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

body {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    background: linear-gradient(135deg, #87CEEB 0%, #98FB98 50%, #F0E68C 100%);
    min-height: 100vh;
    padding: 10px;
}

.game-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.game-header {
    background: linear-gradient(45deg, #FF6B6B, #4ECDC4);
    color: white;
    padding: 20px;
    text-align: center;
}

.game-header h1 {
    font-size: 2rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.game-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.score, .level {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 1.1rem;
}

.timer {
    display: flex;
    align-items: center;
    gap: 10px;
}

.timer-bar {
    width: 150px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
}

#timer-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FF6B6B);
    width: 100%;
    transition: width 0.1s linear;
}

.game-main {
    padding: 30px;
    text-align: center;
}

.sound-section {
    margin-bottom: 30px;
}

.play-sound-btn {
    background: linear-gradient(45deg, #FF6B6B, #FF8E53);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.3rem;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: bold;
}

.play-sound-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(255, 107, 107, 0.6);
}

.play-sound-btn:active {
    transform: translateY(0);
}

.play-sound-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.sound-feedback {
    margin-top: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    min-height: 25px;
}

.animals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin: 30px 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.animal-btn {
    background: white;
    border: 3px solid #ddd;
    border-radius: 20px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.animal-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-color: #4ECDC4;
}

.animal-btn.correct {
    background: linear-gradient(45deg, #98FB98, #90EE90);
    border-color: #32CD32;
    animation: correctPulse 0.6s ease;
}

.animal-btn.wrong {
    background: linear-gradient(45deg, #FFB6C1, #FFA0B4);
    border-color: #FF6B6B;
    animation: wrongShake 0.6s ease;
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

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

.animal-icon {
    font-size: 3rem;
    margin-bottom: 8px;
}

.animal-name {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
}

.feedback {
    font-size: 1.2rem;
    font-weight: bold;
    min-height: 30px;
    margin: 20px 0;
}

.feedback.correct {
    color: #32CD32;
}

.feedback.wrong {
    color: #FF6B6B;
}

.game-over {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    z-index: 1000;
}

.game-over h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #FFD700;
}

.game-over p {
    font-size: 1.3rem;
    margin: 10px 0;
}

.restart-btn {
    background: linear-gradient(45deg, #4ECDC4, #44A08D);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    margin-top: 20px;
    font-family: inherit;
    font-weight: bold;
    transition: all 0.3s ease;
}

.restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.4);
}

.instructions {
    background: #F0F8FF;
    padding: 20px;
    margin: 20px;
    border-radius: 15px;
    border-left: 5px solid #4ECDC4;
}

.instructions h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.instructions ul {
    list-style: none;
    text-align: left;
}

.instructions li {
    margin: 8px 0;
    font-size: 1rem;
    color: #555;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-header h1 {
        font-size: 1.5rem;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .timer-bar {
        width: 120px;
    }
    
    .animals-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 15px;
    }
    
    .animal-btn {
        min-height: 100px;
        padding: 15px;
    }
    
    .animal-icon {
        font-size: 2.5rem;
    }
    
    .play-sound-btn {
        padding: 12px 25px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .game-container {
        margin: 5px;
        border-radius: 15px;
    }
    
    .game-main {
        padding: 20px;
    }
    
    .animals-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .instructions {
        margin: 10px;
        padding: 15px;
    }
}