:root {
    /* Fond très sombre avec une infime touche de violet pour lier le tout */
    --bg-dark: #0f0a14; 
    --card-bg: #1c1326;
    --text-light: #FFFFFF;
    
    /* TON DÉGRADÉ MAGIQUE */
    --gradient-fire: linear-gradient(135deg, #FF7A00 0%, #FF004D 50%, #7000FF 100%);
    
    /* Couleurs solides pour les ombres 3D (basées sur la fin du dégradé) */
    --shadow-color: #4a00a8; 
    --input-border: #FF004D; /* Le rouge au centre du dégradé pour l'input */
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Fredoka', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    height: 100dvh; 
    overflow: hidden; 
}

#app {
    display: flex;
    flex-direction: column;
    height: 100%;
}

header {
    text-align: center;
    padding: 20px 15px 10px;
}

header h1 {
    font-size: 2.8rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Application du dégradé sur le texte SPECIAL */
.highlight {
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    color: #907d9e;
    margin: 5px 0 0 0;
    font-size: 1.1rem;
}

#player-container {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

#empty-state {
    text-align: center;
    color: #5c456e;
    margin-top: 40px;
    font-size: 1.2rem;
    font-weight: 600;
}

#playerList {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.player-item {
    background: var(--card-bg);
    padding: 15px 20px;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    /* Légère bordure violette pour détacher la bulle */
    border: 2px solid #2d1c3d; 
}

.btn-delete {
    background: none;
    border: none;
    color: #FF004D;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 5px 10px;
}

.bottom-controls {
    padding: 15px 20px 30px;
    /* Dégradé noir vers transparent pour adoucir le bas */
    background: linear-gradient(to top, var(--bg-dark) 85%, transparent);
}

.input-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

input {
    flex: 1;
    padding: 15px 20px;
    border-radius: 25px;
    border: 2px solid var(--input-border);
    background: #000000;
    color: white;
    font-size: 1.1rem;
    font-family: 'Fredoka', sans-serif;
    outline: none;
}

input::placeholder {
    color: #5c456e;
}

/* Boutons avec le dégradé en fond et ombre 3D */
.btn-add {
    width: 60px;
    border-radius: 25px;
    border: none;
    background: var(--gradient-fire);
    color: white;
    font-size: 2rem;
    font-weight: bold;
    box-shadow: 0 6px 0 var(--shadow-color);
    transition: all 0.1s;
}

.btn-add:active {
    transform: translateY(6px);
    box-shadow: 0 0 0 var(--shadow-color);
}

.btn-start {
    width: 100%;
    padding: 18px;
    border-radius: 25px;
    border: none;
    background: var(--gradient-fire);
    color: white;
    font-size: 1.4rem;
    font-weight: bold;
    font-family: 'Fredoka', sans-serif;
    box-shadow: 0 8px 0 var(--shadow-color);
    transition: all 0.1s;
}

.btn-start:active:not(:disabled) {
    transform: translateY(8px);
    box-shadow: 0 0 0 var(--shadow-color);
}

/* État désactivé : on grise le bouton et on enlève le dégradé */
.btn-start:disabled {
    background: #2d1c3d;
    color: #666;
    box-shadow: 0 8px 0 #180f21;
    transform: none;
}

/* ========================================== */
/* Footer Discret - EN BAS DU SCROLL          */
/* ========================================== */
.discreet-footer {
    width: 100%;
    text-align: center;
    padding: 40px 0 20px 0; /* Donne de l'espace avec le dernier jeu */
    margin-top: auto; 
}

.discreet-footer a {
    display: inline-block;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.8rem;
    opacity: 0.5;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.05); /* Fond ultra léger */
    padding: 10px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.discreet-footer a:active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(0.95); /* Petit effet de clic ("pop") */
}

/* ========================================= */
/* POPUP NOUVELLE VERSION                    */
/* ========================================= */

/* Le fond sombre flouté derrière la pop-up */
.popup-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100dvh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999; /* S'assure qu'elle est au-dessus de tout le reste */
    padding: 20px;
    box-sizing: border-box;
    transition: opacity 0.3s ease;
}

/* Cache la pop-up par défaut */
.popup-overlay.hidden {
    display: none !important;
}

/* La boîte centrale */
.popup-content {
    background: linear-gradient(135deg, #1a0b2e, #050a14);
    border: 3px solid #B200FF;
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(178, 0, 255, 0.4);
}

/* Animation de l'icône qui flotte */
.popup-icon {
    font-size: 4rem;
    margin-bottom: 10px;
    animation: float 3s ease-in-out infinite;
}

.popup-content h2 {
    margin: 0 0 20px 0;
    font-size: 1.6rem;
    color: #fff;
}

.highlight-laspecial {
    color: #00E5FF;
    font-weight: 900;
    font-size: 2.2rem;
    text-shadow: 0 0 15px rgba(0, 229, 255, 0.5);
    display: block;
    margin-top: 5px;
}

/* Liste des nouveautés */
.popup-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    text-align: left;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.popup-features li {
    font-size: 1.1rem;
    color: #d4b3ff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.popup-features li:last-child { margin-bottom: 0; }
.popup-features strong { color: #fff; }

.popup-subtext {
    color: #FF004D;
    font-weight: bold;
    font-style: italic;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* Bouton Néon */
.btn-neon {
    background: linear-gradient(135deg, #B200FF, #6b0099);
    color: white;
    box-shadow: 0 6px 0 #3a0052, 0 0 20px rgba(178, 0, 255, 0.4);
    border: 2px solid #e0b3ff;
    width: 100%;
    padding: 18px;
    font-size: 1.3rem;
    font-family: 'Fredoka', sans-serif;
    border-radius: 15px;
    font-weight: 900;
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.1s;
}

.btn-neon:active {
    transform: translateY(6px);
    box-shadow: 0 0 0 #3a0052;
}

/* Animations d'apparition */
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-10px); } 100% { transform: translateY(0px); } }
.pop-in { animation: popInAnim 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
@keyframes popInAnim { 0% { transform: scale(0.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }