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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100vh;
    background: black;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 1200px;
    width: 100%;
}

/* Écran de sélection du niveau */
.level-selection {
    max-width: 500px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.level-selection h1 {
    text-align: center;
    color: white;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.level-selection .subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
    font-size: 1.1em;
}

.level-selection .icon {
    text-align: center;
    font-size: 5em;
    margin-bottom: 20px;
}

.level-btn {
    width: 100%;
    padding: 30px;
    margin: 15px 0;
    border: none;
    border-radius: 20px;
    font-size: 1.2em;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.level-btn:hover {
    transform: scale(1.05);
}

.level-btn.debutant {
    background: #10b981;
}

.level-btn.debutant:hover {
    background: #059669;
}

.level-btn.expert {
    background: #ef4444;
}

.level-btn.expert:hover {
    background: #dc2626;
}

.level-btn-title {
    font-size: 1.5em;
    margin-bottom: 5px;
}

.level-btn-desc {
    font-size: 0.8em;
    opacity: 0.9;
}

/* Écran de jeu */
.game-screen {
    display: none;
}

.game-header {
    text-align: center;
    margin-bottom: 40px;
}

.game-header h1 {
    color: white;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.game-header .level-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.3em;
    margin-bottom: 10px;
}

.change-level {
    color: white;
    font-size: 1.5em;
    border-radius: 20px;
    cursor: pointer;
    margin: 10px;
    padding: 15px 50px;
    background: rgb(66, 63, 62);
    border: none;
}

.change-level:hover {
    color: white;
}

/* Grille des catégories */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 20px;
    }
}

.category-card {
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    border: 4px solid transparent;
}

.category-card.selected {
    transform: scale(1.1);
    box-shadow: 0 0 40px currentColor;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.category-card.vert { background: #10b981; }
.category-card.rose { background: #ec4899; }
.category-card.jaune { background: #f59e0b; }
.category-card.violet { background: #8b5cf6; }
.category-card.bleu { background: #3b82f6; }

.category-card.selected.vert { border-color: #10b981; }
.category-card.selected.rose { border-color: #ec4899; }
.category-card.selected.jaune { border-color: #f59e0b; }
.category-card.selected.violet { border-color: #8b5cf6; }
.category-card.selected.bleu { border-color: #3b82f6; }

.category-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.category-name {
    font-weight: bold;
    font-size: 1em;
    margin-bottom: 8px;
}

.category-desc {
    font-size: 0.75em;
    opacity: 0.9;
    display: none;
}

@media (min-width: 768px) {
    .category-desc {
        display: block;
    }
}

/* Bouton de tirage */
.draw-section {
    text-align: center;
    margin-bottom: 40px;
}

.draw-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 20px 50px;
    border-radius: 50px;
    font-size: 1.3em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.draw-btn:hover:not(:disabled) {
    transform: scale(1.1);
}

.draw-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.draw-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Résultat */
.result-section {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    animation: fadeIn 0.5s ease;
}

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

.result-title {
    text-align: center;
    color: white;
    font-size: 1.8em;
    margin-bottom: 20px;
}

.result-card {
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    color: white;
}

.result-card-name {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 10px;
}

.result-card-desc {
    font-size: 1.2em;
    opacity: 0.9;
}

/* Timer */
.timer-section {
    display: none;
    margin-top: 30px;
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
}

.timer-label {
    color: white;
    font-size: 1.2em;
    margin-bottom: 10px;
    opacity: 0.9;
}

.timer-display {
    font-size: 5em;
    font-weight: bold;
    color: white;
    margin: 10px 0;
    transition: all 0.3s ease;
}

.timer-display.timer-warning {
    color: #fbbf24;
}

.timer-display.timer-danger {
    color: #f87171;
    animation: shake 0.5s ease-in-out infinite;
}

.timer-display.timer-expired {
    color: #ef4444;
    animation: blink 0.5s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.timer-text {
    color: white;
    font-size: 1em;
    opacity: 0.8;
}

.hidden {
    display: none !important;
}
.result-section.vert { background: #10b981; }
.result-section.rose { background: #ec4899; }
.result-section.jaune { background: #f59e0b; }
.result-section.violet { background: #8b5cf6; }
.result-section.bleu { background: #3b82f6; }