* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.score-board {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 1.2rem;
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.controls {
    text-align: center;
    margin-bottom: 30px;
}

button {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin: 0 10px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.microphone-status {
    margin-top: 15px;
    font-size: 1.1rem;
    padding: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    display: inline-block;
}

.game-area {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.cake {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cake-base {
    width: 600px;
    height: 120px;
    background: linear-gradient(45deg, #8B4513, #A0522D);
    border-radius: 15px;
    position: relative;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.cake-base::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 10px;
    right: 10px;
    height: 20px;
    background: linear-gradient(45deg, #FFB6C1, #FFC0CB);
    border-radius: 10px;
}

.candles-container {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
    padding: 20px;
    position: absolute;
    top: -60px;
    width: 100%;
    max-width: 580px;
}

.candle {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.candle-stick {
    width: 12px;
    height: 40px;
    background: linear-gradient(45deg, #f4f4f4, #e0e0e0);
    border-radius: 6px;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.flame {
    width: 16px;
    height: 20px;
    background: radial-gradient(circle, #FFD700 0%, #FF6347 50%, #FF4500 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    animation: flicker 0.5s ease-in-out infinite alternate;
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.7);
}

@keyframes flicker {
    0% {
        transform: translateX(-50%) rotate(-1deg) scale(1);
    }
    100% {
        transform: translateX(-50%) rotate(1deg) scale(1.05);
    }
}

.candle.extinguished .flame {
    display: none;
}

.candle.extinguished .candle-stick {
    opacity: 0.6;
}

.smoke {
    width: 2px;
    height: 15px;
    background: rgba(128, 128, 128, 0.6);
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: smoke-rise 2s ease-out;
}

@keyframes smoke-rise {
    0% {
        opacity: 0.8;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

.instructions {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.instructions h3 {
    margin-bottom: 15px;
    color: #FFD700;
}

.instructions p {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.audio-indicator {
    text-align: center;
    margin-top: 20px;
}

.audio-bar {
    width: 300px;
    height: 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    margin: 0 auto 10px;
    position: relative;
    overflow: hidden;
}

.audio-bar::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A, #CDDC39, #FFEB3B, #FF9800, #F44336);
    border-radius: 10px;
    width: 0%;
    transition: width 0.1s ease;
}

.game-over {
    text-align: center;
    background: rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.victory {
    background: rgba(76, 175, 80, 0.3);
}

.victory h2 {
    color: #4CAF50;
    font-size: 2rem;
    margin-bottom: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .score-board {
        flex-direction: column;
        gap: 10px;
    }
    
    .cake-base {
        width: 400px;
        height: 100px;
    }
    
    .candles-container {
        grid-template-columns: repeat(7, 1fr);
        max-width: 380px;
    }
    
    .audio-bar {
        width: 250px;
    }
}

@media (max-width: 480px) {
    .cake-base {
        width: 300px;
        height: 80px;
    }
    
    .candles-container {
        grid-template-columns: repeat(5, 1fr);
        max-width: 280px;
    }
    
    .candle-stick {
        width: 10px;
        height: 30px;
    }
    
    .flame {
        width: 12px;
        height: 16px;
    }
}
