:root {
  --bg: #080c14;
  --bg-card: #0f1623;
  --bg-card-hover: #151d2e;
  --border: #1a2536;
  --text: #f1f5f9;
  --text-muted: #8b9cb3;
  --accent: #22c55e;
  --accent-dim: #16a34a;
  --accent-glow: rgba(34, 197, 94, 0.2);
  --brand: #0098ea;
  --brand-glow: rgba(0, 152, 234, 0.25);
  --gold: #fbbf24;
  --danger: #ef4444;
  --home: #3b82f6;
  --away: #8b5cf6;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Manrope', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 50% -10%, rgba(0, 152, 234, 0.1), transparent),
    radial-gradient(ellipse 50% 35% at 100% 80%, rgba(34, 197, 94, 0.07), transparent);
  pointer-events: none;
  z-index: -1;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

.hidden {
  display: none !important;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 12, 20, 0.9);
  backdrop-filter: blur(16px);
  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: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.15rem;
}

.logo__icon {
  font-size: 1.35rem;
}

.nav {
  display: flex;
  gap: 4px;
}

.nav__link {
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.85rem;
  transition: color 0.2s, background 0.2s;
}

.nav__link:hover,
.nav__link--active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

/* Hero / Match */
.hero {
  padding: 32px 0 16px;
}

.hero__badge {
  display: inline-block;
  background: rgba(0, 152, 234, 0.12);
  color: #38bdf8;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
  border: 1px solid rgba(0, 152, 234, 0.2);
}

.match-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.match-card__teams {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.team--home {
  flex: 1 1 0;
  min-width: 0;
  order: 1;
}

.match-center {
  flex: 0 0 auto;
  order: 2;
  text-align: center;
  padding: 0 8px;
}

.team--away {
  flex: 1 1 0;
  min-width: 0;
  order: 3;
}

.match-card__meta {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.team {
  text-align: center;
}

.team__logo-wrap {
  width: 80px;
  height: 80px;
  margin: 0 auto 12px;
}

.team__logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--home), #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.35rem;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.team__logo-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  padding: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.team__logo--away {
  background: linear-gradient(135deg, var(--away), #6d28d9);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

.team__name {
  font-size: clamp(0.95rem, 2.5vw, 1.25rem);
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.25;
}

.team__form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.form-dots {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

.form-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-right: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-dot {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
}

.form-dot--win {
  background: rgba(34, 197, 94, 0.2);
  color: var(--accent);
}

.form-dot--draw {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
}

.form-dot--loss {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.match-center__vs {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}

.match-center__datetime {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  white-space: nowrap;
}

.match-center__venue {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 14px;
}

.countdown-title {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  margin-bottom: 10px;
}

.countdown {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.countdown__value {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.countdown__label {
  font-size: 0.58rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.countdown__sep {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-muted);
  padding-bottom: 14px;
}

.countdown--started {
  display: block;
}

.countdown--started .countdown__item {
  min-width: auto;
  padding: 12px 20px;
}

.countdown--started .countdown__value {
  font-size: 1rem;
}

/* Sections */
.section {
  padding: 28px 0;
}

.section--compact {
  padding: 20px 0;
}

.section__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.section__subtitle {
  color: var(--text-muted);
  margin-bottom: 18px;
  font-size: 0.88rem;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  transition: border-color 0.2s;
}

.stat-item:hover {
  border-color: rgba(34, 197, 94, 0.3);
}

.stat-item__value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 2px;
  font-variant-numeric: tabular-nums;
}

.stat-item__label {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

/* Betting */
.bet-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.bet-tab {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.bet-tab:hover {
  border-color: var(--accent);
  color: var(--text);
}

.bet-tab--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #052e16;
}

.bet-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.bet-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(0, 0, 0, 0.15);
}

.bet-table th,
.bet-table td {
  padding: 14px 16px;
  text-align: center;
}

.bet-table th:first-child,
.bet-table td:first-child {
  text-align: left;
}

.bet-table th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bet-table tr:not(:last-child) td {
  border-bottom: 1px solid var(--border);
}

.bookmaker-name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

.bookmaker-name--link {
  text-decoration: none;
  color: var(--text);
  transition: color 0.2s;
}

.bookmaker-name--link:hover {
  color: var(--accent);
}

.bookmaker-logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.65rem;
  color: #fff;
  flex-shrink: 0;
}

.odds-btn {
  display: inline-block;
  min-width: 60px;
  padding: 8px 12px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 8px;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}

.odds-btn:hover {
  background: var(--accent);
  color: #052e16;
  transform: translateY(-1px);
}

.odds-btn--best {
  background: var(--accent);
  color: #052e16;
  border-color: var(--accent);
}

.bet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.bet-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  box-sizing: border-box;
}

.bet-action-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.bet-action-btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #052e16;
}

.bet-action-btn--primary:hover {
  background: var(--accent-dim);
  border-color: var(--accent-dim);
  color: #052e16;
}

.match-description {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.75;
}

.match-description p {
  margin-bottom: 12px;
}

.match-description p:last-child {
  margin-bottom: 0;
}

.bet-disclaimer {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-align: center;
}

/* AI */
.ai-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.ai-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.06), transparent);
}

.ai-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
}

.ai-badge__dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.btn {
  font-family: inherit;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.ai-card__body {
  padding: 24px 20px;
  min-height: 200px;
}

.ai-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 160px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.ai-loading__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.ai-prediction {
  display: grid;
  gap: 20px;
}

.ai-winner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(34, 197, 94, 0.06);
  border: 1px solid rgba(34, 197, 94, 0.15);
  border-radius: var(--radius-sm);
}

.ai-winner__icon {
  font-size: 2rem;
}

.ai-winner__text h3 {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ai-winner__text p {
  font-size: 1.25rem;
  font-weight: 800;
}

.ai-confidence {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-confidence__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.ai-confidence__bar-wrap {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.ai-confidence__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  border-radius: 999px;
  transition: width 1s ease;
}

.ai-confidence__value {
  font-weight: 800;
  font-size: 1rem;
  color: var(--accent);
  min-width: 42px;
  text-align: right;
}

.ai-score {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.ai-score span {
  color: var(--text-muted);
  font-weight: 400;
}

.ai-factors {
  list-style: none;
  display: grid;
  gap: 8px;
}

.ai-factors li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.ai-factors li::before {
  content: '•';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

.ai-summary {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.65;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  margin-top: 16px;
}

.footer__inner {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.footer__note {
  margin-top: 4px;
  font-size: 0.72rem;
  opacity: 0.7;
}

/* Static pages */
.page-hero {
  padding: 36px 0 20px;
}

.page-hero h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.page-hero p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.content-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

.content-block h2 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.content-block p,
.content-block li {
  color: var(--text-muted);
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.content-block ul {
  padding-left: 18px;
}

/* Catalog */
.match-list {
  display: grid;
  gap: 12px;
}

.match-card-mini {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}

.match-card-mini:hover {
  border-color: rgba(0, 152, 234, 0.5);
  transform: translateY(-1px);
}

.match-card-mini__league {
  font-size: 0.7rem;
  color: #38bdf8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.match-card-mini__teams {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.match-card-mini__team {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
}

.match-card-mini__logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  padding: 3px;
}

.match-card-mini__abbr {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
}

.match-card-mini__vs {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
}

.match-card-mini__time {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 520px) {
  .match-card__teams {
    gap: 6px;
  }

  .team__name {
    font-size: 0.78rem;
  }

  .team__logo-wrap,
  .team__logo,
  .team__logo-img {
    width: 64px;
    height: 64px;
  }

  .team__logo {
    font-size: 1.1rem;
  }

  .match-center__datetime {
    font-size: 0.78rem;
    white-space: normal;
  }

  .countdown__item {
    min-width: 44px;
    padding: 6px 8px;
  }

  .countdown__value {
    font-size: 1.1rem;
  }

  .countdown__sep {
    padding-bottom: 12px;
    font-size: 0.9rem;
  }

  .nav__link {
    padding: 6px 8px;
    font-size: 0.75rem;
  }

  .panel {
    padding: 18px 14px;
  }

  .bet-actions {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .bet-action-btn {
    width: 100%;
  }

  .ai-winner {
    flex-direction: column;
    text-align: center;
  }

  .ai-confidence {
    flex-wrap: wrap;
  }

  .ai-confidence__label {
    width: 100%;
  }
}
