:root {
    --primary-color: #FF007A;
    --secondary-color: #333;
    --background-dark: #111;
    --text-color: #fff;
    --highlight-color: #FF007A;
    --gold-color: #FFD700;
    --green-color: #4CAF50;
    --blue-color: #00BFFF;
    --purple-color: #9C27B0;
    --error-color: #F44336;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--background-dark);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5)), 
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23111111" /></svg>');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
}

/* Fond dynamique qui change selon le score */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: var(--background-dark);
    opacity: 0.8;
    transition: background 2s ease;
}

/* Niveaux de fond */
body.level-1::before {
    background: linear-gradient(135deg, #111111, #222222);
}

body.level-2::before {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

body.level-3::before {
    background: linear-gradient(135deg, #0f3443, #34e89e);
}

body.level-4::before {
    background: linear-gradient(135deg, #7F00FF, #E100FF);
}

body.level-5::before {
    background: linear-gradient(135deg, #FFD700, #FF8C00);
}

header {
    text-align: center;
    padding: 2rem 0;
    position: relative;
    z-index: 1;
}

h1, h2 {
    font-family: 'Racing Sans One', cursive;
    text-transform: uppercase;
}

h1 {
    font-size: 3rem;
    color: var(--primary-color);
    text-shadow: 0 0 15px var(--primary-color);
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.back-button {
    position: absolute;
    top: 2rem;
    left: 2rem;
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    z-index: 10;
}

.back-button:hover {
    background-color: white;
    color: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-color);
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

footer {
    text-align: center;
    padding: 2rem;
    margin-top: auto;
    font-size: 0.9rem;
    color: #aaa;
    background-color: rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}

/* Scrollbars personnalisés */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d60066;
}

/* Responsive design */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .back-button {
        top: 1rem;
        left: 1rem;
    }
    
    .game-container {
        padding: 1rem;
    }
}