/* static/style.css */
:root {
    --primary-color: #9933ff;    /* Vibrant purple */
    --secondary-color: #66ff66;  /* Lime green */
    --correct-color: #00ff99;    /* Aqua green */
    --wrong-color: #ff6666;      /* Soft red */
    --food-colors: #ffff66, #ff66b3, #66ccff; /* Sunny yellow, Bubblegum pink, Sky blue */
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Comic Sans MS', 'Arial', sans-serif;
    text-align: center;
    background-color: #33cccc !important; /* Bright teal */
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
}

h1 {
    color: var(--primary-color) !important;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

#controls {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

#controls select, #controls button {
    padding: 8px 15px;
    font-size: 1em;
    border-radius: 20px;
    border: 2px solid var(--primary-color);
    background-color: white;
    cursor: pointer;
}

#controls button {
    background-color: var(--primary-color);
    color: white;
    transition: all 0.3s;
}

#controls button:hover {
    background-color: #7a29cc;
    transform: scale(1.05);
}

#game-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin: 20px 0;
    flex: 1;
}

#monster-container {
    position: relative;
    transition: transform 0.8s ease;
}

#monster {
    width: 220px;
    height: 220px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: background-color 0.3s;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: bounce 2s infinite;
}

.monster-level-1 { background-color: #66ff66; }
.monster-level-2 { background-color: #55ee55; }
.monster-level-3 { background-color: #44dd44; }
.monster-level-4 { background-color: #33cc33; }
.monster-level-5 { background-color: #22bb22; }

/* Monster eyes */
#monster::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    top: 50px;
    left: 50px;
    box-shadow: 60px 0 0 white;
    z-index: 1;
}

#monster::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: black;
    border-radius: 50%;
    top: 70px;
    left: 70px;
    box-shadow: 60px 0 0 black;
    z-index: 2;
    animation: blink 3s infinite;
}

#monster.correct {
    background-color: var(--correct-color);
}

#monster.wrong {
    background-color: var(--wrong-color);
    animation: shake 0.5s ease;
}

#monster-level {
    position: absolute;
    top: -15px;
    right: -15px;
    background-color: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#problem {
    font-size: 1.8em;
    color: white;
    background-color: var(--primary-color);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 4;
}

#food-items {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
}

.food {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 5;
}

.food-1 { background-color: #ffff66; color: #333; }
.food-2 { background-color: #ff66b3; color: white; }
.food-3 { background-color: #66ccff; color: #333; }

.food:hover {
    transform: scale(1.1) rotate(5deg);
}

.food.eaten {
    opacity: 0;
    transition: opacity 0.2s ease;
}

#message {
    font-size: 1.3em;
    color: #333;
    min-height: 2em;
    margin: 15px 0;
    font-weight: bold;
    transition: all 0.3s;
}

#stars {
    font-size: 1.5em;
    color: #ff9900;
    margin: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

#stars::before {
    content: '★';
    color: #ff9900;
    font-size: 1.5em;
}

#visitor-counter {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-radius: 20px;
    border: 1px solid #ddd;
    font-size: 14px;
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

#visitor-counter span {
    font-weight: bold;
}

#music-controls {
    position: fixed;
    bottom: 10px;
    left: 10px;
    z-index: 100;
}

#music-toggle {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#music-toggle:hover {
    background-color: #7a29cc;
    transform: scale(1.05);
}

#music-toggle.music-on {
    background-color: var(--correct-color);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes blink {
    0%, 90% { transform: scaleY(1); }
    95% { transform: scaleY(0.1); }
    100% { transform: scaleY(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}

@media (max-width: 600px) {
    #monster {
        width: 150px;
        height: 150px;
    }
    
    .food {
        width: 70px;
        height: 70px;
        font-size: 1.3em;
    }
    
    #problem {
        font-size: 1.5em;
        padding: 10px;
    }
    
    #monster::before {
        top: 30px;
        left: 35px;
        width: 40px;
        height: 40px;
        box-shadow: 40px 0 0 white;
    }
    
    #monster::after {
        top: 40px;
        left: 45px;
        width: 15px;
        height: 15px;
        box-shadow: 40px 0 0 black;
    }
    
    #food-items {
        gap: 15px;
    }
    
    #music-controls {
        bottom: 60px;
    }
}