/* ========================================================================== */
/* 1. VARIABILI & RESET                                                       */
/* ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=DS-Digital&display=swap');
:root {
  /* Warm Retro palette */
  --primary-color:   #D4A017; /* mustard */
  --secondary-color: #D35400; /* burnt orange */
  --accent-color:    #417D7A; /* deep sage */
  --success-color:   #6AA84F; /* muted green */
  --text-primary:    #F5F5DC; /* ivory/beige */
  --text-secondary:  #CCCCCC; /* light gray */
  --card-shadow:     0 4px 6px rgba(0, 0, 0, 0.3);

  /* Prediction colors */
  --home-win-color:  #28A745;
  --away-win-color:  #DC3545;
  --draw-color:      #FFC107;

  /* Gradients */
  --gradient-primary:   linear-gradient(135deg, #D4A017, #D35400);
  --gradient-secondary: linear-gradient(135deg, #417D7A, #6AA84F);

  /* Radius */
  --mobile-card-radius: 1.5rem;
  --desktop-card-radius: 2rem;
}


body {
  background-color: #1a1a1a;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ========================================================================== */
/* 2. UTILITÀ & LINK                                                          */
/* ========================================================================== */
.brand-logo,
.hero-cta {
  text-decoration: none;
}
.brand-logo:hover,
.brand-logo:focus,
.hero-cta:hover,
.hero-cta:focus {
  text-decoration: none;
}

/* ========================================================================== */
/* 3. NAVBAR (Retro-Pixel Theme)                                              */
/* ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;

  /* doppia texture: griglia leggera + gradient caldo */
  background:
    repeating-linear-gradient(
      45deg,
      rgba(255,255,255,0.04) 0,
      rgba(255,255,255,0.04) 2px,
      transparent 2px,
      transparent 8px
    ),
    var(--gradient-primary);

  border: 2px solid var(--secondary-color);
  border-radius: 4px 4px 0 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  overflow: visible;
  animation: glowBorder 6s ease-in-out infinite;
}

/* deco-corner pixel in alto a sinistra e (lampeggiante) a destra */
.navbar::before,
.navbar::after {
  content: '';
  position: absolute;
  width: 8px; height: 8px;
  background: var(--secondary-color);
  z-index: 201;
}
.navbar::before { top: -2px; left: -2px; }
.navbar::after  {
  top: -2px; right: -2px;
  animation: pixelBlink 1s steps(1,start) infinite;
}

/* stato shrink (scroll) */
.navbar.shrink {
  padding: 0.5rem 2rem;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-color) 60%,
    var(--accent-color) 100%
  );
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
}

/* conserva il tuo codice esistente per .navbar-toggler ecc. */

/* Nav-link bullet + hover pop */
.navbar-nav .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  transition: color 0.2s ease, text-shadow 0.2s ease;
}
.navbar-nav .nav-link::before {
  content: '■';
  font-size: 0.85rem;
  color: var(--secondary-color);
  opacity: 1;
  margin-right: 0.4rem;
  transition: transform 0.2s ease;
}
.navbar-nav .nav-link:hover::before,
.navbar-nav .nav-link.active::before {
  transform: scale(1.4);
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--secondary-color);
  text-shadow: 0 0 6px rgba(211,84,0,0.6);
}

/* Keyframes globali */
@keyframes glowBorder {
  0%,100% { box-shadow: 0 4px 16px rgba(0,0,0,0.5); }
  50%     { box-shadow: 0 4px 20px rgba(0,0,0,0.6); }
}
@keyframes pixelBlink {
  0%,100% { background-color: var(--secondary-color); }
  50%     { background-color: #FFF; }
}



/* ——————————————————————————————————————————————————————————————— */
/* 3a. BRAND LOGO & DESKTOP TOGGLER                                        */
/* ——————————————————————————————————————————————————————————————— */
.brand-logo {
  text-decoration: none;
}
.brand-logo:hover { text-decoration: none; }

.brand-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.2rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 6px rgba(211,84,0,0.8), 0 0 12px rgba(211,84,0,0.6);
  display: block;
}
.brand-subtitle {
  display: block;
  font-size: 0.65rem;
  color: var(--text-primary);
  opacity: 0.8;
  font-weight: 400;
  margin-top: 0.25rem;
  letter-spacing: 0.5px;
}

/* Pulsante “hamburger” desktop */
.navbar-toggler {
  margin-left: auto;
  border: 1px solid var(--text-primary);
  background-color: var(--primary-color);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.navbar-toggler:hover {
  background-color: var(--secondary-color);
  box-shadow: 0 0 8px rgba(211,84,0,0.5);
}
.navbar-toggler:focus {
  outline: none;
  box-shadow: 0 0 8px rgba(211,84,0,0.5);
}

/* Barre del “hamburger” */
.navbar-dark .navbar-toggler-icon {
  background-image: none;
  width: 24px;
  height: 18px;
  position: relative;
  display: inline-block;
  transition: transform 0.3s ease;
}
.navbar-dark .navbar-toggler-icon::before,
.navbar-dark .navbar-toggler-icon span,
.navbar-dark .navbar-toggler-icon::after {
  content: '';
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  position: absolute;
  left: 0;
  transition: 0.3s ease;
}
.navbar-dark .navbar-toggler-icon::before { top: 0; }
.navbar-dark .navbar-toggler-icon span       { top: 8px; }
.navbar-dark .navbar-toggler-icon::after     { bottom: 0; }

/* ——————————————————————————————————————————————————————————————— */
/* 3b. X-animation (usa aria-expanded invece di collapsed)                 */
/* ——————————————————————————————————————————————————————————————— */

/* stato chiuso: aria-expanded="false" mantiene le barre normali */
.navbar-toggler[aria-expanded="false"] .navbar-toggler-icon::before,
.navbar-toggler[aria-expanded="false"] .navbar-toggler-icon span,
.navbar-toggler[aria-expanded="false"] .navbar-toggler-icon::after {
  transform: none;
  opacity: 1;
}

/* stato aperto: aria-expanded="true" trasforma in “X” */
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
  transform: translateY(8px) rotate(45deg);
}
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
  transform: translateY(-8px) rotate(-45deg);
}
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon span {
  opacity: 0;
}



/* ——————————————————————————————————————————————————————————————— */
/* 3b. NAVBAR MOBILE-FIRST                                                */
/* ——————————————————————————————————————————————————————————————— */
@media (max-width: 991px) {
  .navbar {
    background:
      repeating-linear-gradient(
        45deg,
        rgba(255,255,255,0.04) 0,
        rgba(255,255,255,0.04) 2px,
        transparent 2px,
        transparent 8px
      ),
      var(--gradient-primary);
    border-top:    2px solid var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding:       0.6rem 1rem !important;
  }

  /* angolino fisso in alto a sinistra */
  .navbar::before {
    content: '';
    position: absolute;
    top:  -2px;
    left: -2px;
    width:  8px;
    height: 8px;
    background: var(--secondary-color);
    z-index:    201;
  }

  /* hamburger “pixel” bianco */
  .navbar-toggler {
    background: none !important;
    border:     none;
    padding:    0.25rem;
    position:   relative;
    z-index:    202;
  }
  .navbar-toggler-icon {
    background-image: none;
    width: 24px;
    height:18px;
    position: relative;
    display: inline-block;
  }
  .navbar-toggler-icon::before,
  .navbar-toggler-icon::after,
  .navbar-toggler-icon span {
    content: '';
    position: absolute;
    left:0; right:0; height:3px;
    background: var(--text-primary);
  }
  .navbar-toggler-icon::before { top:0; }
  .navbar-toggler-icon span       { top:7px; }
  .navbar-toggler-icon::after     { bottom:0; }

  /* le “■” appaiono solo a menu aperto */
  .navbar-collapse.show .nav-link::before {
    content: '■';
    opacity: 1;
  }
}


/* ========================================================================== */
/* 4. ANALYSIS CARD & MATCH DISPLAY                                          */
/* ========================================================================== */

/* ----- Base Card ----- */
.analysis-card {
	margin-left: 2rem;
  margin-right: 2rem;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  background-color: #2b2b2b;
  border: none;
  margin-bottom: 2rem;
}
.analysis-card .card-header {
  background: var(--gradient-primary);
  padding: 2rem;
  text-align: center;
  position: relative;
}

/* Contenitore titolo match (puoi modificarlo se necessario) */
.match-title {
  font-family: 'Press Start 2P', cursive;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Riga per team e punteggio (usata se non usi il tabellone vintage) */
.match-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px; /* Modifica qui lo spazio tra i blocchi */
  font-size: 1.2rem;
}

/* Contenitore per scoreboard (se necessario) */
.scoreboard-container {
  background: rgba(0, 0, 0, 0.4); /* Modifica il colore se preferisci */
  border: 1px solid rgba(255, 0, 255, 0.3);
  border-radius: 1rem;
  padding: 1rem 2rem;
  display: inline-block;
  text-align: center;
  box-shadow: 0 0 8px rgba(255, 0, 255, 0.2);
  margin-top: 1rem;
}

/* ========================================================================== */
/* 5. VINTAGE SCOREBOARD (Tabellone stile retro)                             */
/* ========================================================================== */
/* Utilizzato per visualizzare il match in un'unica riga con effetto "scoreboard" */
.vintage-scoreboard {
  display: inline-flex;          /* Mostra in linea */
  align-items: center;
  gap: 1rem;                     /* Spazio fra gli elementi */
  position: relative;
  padding: 1rem 2rem;
  margin: 0.5rem auto;           /* Centra il contenitore */
  
  background-color: #111;        /* Sfondo scuro per effetto tabellone */
  border: 2px solid #00ff00;     /* Bordo verde neon */
  border-radius: 0.5rem;
  box-shadow: 0 0 15px rgba(0,255,0,0.3);
}

/* Effetto scanline leggero per dare aspetto vintage */
.vintage-scoreboard::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.1; /* Regola l'intensità delle scanline */
  background-image: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 2px
  );
}

/* Stile per il nome della squadra all'interno del tabellone */
.vintage-scoreboard .team-name {
  font-family: 'Press Start 2P', cursive;
  font-size: 1rem;
  color: #fff;
  text-transform: uppercase;
}

/* Stile per il testo "vs" */
.vintage-scoreboard .vs-line {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.9rem;
  color: #ffe600;
  text-shadow: 0 0 4px rgba(255,230,0,0.8);
}

/* Stile per i punteggi in formato "digitale" */
.vintage-scoreboard .score-badge {
  font-family: 'DS-Digital', 'Press Start 2P', cursive;
  font-size: 1.2rem;
  color: #00ff00;
  background: none;   /* Rimuove sfondo per effetto LED */
  border: none;       /* Nessun bordo */
  text-shadow: 0 0 6px rgba(0,255,0,0.6);
  padding: 0;
}


/* Avviso rischio alto pre-match */
.risky-alert {
  margin-top: 10px;
  text-align: center;
}

.risky-alert .badge-title {
  background: #ff0055;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #fff;
  font-family: 'Press Start 2P', monospace;
}

.risky-alert .badge-text {
  margin-top: 6px;
  color: #ffccff;
  font-size: 0.75rem;
  font-family: 'Press Start 2P', monospace;
  text-shadow: 1px 1px #000;
}

/* Avviso pre-match stabile */
.safe-alert {
  margin-top: 10px;
  text-align: center;
}

.safe-alert .badge-title {
  background: #00cc66;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #000;
  font-family: 'Press Start 2P', monospace;
}

.safe-alert .badge-text {
  margin-top: 6px;
  color: #b3ffcc;
  font-size: 0.75rem;
  font-family: 'Press Start 2P', monospace;
  text-shadow: 1px 1px #000;
}


.metric-value .dimmed {
  opacity: 0.5;
  filter: grayscale(0.4);
}


/* regola base già applicata per desktop/mobile grandi */
.vintage-scoreboard {
  position: relative;
  text-align: center;
}
.vintage-scoreboard .venue-info-small {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  color: #ccc;
  white-space: nowrap;
  pointer-events: none;
}

/* ————————— mobile (max-width 400px) ————————— */
@media (max-width: 400px) {
  .vintage-scoreboard .venue-info-small {
    /* escono dal flow assoluto */
    position: static;
    display: block;         /* occupa tutta la riga */
    margin: 6px auto 0;     /* 6px di spazio sopra, centra orizzontalmente */
    transform: none;        /* non serve più */
    left: auto;             /* non serve più */
    width: 90%;             /* leggero padding orizzontale */
    font-size: 7px;         /* più piccolo per telefono */
    white-space: normal;    /* spezza su più righe */
  }
}

.venue-info-small .spectator-icon {
  margin: 0 2px;
  font-size: 0.8em;      /* un filo più piccolo del testo */
  vertical-align: middle;
  color: #ccc;           /* come il resto del testo */
}
/* container già centra e ha mobile-first */
.vintage-scoreboard .venue-info-small {
  text-align: center;
  display: block;
  margin: 6px auto 0;
  font-size: 7px;
  color: #ccc;
}

/* impedisci al blocco stadio+icona+capienza di andare a capo */
.vintage-scoreboard .venue-info-small .venue-stadium-capacity {
  white-space: nowrap;
}

/* un minimo di spacing per la location */
.vintage-scoreboard .venue-info-small .venue-location {
  margin-right: 4px;
}




/* ========================================================================== */
/* 6. RESPONSIVE (Mobile First)                                               */
/* ========================================================================== */
/* Regole specifiche per schermi <= 576px per ottimizzare lo spazio mobile */
@media (max-width: 576px) {
  /* ... regole esistenti per vintage-scoreboard, prediction-badge, ecc. */

  /* Layout a colonna per scoreboard su mobile */
  .vintage-scoreboard {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
}

/* =========================
   7) DESKTOP ADJUSTMENTS
   ========================= */

/* Goal più grande su desktop (>= 992px) */
@media (min-width: 992px) {
  .vintage-scoreboard .score-badge {
    font-size: 2rem; /* Scegli tu la dimensione */
  }
}
  .vintage-scoreboard .team-name {
    font-size: 0.9rem;        /* Riduci leggermente il testo delle squadre */
  }
  .vintage-scoreboard .score-badge {
    font-size: 2rem;          /* Punteggio leggermente ridotto */
  }
  .vintage-scoreboard .vs-line {
    font-size: 0.8rem;        /* "vs" più piccolo */
  }

  /* 6.2) Badge AI Prediction: dimensioni ridotte per mobile */
  .prediction-badge {
    display: block;           /* Visualizza su riga intera */
    margin: 0.5rem auto;      /* Centra il badge */
    font-size: 0.8rem;        /* Testo più piccolo */
    padding: 0.3rem 0.6rem;
  }

  /* 6.3) Card Header: riduci padding per ottimizzare lo spazio */
  .analysis-card .card-header {
    padding: 1rem;            /* Meno padding su mobile */
  }

  /* 6.4) Live Analysis: testo e barra più compatti */
  .ai-live-analysis-title {
    font-size: 1rem;
  }
  .progress-status {
    font-size: 0.7rem;
  }
  .ai-live-summary {
    font-size: 0.85rem;
  }

  /* 6.5) Metrics Grid: due colonne su mobile */
  .ai-live-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .ai-metric {
    padding: 0.5rem;
  }
.ai-metric .metric-value {
  font-family: 'DS-Digital', monospace;
  font-size: 1rem;
  background: transparent;       /* sicuro… */
  -webkit-text-fill-color: #39ff14; /* il vero colore “LED” */
  text-shadow:
    0 0 2px rgba(57,255,20,0.8),
    0 0 6px rgba(57,255,20,0.6);
}



  /* 6.6) Sezioni di analisi: margini e padding ridotti */
  .analysis-body {
    margin: 1rem;
    padding: 1rem;
  }
  
    
  .analysis-text p {
    font-size: 0.9rem;
  }
  
   /* 6.6.1) metriche live dominant focus */
.metric-home.dominant,
.metric-away.dominant {
  color: #39ff14 !important;
  font-weight: bold;
}

.metric-home.weakened,
.metric-away.weakened {
  opacity: 0.4;
}

.dominant {
  animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
  0%, 100% { text-shadow: 0 0 2px #39ff14, 0 0 5px #39ff14; }
  50% { text-shadow: 0 0 10px #39ff14, 0 0 20px #39ff14; }
}


  /* 6.7) Logout Button: dimensioni più contenute */
  .logout-btn-floating {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    bottom: 10px;
    right: 10px;
  }
}

/* ========================================================================== */
/* 7. MATCH HEADER (Altri stili, se presenti)                                 */
/* ========================================================================== */
.match-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap; /* Utile per spazi ristretti */
}

/* ========================================================================== */
/* 8. BADGE PREDICTION (Versioni dinamiche e originali)                      */
/* ========================================================================== */

/* Stile base per il badge Prediction */
.prediction-badge {
  display: inline-block;
  margin-top: 0.5rem;
  background-color: #008f11;
  color: #fff;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.9rem; /* Puoi modificarlo per bilanciare il layout */
  padding: 0.4rem 0.8rem;
  border-radius: 0.5rem;
  margin: 0.5rem;
  text-shadow: 0 0 4px rgba(255,255,255,0.5);
  box-shadow: 0 0 6px rgba(0,255,0,0.4);
  border: 2px solid #00ff00;
}

/* Versione "risky" del badge Prediction (cambia colore) */
.prediction-badge.risky {
  background-color: var(--away-win-color) !important;
  box-shadow: 0 0 6px rgba(255,87,34,0.6) !important;
}

/* ========================================================================== */
/* 9. AI LIVE ANALYSIS CONTAINER                                             */
/* ========================================================================== */
.ai-live-analysis-container {
  background-color: rgba(0, 0, 0, 0.8);
  border: 2px solid #ff00ff;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-top: 1.5rem;
  text-align: center;
  box-shadow: 0 0 12px rgba(255, 0, 255, 0.6);
}

/* La barra di avanzamento e i relativi stati (verde, giallo, rosso) */
/* Default (verde) */
.progress-bar {
  height: 100%;
  width: 100%; /* Inizialmente piena */
  background: linear-gradient(90deg, #00ff00, #00cc66);
  transition: width 0.5s ease-in-out, background 0.5s ease-in-out;
}
.progress-bar.warning {
  background: linear-gradient(90deg, #ffcc00, #ffaa00);
}
.progress-bar.danger {
  background: linear-gradient(90deg, #ff0000, #cc0000);
}
.critical-progress {
  background: linear-gradient(90deg, #ff0000, #cc0000) !important;
}

/* Effetto lampeggio per tracking shift */
.blinking {
  animation: blink-animation 1s infinite alternate;
}
@keyframes blink-animation {
  0% { opacity: 1; }
  100% { opacity: 0.4; }
}

/* Testo "loading" AI con cursore lampeggiante */
.loading-text::after {
  content: " █";
  display: inline-block;
  animation: blinkCursor 1s infinite;
}
@keyframes blinkCursor {
  0% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}


/* Titolo della Live Analysis */
.ai-live-analysis-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.4rem;
  text-transform: uppercase;
  color: #ffe600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-shadow: 0 0 8px rgba(255,230,0,0.8);
}
.ai-live-analysis-title i {
  color: #ff00ff;
  font-size: 1.6rem;
  text-shadow: 0 0 6px rgba(255,0,255,0.6);
}

/* Contenitore della barra di avanzamento */
.ai-live-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1rem;
}
.progress-bar-container {
  width: 90%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  overflow: hidden;
  height: 12px;
  position: relative;
  border: 1px solid rgba(0, 255, 0, 0.5);
  box-shadow: 0 0 5px rgba(0, 255, 0, 0.3);
}

/* Testo di stato della progress bar */
.progress-status {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8rem;
  color: #00ff00;
  text-shadow: 0 0 3px rgba(0, 255, 0, 0.5);
  margin-top: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  animation: flicker 1.5s infinite alternate;
}

/* Contenitore del messaggio AI */
.ai-live-summary {
  background: rgba(0, 255, 128, 0.2);
  border: 1px solid rgba(0, 255, 128, 0.5);
  border-radius: 0.5rem;
  padding: 0.8rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  text-align: center;
  color: #00ff80;
  text-shadow: 0 0 4px rgba(0, 255, 128, 0.8);
}
@media (max-width: 576px) {
  .ai-live-summary {
    font-size: 1rem; /* Aumenta leggermente per migliorare la leggibilità */
    padding: 1rem;
  }
}

/* Contenitore del messaggio AI in loading */
.ai-loading-box {
  background: rgba(0, 255, 0, 0.1);
  border: 1px solid rgba(0, 255, 0, 0.4);
  border-radius: 0.5rem;
  padding: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.9rem;
  color: #00ff00;
  text-shadow: 0 0 5px rgba(0, 255, 0, 0.6);
  width: 90%;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
.loading-text::after {
  content: " █";
  display: inline-block;
  animation: blinkCursor 1s infinite;
}
@keyframes blinkCursor {
  0% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}

/* ========================================================================== */
/* 10. METRICHE LIVE                                                        */
/* ========================================================================== */
.ai-live-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  justify-content: center;
  margin-top: 1rem;
}
.ai-metric {
  background: rgba(255, 0, 255, 0.15);
  border: 1px solid rgba(255, 0, 255, 0.3);
  border-radius: 0.5rem;
  padding: 0.8rem;
  text-align: center;
  text-shadow: 0 0 6px rgba(255,0,255,0.4);
  box-shadow: 0 0 8px rgba(255,0,255,0.2);
  transition: transform 0.2s ease-in-out;
}
.ai-metric:hover {
  transform: scale(1.05);
}
.metric-label {
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
  display: block;
  color: var(--text-secondary);
}
.metric-value {
  font-size: 1.4rem;
  font-weight: bold;
  color: #00ff00;
  margin-top: 0.3rem;
}

/* ========================================================================== */
/* 11. QUOTE LIVE                                                           */
/* ========================================================================== */
.ai-live-odds {
  margin-top: 1.5rem;
  text-align: center;
}
.odds-box {
  background: rgba(0, 255, 255, 0.15);
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 0.5rem;
  padding: 0.8rem;
  text-align: center;
  transition: background 0.3s ease-in-out;
}
.odds-value {
  font-size: 1.3rem;
  font-weight: bold;
  text-shadow: 0 0 6px rgba(0, 255, 255, 0.5);
}
.odds-up {
  color: #ff4d4d; /* Quota in salita: rosso */
  text-shadow: 0 0 6px rgba(255, 0, 0, 0.6);
}
.odds-down {
  color: #00ff00; /* Quota in discesa: verde */
  text-shadow: 0 0 6px rgba(0, 255, 0, 0.6);
}

/* ========================================================================== */
/* 12. RESPONSIVE OTTIMIZZAZIONE (per metriche e quote su schermi <=820px)    */
/* ========================================================================== */
@media (max-width: 820px) {
  .ai-live-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .metric-value {
    font-size: 1.2rem;
  }
  .odds-box {
    padding: 1rem;
  }
  .odds-value {
    font-size: 1.1rem;
  }
}

/* ========================================================================== */
/* 13. STATISTICHE E LED                                                    */
/* ========================================================================== */
.stat-highlight {
  background: rgba(211,84,0,0.1);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 1rem 1.5rem 1rem;
  border: 1px solid rgba(211,84,0,0.2);
  transition: background 0.3s ease;
}
.stat-highlight:hover {
  background: rgba(211,84,0,0.2);
}
.stat-value {
  font-size: 2rem;
  font-family: 'DS-Digital', 'Press Start 2P', sans-serif;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 6px rgba(211,84,0,0.6);
}
@media (max-width: 576px) {
  .stat-value {
    font-size: 2.6rem;
  }
}
.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ========================================================================== */
/* 14. ANALISI APPROFONDITA                                                 */
/* ========================================================================== */
.analysis-body {
  background: #242424;
  border: 1px solid rgba(255,0,255,0.2);
  border-radius: 1rem;
  padding: 1.5rem;
  margin: 1rem;
  box-shadow: 0 0 8px rgba(255,0,255,0.1);
}
.analysis-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 1rem;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1rem;
  letter-spacing: 1px;
  text-shadow: 0 0 6px rgba(255,0,255,0.4);
}
.analysis-text p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.4;
  margin-bottom: 1rem;
}
.analysis-text strong {
  color: #fff;
  font-weight: 600;
}
.analysis-divider {
  border: 0;
  height: 1px;
  background: linear-gradient(to right, rgba(255,0,255,0.5), rgba(255,255,255,0), rgba(255,0,255,0.5));
  margin: 1.5rem 0;
}

/* ========================================================================== */
/* 15. AI INSIGHTS                                                          */
/* ========================================================================== */
.ai-insights-card {
  background: #242424;
  border: 1px solid rgba(211,84,0,0.2);
  border-radius: 1rem;
  padding: 1rem;
  margin-top: 1rem;
  box-shadow: 0 0 8px rgba(211,84,0,0.1);
}
.ai-insights-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 1rem;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1rem;
  text-shadow: 0 0 6px rgba(211,84,0,0.4);
  text-align: center;
}
.insight-box {
  background: #2b2b2b;
  border: 1px solid rgba(255,0,255,0.2);
  border-radius: 0.5rem;
  padding: 1rem;
  margin: 0.5rem;
  text-align: center;
}
.insight-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}
.insight-value {
  font-family: 'DS-Digital', 'Press Start 2P', sans-serif;
  font-size: 1.4rem;
  color: var(--accent-color);
  text-shadow: 0 0 4px rgba(211,84,0,0.6);
  display: block;
  margin-top: 0.25rem;
}
@media (max-width: 820px) {
  .ai-insights-card .row {
    flex-direction: column;
    align-items: center;
  }
  .ai-insights-card .col-4 {
    width: 100%;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
  }
  .insight-value {
    font-size: 1.2rem;
  }
  .insight-box {
    background: #2b2b2b;
    border: 1px solid rgba(255,0,255,0.2);
    border-radius: 0.5rem;
    padding: 1.2rem 1.5rem; /* Aumentato leggermente per maggiore respiro */
    margin: 0.5rem;
    text-align: center;
  }
}

/* ========================================================================== */
/* 16. COMPARISON CARD                                                      */
/* ========================================================================== */
.comparison-card {
  background: #242424;
  border: 1px solid rgba(211,84,0,0.2);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-top: 2rem;
  box-shadow: 0 0 8px rgba(211,84,0,0.1);
}
.comparison-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 1rem;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1rem;
  letter-spacing: 1px;
  text-shadow: 0 0 6px rgba(211,84,0,0.4);
  text-align: center;
}
.comparison-row {
  display: flex;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(211,84,0,0.05);
}
.comparison-row:last-child {
  border-bottom: none;
}
.comparison-team {
  flex: 1;
  display: flex;
}
.comparison-team.home {
  justify-content: flex-start;
}
.comparison-team.away {
  justify-content: flex-end;
}
.comparison-value {
  font-family: 'DS-Digital', 'Press Start 2P', sans-serif;
  color: var(--accent-color);
  font-size: 1.4rem;
  text-shadow: 0 0 6px rgba(211,84,0,0.6);
  line-height: 1;
}
.comparison-stat-label {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}
.center-label {
  text-align: center;
}

/* ========================================================================== */
/* 17. CHART CARD (Historical Accuracy)                                     */
/* ========================================================================== */
.chart-card {
 margin: 2rem; /* top, right, bottom, left */
  border-radius: var(--mobile-card-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  height: 100%;
  background: #2b2b2b;
  margin-bottom: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
}
.chart-card .card-header {
  padding: 1.25rem;
  border-bottom: none;
  background: #222;
}
.chart-card .card-header h5 {
  color: #fff;
  margin: 0;
  font-size: 1rem;
  font-family: 'Press Start 2P', cursive;
  text-transform: uppercase;
}
.chart-container {
  height: 250px;
  padding: 1rem;
}
@media (min-width: 768px) {
  .chart-container {
    height: 350px;
    padding: 1.5rem;
  }
  .chart-card {
    border-radius: var(--desktop-card-radius);
  }
  .chart-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
  }
}

/* ========================================================================== */
/* 18. LOGIN CARD & INPUTS                                                  */
/* ========================================================================== */
.login-card {
  background: #2b2b2b;
  border: 2px solid rgba(255,0,255,0.2);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 0 12px rgba(255,0,255,0.2);
  text-align: center;
}
.login-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.4rem;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1rem;
  text-shadow: 0 0 6px rgba(255,0,255,0.4);
  opacity: 0;
  transform: translateY(-10px);
  animation: fadeInUp 0.8s ease-out forwards;
}
.highlight {
  color: #ff00ff;
  text-shadow: 0 0 8px rgba(255,0,255,0.6);
}
.login-description {
  color: #ccc;
  font-size: 1rem;
  max-width: 90%;
  margin: 0 auto 1rem auto;
  line-height: 1.5;
  word-break: break-word;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 1s ease-out forwards 0.3s;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 768px) {
  .login-title {
    font-size: 1.2rem;
  }
  .login-description {
    font-size: 0.9rem;
    line-height: 1.4;
  }
}
.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  border: none;
  border-radius: 5px;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  width: 100%;
  transition: background 0.3s ease;
}
.login-btn:hover {
  background: #ddd;
}
.login-icon {
  width: 1.2em;
  height: 1.2em;
}
@media (max-width: 768px) {
  .login-title {
    font-size: 1.2rem;
  }
  .login-description {
    font-size: 0.9rem;
    max-width: 95%;
    text-align: center;
    line-height: 1.4;
  }
}
.neon-input {
  background-color: #1a1a1a;
  border: 1px solid rgba(255, 0, 255, 0.3);
  color: #fff;
  font-family: 'DS-Digital', 'Press Start 2P', sans-serif;
  box-shadow: 0 0 4px rgba(255,0,255,0.2) inset;
  transition: all 0.3s ease;
}
.neon-input:focus {
  border-color: #ff00ff;
  outline: none;
  box-shadow: 0 0 8px rgba(255,0,255,0.4), 0 0 4px rgba(255,0,255,0.2) inset;
}
.neon-button {
  font-family: 'Press Start 2P', cursive;
  background: var(--gradient-primary);
  border: none;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 6px rgba(255,255,255,0.3);
  box-shadow: 0 0 6px rgba(255,0,255,0.4);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.neon-button:hover {
  background: linear-gradient(135deg, #ff00ff, #ff0080);
  box-shadow: 0 0 12px rgba(255,0,255,0.7);
}
.neon-button:focus {
  outline: none;
  box-shadow: 0 0 12px rgba(255,0,255,0.7);
}


/* override per tutti i neon-button, oppure usa .challenge-button:hover */
.neon-button:hover {
  /* gradient arancio→mustard */
  background: linear-gradient(135deg,
    var(--secondary-color),
    var(--primary-color)
  );
  /* ombra calda in tinta */
  box-shadow: 0 0 12px rgba(211,84,0,0.7);
}

.challenge-button {
  display: inline-block;
  margin: 1.5rem auto 0;
  padding: 0.75rem 1.5rem;    /* stesso “spessore” del pulsante principale */
  font-size: 1rem;           /* idem font-size */
  letter-spacing: 0.1em;     /* idem letter-spacing */
  border-radius: 0.5rem;     /* arrotondato come il neon-button */
}



.login-links a {
  color: #00ffff;
  text-decoration: none;
  font-size: 0.75rem;
  font-family: 'Press Start 2P', cursive;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}
.login-links a:hover {
  color: #fff;
  text-shadow: 0 0 4px rgba(211,84,0,0.8);
}
@media (max-width: 576px) {
  .login-card {
    padding: 1.5rem;
    margin: 0 1rem;
  }
  .login-title {
    font-size: 1rem;
  }
  .neon-button {
    font-size: 0.8rem;
  }
}

/* ========================================================================== */
/* 19. DAILY MATCHES & MATCH CARD                                           */
/* ========================================================================== */
.daily-title {
  font-family: 'Press Start 2P', cursive;
  color: #fff;
}
.championship-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.1rem;
  color: #fff;
  margin: 1rem 0 0.5rem;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 0 6px rgba(255,0,255,0.4);
}
.match-card {
  background: #2b2b2b;
  border: 1px solid rgba(255,0,255,0.2);
  border-radius: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
  text-align: center;
  transition: transform 0.3s ease;
  cursor: pointer;
}
.match-card:hover {
  transform: translateY(-5px);
}
.match-teams {
  font-family: 'Press Start 2P', cursive;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.match-time {
  font-family: 'DS-Digital', 'Press Start 2P', sans-serif;
  color: var(--accent-color);
  font-size: 1rem;
}

.no-matches {
  color: #ccc;
  font-style: italic;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
}




@media (max-width: 820px) {
  .match-card {
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ========================================================================== */
/* 20. SCORE & PREDICTION BADGES (RETRO STYLE)                                */
/* ========================================================================== */
/* Stile per i badge dei punteggi con effetto neon */
.score-badge {
  display: inline-block;
  font-family: 'Press Start 2P', cursive;
  font-size: 1rem; /* Base per mobile, sovrascritto su desktop tramite media query */
  color: #fff;
  background: rgba(211,84,0,0.1);
  border: 1px solid rgba(211,84,0,0.2);
  border-radius: 0.5rem;
  padding: 0.6rem 1rem;
  margin: 0.5rem;
  text-align: center;
  
  /* Effetto neon */
  text-shadow: 0 0 6px rgba(255,0,255,0.4);
  box-shadow: 0 0 6px rgba(255,0,255,0.2);
  transition: transform 0.3s ease;
}
.score-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 12px rgba(255,0,255,0.4);
}
/* Aumenta leggermente la dimensione su schermi più larghi */
@media (min-width: 576px) {
  .score-badge {
    font-size: 1.2rem;
  }
}

/* ========================================================================== */
/* 21. CARD PREMIUM & “PRO” SECTION                                           */
/* ========================================================================== */
.premium-card {
  background-color: #2b2b2b;
  border: 1px solid rgba(211,84,0,0.2);
  border-radius: 1rem;
  box-shadow: 0 0 12px rgba(211,84,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}
.premium-card:hover {
  transform: scale(1.03);
  box-shadow: 0 0 20px rgba(211,84,0,0.5);
  z-index: 2;
}

/* Header gradient */
.premium-card .card-header {
  background: var(--gradient-primary) !important;
  padding: 1rem;
}
.premium-card .card-title {
  margin: 0;
  font-family: 'Press Start 2P', cursive;
  color: #fff;
  font-size: 1.2rem;
}

/* Price styling */
.premium-card .price {
  font-family: 'DS-Digital', sans-serif;
  font-size: 2rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

/* Feature list */
.premium-card ul {
  text-align: left;
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}
.premium-card ul li {
  margin-bottom: 0.5rem;
  font-family: 'Inter', sans-serif;
  color: #fff;
  position: relative;
  padding-left: 1.5rem;
}
.premium-card ul li::before {
  content: "★";
  position: absolute;
  left: 0;
  color: var(--accent-color);
}

/* Buy button */
.premium-card .neon-button {
  display: inline-block;
  margin-top: 1rem;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.9rem;
  text-transform: uppercase;
  padding: 0.6rem 1rem;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  box-shadow: 0 0 6px rgba(211,84,0,0.4);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.premium-card .neon-button:hover {
  background: var(--gradient-secondary);
  box-shadow: 0 0 12px rgba(211,84,0,0.7);
}
.premium-card .neon-button:focus {
  outline: none;
  box-shadow: 0 0 12px rgba(211,84,0,0.7);
}

/* “Most Popular” badge */
.featured-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--secondary-color);
  color: #fff;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-bottom-left-radius: 8px;
  box-shadow: 0 0 8px rgba(211,84,0,0.5);
  z-index: 2;
}

/* Pro-plan border & header override */
.premium-card.pro-plan {
  border-color: var(--secondary-color);
}
.premium-card.pro-plan .card-header {
  background: var(--gradient-secondary) !important;
}

/* ========================================================================== */
/* 21b. MOBILE TWEAKS FOR “MOST POPULAR” BADGE                                  */
/* ========================================================================== */
@media (max-width: 576px) {
  .featured-badge {
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
  }
}


/* ========================================================================== */
/* 22. INSTALL BUTTON & LOGOUT BUTTON                                       */
/* ========================================================================== */
.install-btn-retro {
  display: inline-block;
  cursor: pointer;
  transition: 0.2s ease-in-out;
  font-family: 'Press Start 2P', cursive;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #ff00ff 0%, #ff6eff 100%);
  color: #fff;
  border: 2px solid #ff00ff;
  padding: 12px 20px;
  outline: none;
  box-shadow: 0 0 10px rgba(255,0,255,0.6);
}
.install-btn-retro:hover {
  transform: translateY(-2px);
  background: linear-gradient(90deg, #fff 0%, #fff 100%);
  color: #ff00ff;
  box-shadow: 0 0 15px rgba(255,0,255,0.9);
}
.logout-btn-floating {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: 'Press Start 2P', cursive;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 20px;
  border-radius: 0.5rem;
  /* gradient da secondary-color a accent-color */
  background: linear-gradient(
    90deg,
    var(--secondary-color),
    var(--accent-color)
  );
  color: var(--text-primary);
  border: 2px solid var(--secondary-color);
  box-shadow: 0 0 10px rgba(211, 84, 0, 0.8);
  cursor: pointer;
  transition: all 0.3s ease;
}
.logout-btn-floating:hover {
  background: linear-gradient(
    90deg,
    var(--accent-color),
    var(--secondary-color)
  );
  box-shadow: 0 0 15px rgba(211, 84, 0, 1);
  transform: translateY(-2px);
}


/* ========================================================================== */
/* 23. ICONE (LIVE, VALUE BET, PIN, NOTIFICHE, RISK)                         */
/* ========================================================================== */
.live-icon,
.value-bet-icon,
.pin-icon,
.notification-icon {
  font-size: 1.2rem;
  color: gray;
  opacity: 0.4;
  margin-left: 0.5rem;
  transition: color 0.3s ease, opacity 0.3s ease;
  cursor: pointer;
}
.live-icon.live {
  font-size: 1.5rem;
  color: #ff0000;
  text-shadow: 0 0 8px rgba(255,0,0,0.8), 0 0 16px rgba(255,0,0,0.6);
  animation: blink-live 1s infinite alternate;
  opacity: 1;
}
@keyframes blink-live {
  0% { opacity: 1; }
  100% { opacity: 0.3; }
}
.value-bet-icon.active {
  color: #00ff00;
  opacity: 1;
}
.pin-icon.pinned {
  color: #ffd700;
  opacity: 1;
}
.notification-icon.active {
  color: #00ff00;
  opacity: 1;
  text-shadow: 0 0 6px rgba(0,255,0,0.7);
}
.risky-icon {
  font-size: 1.2rem;
  color: #ff5722;
  text-shadow: 0 0 8px rgba(255,87,34,0.8);
  margin-left: 0.5rem;
}
.safe-icon {
  font-size: 1.2rem;
  color: #00ff00;
  text-shadow: 0 0 8px rgba(0,255,0,0.8);
  margin-left: 0.5rem;
}


.drop-warning {
  background: rgba(255, 235, 59, 0.2);
  border: 1px solid #FFEB3B;
  padding: 0.5em;
  margin: 0.5em 0;
  border-radius: 4px;
  font-size: 0.9em;
}





/* ========================================================================== */
/* 23.1 info metrics panels                                                       */
/* ========================================================================== */


.info-icon {
  font-size: 1.2rem;
  color: #fff;
  opacity: 0.8;
  /* Aggiungi un margin-left più grande per distanziare l'icona dal testo */
  margin-left: 8px; 
  cursor: pointer;
  transition: color 0.3s ease, opacity 0.3s ease;
}
.info-icon:hover {
  color: #ff00ff;
  opacity: 1;
  text-shadow: 0 0 6px rgba(255, 0, 255, 0.6);
}


/* Stile retro neon per la modale */
/* MODAL STILE RETRO NEON */
.modal-content {
  background: #1e1e1e;               /* Sfondo leggermente più chiaro del nero totale */
  border: 2px solid #ff00ff;        /* Bordo neon fucsia */
  border-radius: 0.5rem;
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 0, 255, 0.4);
  animation: neonModalFadeIn 0.3s ease forwards;
}

/* Effetto fade in */
@keyframes neonModalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  border-bottom: 1px solid rgba(255, 0, 255, 0.2);
  background: rgba(255, 0, 255, 0.1);
  padding: 1rem 1.5rem;
}

.modal-header .modal-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 0 4px rgba(255, 0, 255, 0.4);
  margin: 0;
}

.modal-body {
  font-size: 0.95rem;
  line-height: 1.4;
  color: #ddd;
  font-family: 'Inter', sans-serif;
  background: #2b2b2b;              /* Leggero contrasto interno */
  border: 1px solid rgba(255,0,255,0.2);
  border-radius: 0.5rem;
  padding: 1rem 1.2rem;
  box-shadow: inset 0 0 6px rgba(255, 0, 255, 0.1);
  margin: 1rem;                     /* Spazio interno per staccare dal bordo */
}

/* Pulsante di chiusura (la X) */
.btn-close {
  filter: brightness(0) invert(1);  /* Rende la X bianca */
  opacity: 0.8;
  transition: opacity 0.3s ease;
}
.btn-close:hover {
  opacity: 1;
}

/* Se vuoi personalizzare anche lo sfondo esterno scuro quando la modale è aperta */
.modal-backdrop.show {
  background-color: rgba(0, 0, 0, 0.7);
}



/* ========================================================================== */
/* 24. PINNED MATCHES                                                       */
/* ========================================================================== */
.pinned-card {
  border: 2px solid #ff00ff;
  box-shadow: 0 0 12px rgba(255,0,255,0.5);
  background: rgba(255,0,255,0.1);
}
#pinnedContainer .championship-title {
  color: #ff00ff;
  text-shadow: 0 0 6px rgba(255,0,255,0.6);
}

/* ========================================================================== */
/* 25. ANIMAZIONI RETRO                                                     */
/* ========================================================================== */
.retro-reload {
  animation: neonBlip 0.7s ease-in-out;
}
@keyframes neonBlip {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.97);
    opacity: 0.3;
    filter: blur(1px);
  }
  100% {
    transform: scale(1);
    opacity: 1;
    filter: blur(0);
  }
}

/* ========================================================================== */
/* 26. BUTTON BACK TO TODAY LIST                                            */
/* ========================================================================== */
.back-to-list {
  position: relative;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}
.back-to-list.fixed {
  position: fixed;
  top: 60px;
  left: 10px;
  z-index: 9999;
  background: #2b2b2b;
  padding: 0.4rem 0.8rem;
  border-radius: 0.5rem;
}
.back-link {
  font-family: 'Press Start 2P', cursive;
  color: #00ffff;
  text-decoration: none;
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(211,84,0,0.4);
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(211,84,0,0.5);
  transition: color 0.3s ease, box-shadow 0.3s ease;
}
.back-link:hover {
  color: #fff;
  box-shadow: 0 0 12px rgba(211,84,0,0.7);
  text-shadow: 0 0 6px rgba(211,84,0,0.5);
}



/* ========================================================================== */
/* 27. BEAT THE AI SECTION                                                     */
/* ========================================================================== */

/* Base styles per le cards */
.feature-box {
  background: var(--card-bg);
  border: 1px solid rgba(65,125,122,0.2);
  border-radius: 1rem;
  width: 100%;
  min-height: 250px;
  text-align: center;
  box-shadow: 0 0 8px rgba(65,125,122,0.1);
}

/* Titoli e paragrafi interni */
.feature-box h3 {
  font-size: 1.1rem;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.feature-box p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Icona retro in sprite fallback (non necessarie con SVG inline) */
.retro-icon {
  width: 48px;
  height: 48px;
  display: block;
  background-size: contain;
}
.sprite-curve   { background-image: url('/img/icons/curve-8bit.svg'); }
.sprite-picks   { background-image: url('/img/icons/picks-8bit.svg'); }
.sprite-leader  { background-image: url('/img/icons/leaderboard-8bit.svg'); }

/* Dimensione icone SVG inline */
.beat-ai-page .feature-icon {
  width: 64px;
  height: 64px;
}

/* ——————————————————————————————————————————————————————————————— */
/* Hover & animazioni extra */
/* ——————————————————————————————————————————————————————————————— */

/* solleva e illumina la card al passaggio del mouse */
.beat-ai-page .feature-box {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.beat-ai-page .feature-box:hover {
  transform: translateY(-8px);
  box-shadow: 0 0 16px rgba(211,84,0,0.6);
}

/* animazione glow per le icone SVG */
@keyframes iconGlow {
  0%,100% { filter: drop-shadow(0 0 4px rgba(211,84,0,0.8)); }
  50%     { filter: drop-shadow(0 0 8px rgba(211,84,0,1)); }
}
.beat-ai-page .feature-icon {
  animation: iconGlow 1.5s infinite alternate;
}

/* ========================================================================== */
/* Pulsante CTA arancione: corregge il bug del testo bianco al hover          */
/* ========================================================================== */
.hero-cta.primary:hover {
  color: var(--text-primary) !important;
  text-shadow: 0 0 6px rgba(255,255,255,0.6);
}


/* ========================================================================== */
/* ==========================================================================  
   Pulsante AI Challenge: Modale & Option-Buttons  
   ========================================================================== */

/* ───────────────────────────────  
   1) MODAL FULL-SCREEN BACKDROP  
   ─────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9); /* sfondo semitrasparente scuro */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
}

/* Nasconde completamente l’elemento quando serve */
.hidden {
  display: none;
}

/* ───────────────────────────────  
   2) MODAL CONTENT & NEON BORDER  
   ─────────────────────────────── */
.modal-content {
  position: relative;
  background: #111;                /* sfondo nero profondo */
  width: 100%;
  max-width: 320px;                /* larghezza massima sul mobile */
  padding: 1.5rem;
  text-align: center;
  border-radius: 0.5rem;
}

/* bordo e bagliore neon */
.neon-border {
  border: 2px solid var(--secondary-color);
  box-shadow: 0 0 12px var(--secondary-color);
}

/* ───────────────────────────────  
   3) CLOSE BUTTON “×”  
   ─────────────────────────────── */
.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--secondary-color);
  cursor: pointer;
}

/* ───────────────────────────────  
   4) HEADLINE STYLES  
   ─────────────────────────────── */
.pixel-font {
  font-family: 'Press Start 2P', monospace;
  color: #eee;
  display: block;
  margin: 0.75rem 0;
}

.neon-text {
  color: var(--primary-color);
  text-shadow:
    0 0 4px var(--primary-color),
    0 0 8px var(--secondary-color);
}

/* ───────────────────────────────  
   5) OPTIONS GRID  
   ─────────────────────────────── */
.options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

/* ───────────────────────────────  
   6) OPTION BUTTON (base)  
   ─────────────────────────────── */
.option-btn {
  background: transparent;
  border: 2px solid var(--secondary-color);
  border-radius: 0.5rem;
  padding: 0.75rem 0;
  font-family: 'Press Start 2P', monospace;
  font-size: 1.2rem;
  color: var(--secondary-color);
  text-shadow: 0 0 6px rgba(255, 159, 0, 0.7);
  cursor: pointer;
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.1s ease;
}

/* Hover e focus: glow + leggero ingrandimento */
.option-btn:hover,
.option-btn:focus {
  background: rgba(255, 159, 0, 0.2);
  box-shadow: 0 0 12px rgba(255, 159, 0, 0.8);
  transform: scale(1.05);
  outline: none;
}

/* Active (click): effetto “pop” */
.option-btn:active {
  transform: scale(0.95);
}

/* ───────────────────────────────  
   7) PULSE GLOW ANIMATION  
   ─────────────────────────────── */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow:
      0 0 8px rgba(255, 159, 0, 0.8),
      0 0 16px rgba(255, 159, 0, 0.6);
  }
  50% {
    box-shadow:
      0 0 16px rgba(255, 159, 0, 1),
      0 0 32px rgba(255, 159, 0, 0.8);
  }
}

/* ───────────────────────────────  
   8) OPTION SELECTED STATE  
   ─────────────────────────────── */
.option-btn.selected {
  background: var(--secondary-color);
  color: #111;
  animation: pulseGlow 1.5s ease-in-out infinite;
  transform: scale(1.1);
}

/* ───────────────────────────────  
   9) CONFIRM BUTTON  
   ─────────────────────────────── */
.confirm-btn {
  margin-top: 1.5rem;
  width: 100%;
}

/* ───────────────────────────────  
   10) RESPONSIVE MEDIA QUERIES  
   ─────────────────────────────── */
@media (min-width: 768px) {
  .modal-content {
    max-width: 480px;
    padding: 2rem;
  }
  .modal-content h2 {
    font-size: 1.5rem;
  }
}

@media (min-width: 1200px) {
  .modal-content {
    max-width: 600px;
    padding: 2.5rem;
  }
}


.prediction-info {
  margin: 0.5rem 0;
  font-size: 0.9rem;
  text-align: center;
  color: #ffda00;
}
.prediction-info.success {
  color: #6aa84f;
}


.prediction-info {
  margin: 0.5em 0;
  font-size: 0.9rem;
  color: #0ff;
}
.prediction-info.error { color: #f55; }





/* ========================================================================== */
/* 27b.0. GAMIFICATION AI CHALLENGE                                           */
/* ========================================================================== */


.retro-card {
      background-color: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 1rem;
      backdrop-filter: blur(4px);
      box-shadow: 0 0 10px rgba(255,255,255,0.05);
    }
    .table.retro-table td, .table.retro-table th {
      font-size: 0.875rem;
    }
    .leaderboard-tiers {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 2rem;
      margin-bottom: 2rem;
    }
    .tier-entry {
      text-align: center;
      max-width: 100px;
    }
    .tier-icon {
      height: 56px;
      opacity: 0.5;
      filter: grayscale(100%) brightness(0.4);
      transition: 0.3s ease;
    }
    .tier-icon.active {
      filter: none;
      opacity: 1;
      transform: scale(1.2);
      animation: glowPulse 1.6s infinite alternate;
    }
    @keyframes glowPulse {
      0% { filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 4px #ff0); }
      100% { filter: drop-shadow(0 0 10px #fff) drop-shadow(0 0 20px #ff0); }
    }
    .tier-label {
      font-family: 'Press Start 2P', monospace;
      font-size: 0.7rem;
      margin-top: 0.5rem;
      color: #ccc;
    }
    .tier-entry .active + .tier-label {
      color: #fff;
      font-weight: bold;
    }
    @media (max-width: 991px) {
      .pixel-font {
        font-size: 0.85rem;
      }
      .hero-title, .hero-subtitle {
        padding-left: 1rem;
        padding-right: 1rem;
      }
      .leaderboard-tiers {
        gap: 1.25rem;
      }
    }
	
/* ensure the color actually applies inside bootstrap’s tables */
.promotion-zone td {
  color: #39ff14 !important;
  font-weight: bold;
  text-align: center;
}
.relegation-zone td {
  color: #ff4444 !important;
  font-weight: bold;
  text-align: center;
}

    .current-row {
      background-color: rgba(255,255,255,0.1) !important;
    }
    @media (max-width: 991px) {
      .pixel-font { font-size: 0.85rem; }
      .hero-title, .hero-subtitle { padding: 0 1rem; }
      .leaderboard-tiers { gap: 1.25rem; }
    }




/* contenitore lista */
#top-matches-list {
  margin: 0;
  padding: 0;
}

/* ogni voce divisa in 3 colonne: data / squadre / freccia */
.top-match-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.top-match-item:last-child {
  border-bottom: none;
}

/* colonna data/ora */
.top-match-item .match-date {
  color: #aaa;
  font-size: 0.8rem;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}
.top-match-item .match-date .time {
  display: block;
  font-weight: bold;
}

/* colonna squadre: impilate verticalmente */
.top-match-item .match-teams {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.top-match-item .team {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}
.top-match-item .team-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* colonna freccia */
.top-match-item .arrow {
  font-size: 1.2rem;
  text-decoration: none;
  padding-left: 0.5rem;
}

/* piccolo kick: cambia colore al hover */
.top-match-item:hover .arrow {
  color: #ff0;
}
/* evidenzia l’utente corrente */
.current-user {
  background-color: rgba(255, 255, 255, 0.1) !important;
  font-weight: bold;
}

/* Zona promozione */
.promotion-zone {
  color: #39ff14;
  font-weight: bold;
  text-align: center;
}

/* Zona retrocessione */
.relegation-zone {
  color: #ff4444;
  font-weight: bold;
  text-align: center;
}

/* ========================================================================== */
/* LEFT-ALIGN CARDS & STYLE LISTE “The Game” e “Cheat Codes”                   */
/* ========================================================================== */
#leaderboard .row > .col-lg-3:nth-child(3) .retro-card {
  text-align: left;
}

/* spazio sotto il titolo h4 */
#leaderboard .row > .col-lg-3:nth-child(3) .retro-card h4.pixel-font {
  margin-bottom: 0.75rem;
}

/* “The Game” (ol numerato) */
#leaderboard .row > .col-lg-3:nth-child(3) ol.game-steps {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  list-style-type: decimal inside;
  line-height: 1.4;
}

/* “Cheat Codes” (ul puntato) */
#leaderboard .row > .col-lg-3:nth-child(3) ul.cheat-list {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  list-style-type: disc inside;
  line-height: 1.4;
}

/* se vuoi uniformare anche i paragrafi sotto gli elenchi */
#leaderboard .row > .col-lg-3:nth-child(3) .retro-card p {
  margin-bottom: 1rem;
}


/* THE GAME – stile avanzato */

/* ───────────────────────────────────────────────────────────────────────── */
/* Center “THE GAME” title inside its card, keep il resto left-aligned      */
/* ───────────────────────────────────────────────────────────────────────── */
.retro-card h4.pixel-font.text-info {
  text-align: center;
  margin-bottom: 1rem; /* un pochino più di spazio sotto il titolo */
}



ol.game-steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding-left: 0;
}
ol.game-steps li {
  counter-increment: step;
  position: relative;
  padding: 0.75rem 0 0.75rem 3rem;
  margin-bottom: 0.5rem;
  transition: background 0.2s ease;
}
ol.game-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 2rem; height: 2rem;
  line-height: 2rem;
  background: var(--secondary-color);
  color: #111;
  font-weight: bold;
  border-radius: 50%;
  text-align: center;
  text-shadow: none;
  box-shadow: 0 0 4px rgba(0,0,0,0.5);
}
/* effetto hover sulle righe */
ol.game-steps li:hover {
  background: rgba(212,160,23,0.1);
}
/* un po’ di spazio sotto il paragrafo finale */
ol.game-steps + p {
  margin-top: 1rem;
}


/* ───────────────────────────────────────────────────────────────────────── */
/* Enfatizza il testo “Press START and let the pixels fly!” in THE GAME card */
/* ───────────────────────────────────────────────────────────────────────── */
.retro-card h4.pixel-font.text-info + ol + p {
  /* mobile-first: dimensione leggermente più grande e colore accentuato */
  font-size: 1rem;            /* da 0.875rem a 1rem su mobile */
  font-weight: 600;           /* un filo più “audace” */
  color: var(--secondary-color);
  text-align: center;
  margin-top: 1rem;           /* un po’ di spazio sopra */
  /* mantieni l’opacità piena, rimuovi mb-0 se necessario */
}

/* su tablet e desktop alza un pochino la dimensione */
@media (min-width: 576px) {
  .retro-card h4.pixel-font.text-info + ol + p {
    font-size: 1.1rem;
  }
}



/* ───────────────────────────────────────────────────────────────────────── */
/*  Your Picks card: centratura, lista orizzontale e pallini custom        */
/* ───────────────────────────────────────────────────────────────────────── */
.picks-card {
  text-align: center;
}
.picks-card p.small {
  margin-bottom: 1rem !important;
}
#picks-summary {
  list-style: none;
  padding: 0;
  margin: 0 auto 1.5rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
}
#picks-summary li {
  position: relative;
  padding-left: 0;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
}
#picks-summary li::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--secondary-color);
  border-radius: 50%;
  margin-right: 0.5rem;
}
.picks-card .btn-outline-primary {
  display: inline-block;
  margin: 0 auto;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
}
@media (max-width: 576px) {
  #picks-summary {
    flex-direction: column;
    gap: 0.5rem;
  }
}


/* ───────────────────────────────────────────────────────────────────── */
/* Enfatizza l’intro della card “Your Picks”                             */
/* ───────────────────────────────────────────────────────────────────── */
.picks-card p.small:first-of-type {
  font-size: 1rem;                  /* più grande su mobile */
  font-weight: 600;                 /* un po’ di bold */
  color: var(--secondary-color);    /* colore arancio acceso */
  text-shadow: 0 0 4px rgba(211,84,0,0.6);
  margin-bottom: 1rem !important;   /* spazio extra sotto */
  letter-spacing: 0.02em;           /* leggero tracking */
}

@media (min-width: 576px) {
  .picks-card p.small:first-of-type {
    font-size: 1.1rem;              /* ancora più grande su tablet+ */
  }
}


/* ───────────────────────────────────────────────────────────────────── */
/* Enfatizza e centra la card “Your Rank”                               */
/* ───────────────────────────────────────────────────────────────────── */
#yourRankCard {
  text-align: center;
}

/* Numero di rank “#1” */
#yourRankCard #rankNumber {
  display: block;
  font-size: 2.5rem;               /* grandezza principale su mobile */
  font-weight: bold;
  color: var(--secondary-color);   /* arancio vivo */
  margin-bottom: 0.25rem;
  text-shadow: 0 0 4px rgba(211,84,0,0.6);
}

/* Nome utente sotto il numero */
#yourRankCard #rankName {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

/* Stile per i valori Tier / Streak / Points */
#yourRankCard p.small {
  margin: 0.25rem 0;
  font-size: 0.9rem;
}
#yourRankCard p.small strong {
  color: var(--accent-color);
  font-weight: bold;
}
#yourRankCard p.small .text-info { /* Tier */
  color: var(--secondary-color) !important;
}
#yourRankCard p.small .text-danger { /* Streak */
  color: var(--away-win-color) !important;
}

/* Banner promozione/relegation */
#yourRankCard #rankBanner {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Su tablet e desktop aumenta leggermente il numero */
@media (min-width: 576px) {
  #yourRankCard #rankNumber {
    font-size: 3rem;
  }
}


/* ————————— HERO / PREMIUM TEASER ————————— */
.hero-hype {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 1rem;
  opacity: 0.9;
}






/* ========================================================================== */
/* 27b. FOOTER SPACE                                                         */
/* ========================================================================== */
.footer-space {
  height: 4rem;
}

