* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0f0f0f;
    color: white;
    overflow: hidden;
    position: relative;
}

/* Fond animé avec particules - plus discret */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(60, 60, 120, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(40, 80, 120, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(80, 40, 100, 0.08) 0%, transparent 50%);
    animation: subtleGradientShift 20s ease infinite;
    z-index: 0;
}

@keyframes subtleGradientShift {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05) rotate(2deg);
    }
}

/* Effet de grille animée - plus subtil */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: subtleGridMove 30s linear infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes subtleGridMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(60px, 60px);
    }
}

.screen {
    display: none;
    width: 100vw;
    height: 100vh;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.screen.active {
    display: flex;
}

/* ===== Configuration Screen ===== */
.config-container {
    background: linear-gradient(145deg, rgba(20, 20, 30, 0.95), rgba(30, 30, 45, 0.95));
    backdrop-filter: blur(10px);
    border: 2px solid rgba(100, 200, 255, 0.3);
    color: #fff;
    padding: 30px;
    border-radius: 30px;
    max-width: 1400px;
    width: 95vw;
    height: 95vh;
    overflow-y: auto;
    box-shadow: 
        0 0 60px rgba(100, 200, 255, 0.2),
        inset 0 0 40px rgba(100, 200, 255, 0.05);
    animation: containerFadeIn 0.6s ease-out;
    display: flex;
    flex-direction: column;
}

.config-container h1 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 2.5em;
    background: linear-gradient(135deg, #00d4ff, #2eaf88, #ff006e);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
    animation: titleGlow 3s ease-in-out infinite;
    font-weight: 900;
    flex-shrink: 0;
}

@keyframes containerFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.config-container h1 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 3em;
    background: linear-gradient(135deg, #00d4ff, #2eaf88, #ff006e);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
    animation: titleGlow 3s ease-in-out infinite;
    font-weight: 900;
}

@keyframes titleGlow {
    0%, 100% {
        filter: brightness(1) drop-shadow(0 0 20px rgba(0, 212, 255, 0.6));
    }
    50% {
        filter: brightness(1.3) drop-shadow(0 0 40px rgba(47, 247, 147, 0.8));
    }
}

.config-section {
    margin-bottom: 35px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.config-section:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(100, 200, 255, 0.3);
    transform: translateY(-2px);
}

.config-section {
    margin-bottom: 15px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    flex-shrink: 0;
}

.config-section:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(100, 200, 255, 0.3);
    transform: translateY(-2px);
}

.config-section h2 {
    margin-bottom: 15px;
    color: #00d4ff;
    font-size: 1.4em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* Configuration en grille */
.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.config-column {
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: 15px;
}

/* Section équipes améliorée */
.teams-section {
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(123, 47, 247, 0.1));
    border: 2px solid rgba(0, 212, 255, 0.3);
    flex-shrink: 0;
}

/* Configuration compacte des équipes */
.teams-config-compact {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.team-count-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.team-count-row label {
    font-size: 1em;
    font-weight: 700;
    color: #00d4ff;
    margin: 0;
    white-space: nowrap;
}

.team-count-buttons-horizontal {
    display: flex;
    gap: 10px;
}

.team-count-btn {
    width: 50px;
    height: 40px;
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 10px;
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    font-size: 1.2em;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-count-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(0, 212, 255, 0.4);
}

.team-count-btn.active {
    background: linear-gradient(135deg, #00d4ff, #27a57b);
    border-color: #00d4ff;
    color: white;
    box-shadow: 0 3px 15px rgba(0, 212, 255, 0.5);
    transform: scale(1.02);
}

.team-names-row {
    display: flex;
    flex-direction: column;
}

.team-names-horizontal {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.team-input {
    padding: 18px;
    font-size: 1.1em;
    font-weight: 700;
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    background: rgba(0, 212, 255, 0.05);
    color: #fff;
    transition: all 0.3s;
    margin-bottom: 0;
    border-left: 5px solid;
    min-width: 200px;
    flex: 1;
}

.team-input:focus {
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.15);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    transform: scale(1.02);
}

.team-input::placeholder {
    color: rgba(0, 212, 255, 0.7);
    font-weight: 600;
}

/* Bordures colorées pour les équipes */
.team-input.team-rouge {
    border-left-color: #ff6b6b;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(255, 107, 107, 0.05));
}

.team-input.team-bleu {
    border-left-color: #4dabf7;
    background: linear-gradient(135deg, rgba(77, 171, 247, 0.1), rgba(77, 171, 247, 0.05));
}

.team-input.team-verte {
    border-left-color: #51cf66;
    background: linear-gradient(135deg, rgba(81, 207, 102, 0.1), rgba(81, 207, 102, 0.05));
}

.team-input.team-jaune {
    border-left-color: #ffd43b;
    background: linear-gradient(135deg, rgba(255, 212, 59, 0.1), rgba(255, 212, 59, 0.05));
}

.team-input.team-rouge::placeholder {
    color: rgba(255, 107, 107, 0.8);
}

.team-input.team-bleu::placeholder {
    color: rgba(77, 171, 247, 0.8);
}

.team-input.team-verte::placeholder {
    color: rgba(81, 207, 102, 0.8);
}

.team-input.team-jaune::placeholder {
    color: rgba(255, 212, 59, 0.8);
}

/* Sélecteur de durée avec boutons */
.timer-duration-selector {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.timer-duration-selector label {
    font-size: 1.2em;
    font-weight: 700;
    color: #00ff88;
    margin: 0;
}

.timer-duration-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.timer-duration-btn {
    padding: 15px 20px;
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 12px;
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.timer-duration-btn:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.4);
}

.timer-duration-btn.active {
    background: linear-gradient(135deg, #00ff88, #00d4aa);
    border-color: #00ff88;
    color: white;
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.5);
    transform: scale(1.02);
}

/* Sélecteur de passes */
.passes-selector {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 169, 77, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 169, 77, 0.2);
}

.passes-selector label {
    font-size: 1.2em;
    font-weight: 700;
    color: #ffa94d;
    margin: 0;
}

.passes-buttons {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.passes-btn {
    padding: 12px 8px;
    border: 2px solid rgba(255, 169, 77, 0.3);
    border-radius: 10px;
    background: rgba(255, 169, 77, 0.1);
    color: #ffa94d;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 45px;
}

.passes-btn:hover {
    background: rgba(255, 169, 77, 0.2);
    border-color: #ffa94d;
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(255, 169, 77, 0.4);
}

.passes-btn.active {
    background: linear-gradient(135deg, #ffa94d, #ff8c42);
    border-color: #ffa94d;
    color: white;
    box-shadow: 0 3px 15px rgba(255, 169, 77, 0.5);
    transform: scale(1.02);
}

/* Affichage des passes dans le jeu */
.passes-display {
    margin-bottom: 30px;
    text-align: center;
    z-index: 2;
}

.passes-label {
    font-size: 1.8em;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    color: #ffa94d;
}

.passes-value {
    font-size: 3em;
    font-weight: 900;
    text-shadow: 
        0 0 20px #ffa94d,
        0 0 40px #ffa94d,
        0 5px 15px rgba(0, 0, 0, 0.5);
    font-family: 'Courier New', monospace;
    animation: passesGlow 2s ease-in-out infinite;
    color: #ffa94d;
}

.passes-value.warning {
    color: #ff006e;
    animation: passesWarning 0.5s infinite;
}

.passes-value.unlimited {
    color: #00ff88;
    font-size: 2.5em;
}

@keyframes passesGlow {
    0%, 100% {
        text-shadow: 
            0 0 20px #ffa94d,
            0 0 40px #ffa94d,
            0 5px 15px rgba(255, 169, 77, 0.5);
    }
    50% {
        text-shadow: 
            0 0 30px #ffa94d,
            0 0 60px #ffa94d,
            0 8px 20px rgba(255, 169, 77, 0.8);
    }
}

@keyframes passesWarning {
    0%, 100% {
        transform: scale(1);
        text-shadow: 
            0 0 20px #ff006e,
            0 0 40px #ff006e,
            0 5px 15px rgba(255, 0, 110, 0.8);
    }
    50% {
        transform: scale(1.1);
        text-shadow: 
            0 0 40px #ff006e,
            0 0 80px #ff006e,
            0 8px 25px rgba(255, 0, 110, 1);
    }
}

/* Section de démarrage avec résumé */
.start-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
    flex-shrink: 0;
}

/* Conteneur de récupération de session */
.restore-session-container {
    background: linear-gradient(135deg, rgba(255, 169, 77, 0.15), rgba(255, 107, 107, 0.15));
    border: 2px solid rgba(255, 169, 77, 0.4);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 10px;
    animation: sessionPulse 2s ease-in-out infinite;
}

@keyframes sessionPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 169, 77, 0.3);
        border-color: rgba(255, 169, 77, 0.4);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 169, 77, 0.5);
        border-color: rgba(255, 169, 77, 0.6);
    }
}

.restore-session-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.restore-icon {
    font-size: 2.5em;
    filter: drop-shadow(0 0 10px rgba(255, 169, 77, 0.6));
}

.restore-text {
    flex: 1;
}

.restore-title {
    font-size: 1.3em;
    font-weight: 700;
    color: #ffa94d;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(255, 169, 77, 0.5);
}

.restore-details {
    font-size: 1em;
    color: #e0e0e0;
    opacity: 0.9;
}

.restore-actions {
    display: flex;
    gap: 15px;
}

.btn-restore {
    flex: 2;
    padding: 15px 25px;
    font-size: 1.1em;
    font-weight: 700;
    border: 2px solid rgba(255, 169, 77, 0.5);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 169, 77, 0.2), rgba(255, 169, 77, 0.1));
    color: #ffa94d;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-restore:hover {
    background: linear-gradient(135deg, rgba(255, 169, 77, 0.3), rgba(255, 169, 77, 0.2));
    border-color: #ffa94d;
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(255, 169, 77, 0.4);
    color: white;
}

.btn-ignore {
    flex: 1;
    padding: 15px 20px;
    font-size: 1em;
    font-weight: 600;
    border: 2px solid rgba(108, 117, 125, 0.5);
    border-radius: 12px;
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-ignore:hover {
    background: rgba(108, 117, 125, 0.2);
    border-color: #6c757d;
    color: white;
    transform: scale(1.02);
}

.game-summary {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(123, 47, 247, 0.1));
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 15px;
    margin-bottom: 5px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    text-align: center;
}

.summary-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.2);
}

.summary-icon {
    font-size: 1.8em;
    margin-bottom: 6px;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
}

.summary-label {
    font-size: 0.85em;
    font-weight: 600;
    color: #b0b0b0;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.summary-value {
    font-size: 1.3em;
    font-weight: 900;
    color: #00d4ff;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    min-height: 1.3em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-value.error {
    color: #ff006e;
    text-shadow: 0 0 10px rgba(255, 0, 110, 0.5);
}

.summary-value.success {
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* Responsive pour le résumé */
@media (max-width: 768px) {
    .game-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 15px;
    }
    
    .summary-item {
        padding: 12px;
    }
    
    .summary-icon {
        font-size: 1.5em;
    }
    
    .summary-value {
        font-size: 1.2em;
    }
    
    /* Configuration des équipes en responsive */
    .teams-config-compact {
        gap: 15px;
    }
    
    .team-count-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .team-count-buttons-horizontal {
        justify-content: center;
        width: 100%;
    }
    
    .team-count-buttons-horizontal .team-count-btn {
        width: 50px;
        height: 50px;
    }
    
    .team-names-horizontal {
        flex-direction: column;
        gap: 10px;
    }
    
    .team-input {
        min-width: auto;
    }
}

/* Responsive pour la grille */
@media (max-width: 1200px) {
    .config-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .config-container {
        max-width: 900px;
        padding: 30px;
        width: 98vw;
        height: 98vh;
    }
    
    .config-container h1 {
        font-size: 2em;
        margin-bottom: 20px;
    }
    
    .checkbox-group {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .config-container {
        padding: 20px;
        border-radius: 20px;
    }
    
    .config-container h1 {
        font-size: 1.8em;
    }
    
    .config-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .config-section h2 {
        font-size: 1.2em;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
}

.config-section h2 {
    margin-bottom: 15px;
    color: #00d4ff;
    font-size: 1.4em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.config-section label {
    display: block;
    font-weight: 600;
    font-size: 1.1em;
    color: #e0e0e0;
}

.config-section input[type="number"],
.config-section input[type="text"],
.config-section select {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(100, 200, 255, 0.3);
    border-radius: 10px;
    font-size: 1.1em;
    margin-bottom: 15px;
    background: rgba(10, 10, 20, 0.6);
    color: #fff;
    font-weight: 600;
    transition: all 0.3s;
}

.config-section input[type="number"]:focus,
.config-section input[type="text"]:focus,
.config-section select:focus {
    outline: none;
    border-color: #00d4ff;
    background: rgba(10, 10, 20, 0.8);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 5px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    padding: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1em;
    font-weight: 600;
}

.checkbox-group label:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: #00d4ff;
    transform: translateY(-2px);
    box-shadow: 0 3px 15px rgba(0, 212, 255, 0.4);
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #00d4ff;
}

.team-input {
    margin-bottom: 15px;
}

.btn-primary, .btn-secondary {
    width: 100%;
    padding: 18px;
    font-size: 1.3em;
    font-weight: 900;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.btn-primary {
    background: linear-gradient(135deg, #00d4ff, #27a57b);
    color: white;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

.btn-primary::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;
}

.btn-primary:hover::before {
    width: 400px;
    height: 400px;
}

.btn-primary:hover {
    box-shadow: 0 15px 50px rgba(0, 212, 255, 0.6);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.2);
}

.btn-primary:disabled:hover {
    transform: none;
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.2);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    box-shadow: 0 10px 30px rgba(108, 117, 125, 0.4);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #3d4349);
    transform: scale(1.05);
}

/* ===== Game Screen ===== */
.game-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px;
    position: relative;
    border-left: 20px solid transparent;
    transition: border-color 0.3s ease;
}

/* Effet de lumière autour de l'équipe */
.game-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: pulseGlow 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.team-header {
    text-align: center;
    margin-bottom: 50px;
    animation: slideDown 0.6s ease-out;
    z-index: 2;
}

.team-header h1 {
    font-size: 4em;
    font-weight: 900;
    text-shadow: 
        0 0 20px currentColor,
        0 0 40px currentColor,
        0 5px 15px rgba(0, 0, 0, 0.5);
    margin-bottom: 15px;
    letter-spacing: 4px;
    text-transform: uppercase;
    animation: teamPulse 2s ease-in-out infinite;
}

@keyframes teamPulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 
            0 0 20px currentColor,
            0 0 40px currentColor,
            0 5px 15px rgba(0, 0, 0, 0.5);
    }
    50% {
        transform: scale(1.05);
        text-shadow: 
            0 0 30px currentColor,
            0 0 60px currentColor,
            0 8px 20px rgba(0, 0, 0, 0.7);
    }
}

.round-info {
    font-size: 2em;
    opacity: 0.9;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.word-display {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(240, 240, 255, 0.95));
    padding: 70px 100px;
    border-radius: 40px;
    margin-bottom: 50px;
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 0 3px rgba(0, 212, 255, 0.3),
        inset 0 0 40px rgba(0, 212, 255, 0.1);
    animation: wordPopIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 700px;
    text-align: center;
    position: relative;
    z-index: 2;
    border: 3px solid rgba(0, 212, 255, 0.5);
}

@keyframes wordPopIn {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.word {
    font-size: 5em;
    font-weight: 900;
    color: #000;
    margin-bottom: 15px;
    animation: wordFadeIn 0.5s ease-out;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
    transition: all 0.3s ease;
}

/* Style spécial pour le message de pause */
.word.paused {
    color: #ffa94d !important;
    font-style: italic !important;
    font-size: 3em !important;
    animation: pausePulse 2s ease-in-out infinite;
    text-shadow: 
        0 0 20px rgba(255, 169, 77, 0.6),
        0 0 40px rgba(255, 169, 77, 0.4);
}

@keyframes pausePulse {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@keyframes wordFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.word-meta {
    font-size: 1.6em;
    color: #555;
    font-style: italic;
    font-weight: 600;
}

.timer-container {
    margin-bottom: 40px;
    text-align: center;
    z-index: 2;
}

.timer {
    font-size: 5em;
    font-weight: 900;
    text-shadow: 
        0 0 30px currentColor,
        0 0 60px currentColor,
        0 5px 20px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
    letter-spacing: 5px;
}

.timer.warning {
    color: #ff006e;
    animation: timerPulse 0.5s infinite;
}

@keyframes timerPulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 
            0 0 30px #ff006e,
            0 0 60px #ff006e,
            0 5px 20px rgba(255, 0, 110, 0.8);
    }
    50% {
        transform: scale(1.1);
        text-shadow: 
            0 0 50px #ff006e,
            0 0 100px #ff006e,
            0 8px 30px rgba(255, 0, 110, 1);
    }
}

.timer-bar-container {
    width: 500px;
    height: 25px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 
        inset 0 2px 10px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(0, 212, 255, 0.3);
    border: 2px solid rgba(0, 212, 255, 0.5);
}

.timer-bar {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00d4ff);
    transition: width 0.1s linear;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
    border-radius: 12px;
}

/* Styles pour les boutons désactivés en pause */
.btn-control:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(70%);
    transform: none !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
}

.btn-control:disabled:hover {
    transform: none !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
}

.btn-control:disabled::before {
    display: none;
}

.score-display {
    margin-bottom: 40px;
    text-align: center;
    z-index: 2;
}

.score-label {
    font-size: 2em;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.score-value {
    font-size: 5em;
    font-weight: 900;
    text-shadow: 
        0 0 30px #00ff88,
        0 0 60px #00ff88,
        0 5px 20px rgba(0, 0, 0, 0.5);
    font-family: 'Courier New', monospace;
    animation: scoreGlow 2s ease-in-out infinite;
}

@keyframes scoreGlow {
    0%, 100% {
        color: #00ff88;
        text-shadow: 
            0 0 30px #00ff88,
            0 0 60px #00ff88,
            0 5px 20px rgba(0, 255, 136, 0.5);
    }
    50% {
        color: #00ffff;
        text-shadow: 
            0 0 40px #00ffff,
            0 0 80px #00ffff,
            0 8px 30px rgba(0, 255, 255, 0.8);
    }
}

.controls {
    display: flex;
    gap: 25px;
    margin-bottom: 30px;
    z-index: 2;
}

.btn-control {
    padding: 25px 50px;
    font-size: 1.8em;
    font-weight: 900;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-control::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.5s, height 0.5s;
}

.btn-control:hover::before {
    width: 300px;
    height: 300px;
}

.btn-found {
    background: linear-gradient(135deg, #00ff88, #00d4ff);
    box-shadow: 0 10px 40px rgba(0, 255, 136, 0.5);
}

.btn-found:hover {
    background: linear-gradient(135deg, #00ffaa, #00e5ff);
    transform: scale(1.1) rotate(-2deg);
    box-shadow: 0 15px 60px rgba(0, 255, 136, 0.8);
}

.btn-pass {
    background: linear-gradient(135deg, #ffa94d, #ff6b6b);
    box-shadow: 0 10px 40px rgba(255, 169, 77, 0.5);
}

.btn-pass:hover {
    background: linear-gradient(135deg, #ffbb66, #ff7777);
    transform: scale(1.1) rotate(2deg);
    box-shadow: 0 15px 60px rgba(255, 107, 107, 0.8);
}

.btn-pause {
    background: linear-gradient(135deg, #748ffc, #5c7cfa);
    box-shadow: 0 10px 40px rgba(116, 143, 252, 0.5);
}

.btn-pause:hover {
    background: linear-gradient(135deg, #859fff, #6d8dff);
    transform: scale(1.1);
    box-shadow: 0 15px 60px rgba(92, 124, 250, 0.8);
}

.keyboard-hints {
    display: flex;
    gap: 40px;
    font-size: 1.3em;
    opacity: 0.8;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.keyboard-hints span {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Bouton discret pour passer à l'équipe suivante */
.btn-skip-team {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 12px 20px;
    font-size: 1em;
    font-weight: 700;
    border: 2px solid rgba(255, 169, 77, 0.5);
    border-radius: 25px;
    background: rgba(255, 169, 77, 0.2);
    color: #ffa94d;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0.7;
    animation: subtlePulse 2s ease-in-out infinite;
}

.btn-skip-team:hover {
    opacity: 1;
    background: rgba(255, 169, 77, 0.3);
    border-color: #ffa94d;
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 169, 77, 0.4);
}

.btn-skip-team:active {
    transform: scale(0.95);
}

@keyframes subtlePulse {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.02);
    }
}

/* ===== Round End Screen ===== */
.round-end-container {
    background: linear-gradient(145deg, rgba(20, 20, 30, 0.95), rgba(30, 30, 45, 0.95));
    backdrop-filter: blur(15px);
    border: 3px solid rgba(0, 212, 255, 0.5);
    color: #fff;
    padding: 80px;
    border-radius: 40px;
    text-align: center;
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(0, 212, 255, 0.3);
    animation: containerPopIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes containerPopIn {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.round-end-container h1 {
    font-size: 4em;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #ff006e, #ffa94d);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    text-shadow: 0 0 40px rgba(255, 0, 110, 0.6);
    animation: titleFlash 1.5s ease-in-out infinite;
}

@keyframes titleFlash {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.5);
    }
}

.round-team {
    font-size: 3.5em;
    font-weight: 900;
    margin-bottom: 25px;
    text-shadow: 0 0 30px currentColor;
    animation: teamBounce 1s ease-in-out infinite;
}

@keyframes teamBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.round-label {
    font-size: 2em;
    margin: 15px 0;
    font-weight: 600;
}

.round-score-value {
    font-size: 7em;
    font-weight: 900;
    background: linear-gradient(135deg, #00ff88, #00d4ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 30px 0;
    text-shadow: 0 0 60px rgba(0, 255, 136, 0.8);
    animation: scoreExplosion 1s ease-out;
}

@keyframes scoreExplosion {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===== Scores Screen ===== */
.scores-container {
    background: linear-gradient(145deg, rgba(20, 20, 30, 0.95), rgba(30, 30, 45, 0.95));
    backdrop-filter: blur(15px);
    border: 3px solid rgba(0, 212, 255, 0.5);
    color: #fff;
    padding: 70px;
    border-radius: 40px;
    min-width: 700px;
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(0, 212, 255, 0.3);
    animation: containerFadeIn 0.6s ease-out;
}

.scores-container h1 {
    text-align: center;
    font-size: 4em;
    margin-bottom: 50px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    text-shadow: 0 0 40px rgba(255, 215, 0, 0.6);
    animation: trophyShine 2s ease-in-out infinite;
}

@keyframes trophyShine {
    0%, 100% {
        filter: brightness(1) drop-shadow(0 0 20px rgba(255, 215, 0, 0.6));
    }
    50% {
        filter: brightness(1.5) drop-shadow(0 0 40px rgba(255, 237, 78, 1));
    }
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 35px;
    margin-bottom: 20px;
    border-radius: 20px;
    font-size: 2.2em;
    font-weight: 900;
    color: white;
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.4),
        inset 0 2px 10px rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    animation: scoreItemSlide 0.5s ease-out backwards;
}

.score-item:nth-child(1) { animation-delay: 0.1s; }
.score-item:nth-child(2) { animation-delay: 0.2s; }
.score-item:nth-child(3) { animation-delay: 0.3s; }
.score-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes scoreItemSlide {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.score-item:hover {
    transform: translateX(10px) scale(1.02);
}

.score-item.winner {
    transform: scale(1.08);
    box-shadow: 
        0 15px 40px rgba(255, 215, 0, 0.6),
        0 0 60px rgba(255, 215, 0, 0.4),
        inset 0 2px 10px rgba(255, 255, 255, 0.2);
    animation: winnerPulse 1.5s ease-in-out infinite;
    border: 3px solid #ffd700;
}

@keyframes winnerPulse {
    0%, 100% {
        box-shadow: 
            0 15px 40px rgba(255, 215, 0, 0.6),
            0 0 60px rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 
            0 20px 60px rgba(255, 215, 0, 0.9),
            0 0 80px rgba(255, 215, 0, 0.7);
    }
}

.scores-actions {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 60px;
}

/* ===== Team Border Colors for Game Container ===== */
.game-container.team-rouge {
    border-left-color: #ff006e;
}

.game-container.team-bleu {
    border-left-color: #00d4ff;
}

.game-container.team-vert,
.game-container.team-verte {
    border-left-color: #00ff88;
}

.game-container.team-jaune {
    border-left-color: #ffd43b;
}

/* ===== Animations ===== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-80px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(20, 20, 30, 0.8);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #00d4ff, #7b2ff7);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #00e5ff, #8b3fff);
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .word {
        font-size: 4em;
    }
    
    .timer {
        font-size: 4em;
    }
    
    .btn-control {
        font-size: 1.5em;
        padding: 20px 40px;
    }
}

/* ===== Particules flottantes ===== */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

.game-container::after {
    content: '✨';
    position: absolute;
    font-size: 2em;
    animation: float 4s ease-in-out infinite;
    opacity: 0.3;
    pointer-events: none;
}
