/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0d1f0d;
  color: #e2e8f0;
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* === Header === */
/* === Header Wrap (sticky) === */
.header-wrap {
  position: sticky;
  top: 0;
  z-index: 100;
}

.header {
  position: relative;
  background: #0a1a0a;
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  border-bottom: 2px solid rgba(255, 215, 0, 0.4);
}
/* 动态光扫 */
.header::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,215,0,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(46,139,87,0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(255,215,0,0.08) 0%, transparent 40%);
  animation: headerLightSweep 8s ease-in-out infinite;
  pointer-events: none;
}
/* 第二道光束 */
.header::after {
  content: '';
  position: absolute;
  top: -100%; right: -30%;
  width: 80%; height: 300%;
  background: linear-gradient(105deg,
    transparent 40%,
    rgba(255,215,0,0.06) 45%,
    rgba(255,215,0,0.12) 50%,
    rgba(255,215,0,0.06) 55%,
    transparent 60%
  );
  animation: headerBeam 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes headerLightSweep {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(3%, -2%) rotate(1deg); }
  50% { transform: translate(-2%, 3%) rotate(-1deg); }
  75% { transform: translate(1%, -1%) rotate(0.5deg); }
}
@keyframes headerBeam {
  0%, 100% { transform: translateX(0) skewX(-15deg); opacity: 0.6; }
  50% { transform: translateX(60%) skewX(-15deg); opacity: 1; }
}
/* 浮动粒子 - 全页面 */
.header-particles {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}
.header-left {
  text-align: center;
}
.header-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.header-logo {
  height: 36px;
  width: auto;
  border-radius: 4px;
}
.header-left h1 {
  font-size: 1.5rem;
  color: #ffd700;
  letter-spacing: 3px;
  text-shadow: 0 0 30px rgba(255,215,0,0.3);
  position: relative;
  z-index: 1;
}
.header-left .subtitle {
  font-size: 0.8rem;
  color: #86efac;
  margin-top: 2px;
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
}
.header-right {
  position: absolute;
  top: 16px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1;
}
.header select {
  background: rgba(0,0,0,0.4);
  color: #ffd700;
  border: 1px solid rgba(255,215,0,0.5);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
}
.lang-toggle {
  display: inline-flex;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,215,0,0.3);
  border-radius: 50px;
  overflow: hidden;
}
.lang-toggle span {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: rgba(255,255,255,0.5);
  transition: all 0.25s;
  letter-spacing: 1px;
  user-select: none;
}
.lang-toggle span.active {
  background: #ffd700;
  color: #0a1a0a;
}
.lang-toggle span:hover:not(.active) {
  color: #ffd700;
}

/* === Tabs === */
.tabs {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: #0a2816;
  position: relative;
  z-index: 1;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 1 1 0;
  min-width: 80px;
  white-space: nowrap;
  text-align: center;
  padding: 10px 10px;
  cursor: pointer;
  font-weight: 600;
  color: #5a9e72;
  border-radius: 6px;
  transition: all 0.25s;
  font-size: 0.9rem;
}
.tab:hover { color: #ffd700; background: rgba(255, 215, 0, 0.05); }
.tab.active {
  color: #1a472a;
  background: linear-gradient(135deg, #ffd700, #e6a800);
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.15);
}

/* === Content === */
.content { max-width: 1100px; margin: 0 auto; padding: 20px; position: relative; z-index: 2; }
#lottery-content { padding-bottom: 100px; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* === Filters === */
.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.filters select {
  background: #0d3320;
  color: #e2e8f0;
  border: 1px solid #2d8a4e;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* === Date Group === */
.date-group { margin-bottom: 28px; }
.date-header {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffd700;
  padding: 8px 0;
  border-bottom: 1px solid #2d8a4e;
  margin-bottom: 12px;
}
.date-header.today { color: #ff4444; }

/* === Match Card === */
.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}
.match-card {
  background: linear-gradient(135deg, #1a3a1a, #153015);
  border: 1px solid #2d8a4e;
  border-radius: 8px;
  padding: 16px;
  transition: border-color 0.2s;
  position: relative;
}
.match-card:hover { border-color: #ffd700; }
.match-card .match-time {
  font-size: 0.8rem;
  color: #86efac;
  margin-bottom: 8px;
}
.match-card .match-teams {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-top: 20px;
  margin-bottom: 8px;
}
.match-card .team {
  flex: 1;
  text-align: center;
}
.match-card .team .name {
  font-weight: 600;
  font-size: 0.95rem;
  display: block;
  line-height: 1.3;
  word-break: break-word;
}

/* === Flag Images === */
.flag-img { display: block; margin: 0 auto 4px; vertical-align: middle; }
.standings-table .flag-img { display: inline; margin: 0 4px 0 0; vertical-align: middle; }
.match-card .team .flag { font-size: 1.5rem; display: block; margin-bottom: 4px; }
.match-card .flag-img {
  width: 48px !important;
  height: 32px !important;
  margin-bottom: 20px;
}
.match-card .score {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffd700;
  min-width: 60px;
  text-align: center;
  margin-top: 5px;
}
.match-card .score-num { color: #ffd700; }
.match-card .score-tag-pen {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: #f87171;
  margin-top: 1px;
  line-height: 1.2;
}
.match-card .score-tag-et {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: #fbbf24;
  margin-top: 1px;
  line-height: 1.2;
}
.live-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.55rem;
  font-weight: 700;
  color: #fff;
  background: #dc2626;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  animation: live-pulse 1.5s ease-in-out infinite;
  z-index: 1;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.match-card .match-ground {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 8px;
  text-align: center;
}
.match-card .match-round {
  display: inline-block;
  font-size: 0.7rem;
  background: #ffd700;
  color: #1a472a;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 8px;
}

/* === Standings Table === */
.group-title {
  color: #ffd700;
  font-size: 1.1rem;
  margin: 24px 0 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid #2d8a4e;
}
.group-title:first-child { margin-top: 0; }
.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.standings-table th {
  background: #0d3320;
  color: #ffd700;
  padding: 10px 6px;
  text-align: center;
  font-weight: 600;
  border-bottom: 2px solid #ffd700;
  white-space: nowrap;
  font-size: 0.8rem;
}
.standings-table th:first-child { text-align: left; padding-left: 12px; }
.standings-table td {
  padding: 6px 5px;
  text-align: center;
  border-bottom: 1px solid #1a1a3a;
  font-size: 0.85rem;
}
.standings-table td:first-child { text-align: left; padding-left: 12px; font-weight: 600; white-space: nowrap; }
.standings-table tr:hover td { background: rgba(255, 215, 0, 0.05); }
.standings-table tr.qualified td { background: rgba(255, 215, 0, 0.1); }
.standings-table tr.qualified td:first-child { color: #ffd700; }
.qualified-mark { color: #ffd700; font-size: 0.75rem; margin-left: 4px; }

/* === Knockout Bracket === */
#knockout-content { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bracket-v {
  display: flex; align-items: stretch; justify-content: flex-start;
  gap: 0; min-width: 1640px; position: relative;
  padding: 20px 0 30px;
}
.br-half { display: flex; gap: 18px; }
.br-left { justify-content: flex-end; }
.br-right { justify-content: flex-start; }
.br-center {
  display: flex; justify-content: center;
  padding: 0 28px; flex-shrink: 0;
}
.br-vcol { width: 160px; flex-shrink: 0; }
.br-center .br-vcol { width: 200px; }
.br-vslots { position: relative; }
.br-round-title {
  font-size: 0.8rem; color: #ffd700; text-align: center;
  margin-bottom: 12px; padding-bottom: 6px;
  border-bottom: 1px solid #2d8a4e;
}
.br-slot {
  position: absolute; left: 0; right: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 3px 5px;
}
.br-match {
  background: linear-gradient(135deg, #1a3a1a, #153015);
  border: 1px solid #2d8a4e;
  border-radius: 8px; padding: 7px 12px; width: 100%;
  font-size: 0.82rem; position: relative; z-index: 1;
  cursor: pointer; transition: border-color 0.2s;
}
.br-match:hover { border-color: #ffd700; }
.br-match.br-ph { opacity: 0.45; cursor: default; }
.br-team {
  display: flex; align-items: center; gap: 6px; padding: 3px 0;
}
.br-team img.flag-img { width: 22px; height: 14px; flex-shrink: 0; border-radius: 2px; }
.br-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-score { font-weight: 700; color: #ffd700; flex-shrink: 0; font-size: 0.82rem; min-width: 14px; text-align: right; }
.br-winner .br-name { color: #ffd700; }
.br-pen { font-size: 0.62rem; color: #f87171; font-weight: 600; }
.br-et { font-size: 0.62rem; color: #fbbf24; }
.br-lines { pointer-events: none; z-index: 0; }

/* 决赛 & 三四名加大 */
.br-final-slot .br-match,
.br-third-slot .br-match {
  font-size: 0.95rem; padding: 10px 16px;
}
.br-final-slot .br-match {
  font-size: 1.05rem; padding: 12px 18px;
  border-color: #ffd700; border-width: 2px;
  box-shadow: 0 0 12px rgba(255,215,0,0.25);
}
.br-final-slot .br-score { font-size: 1.05rem; }
.br-third-slot .br-score { font-size: 0.95rem; }
.br-final-slot .br-team img.flag-img { width: 28px; height: 20px; }
.br-third-slot .br-team img.flag-img { width: 24px; height: 16px; }

@media (max-width: 768px) {
  .bracket-v { min-width: 1200px; }
  .br-half { gap: 10px; }
  .br-center { padding: 0 14px; }
  .br-vcol { width: 120px; }
  .br-match { font-size: 0.68rem; padding: 5px 8px; }
  .br-score { font-size: 0.72rem; }
  .br-team img.flag-img { width: 16px; height: 11px; }
}

/* === Group Stage Toggle === */
.group-toggle-wrap { margin-bottom: 24px; }
.group-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: #1a3a1a; border: 1px solid #2d8a4e;
  border-radius: 8px; cursor: pointer; font-size: 0.85rem;
  color: #86efac; transition: border-color 0.2s;
}
.group-toggle:hover { border-color: #ffd700; }
.group-toggle .toggle-arrow { transition: transform 0.2s; font-size: 0.7rem; }
.group-toggle.collapsed .toggle-arrow { transform: rotate(-90deg); }
.group-matches.hidden { display: none; }

/* === No Data === */
.no-data { text-align: center; padding: 40px; color: #64748b; font-size: 1rem; }

/* === Spinner === */
.spinner {
  width: 40px; height: 40px;
  border: 3px solid #2d8a4e;
  border-top-color: #ffd700;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === Footer === */
.footer {
  text-align: center;
  padding: 24px;
  color: #64748b;
  font-size: 0.8rem;
  border-top: 1px solid #1a3a1a;
  margin-top: 40px;
  position: relative;
  z-index: 1;
}
.footer a { color: #86efac; }

/* === Champions === */
.champions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.champion-card {
  background: linear-gradient(135deg, #1a3a1a, #153015);
  border: 1px solid #2d8a4e;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  transition: border-color 0.2s;
}
.champion-card:hover {
  border-color: #ffd700;
  transform: translateY(-2px);
}
.champion-year {
  font-size: 0.8rem;
  color: #86efac;
  margin-bottom: 6px;
  letter-spacing: 1px;
  white-space: nowrap;
}
.champion-flag {
  margin-bottom: 8px;
}
.champion-flag .flag-img {
  width: 48px;
  height: 32px;
  border-radius: 3px;
}
.champion-winner {
  color: #ffd700;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 2px;
}
.champion-runner {
  color: #c0c0c0;
  font-size: 0.8rem;
  margin-bottom: 4px;
}
.champion-host {
  color: #64846c;
  font-size: 0.7rem;
}

/* === Lottery === */
.lottery-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: #0d3320;
  border-radius: 8px;
  border: 1px solid #2d8a4e;
  font-size: 0.85rem;
  color: #86efac;
}
.lottery-info .update-time { color: #ffd700; }
.lottery-card {
  background: linear-gradient(135deg, #1a3a1a, #153015);
  border: 1px solid #2d8a4e;
  border-radius: 8px;
  margin-bottom: 16px;
  overflow: hidden;
}
.lottery-card-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid #1a3a1a;
}
.lottery-card-header .match-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.lottery-card-header .match-num {
  font-size: 0.75rem;
  color: #86efac;
  background: #0d3320;
  padding: 2px 8px;
  border-radius: 3px;
}
.lottery-card-header .match-date {
  font-size: 0.75rem;
  color: #64748b;
}
.lottery-card-header .match-teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.lottery-card-header .team-col {
  text-align: center;
  flex: 1;
}
.lottery-card-header .team-col .flag-img {
  width: 40px;
  height: 27px;
  margin-bottom: 4px;
}
.lottery-card-header .team-col .team-name {
  font-weight: 600;
  font-size: 0.9rem;
  display: block;
}
.lottery-card-header .team-col .team-rank {
  font-size: 0.7rem;
  color: #86efac;
}
.lottery-card-header .vs-text {
  color: #ffd700;
  font-weight: 700;
  font-size: 0.85rem;
}
.lottery-pool-tabs {
  display: flex;
  border-bottom: 1px solid #2d8a4e;
}
.lottery-pool-tab {
  flex: 1;
  text-align: center;
  padding: 10px 6px;
  font-size: 0.8rem;
  cursor: pointer;
  color: #5a9e72;
  font-weight: 600;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}
.lottery-pool-tab:hover { color: #ffd700; }
.lottery-pool-tab.active {
  color: #ffd700;
  border-bottom-color: #ffd700;
}
.lottery-odds-row {
  display: grid;
  gap: 8px;
  padding: 12px 16px;
}
.lottery-odds-row.pool-had,
.lottery-odds-row.pool-hhad { grid-template-columns: repeat(3, 1fr); }
.lottery-odds-row.pool-ttg { grid-template-columns: repeat(4, 1fr); }
.lottery-odds-row.pool-hafu { grid-template-columns: repeat(3, 1fr); }
.lottery-odds-row.pool-crs {
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px 12px;
}
.lottery-odds-row.pool-crs .lottery-odds-btn {
  padding: 8px 4px;
}
.lottery-odds-row.pool-crs .odds-label {
  font-size: 0.65rem;
  margin-bottom: 2px;
}
.lottery-odds-row.pool-crs .odds-value {
  font-size: 0.85rem;
}
.lottery-odds-row.pool-crs .crs-other {
  background: #1a3d2a;
  border-color: #4a9a6e;
}
.lottery-odds-row.pool-crs .crs-other .odds-label {
  color: #fbbf24;
}
.lottery-odds-btn {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  background: #0d3320;
  border: 1px solid #2d8a4e;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  color: #e2e8f0;
}
.lottery-odds-btn:hover {
  border-color: #ffd700;
  background: #1a4a2a;
}
.lottery-odds-btn.selected {
  background: linear-gradient(135deg, #ffd700, #e6a800);
  color: #1a472a;
  border-color: #ffd700;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(255,215,0,0.3);
}
.lottery-odds-btn .odds-label {
  font-size: 0.7rem;
  color: #86efac;
  display: block;
  margin-bottom: 4px;
}
.lottery-odds-btn.selected .odds-label { color: #1a472a; }
.lottery-odds-btn .odds-value {
  font-size: 1.1rem;
  font-weight: 700;
}
.lottery-odds-btn .odds-goalline {
  font-size: 0.65rem;
  color: #ffd700;
  display: block;
  margin-top: 2px;
}
.lottery-odds-btn.selected .odds-goalline { color: #1a472a; }
.lottery-no-data {
  text-align: center;
  padding: 20px;
  color: #64748b;
  font-size: 0.85rem;
}
/* Bet bar (fixed bottom) */
.bet-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0d1f0d;
  border-top: 2px solid rgba(45,138,78,0.4);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 50;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.bet-bar.has-selection {
  border-top-color: rgba(255,215,0,0.6);
  box-shadow: 0 -4px 16px rgba(255,215,0,0.08);
}
.bet-bar.has-selection.is-valid {
  border-top-color: rgba(255,215,0,0.9);
}
.bet-bar .bet-selection {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.bet-bar .bet-count {
  font-weight: 700;
  color: #ffd700;
  font-size: 0.9rem;
}
.bet-bar .bet-combined-inline {
  font-size: 0.8rem;
  color: #86efac;
}
.bet-bar .bet-warning {
  color: #ff4444;
  font-size: 0.75rem;
}
.bet-bar .bet-none {
  color: #64748b;
  font-size: 0.85rem;
}
.bet-detail-btn {
  background: linear-gradient(135deg, #ffd700, #e6a800);
  color: #1a472a;
  border: none;
  border-radius: 6px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  margin-left: auto;
}
.bet-detail-btn:hover {
  box-shadow: 0 0 12px rgba(255,215,0,0.3);
}

/* Bet Modal */
.bet-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.bet-modal {
  background: #0d1f0d;
  border: 2px solid rgba(255,215,0,0.4);
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
}
.bet-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #1a3a1a;
  position: sticky;
  top: 0;
  background: #0d1f0d;
  z-index: 1;
}
.bet-modal-title {
  color: #ffd700;
  font-weight: 700;
  font-size: 1rem;
}
.bet-modal-close {
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
}
.bet-modal-close:hover { color: #ffd700; }
.bet-modal-body {
  padding: 12px 20px;
}
.bet-modal-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid #1a3a1a;
}
.bet-modal-match { flex: 1; }
.bet-modal-match .bet-match-name {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: #e2e8f0;
}
.bet-modal-match .bet-match-pool {
  font-size: 0.75rem;
  color: #86efac;
}
.bet-modal-odds {
  color: #ffd700;
  font-weight: 700;
  font-size: 0.95rem;
}
.bet-modal-remove {
  color: #64748b;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px;
}
.bet-modal-remove:hover { color: #ff4444; }
.bet-modal-footer {
  padding: 16px 20px;
  border-top: 1px solid #2d8a4e;
}
.bet-modal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}
.bet-modal-row label {
  color: #86efac;
  font-size: 0.85rem;
}
.bet-multiplier-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}
.bet-multiplier-wrap input {
  width: 60px;
  padding: 8px;
  background: #0d3320;
  border: 1px solid #2d8a4e;
  border-radius: 4px;
  color: #ffd700;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}
.bet-multiplier-wrap input:focus {
  outline: none;
  border-color: #ffd700;
}
.bet-mult-btn {
  background: #0d3320;
  border: 1px solid #2d8a4e;
  color: #ffd700;
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
}
.bet-mult-btn:hover { background: #1a4a2a; }
.bet-modal-combined { color: #86efac; font-size: 0.9rem; }
.bet-modal-combined .combined-odds { color: #ffd700; font-weight: 700; }
.bet-modal-payout { margin-top: 4px; }
.bet-modal-payout span:first-child { color: #86efac; font-size: 0.9rem; }
.bet-modal-payout .payout-amount {
  color: #ffd700;
  font-weight: 700;
  font-size: 1.3rem;
}
.bet-modal-hint { color: #64748b; font-size: 0.7rem; margin-top: 2px; }
.bet-modal-warning {
  color: #ff4444;
  font-size: 0.8rem;
  margin-top: 8px;
  text-align: center;
}
.bet-bar .bet-combo-hint {
  font-size: 0.75rem;
  color: #86efac;
  background: #0d3320;
  padding: 1px 6px;
  border-radius: 3px;
}
.bet-modal-match-group {
  margin-bottom: 12px;
  padding: 10px;
  background: #0d3320;
  border-radius: 8px;
}
.bet-modal-match-group .bet-modal-match-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: #e2e8f0;
  margin-bottom: 6px;
}
.bet-modal-pool-row {
  padding: 4px 0;
}
.bet-modal-match-group .bet-modal-pool-tag {
  font-size: 0.7rem;
  color: #ffd700;
  display: block;
  margin-bottom: 2px;
}
.bet-modal-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}
.bet-modal-item + .bet-modal-item {
  border-top: 1px solid rgba(45,138,78,0.2);
}
.bet-modal-opt-label {
  flex: 1;
  font-size: 0.85rem;
  color: #ffd700;
  font-weight: 600;
}
.bet-modal-payout { margin-top: 6px; }
.payout-range {
  color: #ffd700;
  font-weight: 500;
  font-size: 1rem;
}
.combo-count-val {
  color: #86efac;
  font-size: 0.8rem;
}
.total-cost {
  color: #ffd700;
  font-weight: 700;
  font-size: 1rem;
}
.bet-bar .bet-selection {
  flex: 1;
  min-width: 180px;
  font-size: 0.85rem;
  color: #86efac;
}
.bet-bar .bet-selection .bet-match {
  color: #e2e8f0;
  font-weight: 600;
}
.bet-bar .bet-selection .bet-option {
  color: #ffd700;
}
.bet-bar .bet-selection .bet-none {
  color: #64748b;
}
.bet-bar .bet-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bet-bar .bet-input-group label {
  font-size: 0.8rem;
  color: #86efac;
  white-space: nowrap;
}
.bet-bar .bet-input-group input {
  width: 70px;
  padding: 8px 10px;
  background: #0d3320;
  border: 1px solid #2d8a4e;
  border-radius: 4px;
  color: #ffd700;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}
.bet-bar .bet-input-group input:focus {
  outline: none;
  border-color: #ffd700;
}
.bet-bar .bet-payout {
  font-size: 0.9rem;
  color: #86efac;
  white-space: nowrap;
}
.bet-bar .bet-payout .payout-amount {
  color: #ffd700;
  font-weight: 700;
  font-size: 1.1rem;
}
.bet-bar .bet-selection-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #0d3320;
  border: 1px solid #2d8a4e;
  border-radius: 4px;
  padding: 2px 8px;
  margin-right: 6px;
  margin-bottom: 4px;
}
.bet-bar .bet-remove {
  cursor: pointer;
  color: #64748b;
  font-size: 0.75rem;
  margin-left: 4px;
  padding: 0 2px;
}
.bet-bar .bet-remove:hover { color: #ff4444; }
.bet-bar .bet-combined {
  font-size: 0.85rem;
  margin-top: 4px;
  color: #ffd700;
  font-weight: 600;
}
.bet-bar .bet-combined .combined-odds {
  font-size: 1.05rem;
}
.bet-bar .bet-warning {
  color: #ff4444;
  font-size: 0.75rem;
  margin-top: 4px;
}
/* Pool badge */
.pool-badge {
  font-size: 0.55rem;
  margin-left: 3px;
  vertical-align: middle;
  cursor: help;
}
.pool-badge.single {
  color: #4ade80;
  text-shadow: 0 0 4px rgba(74,222,128,0.5);
}
.pool-badge.parlay {
  color: #fbbf24;
  opacity: 0.7;
}

/* === Analysis Tab === */
.analysis-header { text-align: center; padding: 24px 0 12px; }
.analysis-header h2 { font-size: 1.4rem; color: #ffd700; margin-bottom: 4px; }
.analysis-subtitle { font-size: 0.8rem; color: #86efac; opacity: 0.7; }

/* 小组末轮形势 */
.analysis-final-round-banner {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid #ffd70033;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 12px 0;
}
.analysis-final-round-banner h3 {
  font-size: 1.1rem; color: #ffd700; margin: 0 0 12px;
}
.final-round-groups { display: flex; gap: 12px; flex-wrap: wrap; }
.frg-card {
  flex: 1 1 280px;
  background: #0d1117;
  border-radius: 8px;
  padding: 12px;
  border: 1px solid #30363d;
}
.frg-group-name { font-weight: bold; color: #ffd700; font-size: 0.95rem; margin-bottom: 8px; border-bottom: 1px solid #30363d; padding-bottom: 6px; }
.frg-row { font-size: 0.82rem; padding: 2px 0; color: #c9d1d9; }
.frg-pos { color: #8b949e; margin-right: 4px; }
.frg-pts { color: #58a6ff; margin-left: 6px; font-size: 0.78rem; }
.frg-tag { font-size: 0.72rem; margin-left: 4px; padding: 1px 5px; border-radius: 3px; }
.frg-tag-qualified { background: #23863622; color: #3fb950; }
.frg-tag-out { background: #da363322; color: #f85149; }
.frg-tag-fight { background: #d2992222; color: #d29922; }
.frg-matches { margin-top: 8px; border-top: 1px solid #30363d; padding-top: 8px; }
.frg-match-item { font-size: 0.78rem; color: #8b949e; padding: 2px 0; }
.frg-ctx { color: #f0883e; font-size: 0.72rem; }

.analysis-empty {
  text-align: center; padding: 60px 20px; color: #aaa;
  font-size: 0.95rem; line-height: 2;
}
.analysis-empty a { color: #ffd700; cursor: pointer; text-decoration: underline; }

.analysis-info-bar {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255,215,0,0.08); border: 1px solid rgba(255,215,0,0.2);
  border-radius: 8px; padding: 8px 16px; margin-bottom: 16px;
  font-size: 0.85rem; color: #ccc;
}
.analysis-model-badge {
  background: linear-gradient(135deg, #ffd700, #b8860b);
  color: #0a1a0a; font-size: 0.7rem; font-weight: 700;
  padding: 2px 10px; border-radius: 10px;
}

/* Analysis card */
.analysis-card {
  background: linear-gradient(135deg, rgba(10,26,10,0.95), rgba(13,31,13,0.95));
  border: 1px solid rgba(255,215,0,0.25);
  border-radius: 12px; margin-bottom: 20px; overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.analysis-card-header {
  padding: 16px 20px 12px;
  background: linear-gradient(135deg, rgba(255,215,0,0.08), transparent);
  border-bottom: 1px solid rgba(255,215,0,0.15);
  text-align: center;
}
.analysis-match-id { font-size: 0.7rem; color: #aaa; margin-bottom: 8px; }
.analysis-teams { display: flex; align-items: center; justify-content: center; gap: 12px; }
.analysis-team { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; font-weight: 600; }
.analysis-team .flag-img { width: 28px; height: 20px; border-radius: 2px; }
.analysis-vs { font-size: 0.8rem; color: #ffd700; font-weight: 700; }
.analysis-group-tag { font-size: 0.75rem; color: #86efac; margin-top: 6px; }
.analysis-ctx-tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.analysis-ctx-tag {
  font-size: 0.68rem; padding: 2px 8px; border-radius: 4px;
  background: rgba(239,68,68,0.15); color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.25);
}

/* Form mini bar */
.analysis-form-row { display: flex; justify-content: space-between; margin-top: 8px; gap: 20px; }
.analysis-form-side { display: flex; align-items: center; }
.form-mini { display: flex; gap: 3px; }
.fm-dot { width: 18px; height: 18px; border-radius: 3px; font-size: 0.6rem; font-weight: 700; display: flex; align-items: center; justify-content: center; color: #fff; }
.fm-win { background: #22c55e; }
.fm-loss { background: #ef4444; }
.fm-draw { background: #f59e0b; }
.fm-none { background: #3f3f46; }

/* Score section */
.analysis-score-section { padding: 16px 20px; }
.analysis-score-row {
  display: flex; align-items: center; gap: 12px;
}
.analysis-score-num {
  font-size: 2rem; font-weight: 800; color: #ffd700;
  min-width: 50px; text-align: center;
}
.analysis-score-bar-wrap { flex: 1; }
.analysis-score-bar {
  height: 12px; background: rgba(255,255,255,0.1); border-radius: 6px;
  overflow: hidden; margin-bottom: 6px;
}
.analysis-score-fill {
  height: 100%; background: linear-gradient(90deg, #4ade80, #22c55e, #ffd700);
  border-radius: 6px; transition: width 0.6s ease;
}
.analysis-score-label { font-size: 0.75rem; color: #86efac; text-align: center; }
.analysis-gap-text { text-align: center; font-size: 0.8rem; color: #aaa; margin-top: 4px; }

/* Dimension rows */
.analysis-dims { padding: 0 20px 16px; }
.analysis-dim-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; font-size: 0.78rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.dim-label { width: 65px; color: #aaa; flex-shrink: 0; font-size: 0.75rem; }
.dim-val { min-width: 45px; max-width: 120px; text-align: center; font-weight: 600; color: #ccc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dim-val.dim-edge { color: #ffd700; }
.dim-val-left { text-align: right; }
.dim-val-right { text-align: left; }
.dim-bar-wrap { flex: 1; height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.dim-bar { height: 100%; border-radius: 3px; }
.dim-bar.dim-green { background: linear-gradient(90deg, #22c55e, #4ade80); }
.dim-bar.dim-yellow { background: linear-gradient(90deg, #d4a017, #ffd700); }
.dim-bar.dim-red { background: linear-gradient(90deg, #dc2626, #f97316); }

/* Dims detail (伤病/旅途/环境 详情) */
.analysis-dims-detail {
  padding: 8px 12px; margin-top: 2px;
  border-top: 1px dashed rgba(255,255,255,0.08);
}
.dims-detail-item {
  font-size: 0.72rem; color: #94a3b8; padding: 1px 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dims-detail-item .dd-team { font-weight: 700; color: #e2e8f0; }
.dims-detail-item .dd-player { color: #86efac; }
.dims-detail-item .dd-star { color: #ffd700; }
.dims-detail-item .dd-impact { color: #f87171; font-weight: 600; }

/* Insights */
.analysis-insights { padding: 12px 20px 16px; border-top: 1px solid rgba(255,215,0,0.1); }
.analysis-insights-title {
  font-size: 0.85rem; font-weight: 700; color: #ffd700;
  margin-bottom: 8px;
}
.analysis-insight-item {
  font-size: 0.78rem; color: #bbb; padding: 3px 0;
  line-height: 1.5;
}
.insight-icon { margin-right: 4px; }

/* Odds reference */
.analysis-odds-ref {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  background: rgba(255,215,0,0.05); border-top: 1px solid rgba(255,215,0,0.15);
  font-size: 0.78rem; flex-wrap: wrap;
}
.odds-ref-label { color: #ffd700; font-weight: 600; }
.odds-ref-val { color: #aaa; }
.odds-ref-verdict { color: #86efac; font-size: 0.75rem; margin-left: auto; }

/* Prediction section */
.analysis-prediction {
  padding: 14px 20px;
  border-top: 1px solid rgba(255,215,0,0.15);
  background: rgba(255,215,0,0.03);
}
.pred-title { font-size: 0.8rem; font-weight: 700; color: #ffd700; margin-bottom: 10px; }
.pred-bar-wrap { margin-bottom: 8px; }
.pred-bar { display: flex; height: 24px; border-radius: 4px; overflow: hidden; }
.pred-fill { display: flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; transition: width 0.5s; }
.pred-fill-t { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.pred-fill-d { background: linear-gradient(135deg, #6b7280, #4b5563); }
.pred-fill-o { background: linear-gradient(135deg, #ef4444, #dc2626); }
.pred-legend { display: flex; gap: 16px; font-size: 0.72rem; color: #94a3b8; margin-bottom: 8px; flex-wrap: wrap; }
.pred-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.pred-dot-t { background: #3b82f6; }
.pred-dot-d { background: #6b7280; }
.pred-dot-o { background: #ef4444; }
.pred-verdict { font-size: 0.75rem; color: #86efac; line-height: 1.5; }
.pred-scores { margin-top: 8px; display: flex; align-items: center; gap: 8px; font-size: 0.72rem; }
.pred-score-label { color: #64748b; }
.pred-score-val { color: #ffd700; font-weight: 700; font-size: 0.85rem; }
.pred-score-pct { color: #94a3b8; }
.pred-source { font-size: 0.65rem; color: #64748b; margin-top: 4px; }

/* Recommendations */
.analysis-recommendations { margin-top: 8px; padding-bottom: 80px; }
.analysis-rec-header {
  font-size: 1.1rem; font-weight: 700; color: #ffd700;
  margin-bottom: 12px; padding: 0 4px;
}
.analysis-rec-card {
  border-radius: 10px; padding: 14px 16px; margin-bottom: 12px;
  border: 1px solid rgba(255,215,0,0.2);
}
.rec-safe { background: linear-gradient(135deg, rgba(34,197,94,0.1), rgba(34,197,94,0.05)); }
.rec-value { background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(59,130,246,0.05)); }
.rec-fun { background: linear-gradient(135deg, rgba(168,85,247,0.1), rgba(168,85,247,0.05)); }
.rec-upset { background: linear-gradient(135deg, rgba(239,68,68,0.1), rgba(239,68,68,0.05)); }

.rec-card-type { font-size: 0.9rem; font-weight: 700; color: #ffd700; margin-bottom: 8px; }
.rec-card-legs { margin-bottom: 10px; }
.rec-leg {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; font-size: 0.8rem; color: #ccc;
  flex-wrap: wrap;
}
.rec-leg .flag-img { width: 20px; height: 14px; border-radius: 2px; flex-shrink: 0; }
.rec-leg-team { flex: 1; min-width: 120px; }
.rec-leg-pick {
  background: rgba(255,215,0,0.15); color: #ffd700;
  padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 600;
}
.rec-leg-odds { color: #4ade80; font-weight: 700; }
.rec-leg-score { color: #86efac; font-size: 0.7rem; }

.rec-card-footer {
  display: flex; align-items: center; gap: 16px;
  font-size: 0.78rem; color: #aaa; flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.08); padding-top: 8px;
}
.rec-follow-btn {
  background: linear-gradient(135deg, #ffd700, #b8860b);
  color: #0a1a0a; border: none; font-weight: 700;
  padding: 6px 16px; border-radius: 6px; cursor: pointer;
  font-size: 0.78rem; margin-left: auto;
}
.rec-follow-btn:hover { opacity: 0.85; }

/* Lottery recs (compact, inside lottery tab) */
.lottery-recs {
  background: linear-gradient(135deg, rgba(255,215,0,0.08), rgba(34,197,94,0.06));
  border: 1px solid rgba(255,215,0,0.25); border-radius: 10px;
  padding: 12px 16px; margin-bottom: 16px;
}
.lottery-recs-title { font-size: 0.85rem; color: #ffd700; font-weight: 700; margin-bottom: 8px; }
.lottery-rec-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; background: rgba(255,255,255,0.04);
  border-radius: 8px; cursor: pointer; font-size: 0.8rem;
  transition: background 0.2s;
}
.lottery-rec-item:hover { background: rgba(255,215,0,0.1); }
.lottery-rec-item + .lottery-rec-item { margin-top: 6px; }
.lottery-rec-type {
  background: rgba(255,215,0,0.15); color: #ffd700;
  padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 600;
  white-space: nowrap;
}
.lottery-rec-teams { flex: 1; color: #ccc; }
.lottery-rec-odds { color: #4ade80; font-weight: 700; }
.lottery-rec-action { color: #ffd700; font-size: 0.7rem; white-space: nowrap; }

/* === Responsive === */
@media (max-width: 768px) {
  .header { padding: 12px 16px; display: flex; flex-direction: column; }
  .header-left { text-align: center; }
  .header-left h1 { font-size: 1.2rem; }
  .header-right { position: static; justify-content: center; margin-top: 8px; }
  .tab { padding: 12px 8px; font-size: 0.85rem; }
  .content { padding: 12px; }
  .matches-grid { grid-template-columns: 1fr; }
  .filters { flex-direction: column; }
  .standings-table { font-size: 0.8rem; }
  .bracket-round { min-width: 120px; }
  .bracket-match { font-size: 0.7rem; }

  /* Analysis responsive */
  .analysis-team { font-size: 0.9rem; }
  .analysis-score-num { font-size: 1.5rem; min-width: 40px; }
  .analysis-dim-row { font-size: 0.7rem; }
  .dim-label { width: 60px; }
  .dim-val { width: 45px; }
  .rec-card-footer { flex-direction: column; align-items: flex-start; gap: 8px; }
  .rec-follow-btn { margin-left: 0; }
  .rec-leg { font-size: 0.72rem; }
}

/* ---- Match Detail Modal ---- */
.match-modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.85); z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.match-modal {
  background: #1a1a2e; border: 1px solid #2a2a4a; border-radius: 16px;
  width: 95%; max-width: 900px; max-height: 90vh; overflow-y: auto;
  padding: 0; position: relative;
}

.match-modal-close {
  position: fixed; top: 16px; right: 16px; z-index: 10;
  width: 32px; height: 32px; border-radius: 50%; background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.2); color: #fff; font-size: 0.95rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; margin-right: 12px;
}
.match-modal-close:hover { background: #ef4444; }

.match-modal-header {
  background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%);
  padding: 24px 28px 20px; border-radius: 16px 16px 0 0;
  text-align: center; border-bottom: 1px solid #2a2a4a;
}
.match-modal-score {
  display: flex; align-items: center; justify-content: center; gap: 24px;
  flex-wrap: nowrap;
}
.match-modal-team {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  min-width: 120px;
}
.match-modal-flag { width: 48px; height: 32px; object-fit: cover; border-radius: 4px; }
.match-modal-team-name { font-size: 1.1rem; font-weight: 700; color: #fff; }
.match-modal-score-num { font-size: 2.2rem; font-weight: 900; color: #ffd700; letter-spacing: 4px; white-space: nowrap; }
.match-modal-score-sep { font-size: 1.4rem; color: #666; }
.match-modal-meta { font-size: 0.8rem; color: #94a3b8; margin-top: 10px; }
.match-modal-meta span { margin: 0 8px; }

/* Score breakdown (ET/penalties) - multi-row */
.score-breakdown {
  text-align: center;
  font-size: 0.78rem;
  margin-top: 12px;
  padding: 10px 20px;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
  display: inline-block;
}
.score-breakdown .breakdown-title {
  color: #64748b;
  font-size: 0.7rem;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.score-breakdown .breakdown-row {
  padding: 2px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.score-breakdown .breakdown-label {
  color: #94a3b8;
  text-align: left;
}
.score-breakdown .breakdown-score {
  color: #ffd700;
  font-weight: 700;
  text-align: right;
  min-width: 36px;
}
.score-breakdown .breakdown-et .breakdown-label,
.score-breakdown .breakdown-et .breakdown-score { color: #fbbf24; }
.score-breakdown .breakdown-pen .breakdown-label,
.score-breakdown .breakdown-pen .breakdown-score { color: #f87171; }
.score-breakdown .breakdown-winner {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: #4ade80;
  font-weight: 600;
}

/* Lineups */
.match-modal-lineups {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  padding: 20px;
}
.match-lineup-col { background: #0f0f23; border-radius: 12px; padding: 16px; }
.match-lineup-team-name {
  font-size: 0.9rem; font-weight: 700; color: #ffd700;
  text-align: center; margin-bottom: 6px;
}
.match-lineup-formation {
  font-size: 0.75rem; color: #86efac; text-align: center;
  margin-bottom: 14px;
}
.match-lineup-player {
  display: flex; align-items: center; gap: 8px; padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 0.78rem;
}
.match-lineup-jersey {
  width: 22px; height: 22px; border-radius: 50%; background: #2a2a4a;
  color: #ffd700; font-size: 0.65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.match-lineup-name { color: #e2e8f0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-lineup-pos { display: none; }

.match-bench-title {
  font-size: 0.75rem; color: #64748b; font-weight: 600;
  margin-top: 12px; margin-bottom: 6px; padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.match-bench-player { font-size: 0.72rem; color: #94a3b8; }

/* Lineup NOT available */
.match-lineup-empty {
  grid-template-columns: 1fr;
  text-align: center; padding: 40px; color: #64748b;
}

/* Pre-match prediction in modal */
.match-prediction-section {
  margin: 0 20px 16px; padding: 16px;
  background: rgba(59,130,246,0.06); border: 1px solid rgba(59,130,246,0.15);
  border-radius: 10px;
}
.match-prediction-title {
  font-size: 0.85rem; font-weight: 700; color: #93c5fd;
  margin-bottom: 12px; text-align: center;
}
.match-pred-scores {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-bottom: 10px; flex-wrap: wrap;
}
.match-pred-label {
  font-size: 0.75rem; color: #94a3b8; margin-right: 4px;
}
.match-pred-score-val {
  font-size: 1rem; font-weight: 700; color: #ffd700; font-family: monospace;
  background: rgba(255,215,0,0.1); padding: 2px 8px; border-radius: 4px;
}
.match-pred-score-pct {
  font-size: 0.75rem; color: #64748b; margin-right: 4px;
}
.match-pred-wdl {
  margin-bottom: 10px;
}
.match-pred-wdl .pred-bar-wrap { margin-bottom: 4px; }
.match-pred-wdl .pred-bar { height: 20px; border-radius: 4px; overflow: hidden; display: flex; }
.match-pred-wdl .pred-fill { font-size: 0.6rem; }
.match-pred-wdl .pred-legend {
  display: flex; justify-content: center; gap: 12px; font-size: 0.7rem; color: #94a3b8;
}
.match-pred-gap {
  text-align: center; font-size: 0.75rem; color: #64748b;
}

/* Events Timeline */
.match-events-section { padding: 0 20px 20px; }
.match-events-title {
  font-size: 0.85rem; font-weight: 700; color: #ffd700;
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.match-event-row {
  display: flex; align-items: center; gap: 10px; padding: 6px 0;
  font-size: 0.78rem;
}
.match-event-time { color: #ffd700; font-weight: 600; min-width: 42px; font-size: 0.75rem; }
.match-event-icon { width: 20px; text-align: center; font-size: 0.8rem; flex-shrink: 0; }
.own-goal-label { color: #f87171; font-size: 0.75rem; }
.match-event-player { color: #e2e8f0; flex: 1; }
.match-event-assist { color: #94a3b8; font-size: 0.7rem; }
.sub-on { color: #4ade80; font-weight: 700; }
.sub-off { color: #f87171; font-weight: 700; }
.match-event-home { text-align: left; }
.match-event-away { text-align: right; flex-direction: row-reverse; }

/* Stats */
.match-stats-section { padding: 0 20px 20px; }
.match-stats-title {
  font-size: 0.85rem; font-weight: 700; color: #ffd700;
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.match-stat-row {
  display: flex; align-items: center; gap: 12px; padding: 5px 0;
  font-size: 0.78rem;
}
.match-stat-val { color: #e2e8f0; min-width: 36px; text-align: center; font-weight: 600; }
.match-stat-bar-wrap { flex: 1; height: 4px; background: #2a2a4a; border-radius: 2px; display: flex; }
.match-stat-bar-home { height: 100%; background: #3b82f6; border-radius: 2px 0 0 2px; }
.match-stat-bar-away { height: 100%; background: #ef4444; border-radius: 0 2px 2px 0; }
.match-stat-label { color: #94a3b8; font-size: 0.72rem; min-width: 70px; text-align: center; }

/* Modal loading */
.match-modal-loading {
  text-align: center; padding: 60px 20px; color: #64748b; font-size: 0.9rem;
}

/* Modal responsive */
@media (max-width: 640px) {
  .match-modal { max-width: 100%; border-radius: 12px; max-height: 95vh; }
  .match-modal-header { padding: 16px 12px 12px; }
  .match-modal-team { min-width: 80px; }
  .match-modal-score-num { font-size: 1.6rem; }
  .match-modal-team-name { font-size: 0.85rem; }
  .match-modal-flag { width: 36px; height: 24px; }
  .match-modal-lineups { grid-template-columns: 1fr; gap: 10px; padding: 12px; }
  .match-lineup-player { font-size: 0.72rem; }
  .match-lineup-jersey { width: 18px; height: 18px; font-size: 0.6rem; }
  .match-events-section, .match-stats-section { padding: 0 12px 16px; }
}

/* ---- Football Pitch Field View ---- */
.match-field-col { background: #0f0f23; border-radius: 12px; padding: 12px 12px 16px; }
.match-field-formation { font-size: 0.72rem; color: #86efac; text-align: center; margin-bottom: 10px; }
.match-pitch {
  position: relative; width: 100%; height: 400px;
  background: linear-gradient(to bottom, #1e4620 0%, #2a5c2d 3%, #348c3a 15%, #3a9c40 30%, #3a9c40 70%, #348c3a 85%, #2a5c2d 97%, #1e4620 100%);
  border-radius: 6px; overflow: hidden; margin-bottom: 4px;
}
.match-pitch .pitch-line-mid { position: absolute; top:50%; left:8%; right:8%; height:1px; background:rgba(255,255,255,0.2); }
.match-pitch .pitch-circle-mid { position:absolute; top:50%; left:50%; width:52px; height:52px; border:1px solid rgba(255,255,255,0.2); border-radius:50%; transform:translate(-50%,-50%); }
.match-pitch .pitch-box-18 { position:absolute; left:20%; right:20%; bottom:4%; height:16%; border:1px solid rgba(255,255,255,0.25); border-bottom:none; border-radius:4px 4px 0 0; }
.match-pitch .pitch-box-6 { position:absolute; left:36%; right:36%; bottom:4%; height:6%; border:1px solid rgba(255,255,255,0.2); border-bottom:none; border-radius:3px 3px 0 0; }
.match-pitch .pitch-box-18-top { position:absolute; left:20%; right:20%; top:4%; height:16%; border:1px solid rgba(255,255,255,0.25); border-top:none; border-radius:0 0 4px 4px; }
.match-pitch .pitch-box-6-top { position:absolute; left:36%; right:36%; top:4%; height:6%; border:1px solid rgba(255,255,255,0.2); border-top:none; border-radius:0 0 3px 3px; }
.match-pitch .pitch-goal-b { position:absolute; left:44%; right:44%; bottom:0; height:5px; background:rgba(255,255,255,0.15); border-radius:2px 2px 0 0; }
.match-pitch .pitch-goal-t { position:absolute; left:44%; right:44%; top:0; height:5px; background:rgba(255,255,255,0.15); border-radius:0 0 2px 2px; }

.match-player-dot {
  position: absolute; display: flex; flex-direction: column;
  align-items: center; gap: 1px; transform: translate(-50%, -50%); z-index: 2;
}
.match-player-dot .dot-jersey {
  width: 26px; height: 26px; border-radius: 50%;
  background: #1a1a3e; border: 2px solid #ffd700;
  color: #ffd700; font-size: 0.65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s;
}
.match-player-dot:hover .dot-jersey { transform: scale(1.25); z-index: 5; }
.match-player-dot .dot-name { color:#e2e8f0; font-size:0.58rem; white-space:nowrap; text-shadow:0 1px 2px rgba(0,0,0,0.9); max-width:72px; overflow:hidden; text-overflow:ellipsis; text-align:center; }
.match-player-dot .dot-pos-tag { color:#94a3b8; font-size:0.5rem; }

.match-bench-title { font-size:0.7rem; color:#64748b; font-weight:600; margin-bottom:4px; padding-top:6px; border-top:1px solid rgba(255,255,255,0.06); }
.match-bench-list { display:flex; flex-wrap:wrap; gap:3px 10px; }
.match-bench-item { font-size:0.68rem; color:#94a3b8; white-space:nowrap; }
.match-bench-num { color:#ffd700; font-size:0.6rem; margin-right:2px; }

/* ---- Scorers Table ---- */
.scorers-header { text-align: center; margin-bottom: 20px; }
.scorers-header h2 { color: #ffd700; font-size: 1.3rem; }
.scorers-subtitle { color: #94a3b8; font-size: 0.8rem; margin-top: 4px; }
.scorers-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.scorers-table th {
  background: #0d3320; color: #ffd700; padding: 10px 6px;
  text-align: center; font-weight: 600; border-bottom: 2px solid #ffd700;
  font-size: 0.8rem; white-space: nowrap;
}
.scorers-table th:first-child { text-align: left; padding-left: 12px; }
.scorers-table th:last-child { width: 50px; }
.scorers-table td { padding: 8px 6px; text-align: center; border-bottom: 1px solid #1a3a3a; }
.scorers-table .sc-player { text-align: left; padding-left: 12px; font-weight: 600; }
.scorers-table .sc-player .flag-img { display: inline; margin-right: 8px; vertical-align: middle; width: 28px; height: 19px; }
.scorers-table .sc-player span { vertical-align: middle; }
.scorers-table .sc-goals { font-weight: 700; color: #ffd700; font-size: 1rem; }
.scorers-table tr:hover td { background: rgba(255,215,0,0.08); }

/* === Advice tab === */
.advice-wrap{max-width:900px;margin:0 auto;padding:8px 2px}
.advice-badge{display:inline-block;padding:4px 14px;border-radius:16px;font-size:.8rem;margin-bottom:12px}
.advice-badge.green{background:rgba(46,160,67,.15);color:#4ade80;border:1px solid rgba(74,222,128,.4)}
.advice-badge.amber{background:rgba(245,158,11,.12);color:#fbbf24;border:1px solid rgba(251,191,36,.4)}
.advice-badge.red,.advice-empty{background:rgba(239,68,68,.12);color:#f87171;border:1px solid rgba(248,113,113,.4);padding:4px 14px;border-radius:16px;font-size:.8rem;display:inline-block}
.advice-stats{display:flex;gap:18px;flex-wrap:wrap;font-size:.85rem;color:#a3b8a3;margin-bottom:16px}
.advice-stats b{color:#ffd700;font-size:1rem}
.advice-stats .neg,.advice-hist .neg{color:#f87171} .advice-stats .pos,.advice-hist .pos{color:#4ade80}
.advice-h{font-size:1.1rem;color:#ffd700;margin:20px 0 10px;border-left:3px solid #ffd700;padding-left:10px}
.advice-ticket{background:#122512;border:1px solid #2a4a2a;border-radius:10px;padding:12px 14px;margin-bottom:12px}
.advice-ticket.bonus{border-color:#5b3a14}
.advice-tk-head{display:flex;flex-wrap:wrap;gap:10px;align-items:baseline;font-size:.85rem}
.advice-tk-head b{color:#ffd700}
.advice-tk-rule{color:#7a8b7a;font-size:.75rem}
.advice-tk-money{margin-left:auto;color:#a3b8a3;font-size:.8rem}
.advice-leg{display:grid;grid-template-columns:52px 1fr 48px 70px;gap:10px;font-size:.85rem;padding:7px 0;border-top:1px dashed #1f3d1f;align-items:center}
.advice-leg-lg{color:#8fa38f;font-size:.72rem} .advice-leg-vs em{font-style:normal;color:#6b7d6b;font-size:.72rem;margin-left:6px}
.advice-leg-odds{color:#ffd700;font-weight:700} .advice-leg-res{font-size:.78rem;text-align:center}
.advice-leg-res.hit{color:#4ade80} .advice-leg-res.miss{color:#f87171}
.advice-budget{font-size:.8rem;color:#a3b8a3;text-align:right}
.advice-rest{background:#122512;border:1px dashed #2a4a2a;border-radius:10px;padding:20px;text-align:center;color:#8fa38f}
.advice-hist{width:100%;border-collapse:collapse;font-size:.82rem}
.advice-hist th,.advice-hist td{padding:7px 10px;border-bottom:1px solid #1c351c;text-align:left}
.advice-hist th{color:#8fa38f}
.advice-curvebox{background:#122512;border:1px solid #2a4a2a;border-radius:10px;padding:12px}
.advice-curve{width:100%;height:120px;display:block}
.advice-disc{margin-top:24px;font-size:.7rem;color:#5a6b5a;text-align:center}
