/* ============================================
   SoulCommons（虾才市场）— Design System CSS
   ============================================ */

/* --- CSS Variables --- */
:root {
  /* Background */
  --bg-deepest: #0A0B0F;
  --bg-surface: #12131A;
  --bg-elevated: #1A1B26;
  --bg-hover: #22243A;

  /* Brand */
  --claw-500: #E8453C;
  --claw-400: #F06550;
  --claw-600: #C43530;
  --arena-orange: #FF8C42;

  /* Functional */
  --trust-green: #2DD4A8;
  --trust-green-bg: #0D2D24;
  --warning-amber: #FBBF24;
  --warning-bg: #2D2510;
  --danger-red: #EF4444;
  --danger-bg: #2D1010;
  --info-blue: #60A5FA;
  --info-bg: #0D1A2D;
  --arena-purple: #A78BFA;

  /* Rank */
  --rank-gold: #FFD700;
  --rank-silver: #C0C0C0;
  --rank-bronze: #CD7F32;

  /* Text */
  --text-primary: #F0F0F5;
  --text-secondary: #9CA3AF;
  --text-tertiary: #6B7280;
  --text-accent: #E8453C;

  /* Border */
  --border-default: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transition */
  --transition-fast: 150ms ease-out;
  --transition-base: 200ms ease-out;
  --transition-slow: 300ms ease-in-out;

  /* Gradients */
  --gradient-hot: linear-gradient(135deg, #E8453C, #FF8C42);
  --gradient-rank: linear-gradient(180deg, #FFD700, #FF8C42);
  --gradient-trust: linear-gradient(135deg, #2DD4A8, #60A5FA);
  --gradient-arena: linear-gradient(135deg, #1A1B26, #0A0B0F);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  background: var(--bg-deepest);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

input, select {
  font-family: inherit;
  color: inherit;
}

/* --- Typography --- */
.font-mono {
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

.text-hero { font-size: 48px; line-height: 1.15; font-weight: 700; }
.text-h1 { font-size: 32px; line-height: 1.25; font-weight: 700; }
.text-h2 { font-size: 24px; line-height: 1.33; font-weight: 600; }
.text-h3 { font-size: 20px; line-height: 1.4; font-weight: 600; }
.text-h4 { font-size: 16px; line-height: 1.5; font-weight: 600; }
.text-body { font-size: 14px; line-height: 1.57; }
.text-caption { font-size: 12px; line-height: 1.5; }
.text-overline { font-size: 11px; line-height: 1.45; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.text-score-xl { font-size: 56px; font-weight: 700; }
.text-score-lg { font-size: 36px; font-weight: 700; }
.text-score-md { font-size: 24px; font-weight: 700; }
.text-price { font-size: 28px; font-weight: 700; }

/* --- Layout --- */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 80px;
}

.grid { display: grid; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.gap-48 { gap: 48px; }

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 11, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-default);
  height: 64px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
}

.nav-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: var(--gradient-hot);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
  padding: 4px 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--claw-500);
  border-radius: 1px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  min-width: 220px;
  transition: border-color var(--transition-fast);
}

.nav-search:focus-within {
  border-color: var(--claw-500);
}

.nav-search input {
  background: none;
  border: none;
  outline: none;
  font-size: 13px;
  width: 100%;
  color: var(--text-primary);
}

.nav-search input::placeholder {
  color: var(--text-tertiary);
}

.nav-search svg {
  width: 16px;
  height: 16px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-hot);
  color: #fff;
  box-shadow: 0 2px 12px rgba(232, 69, 60, 0.3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(232, 69, 60, 0.4);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-hover);
}
.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: rgba(255,255,255,0.2);
}

.btn-ghost {
  color: var(--text-secondary);
  padding: 8px 12px;
}
.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}

.btn-outline-red {
  border: 1px solid var(--claw-500);
  color: var(--claw-500);
  background: transparent;
}
.btn-outline-red:hover {
  background: rgba(232, 69, 60, 0.1);
}

/* --- Cards --- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition-base);
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.card-clickable {
  cursor: pointer;
}

.card-clickable:hover {
  box-shadow: 0 0 20px rgba(232, 69, 60, 0.08), 0 8px 32px rgba(0,0,0,0.3);
}

/* --- Agent Product Card --- */
.agent-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
}

.agent-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 0 24px rgba(232, 69, 60, 0.08), 0 12px 40px rgba(0,0,0,0.35);
}

.agent-card-live {
  border-color: var(--arena-orange);
}

.agent-card-live::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--arena-orange);
  animation: pulse-border 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulse-border {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.agent-card-header {
  padding: 20px 20px 0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.agent-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.agent-avatar-lg {
  width: 72px;
  height: 72px;
  font-size: 32px;
  border-radius: var(--radius-lg);
}

.agent-info {
  flex: 1;
  min-width: 0;
}

.agent-name {
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-creator {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.agent-card-perf {
  margin: 16px 20px;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
}

.agent-card-perf-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.perf-label {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.perf-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 700;
}

.perf-trend {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.perf-trend.up { color: var(--trust-green); }
.perf-trend.down { color: var(--danger-red); }

.agent-card-tags {
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agent-card-footer {
  padding: 16px 20px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  border-top: 1px solid var(--border-default);
}

.agent-price {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
}

.agent-price .unit {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
}

.agent-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.agent-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* --- Badges / Tags --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-soul {
  background: rgba(167, 139, 250, 0.15);
  color: var(--arena-purple);
}
.badge-skill {
  background: rgba(96, 165, 250, 0.15);
  color: var(--info-blue);
}
.badge-core {
  background: rgba(255, 140, 66, 0.15);
  color: var(--arena-orange);
}
.badge-multi-pack {
  background: rgba(255, 100, 100, 0.18);
  color: #FF6B6B;
}
.badge-memory {
  background: rgba(45, 212, 168, 0.15);
  color: var(--trust-green);
}
.badge-hosted {
  background: rgba(232, 69, 60, 0.15);
  color: var(--claw-400);
}

.badge-verified {
  background: var(--trust-green-bg);
  color: var(--trust-green);
}
.badge-top10 {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 140, 66, 0.2));
  color: var(--rank-gold);
}
.badge-fastest {
  background: rgba(167, 139, 250, 0.15);
  color: var(--arena-purple);
}
.badge-best-value {
  background: var(--trust-green-bg);
  color: var(--trust-green);
}
.badge-rising {
  background: rgba(255, 140, 66, 0.15);
  color: var(--arena-orange);
}
.badge-new {
  background: var(--gradient-hot);
  color: #fff;
}
.badge-live {
  background: var(--danger-red);
  color: #fff;
  animation: pulse-live 2s ease-in-out infinite;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.badge-live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* --- Trust Score --- */
.trust-score {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trust-grade {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.trust-grade-a { background: var(--trust-green-bg); color: var(--trust-green); }
.trust-grade-b { background: var(--info-bg); color: var(--info-blue); }
.trust-grade-c { background: var(--warning-bg); color: var(--warning-amber); }
.trust-grade-d { background: var(--danger-bg); color: var(--danger-red); }

.trust-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--bg-hover);
  overflow: hidden;
  flex: 1;
}

.trust-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--gradient-trust);
  transition: width 1s ease-out;
}

/* --- Battle Card --- */
.battle-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  cursor: pointer;
}

.battle-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.battle-card-header {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-default);
}

.battle-track {
  font-size: 12px;
  color: var(--text-secondary);
}

.battle-card-body {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.battle-agent {
  flex: 1;
  text-align: center;
}

.battle-agent-name {
  font-size: 14px;
  font-weight: 600;
  margin-top: 10px;
}

.battle-agent-elo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.battle-vs {
  font-size: 20px;
  font-weight: 800;
  color: var(--claw-500);
  text-shadow: 0 0 20px rgba(232, 69, 60, 0.3);
  flex-shrink: 0;
}

.battle-vote-bar {
  margin: 0 20px 8px;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-hover);
  overflow: hidden;
  display: flex;
}

.battle-vote-a {
  height: 100%;
  background: var(--claw-500);
  transition: width 0.8s ease-out;
  border-radius: 3px 0 0 3px;
}

.battle-vote-b {
  height: 100%;
  background: var(--info-blue);
  transition: width 0.8s ease-out;
  border-radius: 0 3px 3px 0;
}

.battle-vote-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  font-size: 12px;
  color: var(--text-secondary);
}

.battle-card-footer {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-default);
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 8px;
}

/* --- Leaderboard --- */
.leaderboard-row {
  display: grid;
  grid-template-columns: 50px 48px 1fr 120px 100px 80px 100px;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-default);
  transition: background var(--transition-fast);
  cursor: pointer;
}

.leaderboard-row:hover {
  background: var(--bg-hover);
}

.leaderboard-rank {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

.leaderboard-rank.gold { color: var(--rank-gold); }
.leaderboard-rank.silver { color: var(--rank-silver); }
.leaderboard-rank.bronze { color: var(--rank-bronze); }

.leaderboard-info {
  min-width: 0;
}

.leaderboard-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-creator {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.leaderboard-elo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
}

.leaderboard-winrate {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--text-secondary);
}

.leaderboard-change {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.leaderboard-change.up { color: var(--trust-green); }
.leaderboard-change.down { color: var(--danger-red); }
.leaderboard-change.neutral { color: var(--text-tertiary); }

.leaderboard-header {
  display: grid;
  grid-template-columns: 50px 48px 1fr 120px 100px 80px 100px;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-default);
  background: var(--bg-elevated);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* --- Section --- */
.section {
  padding: 64px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-link {
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition-fast);
}

.section-link:hover {
  color: var(--claw-500);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 64px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(232, 69, 60, 0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 60%, rgba(255, 140, 66, 0.05) 0%, transparent 50%),
              var(--bg-deepest);
}

.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(232, 69, 60, 0.3);
  border-radius: 50%;
  animation: float-particle linear infinite;
}

@keyframes float-particle {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100vh) translateX(50px); opacity: 0; }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.hero-title {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-title .highlight {
  background: var(--gradient-hot);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
}

.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 56px;
}

.hero-stat {
  text-align: left;
}

.hero-stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 32px;
  font-weight: 700;
}

.hero-stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* --- Track Entry Cards --- */
.track-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.track-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.track-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.track-card.coding::before { background: var(--info-blue); }
.track-card.research::before { background: var(--trust-green); }
.track-card.structured::before { background: var(--arena-orange); }
.track-card.persona::before { background: var(--arena-purple); }

.track-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}

.track-card.coding .track-icon { background: var(--info-bg); }
.track-card.research .track-icon { background: var(--trust-green-bg); }
.track-card.structured .track-icon { background: var(--warning-bg); }
.track-card.persona .track-icon { background: rgba(167, 139, 250, 0.1); }

.track-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.track-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.track-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.track-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* --- Tabs --- */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
}

.tab {
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.tab:hover {
  color: var(--text-primary);
}

.tab.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* --- Filters --- */
.filter-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.filter-group {
  margin-bottom: 24px;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 12px;
  font-weight: 600;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
}

.filter-chip:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.filter-chip.active {
  background: rgba(232, 69, 60, 0.1);
  border-color: var(--claw-500);
  color: var(--claw-500);
}

/* --- Search Bar (Market) --- */
.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 24px;
  transition: border-color var(--transition-fast);
}

.search-bar:focus-within {
  border-color: var(--claw-500);
}

.search-bar input {
  background: none;
  border: none;
  outline: none;
  font-size: 15px;
  width: 100%;
  color: var(--text-primary);
}

.search-bar input::placeholder {
  color: var(--text-tertiary);
}

/* --- Product Detail --- */
.detail-hero {
  padding-top: 96px;
  padding-bottom: 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  align-items: start;
}

.detail-main {
  min-width: 0;
}

.detail-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.detail-title {
  font-size: 28px;
  font-weight: 700;
}

.detail-tagline {
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.6;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.detail-sidebar {
  position: sticky;
  top: 88px;
}

.detail-price-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.detail-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 4px;
}

.detail-price .unit {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
}

.detail-price-suggest {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 20px;
}

.detail-delivery-options {
  margin-bottom: 20px;
}

.delivery-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 14px;
}

.delivery-option:hover {
  border-color: var(--border-hover);
}

.delivery-option.active {
  border-color: var(--claw-500);
  background: rgba(232, 69, 60, 0.05);
}

.delivery-option-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.delivery-option.active .delivery-option-radio {
  border-color: var(--claw-500);
}

.delivery-option.active .delivery-option-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--claw-500);
}

.delivery-option-price {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--text-secondary);
}

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.detail-security {
  padding-top: 20px;
  border-top: 1px solid var(--border-default);
}

.security-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.security-item svg {
  color: var(--trust-green);
  flex-shrink: 0;
}

/* --- Tab Content --- */
.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-default);
  margin-bottom: 32px;
  margin-top: 40px;
}

.tab-nav-item {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab-nav-item:hover {
  color: var(--text-primary);
}

.tab-nav-item.active {
  color: var(--text-primary);
  border-bottom-color: var(--claw-500);
}

/* --- Performance Card (Detail) --- */
.perf-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.perf-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 28px;
}

.perf-card-item {
  text-align: center;
}

.perf-card-item-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.perf-card-item-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 700;
}

.perf-card-item-sub {
  font-size: 12px;
  margin-top: 4px;
}

/* Radar Chart Placeholder */
.radar-chart {
  width: 200px;
  height: 200px;
  margin: 0 auto;
  position: relative;
}

/* Recent Record */
.recent-record {
  display: flex;
  gap: 6px;
  margin-top: 20px;
  justify-content: center;
}

.record-dot {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.record-dot.win { background: var(--trust-green-bg); color: var(--trust-green); }
.record-dot.loss { background: var(--danger-bg); color: var(--danger-red); }

/* --- Battle Replay Page --- */
.battle-replay-header {
  text-align: center;
  padding: 32px 0;
}

.battle-replay-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  margin: 24px 0 32px;
}

.battle-replay-agent {
  text-align: center;
}

.battle-replay-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 400px;
  margin-bottom: 32px;
}

.replay-panel {
  background: var(--bg-surface);
  padding: 24px;
}

.replay-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-default);
}

.replay-output {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

.replay-output .code-block {
  background: var(--bg-deepest);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 8px 0;
  border-left: 3px solid var(--info-blue);
}

/* --- Vote Panel --- */
.vote-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.vote-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.vote-option:hover {
  border-color: var(--border-hover);
  background: var(--bg-hover);
}

.vote-option.selected {
  border-color: var(--claw-500);
  background: rgba(232, 69, 60, 0.05);
}

/* --- Scroll Container --- */
.scroll-x {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-hover) transparent;
}

.scroll-x::-webkit-scrollbar {
  height: 4px;
}

.scroll-x::-webkit-scrollbar-track {
  background: transparent;
}

.scroll-x::-webkit-scrollbar-thumb {
  background: var(--bg-hover);
  border-radius: 2px;
}

/* --- Footer --- */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-default);
  padding: 48px 0;
  margin-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 12px;
  line-height: 1.7;
}

.footer-col-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-default);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* --- Utility --- */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-accent { color: var(--text-accent); }

/* --- Responsive --- */
@media (max-width: 1200px) {
  .container { padding: 0 40px; }
  .leaderboard-row { grid-template-columns: 40px 40px 1fr 100px 80px 80px 80px; gap: 12px; }
  .leaderboard-header { grid-template-columns: 40px 40px 1fr 100px 80px 80px 80px; gap: 12px; }
}

@media (max-width: 1024px) {
  .container { padding: 0 24px; }
  .hero-title { font-size: 40px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .battle-replay-area { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hero-title { font-size: 32px; }
  .hero-stats { gap: 24px; }
  .hero-stat-value { font-size: 24px; }
  .nav-links { display: none; }
  .nav-search { min-width: 160px; }
  .perf-card-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .leaderboard-row { grid-template-columns: 36px 36px 1fr 80px 70px; }
  .leaderboard-row > *:nth-child(6),
  .leaderboard-row > *:nth-child(7) { display: none; }
  .leaderboard-header { grid-template-columns: 36px 36px 1fr 80px 70px; }
  .leaderboard-header > *:nth-child(6),
  .leaderboard-header > *:nth-child(7) { display: none; }
  .hero-actions { flex-direction: column; }
  .battle-replay-vs { gap: 24px; }
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.5s ease-out both;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* --- Radar Chart (SVG-based) --- */
.radar-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
}

/* --- Star Rating --- */
.star-rating {
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--rank-gold);
  font-size: 14px;
}

.star-rating .count {
  color: var(--text-secondary);
  font-size: 13px;
  margin-left: 6px;
}

/* --- Mobile Nav --- */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 11, 15, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-default);
  padding: 8px 0 env(safe-area-inset-bottom, 8px);
}

.mobile-nav-inner {
  display: flex;
  justify-content: space-around;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 10px;
  color: var(--text-tertiary);
  transition: color var(--transition-fast);
}

.mobile-nav-item.active {
  color: var(--claw-500);
}

.mobile-nav-item svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 768px) {
  .mobile-nav { display: block; }
  body { padding-bottom: 72px; }
}

/* --- Loading skeleton --- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-hover) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- Tooltip --- */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  color: var(--text-primary);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.tooltip:hover::after {
  opacity: 1;
}
