/* ============================================================
   KINGSDRAFT — KINGS LEAGUE PREDICTION & PROBABILITY PLATFORM
   Aesthetic: Carbon Stealth + Electroluminescent Neon Emerald & Gold
   Inspired by Inker Draw, UEFA Monte Carlo & KingsDraft Design System
   ============================================================ */

:root {
  --bg-page: #06080d;
  --bg-card: #0a0d14;
  --bg-card-sub: #121824;
  --bg-card-hover: #182233;
  --bg-glass: rgba(10, 13, 20, 0.85);

  --border: #1a2232;
  --border-light: rgba(163, 178, 207, 0.16);
  --border-glow: rgba(0, 255, 135, 0.35);

  --neon-green: #00ff87;
  --neon-green-glow: rgba(0, 255, 135, 0.35);
  --neon-green-bg: rgba(0, 255, 135, 0.08);

  --cyan: #00d2ff;
  --cyan-glow: rgba(0, 210, 255, 0.35);
  --gold: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.35);
  --orange: #ff5722;
  --red: #ff385c;
  --red-glow: rgba(255, 56, 92, 0.3);

  --text-primary: #f3f4f6;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;

  --font-display: 'Barlow Condensed', 'Rajdhani', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Inter', -apple-system, sans-serif;

  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 25px rgba(0, 255, 135, 0.22);
}

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

body {
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 255, 135, 0.07), transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 80%, rgba(0, 210, 255, 0.04), transparent 60%);
}

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

/* ============================================================
   TOP NAVBAR
   ============================================================ */
.pred-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.pred-header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-white { color: #fff; }
.brand-green { color: var(--neon-green); text-shadow: 0 0 12px var(--neon-green-glow); }

.brand-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: var(--neon-green-bg);
  color: var(--neon-green);
  border: 1px solid rgba(0, 255, 135, 0.35);
}

.pred-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pred-nav-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pred-nav-link:hover, .pred-nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-back-home {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-back-home:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--text-secondary);
}

/* ============================================================
   HERO HUD
   ============================================================ */
.hero-hud {
  padding: 2rem 1.5rem 1.5rem;
  max-width: 1440px;
  margin: 0 auto;
}

.hud-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.hud-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(0, 255, 135, 0.1);
  color: var(--neon-green);
  border: 1px solid rgba(0, 255, 135, 0.3);
}

.hud-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 800px;
  line-height: 1.5;
}

/* Quick Metrics Row */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
}

.metric-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.metric-val {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.metric-sub {
  font-size: 0.75rem;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text-secondary);
}

/* ============================================================
   CONTROLS BAR (Group Toggles & Tab Switcher)
   ============================================================ */
.controls-bar {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
}

.view-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  max-width: 100%;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  background: var(--neon-green-bg);
  color: var(--neon-green);
  border: 1px solid rgba(0, 255, 135, 0.4);
  box-shadow: 0 0 12px rgba(0, 255, 135, 0.2);
}

.group-toggles {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: var(--radius-md);
}

.group-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.group-btn:hover {
  color: #fff;
}

.group-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* ============================================================
   MAIN CONTENT CONTAINER & VIEWS
   ============================================================ */
.pred-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem;
}

.pred-view {
  display: none;
}

.pred-view.active {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

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

/* ============================================================
   VIEW 1: PROBABILITY MATRIX (INKER / DRAW STYLE)
   ============================================================ */
.matrix-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.group-matrix-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.group-matrix-header {
  padding: 1rem 1.5rem;
  background: var(--bg-card-sub);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.group-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.group-badge {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: var(--radius-xs);
  background: var(--gold);
  color: #000;
}

.group-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.table-responsive {
  overflow-x: auto;
  width: 100%;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: center;
}

.matrix-table th {
  background: rgba(18, 24, 36, 0.95);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.matrix-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.matrix-table th.sortable:hover {
  color: var(--neon-green);
}

.matrix-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(26, 34, 50, 0.6);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  white-space: nowrap;
}

.matrix-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Sticky Team Column */
.matrix-table th.col-team,
.matrix-table td.col-team {
  text-align: left;
  position: sticky;
  left: 0;
  background: var(--bg-card);
  z-index: 2;
  border-right: 1px solid var(--border);
  min-width: 200px;
}

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

.team-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.team-logo-small {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.team-name-wrap {
  display: flex;
  flex-direction: column;
}

.team-main-name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
}

.team-sub-info {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.25;
  max-width: 260px;
  word-break: break-word;
}

/* Inker Draw Heatmap Cells */
.prob-cell {
  font-weight: 700;
  border-radius: var(--radius-xs);
  transition: all 0.2s;
  padding: 8px 6px;
}

.heat-0 {
  color: var(--text-dim);
  background: transparent;
}

.heat-low {
  background: rgba(0, 255, 135, 0.07);
  color: rgba(0, 255, 135, 0.8);
}

.heat-med {
  background: rgba(0, 255, 135, 0.16);
  color: #00ff87;
}

.heat-high {
  background: rgba(0, 255, 135, 0.32);
  color: #fff;
  font-weight: 800;
}

.heat-max {
  background: rgba(0, 255, 135, 0.55);
  color: #000;
  font-weight: 900;
  text-shadow: none;
  box-shadow: inset 0 0 10px rgba(0, 255, 135, 0.8);
}

.heat-out-high {
  background: rgba(255, 56, 92, 0.25);
  color: #ff385c;
  font-weight: 800;
}

.heat-out-max {
  background: rgba(255, 56, 92, 0.5);
  color: #fff;
  font-weight: 900;
}

.th-group-stage {
  border-left: 2px solid var(--border);
}

.td-group-stage {
  border-left: 2px solid var(--border);
}

/* Stage Outcome Badges */
.badge-stage {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.72rem;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.status-sf {
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.status-qf {
  background: rgba(0, 210, 255, 0.15);
  color: var(--cyan);
  border: 1px solid rgba(0, 210, 255, 0.4);
}

.status-lc-adv {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.status-lc {
  background: rgba(249, 115, 22, 0.15);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.4);
}

.status-out {
  background: rgba(255, 56, 92, 0.12);
  color: var(--red);
  border: 1px solid rgba(255, 56, 92, 0.3);
}

/* Legend */
.matrix-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============================================================
   VIEW 2: "WHAT-IF" INTERACTIVE SIMULATOR
   ============================================================ */
.simulator-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 1080px) {
  .simulator-layout {
    grid-template-columns: 1fr;
  }
}

.sim-pane {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pane-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Action Presets */
.preset-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-preset {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card-sub);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-preset:hover {
  background: var(--bg-card-hover);
  border-color: var(--neon-green);
  color: var(--neon-green);
}

/* Matchday Card */
.turn-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.turn-title-bar {
  padding: 8px 14px;
  background: var(--bg-card-sub);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--neon-green);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.match-picker-card {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(26, 34, 50, 0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s;
}

.match-picker-card:last-child {
  border-bottom: none;
}

.match-picker-card:hover {
  background: rgba(255, 255, 255, 0.02);
}

.match-teams-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.team-pick-btn {
  flex: 1;
  background: var(--bg-card-sub);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
}

.team-pick-btn:hover {
  border-color: var(--text-secondary);
  color: #fff;
}

.team-pick-btn.active-winner {
  background: var(--neon-green-bg);
  border-color: var(--neon-green);
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 255, 135, 0.25);
}

.team-pick-btn.active-winner .pick-badge {
  background: var(--neon-green);
  color: #000;
}

.pick-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  margin-left: auto;
}

.vs-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-dim);
}

.match-meta-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Hypothetical Standings Table */
.hypo-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.hypo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.hypo-table th {
  background: var(--bg-card-sub);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.hypo-table th.th-left { text-align: left; }

.hypo-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(26, 34, 50, 0.5);
  font-family: var(--font-mono);
  text-align: center;
  font-size: 0.85rem;
}

.hypo-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.rank-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
}

.rank-1 { background: var(--gold); color: #000; }
.rank-2 { background: var(--cyan); color: #000; }
.rank-3 { background: #c084fc; color: #000; }
.rank-4 { background: #fb923c; color: #000; }

.movement-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  margin-left: 4px;
}

.move-up { color: var(--neon-green); }
.move-down { color: var(--red); }
.move-same { color: var(--text-dim); }

/* ============================================================
   VIEW 3: HEAD-TO-HEAD MATRIX & SCONTRI DIRETTI
   ============================================================ */
.h2h-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.h2h-matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.h2h-matrix-table th, .h2h-matrix-table td {
  padding: 10px;
  border: 1px solid var(--border);
}

.h2h-matrix-table th {
  background: var(--bg-card-sub);
  color: var(--text-secondary);
}

.h2h-self {
  background: rgba(255, 255, 255, 0.03);
}

.h2h-win {
  background: rgba(0, 255, 135, 0.15);
  color: var(--neon-green);
  font-weight: 800;
}

.h2h-loss {
  background: rgba(255, 56, 92, 0.12);
  color: var(--red);
  font-weight: 700;
}

.h2h-upcoming {
  color: var(--text-muted);
  font-size: 0.72rem;
}

/* ============================================================
   VIEW 4: PLAYOFF BRACKET
   ============================================================ */
.bracket-wrapper {
  overflow-x: auto;
  padding: 1rem 0;
}

.bracket-tree {
  display: flex;
  align-items: stretch;
  gap: 2.5rem;
  min-width: 900px;
  padding: 1rem;
}

.bracket-round {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 2rem;
}

.round-header-label {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--neon-green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  text-align: center;
}

.bracket-match-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.bracket-match-card:hover {
  border-color: var(--border-glow);
}

.bracket-team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-card-sub);
}

.bracket-team-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.85rem;
}

.bracket-adv-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  margin-top: 4px;
  text-align: center;
}

/* ============================================================
   VIEW 5: OFFICIAL REGULATIONS CARDS
   ============================================================ */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.rule-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rule-card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rule-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.rule-list li {
  position: relative;
  padding-left: 1.5rem;
  line-height: 1.5;
}

.rule-list li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--neon-green);
  font-weight: 900;
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */
@media (max-width: 768px) {
  .pred-header-inner {
    padding: 0 1rem;
  }

  .pred-nav {
    display: none; /* Collapsed on mobile, accessible via sub-bar */
  }

  .hero-hud {
    padding: 1.25rem 1rem 1rem;
  }

  .controls-bar {
    padding: 0 1rem 1rem;
    flex-direction: column;
    align-items: stretch;
  }

  .view-tabs {
    width: 100%;
  }

  .pred-main {
    padding: 1rem;
  }
}



/* ============================================================
   GUIDA ALLA LETTURA & HELP CALLOUTS
   ============================================================ */
.guide-wrapper {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem 1.5rem;
}

.guide-box {
  background: linear-gradient(135deg, rgba(10, 15, 25, 0.95) 0%, rgba(6, 8, 13, 0.98) 100%);
  border: 1px solid rgba(0, 255, 135, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 0 30px rgba(0, 255, 135, 0.12);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: fadeIn 0.3s ease-out;
}

.guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.guide-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.guide-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: var(--neon-green-bg);
  color: var(--neon-green);
  border: 1px solid rgba(0, 255, 135, 0.3);
}

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

.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: all 0.2s;
}

.guide-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.guide-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.guide-color-scale {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}

.scale-step {
  flex: 1;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  border-radius: var(--radius-xs);
}

.scale-0 { background: #121824; color: var(--text-dim); }
.scale-low { background: rgba(0, 255, 135, 0.1); color: var(--neon-green); }
.scale-med { background: rgba(0, 255, 135, 0.25); color: #fff; }
.scale-high { background: rgba(0, 255, 135, 0.5); color: #000; }
.scale-out { background: rgba(255, 56, 92, 0.35); color: #ff385c; }

/* Contextual View Info Banner */
.view-info-banner {
  background: rgba(18, 24, 36, 0.7);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--neon-green);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.view-info-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.view-info-content strong {
  color: #fff;
}

.btn-toggle-guide {
  background: rgba(0, 255, 135, 0.1);
  border: 1px solid rgba(0, 255, 135, 0.3);
  color: var(--neon-green);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-toggle-guide:hover {
  background: rgba(0, 255, 135, 0.2);
  box-shadow: 0 0 12px rgba(0, 255, 135, 0.25);
  color: #fff;
}


/* ============================================================
   MATHEMATICAL CERTAINTY BADGES & INTERACTIVE BRACKET STYLES
   ============================================================ */
.math-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.lock-playoff {
  background: rgba(0, 255, 135, 0.15);
  color: var(--neon-green);
  border: 1px solid rgba(0, 255, 135, 0.4);
  box-shadow: 0 0 8px rgba(0, 255, 135, 0.2);
}

.lock-out {
  background: rgba(255, 56, 92, 0.15);
  color: var(--red);
  border: 1px solid rgba(255, 56, 92, 0.4);
}

.in-race {
  background: rgba(245, 158, 11, 0.12);
  color: var(--gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: rgba(10, 15, 25, 0.95);
  border: 1px solid var(--neon-green);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 255, 135, 0.3);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  animation: slideUpToast 0.3s ease-out;
}

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

/* Interactive Bracket Team Button */
.bracket-team-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-card-sub);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  text-align: left;
  color: inherit;
}

.bracket-team-btn:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(2px);
}

.bracket-team-btn.bracket-winner {
  background: var(--neon-green-bg);
  border-color: var(--neon-green);
  box-shadow: 0 0 12px rgba(0, 255, 135, 0.3);
}

.bracket-team-btn.bracket-winner .bracket-team-name {
  color: #fff;
  font-weight: 800;
}

.champion-banner-box {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(20, 15, 5, 0.9) 100%);
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.25);
  animation: pulseGold 2s infinite alternate;
}

@keyframes pulseGold {
  from { box-shadow: 0 0 25px rgba(245, 158, 11, 0.2); }
  to { box-shadow: 0 0 45px rgba(245, 158, 11, 0.4); }
}

.champion-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.champion-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 0 15px rgba(245, 158, 11, 0.6));
}

.champion-info {
  display: flex;
  flex-direction: column;
}

.champion-kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.08em;
}

.champion-name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
}


/* ============================================================
   ANNOUNCEMENTS & NEWS SECTION STYLES
   ============================================================ */
.ann-dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ann-sync-hud {
  background: linear-gradient(135deg, rgba(16, 24, 38, 0.95) 0%, rgba(8, 12, 20, 0.98) 100%);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: 0 0 25px rgba(0, 255, 135, 0.12);
}

.ann-sync-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ann-sync-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--neon-green-bg);
  border: 1px solid rgba(0, 255, 135, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--neon-green);
}

.ann-sync-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
}

.ann-sync-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.ann-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ann-filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.ann-filter-btn:hover {
  border-color: var(--text-secondary);
  color: #fff;
}

.ann-filter-btn.active {
  background: var(--neon-green-bg);
  border-color: var(--neon-green);
  color: var(--neon-green);
  box-shadow: 0 0 10px rgba(0, 255, 135, 0.2);
}

.ann-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
}

.ann-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.ann-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
}

.ann-card-featured {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.12);
}

.ann-card-featured::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--neon-green));
}

.ann-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.ann-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tag-gold {
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.tag-cyan {
  background: rgba(0, 210, 255, 0.15);
  color: var(--cyan);
  border: 1px solid rgba(0, 210, 255, 0.35);
}

.tag-green {
  background: rgba(0, 255, 135, 0.15);
  color: var(--neon-green);
  border: 1px solid rgba(0, 255, 135, 0.35);
}

.tag-orange {
  background: rgba(249, 115, 22, 0.15);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.35);
}

.tag-purple {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.ann-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ann-teams-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ann-team-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-card-sub);
  border: 1px solid var(--border-light);
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

.ann-card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}

.ann-card-summary {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.ann-card-content {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.55;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  border-left: 3px solid var(--border-light);
}
