:root {
  --bg: #0a0e1a;
  --bg-card: #111827;
  --bg-card-hover: #1a2235;
  --border: #1e2d45;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #00d4aa;
  --accent-glow: rgba(0, 212, 170, 0.25);
  --home: #3b82f6;
  --draw: #f59e0b;
  --away: #ef4444;
  --high: #22c55e;
  --medium: #f59e0b;
  --low: #64748b;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 170, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 170, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
}

.logo-icon { font-size: 1.4rem; }

.logo-text {
  background: linear-gradient(135deg, var(--accent), #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.live-badge {
  font-size: 0.6rem;
  background: #ef4444;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.6} }

nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text); padding: 6px 10px; border-radius: 6px; cursor: pointer; }

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent);
  background: var(--accent-glow);
}

/* Main */
.main-content {
  flex: 1;
  position: relative;
  z-index: 1;
  padding: 40px 20px 60px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 48px 0 56px;
}

.hero-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  background: var(--accent-glow);
  border: 1px solid rgba(0, 212, 170, 0.3);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, #fff 30%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--text-muted);
  margin-bottom: 16px;
}

.hero-desc {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 32px;
  font-size: 0.95rem;
}

.hero-desc strong { color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #059669);
  color: #0a0e1a;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px var(--accent-glow);
}

.btn-lg { padding: 14px 36px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: rgba(0, 212, 170, 0.3);
  transform: translateY(-2px);
}

.feature-card.highlight {
  border-color: rgba(0, 212, 170, 0.4);
  background: linear-gradient(135deg, var(--bg-card), rgba(0, 212, 170, 0.05));
}

.feature-icon { font-size: 1.6rem; margin-bottom: 10px; }

.feature-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--accent);
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.feature-card strong { color: var(--text); }

/* Undeveloped / research feature cards */
.undeveloped-section {
  margin-bottom: 32px;
}

.undeveloped-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.score-input {
  width: 64px;
  padding: 6px 8px;
  font-size: 0.9rem;
}

.status-select {
  min-width: 110px;
  padding: 6px 8px;
  font-size: 0.82rem;
}

.save-msg {
  display: block;
  font-size: 0.75rem;
  margin-top: 4px;
}

.eval-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 1.5rem;
}

.eval-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.eval-stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.eval-stat-value {
  display: block;
  font-size: 1.6rem;
  color: var(--accent);
}

.eval-table th,
.eval-table td {
  padding: 8px 12px;
  font-size: 0.88rem;
}

.eval-row-active td {
  background: rgba(0, 212, 170, 0.06);
}

.section-sub-muted {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.feature-card-research {
  max-width: 480px;
  border-color: rgba(148, 163, 184, 0.25);
  background: rgba(30, 41, 59, 0.35);
  opacity: 0.92;
}

.feature-card-research:hover {
  border-color: rgba(148, 163, 184, 0.4);
  transform: none;
}

.research-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tag-research {
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.feature-card-research .research-title {
  color: #94a3b8;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.feature-card-research .research-subtitle {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 10px;
}

.feature-card-research .research-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.btn-research {
  display: inline-block;
  padding: 8px 16px;
  font-size: 0.85rem;
  color: #94a3b8;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.btn-research:hover {
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.55);
}

.nav-link-muted {
  color: var(--text-muted) !important;
  font-size: 0.9em;
}

.nav-link-muted:hover,
.nav-link-muted.active {
  color: #94a3b8 !important;
}

.research-banner {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
  line-height: 1.5;
  max-width: 720px;
}

/* Predict page */
.page-title {
  font-size: clamp(1.6rem, 4vw, 2rem);
  margin-bottom: 8px;
}

.page-desc {
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 0.9rem;
}

.predict-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.form-group input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Error */
.error-box {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: #fca5a5;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

/* Result panel */
.result-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  animation: fadeIn 0.4s ease;
}

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

.result-title {
  text-align: center;
  font-size: 1.3rem;
  margin-bottom: 24px;
  color: var(--text);
}

/* Probability bars */
.prob-bars { margin-bottom: 28px; }

.prob-row { margin-bottom: 16px; }

.prob-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.88rem;
}

.prob-name { font-weight: 600; }
.home-color { color: var(--home); }
.draw-color { color: var(--draw); }
.away-color { color: var(--away); }

.prob-value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.prob-track {
  height: 10px;
  background: var(--bg);
  border-radius: 6px;
  overflow: hidden;
}

.prob-fill {
  height: 100%;
  border-radius: 6px;
  width: 0;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.home-fill { background: linear-gradient(90deg, var(--home), #60a5fa); }
.draw-fill { background: linear-gradient(90deg, var(--draw), #fbbf24); }
.away-fill { background: linear-gradient(90deg, var(--away), #f87171); }

/* Result grid */
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.result-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}

.result-item.full { grid-column: 1 / -1; }

.result-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.result-value {
  font-size: 1.1rem;
  font-weight: 700;
}

.prediction-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 6px;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 1rem;
}

.confidence-badge.HIGH { color: var(--high); }
.confidence-badge.MEDIUM { color: var(--medium); }
.confidence-badge.LOW { color: var(--low); }

.edge-value.positive { color: var(--high); }
.edge-value.negative { color: var(--away); }

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  background: rgba(10, 14, 26, 0.95);
  padding: 20px 0;
  margin-top: auto;
}

.disclaimer {
  text-align: center;
  color: #f59e0b;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.copyright {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Tables */
.table-wrap { overflow-x: auto; margin-top: 16px; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.data-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table tr:hover td { background: var(--bg-card-hover); }

/* Round1 predictions table */
.round1-container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.research-mode-note {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.page-disclaimer {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.tendency-label,
.risk-label {
  font-size: 0.82rem;
  white-space: nowrap;
}

.tendency-focus { color: #34d399; }
.tendency-small { color: #fbbf24; }
.tendency-watch { color: #94a3b8; }
.tendency-skip { color: #f87171; }

.risk-mid { color: #fbbf24; }
.risk-mid-high { color: #fb923c; }
.risk-high { color: #f87171; }

.round1-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.round1-table th,
.round1-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.round1-table .col-match {
  white-space: normal;
  min-width: 120px;
  max-width: 200px;
}

.round1-table .col-kickoff {
  min-width: 108px;
}

.round1-table .col-odds {
  min-width: 150px;
}

.round1-table .col-scores {
  white-space: normal;
  min-width: 140px;
  max-width: 220px;
  font-size: 0.78rem;
  line-height: 1.35;
}

.round1-table .col-result-score {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.round1-container .tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}
.round1-container .tag-status-finished {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
}
.round1-container .tag-pending {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.round1-container .tag-hit {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.35);
}
.round1-container .tag-miss {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.round1-container .tag-result {
  background: rgba(125, 211, 252, 0.12);
  color: #bae6fd;
  border: 1px solid rgba(125, 211, 252, 0.28);
}
.round1-container .tag-upset,
.tag-upset {
  background: rgba(251, 146, 60, 0.18);
  color: #fdba74;
  border: 1px solid rgba(251, 146, 60, 0.35);
}
.round1-container .tag-neutral,
.tag-neutral {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.upset-report-card {
  margin: 1.25rem 0 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(251, 146, 60, 0.25);
  border-radius: 12px;
  background: rgba(251, 146, 60, 0.06);
}
.upset-report-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.upset-report-head .section-sub { margin: 0; }
.upset-report-badge {
  font-size: 0.75rem;
  color: #fdba74;
  border: 1px solid rgba(251, 146, 60, 0.35);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}
.upset-report-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.upset-metric {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.15);
}
.upset-metric span { display: block; font-size: 0.75rem; color: #94a3b8; }
.upset-metric strong { display: block; font-size: 1.25rem; margin-top: 0.15rem; }
.upset-metric em { font-size: 0.72rem; color: #64748b; font-style: normal; }
.upset-reason-list { margin: 0.5rem 0; padding-left: 1.2rem; color: #cbd5e1; }
.upset-advice { margin: 0.5rem 0 0; color: #e2e8f0; font-size: 0.9rem; }
.upset-list-details summary { cursor: pointer; color: #fdba74; margin-top: 0.5rem; }
.upset-list { margin: 0.5rem 0 0; padding-left: 1.2rem; color: #cbd5e1; font-size: 0.88rem; }

.tuning-advice-card {
  margin: 1.25rem 0 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.06);
}
.tuning-advice-detail {
  border-color: rgba(167, 139, 250, 0.25);
  background: rgba(139, 92, 246, 0.06);
}
.tuning-advice-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.tuning-advice-head .section-sub { margin: 0; }
.tuning-summary-metrics { margin-bottom: 0.5rem; }
.tuning-tendency {
  margin: 0;
  color: #e2e8f0;
  font-size: 0.92rem;
  line-height: 1.5;
}
.tuning-tendency-meta {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: #94a3b8;
}
.tuning-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.tuning-block h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: #bfdbfe;
}
.tuning-list {
  margin: 0;
  padding-left: 1.15rem;
  color: #cbd5e1;
  font-size: 0.88rem;
  line-height: 1.55;
}
.tuning-list li + li { margin-top: 0.35rem; }
.tuning-disclaimer {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  color: #64748b;
}

/* Shared accordion (round1 dashboard + results tuning advice) */
.wc-accordion-group { display: flex; flex-direction: column; gap: 0.65rem; margin-bottom: 1.75rem; }
.wc-accordion-item {
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.wc-accordion-item summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: #e2e8f0;
}
.wc-accordion-item summary::-webkit-details-marker { display: none; }
.wc-accordion-item summary::after { content: "+"; font-size: 1.1rem; color: #64748b; }
.wc-accordion-item[open] summary::after { content: "−"; color: #6ee7b7; }
.wc-accordion-hint { font-size: 0.78rem; font-weight: 400; color: #64748b; }
.wc-accordion-body { padding: 0 1.25rem 1.15rem; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.upset-report-compact {
  border-color: rgba(251, 146, 60, 0.2);
  background: rgba(251, 146, 60, 0.04);
}

.round1-table .odds-inline {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.text-ellipsis {
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-detail {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--accent);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  cursor: pointer;
  white-space: nowrap;
}

.btn-detail:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
}

.round1-detail-row td {
  background: rgba(0, 212, 170, 0.04);
  padding: 0 !important;
  white-space: normal;
}

.round1-detail-panel {
  padding: 12px 16px;
  font-size: 0.8rem;
  line-height: 1.5;
}

.round1-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 16px;
}

.round1-detail-grid .detail-wide {
  grid-column: 1 / -1;
  word-break: break-word;
  white-space: normal;
}

.detail-label {
  display: inline-block;
  min-width: 6.5em;
  color: var(--text-muted);
  margin-right: 6px;
}

.status-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  background: rgba(100, 116, 139, 0.2);
  color: var(--text);
}

.round1-cards {
  display: none;
  gap: 12px;
  margin-top: 16px;
}

.round1-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.round1-card-head {
  margin-bottom: 10px;
}

.round1-card-kickoff {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.round1-card-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
  padding: 4px 0;
  border-bottom: 1px solid rgba(30, 45, 69, 0.5);
}

.round1-card-row span {
  color: var(--text-muted);
  flex-shrink: 0;
}

.round1-card-details {
  margin-top: 10px;
  font-size: 0.8rem;
}

.round1-card-details summary {
  cursor: pointer;
  color: var(--accent);
}

@media (max-width: 900px) {
  .round1-table-wrap { display: none; }
  .round1-cards { display: grid; }
}

.hit-yes { color: var(--high); font-weight: 700; }
.hit-no { color: var(--away); font-weight: 700; }
.profit-pos { color: var(--high); font-weight: 600; }
.profit-neg { color: var(--away); font-weight: 600; }

/* Stats */
.stats-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.stat-card h3 {
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stat-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 700;
}

.board-section { margin-bottom: 32px; }
.board-title { font-size: 1.1rem; margin-bottom: 12px; color: var(--text); }

.dash-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.dash-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.dash-stat span { display: block; font-size: 0.75rem; color: var(--text-muted); }
.dash-stat strong { font-size: 1.5rem; color: var(--accent); }
.section-sub { font-size: 1rem; color: var(--text-muted); margin: 24px 0 12px; }
.status-scheduled { color: var(--medium); }
.status-finished { color: var(--high); }
.status-live { color: #ef4444; font-weight: 700; }

.log-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font-size: 0.75rem;
  overflow-x: auto;
  margin-bottom: 12px;
  color: var(--text-muted);
}
.dash-stat .ok { color: var(--high); }
.dash-stat .fail { color: var(--away); }

.team-en {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.3;
}
.team-zh-match { line-height: 1.4; }

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 0 12px;
  line-height: 1.5;
}
.form-hint-block {
  margin-bottom: 16px;
  padding: 10px 12px;
  background: rgba(0, 212, 170, 0.08);
  border: 1px solid rgba(0, 212, 170, 0.2);
  border-radius: 8px;
  color: var(--text);
}
.params-warning {
  margin-bottom: 16px;
  padding: 12px 14px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  color: #fbbf24;
  font-size: 0.88rem;
  line-height: 1.5;
}

/* Mobile */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  nav { display: none; position: absolute; top: 60px; left: 0; right: 0; background: rgba(10,14,26,0.98); flex-direction: column; padding: 12px 20px; border-bottom: 1px solid var(--border); }
  nav.open { display: flex; }
  .header-inner { position: relative; }
}
@media (max-width: 600px) {
  .main-content { padding: 24px 16px 40px; }
  .predict-form { padding: 20px 16px; }
  .result-panel { padding: 20px 16px; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: 32px 0 40px; }
}

/* 球队球员信息 / 阵容情报卡片 */
.player-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.player-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.player-info-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.player-info-badge {
  font-size: 0.68rem;
  color: var(--text-muted);
  background: rgba(0, 212, 170, 0.1);
  border: 1px solid rgba(0, 212, 170, 0.25);
  border-radius: 4px;
  padding: 2px 6px;
  white-space: nowrap;
}
.player-info-body { display: grid; gap: 6px; }
.player-info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  line-height: 1.45;
}
.player-info-row span {
  color: var(--text-muted);
  flex-shrink: 0;
}
.player-info-empty {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}
.player-info-conflict span:last-child {
  color: #fbbf24;
}
.player-info-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.35rem 0 0.5rem;
  line-height: 1.45;
}

.handicap-minus2-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.handicap-minus2-card {
  background: var(--card-bg, rgba(255,255,255,0.03));
  border: 1px solid rgba(0, 212, 170, 0.25);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}
.handicap-minus2-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  font-size: 0.95rem;
}
.handicap-minus2-badge {
  font-size: 0.72rem;
  color: #7dd3fc;
  white-space: nowrap;
}
.handicap-minus2-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
  padding: 0.2rem 0;
  border-bottom: 1px dashed rgba(255,255,255,0.06);
}
.handicap-minus2-row span:first-child {
  color: var(--text-muted);
  flex-shrink: 0;
}
.handicap-minus2-row span:last-child {
  text-align: right;
}
.handicap-minus2-empty {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* 让球 -2 看板页面 + round1 入口卡片 */
.handicap-entry-card {
  margin-top: 2rem;
  padding: 1.35rem 1.5rem;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.55));
  border: 1px solid rgba(0, 212, 170, 0.22);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.handicap-entry-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.handicap-entry-title {
  margin: 0 0 0.25rem;
  font-size: 1.2rem;
  color: #e2e8f0;
}
.handicap-entry-desc {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.handicap-entry-badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.12);
  color: #7dd3fc;
  border: 1px solid rgba(125, 211, 252, 0.25);
}
.handicap-entry-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}
.handicap-entry-metric {
  padding: 0.65rem 0.75rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}
.handicap-entry-metric span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.handicap-entry-metric strong {
  font-size: 1.15rem;
  color: #6ee7b7;
  font-weight: 700;
}
.handicap-entry-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
  background: linear-gradient(135deg, #00d4aa, #34d399);
  border-radius: 999px;
  text-decoration: none;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.handicap-entry-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 212, 170, 0.35);
  color: #0f172a;
}

.handicap-page {
  padding-bottom: 2rem;
}
.handicap-hero {
  margin-bottom: 1.5rem;
}
.handicap-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: #7dd3fc;
  text-decoration: none;
  margin-bottom: 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.25);
  background: rgba(125, 211, 252, 0.08);
  transition: background 0.15s, border-color 0.15s;
}
.handicap-back:hover {
  background: rgba(125, 211, 252, 0.15);
  border-color: rgba(125, 211, 252, 0.4);
  color: #bae6fd;
}
.handicap-hero-badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 212, 170, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(0, 212, 170, 0.28);
  margin-bottom: 0.65rem;
}
.handicap-hero-title {
  margin: 0 0 0.4rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.02em;
}
.handicap-hero-sub {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 640px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.stat-card {
  padding: 1rem 1.15rem;
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.75));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.stat-card-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
  letter-spacing: 0.04em;
}
.stat-card-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.1;
}
.stat-card-value-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fde047;
}
.stat-card-unit {
  font-size: 0.95rem;
  font-weight: 600;
  color: #94a3b8;
  margin-left: 0.15rem;
}

.handicap-filters {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.15rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
}
.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
}
.filter-group-label {
  font-size: 0.8rem;
  color: #94a3b8;
  min-width: 2.8rem;
  font-weight: 600;
}
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  flex: 1;
}
.filter-chip {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  font-family: inherit;
  line-height: 1.3;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.65);
  color: #cbd5e1;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.filter-chip:hover {
  border-color: rgba(0, 212, 170, 0.4);
  color: #e2e8f0;
  background: rgba(0, 212, 170, 0.08);
}
.filter-chip.active {
  background: rgba(0, 212, 170, 0.18);
  border-color: rgba(0, 212, 170, 0.55);
  color: #6ee7b7;
  box-shadow: 0 0 0 1px rgba(0, 212, 170, 0.15);
  font-weight: 600;
}

.data-panel {
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.7));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}
.data-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.22);
}
.data-panel-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #e2e8f0;
}
.data-panel-count {
  font-size: 0.82rem;
  color: #94a3b8;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.data-panel-body {
  padding: 0;
}
.data-panel-foot {
  padding: 0.65rem 1.15rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.15);
}

.handicap-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.handicap-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
}
.handicap-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.7rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  text-align: center;
  background: #0f172a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}
.handicap-table tbody td {
  padding: 0.65rem 0.65rem;
  font-size: 0.84rem;
  color: #e2e8f0;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}
.handicap-table tbody tr:hover {
  background: rgba(0, 212, 170, 0.06);
}
.handicap-table .col-match {
  text-align: left;
  min-width: 130px;
  font-weight: 600;
  color: #f1f5f9;
}
.handicap-table .col-time {
  white-space: nowrap;
  color: #94a3b8;
  font-size: 0.8rem;
}
.handicap-table .col-prob {
  font-variant-numeric: tabular-nums;
}
.handicap-table .prob-max {
  font-weight: 800;
  color: #6ee7b7;
}
.handicap-table .col-result {
  white-space: nowrap;
}
.result-score {
  font-weight: 700;
  color: #f1f5f9;
}
.result-sep {
  margin: 0 0.2rem;
  color: #64748b;
}

.tag {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}
.tag-home {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.tag-draw {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.tag-away {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
}
.tag-skip {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.tag-high {
  background: rgba(0, 212, 170, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(0, 212, 170, 0.4);
}
.tag-mid {
  background: rgba(125, 211, 252, 0.15);
  color: #7dd3fc;
  border: 1px solid rgba(125, 211, 252, 0.3);
}
.tag-low {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.35);
}
.tag-hit {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.35);
}
.tag-miss {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.tag-pending {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.tag-status-active {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.tag-status-skip {
  background: rgba(100, 116, 139, 0.18);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}
.tag-status-settled {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.tag-status-pending {
  background: rgba(234, 179, 8, 0.15);
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.reason-cell {
  max-width: 220px;
  min-width: 160px;
  white-space: normal;
  word-break: break-word;
  text-align: left;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #94a3b8;
}

.handicap-empty-state {
  margin: 2rem 0;
  padding: 2rem 1.5rem;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.2);
}
.handicap-empty-filter {
  padding: 1rem 1.15rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
  text-align: center;
}
.handicap-disclaimer {
  margin-top: 1.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .handicap-entry-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .handicap-hero-title {
    font-size: 1.45rem;
  }
  .stat-card-value {
    font-size: 1.5rem;
  }
  .filter-group {
    flex-direction: column;
    align-items: flex-start;
  }
  .filter-chips {
    width: 100%;
  }
  .handicap-entry-head {
    flex-direction: column;
  }
}

.betting-sim-page .betting-sim-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.betting-sim-card {
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: 12px;
  padding: 1rem 1.1rem;
  background: rgba(255,255,255,.02);
}
.betting-sim-card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}
.betting-sim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .75rem;
  margin-bottom: .75rem;
}
.betting-strategy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: .75rem;
}
.betting-strategy-box {
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  padding: .75rem;
}
.betting-strategy-box.is-recommended {
  border-color: rgba(96, 165, 250, .45);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, .15);
}
.betting-sim-tags {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
  align-items: flex-start;
}
.betting-conclusion-card {
  border: 1px solid rgba(251, 191, 36, .25);
  background: rgba(251, 191, 36, .06);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.betting-conclusion-list {
  margin: .5rem 0;
  padding-left: 1.2rem;
}
.betting-mode-tabs {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .5rem;
}
.betting-mode-tab {
  padding: .45rem .85rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  text-decoration: none;
  color: inherit;
  font-size: .92rem;
}
.betting-mode-tab.is-active {
  border-color: rgba(96, 165, 250, .55);
  background: rgba(96, 165, 250, .12);
}
.betting-mode-desc {
  margin-bottom: 1rem;
}
.betting-card-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: .5rem;
  margin-bottom: .75rem;
  padding: .65rem .75rem;
  border-radius: 10px;
  background: rgba(255,255,255,.03);
}
.betting-card-summary span {
  display: block;
  font-size: .78rem;
  opacity: .75;
}
.betting-compare-table-wrap {
  margin: .75rem 0;
  overflow-x: auto;
}
.betting-compare-table {
  font-size: .88rem;
}
.betting-compare-table .is-recommended-row {
  background: rgba(96, 165, 250, .08);
}
.betting-backtest-line {
  margin-top: .65rem;
  padding-top: .65rem;
  border-top: 1px dashed rgba(255,255,255,.08);
}
.monte-prob-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .65rem;
  margin: .75rem 0;
}
.mc-score-list {
  margin: .25rem 0 0;
  padding-left: 1rem;
  font-size: .88rem;
}
