:root {
    --primary-color: #1a237e;
    --secondary-color: #ffd700;
    --accent-color: #ff5722;
    --dark-bg: #0a0e2a;
    --darker-bg: #050818;
    --text-color: #e8eaf6;
    --success-color: #4caf50;
    --danger-color: #f44336;
    --warning-color: #ff9800;
}

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Orbitron:wght@400;700&family=Rajdhani:wght@500;700&display=swap');

body {
    font-family: 'Rajdhani', 'Orbitron', 'Press Start 2P', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--darker-bg) 100%) !important;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255, 215, 0, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(255, 87, 34, 0.1) 0%, transparent 20%) !important;
    min-height: 100vh;
    color: var(--text-color) !important;
    overflow-x: hidden;
    background-attachment: fixed;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.game-container {
    background: linear-gradient(145deg, rgba(10, 14, 40, 0.9) 0%, rgba(26, 35, 126, 0.8) 100%);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    box-shadow:
        0 0 30px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(255, 215, 0, 0.1) inset;
    padding: 30px;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

.game-container::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        conic-gradient(
            from 0deg at 50% 50%,
            rgba(255, 215, 0, 0.05) 0deg,
            rgba(255, 87, 34, 0.05) 90deg,
            rgba(75, 0, 130, 0.05) 180deg,
            rgba(0, 188, 212, 0.05) 270deg,
            rgba(255, 215, 0, 0.05) 360deg
        );
    animation: rotateGradient 20s linear infinite;
    z-index: 0;
}

@keyframes rotateGradient {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

h1 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 25px;
    font-family: 'Press Start 2P', cursive;
    font-size: 2.5rem;
    text-shadow:
        0 0 10px rgba(255, 215, 0, 0.5),
        0 0 20px rgba(255, 215, 0, 0.3);
    letter-spacing: 2px;
    position: relative;
    animation: neonPulse 2s ease-in-out infinite alternate;
}

@keyframes neonPulse {
    from {
        text-shadow:
            0 0 10px rgba(255, 215, 0, 0.5),
            0 0 20px rgba(255, 215, 0, 0.3);
    }
    to {
        text-shadow:
            0 0 15px rgba(255, 215, 0, 0.7),
            0 0 30px rgba(255, 215, 0, 0.5),
            0 0 40px rgba(255, 215, 0, 0.3);
    }
}

.setup-section {
    padding: 20px;
    border: 2px solid rgba(255, 215, 0, 0.2);
    border-radius: 12px;
    margin-bottom: 15px;
    background: rgba(10, 14, 40, 0.7);
    backdrop-filter: blur(5px);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.setup-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color), var(--secondary-color));
    background-size: 200% 100%;
    animation: loadingBar 3s linear infinite;
}

@keyframes loadingBar {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.game-section {
    padding: 20px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    margin-bottom: 15px;
    background: rgba(10, 14, 40, 0.7);
    backdrop-filter: blur(5px);
    box-shadow:
        0 0 20px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(255, 215, 0, 0.1) inset;
}

.form-group {
    margin-bottom: 12px;
    position: relative;
}

.form-group::before {
    content: "▶";
    color: var(--secondary-color);
    position: absolute;
    left: -15px;
    top: 5px;
    font-size: 12px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--secondary-color);
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
}

input[type="number"], 
input[type="text"], 
select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    box-sizing: border-box;
    background: rgba(26, 35, 126, 0.5);
    color: var(--text-color);
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
    transition: all 0.3s ease;
}

/* Style spécifique pour les champs de texte des noms de joueurs */
#player-names input[type="text"] {
    padding: 12px 15px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    background: rgba(26, 35, 126, 0.5);
    color: var(--text-color);
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

#player-names input[type="text"]:focus {
    border-color: var(--secondary-color);
    box-shadow:
        0 0 10px rgba(255, 215, 0, 0.3),
        0 0 20px rgba(255, 215, 0, 0.1);
    outline: none;
}

input[type="number"]:focus, select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow:
        0 0 10px rgba(255, 215, 0, 0.3),
        0 0 20px rgba(255, 215, 0, 0.1);
    transform: translateY(-2px);
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

button {
    background: linear-gradient(135deg, var(--secondary-color), #ffb300);
    color: var(--dark-bg);
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    margin-right: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.2),
        0 0 0 0 rgba(255, 215, 0, 0.3) inset;
}

button::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover::before {
    width: 300px;
    height: 300px;
}

button:hover {
    background: linear-gradient(135deg, #ffb300, var(--secondary-color));
    transform: translateY(-3px);
    box-shadow:
        0 6px 12px rgba(0, 0, 0, 0.3),
        0 0 0 10px rgba(255, 215, 0, 0.2) inset,
        0 0 20px rgba(255, 215, 0, 0.4);
}

button:active {
    transform: translateY(1px);
}

#cancel-score {
    background: linear-gradient(135deg, var(--danger-color), #d32f2f);
}

#cancel-score:hover {
    background: linear-gradient(135deg, #d32f2f, var(--danger-color));
    box-shadow:
        0 6px 12px rgba(244, 67, 54, 0.4),
        0 0 0 10px rgba(244, 67, 54, 0.2) inset,
        0 0 20px rgba(244, 67, 54, 0.4);
}

#reset-game-btn {
    background: linear-gradient(135deg, var(--warning-color), #f57c00);
}

#reset-game-btn:hover {
    background: linear-gradient(135deg, #f57c00, var(--warning-color));
    box-shadow:
        0 6px 12px rgba(255, 152, 0, 0.4),
        0 0 0 10px rgba(255, 152, 0, 0.2) inset,
        0 0 20px rgba(255, 152, 0, 0.4);
}

.game-info {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.6), rgba(10, 14, 40, 0.6));
    border-radius: 12px;
    border-left: 4px solid var(--secondary-color);
    box-shadow:
        0 0 15px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(255, 215, 0, 0.1) inset;
    position: relative;
    overflow: hidden;
    min-height: 180px; /* Hauteur minimale pour éviter la superposition */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.game-info::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color), var(--success-color), var(--secondary-color));
    background-size: 300% 100%;
    animation: infoBar 4s linear infinite;
}

@keyframes infoBar {
    0% { background-position: 100% 0; }
    100% { background-position: -200% 0; }
}

.game-info h2, .game-info h3 {
    margin: 0;
    padding: 0;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.game-info-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    min-height: 120px;
}

.info-label {
    color: var(--secondary-color);
    min-width: 150px;
    text-align: right;
}

.info-value {
    color: var(--text-color);
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

.throw-indicator {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
    padding: 12px;
    background: rgba(10, 14, 40, 0.5);
    border-radius: 20px;
    border: 2px solid rgba(255, 215, 0, 0.2);
    min-height: 60px;
}

.throw-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #333, #555);
    border: 3px solid #666;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.throw-dot::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.throw-dot.active {
    background: linear-gradient(135deg, var(--secondary-color), #ffb300);
    border-color: var(--secondary-color);
    transform: scale(1.1);
    box-shadow:
        0 0 15px rgba(255, 215, 0, 0.5),
        0 0 30px rgba(255, 215, 0, 0.3);
    animation: dotPulse 1.5s ease-in-out infinite;
}

.throw-dot.active::before {
    background: rgba(255, 255, 255, 0.6);
    width: 12px;
    height: 12px;
}

@keyframes dotPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.throw-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    text-align: center;
    min-height: 24px;
}

.score-pad-container {
    display: flex;
    justify-content: center;
    margin: 25px 0;
    padding: 25px;
    background: linear-gradient(135deg, rgba(10, 14, 40, 0.5), rgba(26, 35, 126, 0.4));
    border-radius: 15px;
    box-shadow:
        0 0 25px rgba(0, 0, 0, 0.4),
        0 0 50px rgba(255, 215, 0, 0.1) inset;
    border: 2px solid rgba(255, 215, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.score-pad-container::before {
    content: "";
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background:
        radial-gradient(circle at 50% 50%,
            rgba(255, 215, 0, 0.03) 0%,
            transparent 70%);
    animation: radialPulse 15s ease-in-out infinite;
}

@keyframes radialPulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.1); opacity: 1; }
}

.score-pad {
    max-width: 700px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
}

.score-pad h3 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 22px;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow:
        0 0 5px rgba(255, 215, 0, 0.3),
        0 0 10px rgba(255, 215, 0, 0.1);
    animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
    from {
        text-shadow:
            0 0 5px rgba(255, 215, 0, 0.3),
            0 0 10px rgba(255, 215, 0, 0.1);
    }
    to {
        text-shadow:
            0 0 10px rgba(255, 215, 0, 0.5),
            0 0 20px rgba(255, 215, 0, 0.3),
            0 0 30px rgba(255, 215, 0, 0.1);
    }
}

.score-selection {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.multiplier-buttons {
    background: linear-gradient(135deg, rgba(10, 14, 40, 0.8), rgba(26, 35, 126, 0.7));
    padding: 20px;
    padding-top: 25px;
    border-radius: 12px;
    box-shadow:
        0 0 15px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(255, 215, 0, 0.1) inset;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    border: 2px solid rgba(255, 215, 0, 0.2);
    position: relative;
    overflow: visible;
    min-height: 140px;
}

.multiplier-buttons::before {
    content: "MULTIPLICATEUR";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    color: var(--dark-bg);
    padding: 6px 24px;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.multiplier-btn {
    padding: 15px 25px;
    font-size: 18px;
    font-weight: bold;
    background: linear-gradient(135deg, #2196F3, #0d47a1);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    flex: 0 0 calc(30% - 15px);
    max-width: 140px;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.2),
        0 0 0 0 rgba(33, 150, 243, 0.3) inset;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.multiplier-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.1) 0%,
            rgba(255, 255, 255, 0) 60%
        );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.multiplier-btn:hover::before {
    opacity: 1;
}

.multiplier-btn:hover {
    background: linear-gradient(135deg, #0d47a1, #2196F3);
    transform: translateY(-5px) scale(1.05);
    box-shadow:
        0 6px 15px rgba(0, 0, 0, 0.3),
        0 0 0 10px rgba(33, 150, 243, 0.2) inset,
        0 0 20px rgba(33, 150, 243, 0.4);
}

.multiplier-btn:active {
    transform: translateY(2px);
}

.multiplier-btn.selected {
    background: linear-gradient(135deg, var(--secondary-color), #ffb300);
    color: var(--dark-bg);
    box-shadow:
        0 0 20px rgba(255, 215, 0, 0.5),
        0 0 40px rgba(255, 215, 0, 0.3),
        0 0 60px rgba(255, 215, 0, 0.1);
    animation: selectedPulse 1.5s ease-in-out infinite;
    transform: translateY(-5px) scale(1.05);
}

@keyframes selectedPulse {
    0% { box-shadow:
        0 0 20px rgba(255, 215, 0, 0.5),
        0 0 40px rgba(255, 215, 0, 0.3),
        0 0 60px rgba(255, 215, 0, 0.1); }
    50% { box-shadow:
        0 0 25px rgba(255, 215, 0, 0.6),
        0 0 50px rgba(255, 215, 0, 0.4),
        0 0 70px rgba(255, 215, 0, 0.2); }
    100% { box-shadow:
        0 0 20px rgba(255, 215, 0, 0.5),
        0 0 40px rgba(255, 215, 0, 0.3),
        0 0 60px rgba(255, 215, 0, 0.1); }
}

.number-buttons {
    background: linear-gradient(135deg, rgba(10, 14, 40, 0.8), rgba(26, 35, 126, 0.7));
    padding: 20px;
    padding-top: 25px;
    border-radius: 12px;
    box-shadow:
        0 0 15px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(255, 215, 0, 0.1) inset;
    border: 2px solid rgba(255, 215, 0, 0.2);
    position: relative;
    overflow: visible;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.number-buttons::before {
    content: "CIBLE";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, var(--secondary-color), var(--success-color));
    color: var(--dark-bg);
    padding: 6px 28px;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.number-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.number-btn {
    width: 50px;
    height: 50px;
    font-size: 20px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--success-color), #388e3c);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.2),
        0 0 0 0 rgba(76, 175, 80, 0.3) inset;
    font-family: 'Orbitron', sans-serif;
    flex: 0 0 calc(18% - 10px);
    min-width: 40px;
}

.number-btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.number-btn:hover::before {
    width: 150px;
    height: 150px;
}

.number-btn:hover {
    background: linear-gradient(135deg, #388e3c, var(--success-color));
    transform: translateY(-5px) scale(1.1);
    box-shadow:
        0 6px 15px rgba(0, 0, 0, 0.3),
        0 0 0 10px rgba(76, 175, 80, 0.2) inset,
        0 0 20px rgba(76, 175, 80, 0.4);
}

.number-btn:active {
    transform: translateY(2px);
}

.number-btn.selected {
    background: linear-gradient(135deg, var(--secondary-color), #ffb300);
    color: var(--dark-bg);
    box-shadow:
        0 0 20px rgba(255, 215, 0, 0.5),
        0 0 40px rgba(255, 215, 0, 0.3),
        0 0 60px rgba(255, 215, 0, 0.1);
    animation: selectedPulse 1.5s ease-in-out infinite;
    transform: translateY(-5px) scale(1.1);
}

.number-btn[data-number="25"] {
    background: linear-gradient(135deg, var(--danger-color), #c62828);
}

.number-btn[data-number="25"]:hover {
    background: linear-gradient(135deg, #c62828, var(--danger-color));
    box-shadow:
        0 6px 15px rgba(0, 0, 0, 0.3),
        0 0 0 10px rgba(244, 67, 54, 0.2) inset,
        0 0 20px rgba(244, 67, 54, 0.4);
}

.number-btn[data-number="25"]::before {
    background: rgba(255, 255, 255, 0.3);
}

.score-input {
    display: none;
}

.game-stats {
    margin-top: 30px;
    position: relative;
}

.game-stats::before {
    content: "SCORES";
    position: absolute;
    top: -15px;
    left: 20px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    color: var(--dark-bg);
    padding: 8px 25px;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
    border-radius: 5px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.game-stats::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color), var(--success-color), var(--secondary-color));
    background-size: 300% 100%;
    animation: statsBar 5s linear infinite;
}

@keyframes statsBar {
    0% { background-position: 100% 0; }
    100% { background-position: -200% 0; }
}

#player-scores {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 25px;
    padding: 10px;
}

.player-card {
    border: 2px solid rgba(255, 215, 0, 0.2);
    padding: 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(10, 14, 40, 0.7), rgba(26, 35, 126, 0.6));
    box-shadow:
        0 0 15px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(255, 215, 0, 0.1) inset;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    break-inside: avoid;
}

.player-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    background-size: 200% 100%;
    animation: playerBar 3s linear infinite;
}

@keyframes playerBar {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.player-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 0 25px rgba(0, 0, 0, 0.4),
        0 0 50px rgba(255, 215, 0, 0.2) inset;
}

.player-name {
    font-weight: bold;
    margin-bottom: 12px;
    font-size: 18px;
    color: var(--secondary-color);
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 5px;
    min-height: 28px;
}

.player-name::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    background-size: 200% 100%;
    animation: nameUnderline 2s linear infinite;
}

@keyframes nameUnderline {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.player-score {
    font-size: 24px;
    color: var(--text-color);
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
    margin-bottom: 10px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-turn {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1), rgba(255, 215, 0, 0.1));
    border-left: 4px solid var(--secondary-color);
    box-shadow:
        0 0 25px rgba(33, 150, 243, 0.3),
        0 0 50px rgba(255, 215, 0, 0.2) inset;
    animation: turnPulse 2s ease-in-out infinite alternate;
}

@keyframes turnPulse {
    from {
        box-shadow:
            0 0 25px rgba(33, 150, 243, 0.3),
            0 0 50px rgba(255, 215, 0, 0.2) inset;
    }
    to {
        box-shadow:
            0 0 35px rgba(33, 150, 243, 0.5),
            0 0 70px rgba(255, 215, 0, 0.3) inset,
            0 0 90px rgba(255, 215, 0, 0.1) inset;
    }
}

.player-winner {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(76, 175, 80, 0.2));
    border: 2px solid var(--secondary-color);
    box-shadow:
        0 0 30px rgba(255, 215, 0, 0.4),
        0 0 60px rgba(76, 175, 80, 0.3) inset;
    animation:
        winnerPulse 1.5s ease-in-out infinite,
        winnerGlow 3s ease-in-out infinite alternate;
}

@keyframes winnerPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes winnerGlow {
    from {
        box-shadow:
            0 0 30px rgba(255, 215, 0, 0.4),
            0 0 60px rgba(76, 175, 80, 0.3) inset;
    }
    to {
        box-shadow:
            0 0 40px rgba(255, 215, 0, 0.6),
            0 0 80px rgba(76, 175, 80, 0.5) inset,
            0 0 100px rgba(255, 215, 0, 0.3) inset;
    }
}

/* Animation pour la sélection */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Animation pour le score célébration */
@keyframes score-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Animation pour les confettis */
@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Nouveau styles pour les éléments ajoutés */
.subtitle {
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
    animation: textGlow 2s ease-in-out infinite alternate;
}

.info-separator {
    color: var(--secondary-color);
    margin: 0 12px;
    font-weight: normal;
    opacity: 0.7;
}

#selected-score-display {
    background: linear-gradient(135deg, rgba(10, 14, 40, 0.8), rgba(26, 35, 126, 0.7));
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow:
        0 0 20px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(255, 215, 0, 0.2) inset;
}

#selected-score-display h3 {
    color: var(--secondary-color);
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#selected-score-value {
    color: var(--text-color);
    font-size: 28px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    animation: scorePulse 1.5s ease-in-out infinite;
}

.game-btn {
    background: linear-gradient(135deg, var(--secondary-color), #ffb300);
    color: var(--dark-bg);
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    margin-right: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.2),
        0 0 0 0 rgba(255, 215, 0, 0.3) inset;
}

.game-btn:hover {
    background: linear-gradient(135deg, #ffb300, var(--secondary-color));
    transform: translateY(-3px);
    box-shadow:
        0 6px 12px rgba(0, 0, 0, 0.3),
        0 0 0 10px rgba(255, 215, 0, 0.2) inset,
        0 0 20px rgba(255, 215, 0, 0.4);
}

.game-btn:active {
    transform: translateY(1px);
}

/* Effets de particule pour le fond */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 50%;
    animation: particleFloat 15s linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Animation d'entrée pour le jeu */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-container {
    animation: fadeInUp 0.8s ease-out;
}

/* Effet de bordure néon */
.neon-border {
    position: relative;
}

.neon-border::before,
.neon-border::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    border-radius: inherit;
    z-index: -1;
    pointer-events: none;
}

.neon-border::before {
    border: 2px solid transparent;
    background:
        linear-gradient(90deg, var(--secondary-color), var(--accent-color), var(--success-color), var(--secondary-color))
        border-box;
    mask:
        linear-gradient(#fff 0 0) padding-box,
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: neonBorder 3s linear infinite;
}

@keyframes neonBorder {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .game-container {
        padding: 15px;
    }
    
    .setup-section, .game-section {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .game-info {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .game-info-content {
        gap: 10px;
    }
    
    .info-row {
        flex-direction: column;
        text-align: center;
    }
    
    .info-separator {
        display: none;
    }
    
    .score-pad-container {
        padding: 15px;
    }
    
    .multiplier-btn, button {
        padding: 10px 16px;
        font-size: 14px;
        min-width: 90px;
    }
    
    .multiplier-btn {
        flex: 0 0 calc(45% - 15px);
    }
    
    .number-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
        flex: 0 0 calc(23% - 10px);
    }
    
    #player-scores {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 20px;
    }
    
    #selected-score-display {
        padding: 15px;
    }
    
    #selected-score-display h3 {
        font-size: 18px;
    }
    
    #selected-score-value {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.6rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .setup-section, .game-section {
        padding: 10px;
    }
    
    .form-group {
        margin-bottom: 10px;
    }
    
    input[type="number"], select {
        padding: 8px;
        font-size: 14px;
    }
    
    .multiplier-btn {
        flex: 0 0 100%;
        min-width: 80px;
    }
    
    .number-btn {
        flex: 0 0 calc(30% - 8px);
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .number-row {
        gap: 6px;
    }
    
    #player-scores {
        grid-template-columns: 1fr;
    }
    
    .player-card {
        min-height: 110px;
        padding: 15px;
    }
    
    .player-name {
        font-size: 16px;
        min-height: 24px;
    }
    
    .player-score {
        font-size: 24px;
        min-height: 36px;
    }
    
    .multiplier-buttons::before {
        font-size: 12px;
        padding: 4px 16px;
        top: -10px;
    }
    
    .number-buttons::before {
        font-size: 12px;
        padding: 4px 20px;
        top: -10px;
    }
    
    .game-info {
        padding: 12px;
        min-height: 160px;
    }
    
    .game-info-content {
        gap: 8px;
        min-height: 100px;
    }
}

/* Animation pour le chargement initial */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

body {
    animation: fadeIn 1s ease-in;
}

/* Assurer que le body a toujours le bon fond, même pendant le chargement */
html {
    background-color: var(--dark-bg) !important;
    min-height: 100%;
}

/* Style pour le chargement des polices */
/* .font-loading {
    opacity: 0;
} */

.font-loaded {
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* Forcer le thème sombre sur tous les éléments de base */
html, body {
    background-color: var(--dark-bg) !important;
    color: var(--text-color) !important;
}

/* Optimisation des espacements - Réduction des margins/paddings excessifs */
.setup-section, .game-section {
    padding: 15px;
    margin-bottom: 12px;
}

/* Style pour les boutons + et - des champs numériques */
.number-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.number-input-group input[type="number"] {
    flex: 1;
    text-align: center;
}

.number-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary-color), #ffb300);
    color: var(--dark-bg);
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.number-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.number-btn:active {
    transform: scale(0.98);
}

.number-btn.plus {
    font-size: 16px;
}

.number-btn.minus {
    font-size: 20px;
    line-height: 1;
}

.form-group {
    margin-bottom: 10px;
}

.game-info {
    padding: 15px;
    margin-bottom: 15px;
}

.game-info-content {
    gap: 10px;
    margin-bottom: 12px;
}

.score-pad-container {
    padding: 15px;
    margin: 15px 0;
}

.multiplier-buttons, .number-buttons {
    padding: 15px;
    padding-top: 20px;
}

/* Structure globale améliorée */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.game-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.setup-section, .game-section {
    position: relative;
    z-index: 1;
}

/* Empêcher la superposition avec les particules */
.particles {
    z-index: -1;
}

.game-container::before {
    z-index: 0;
}

/* Effet de surbrillance pour les éléments interactifs */
button:focus, 
input:focus, 
select:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Style pour les messages temporaires */
.temporary-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(10, 14, 40, 0.9), rgba(26, 35, 126, 0.8));
    color: var(--secondary-color);
    padding: 20px 30px;
    border-radius: 12px;
    border: 2px solid var(--secondary-color);
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow:
        0 0 30px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(255, 215, 0, 0.2) inset;
    z-index: 1000;
    animation:
        fadeInUp 0.3s ease-out,
        pulse 1.5s ease-in-out infinite;
    opacity: 0;
}

.temporary-message.show {
    opacity: 1;
}

/* Style pour l'animation de victoire */
.win-animation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 40, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: var(--secondary-color);
    text-align: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.win-animation.show {
    opacity: 1;
    pointer-events: all;
}

.win-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow:
        0 0 10px rgba(255, 215, 0, 0.5),
        0 0 20px rgba(255, 215, 0, 0.3);
    animation:
        neonPulse 2s ease-in-out infinite alternate,
        bounce 1s ease-out;
}

.win-subtitle {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.win-button {
    background: linear-gradient(135deg, var(--secondary-color), #ffb300);
    color: var(--dark-bg);
    padding: 15px 40px;
    border: none;
    border-radius: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 0 20px rgba(255, 215, 0, 0.4),
        0 0 40px rgba(255, 215, 0, 0.2) inset;
}

.win-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 0 30px rgba(255, 215, 0, 0.6),
        0 0 60px rgba(255, 215, 0, 0.3) inset;
}

/* Animation de rebond */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-30px); }
    60% { transform: translateY(-15px); }
}

/* Style pour les confettis */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

/* Styles améliorés pour les informations de jeu */
.game-info-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    margin: 15px 0;
    min-height: 160px;
}

.info-row {
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    width: 100%;
    margin: 8px 0;
}

.info-label {
    color: var(--secondary-color);
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    font-size: 16px;
    letter-spacing: 1px;
    min-width: 120px;
    text-align: right;
}

.info-value {
    color: var(--text-color);
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
    min-width: 80px;
    text-align: center;
}

.info-separator {
    color: var(--secondary-color);
    margin: 0 15px;
    font-weight: normal;
    opacity: 0.7;
}

/* Style pour l'affichage du joueur actuel */
#current-player {
    color: var(--secondary-color);
    font-family: 'Press Start 2P', cursive;
    font-size: 24px;
    text-shadow:
        0 0 5px rgba(255, 215, 0, 0.5),
        0 0 10px rgba(255, 215, 0, 0.3);
    animation: neonPulse 2s ease-in-out infinite alternate;
}

/* Style pour le score restant */
#remaining-score {
    color: var(--text-color);
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: bold;
    text-shadow:
        0 0 5px rgba(255, 215, 0, 0.3),
        0 0 10px rgba(255, 215, 0, 0.2);
}

/* Style pour les indicateurs de set et tour */
#current-set, #current-turn {
    color: var(--secondary-color);
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

.confetti:nth-child(odd) {
    background-color: var(--accent-color);
}

.confetti:nth-child(3n) {
    background-color: var(--success-color);
}

.confetti:nth-child(4n) {
    background-color: var(--danger-color);
}

.confetti:nth-child(5n) {
    background-color: #00bcd4;
}