/* Custom animations for the animal quiz game */

/* General Styles */
body {
    background: #f1f2f4 !important;
}

/* White Header Bar - Full Width at Top */
.header-white-bar {
    background: #FFFFFF;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 2px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.youkids-logo {
    height: 48px;
    z-index: 1;
    flex-shrink: 0;
}

.game-name {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #000;
    margin: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    max-width: 60%;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hamburger-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #000;
    transition: opacity 0.2s;
    z-index: 1001;
    position: relative;
    min-width: 24px;
    min-height: 24px;
    flex-shrink: 0;
}

.hamburger-menu svg {
    width: 24px !important;
    height: 24px !important;
    display: block !important;
    stroke: #000 !important;
}

.hamburger-menu:hover {
    opacity: 0.7;
}

/* Game Menu Overlay */
.game-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.game-menu-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.game-menu {
    background: white;
    border-radius: 24px;
    padding: 32px;
    max-width: 90%;
    width: 400px;
    position: relative;
    animation: slideUp 0.3s ease;
}

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

.close-menu {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    color: #666;
    transition: color 0.2s;
}

.close-menu:hover {
    color: #000;
}

.game-menu h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    color: #000;
    text-align: center;
}

.menu-item {
    display: block;
    padding: 16px 20px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.2s;
    text-align: center;
}

.menu-item:hover {
    background: #e5e7eb;
    transform: translateX(4px);
}

.menu-item.active {
    background: #ea580c;
    color: white;
}

.game-container-wrapper {
    padding-top: 56px;
}

.game-area {
    padding: 16px;
}

@media (min-width: 360px) {
    .youkids-logo {
        height: 52px;
    }

    .game-name {
        font-size: 18px;
    }

    .game-container-wrapper {
        padding-top: 60px;
    }
}

@media (min-width: 400px) {
    .youkids-logo {
        height: 56px;
    }

    .game-name {
        font-size: 20px;
    }

    .game-container-wrapper {
        padding-top: 64px;
    }
}

@media (min-width: 480px) {
    .header-white-bar {
        padding: 4px 30px;
    }

    .youkids-logo {
        height: 64px;
    }

    .game-name {
        font-size: 22px;
    }

    .hamburger-menu svg {
        width: 28px !important;
        height: 28px !important;
    }

    .game-container-wrapper {
        padding-top: 76px;
    }

    .game-area {
        padding: 24px;
    }
}

@media (min-width: 600px) {
    .youkids-logo {
        height: 68px;
    }

    .game-name {
        font-size: 24px;
    }

    .game-container-wrapper {
        padding-top: 80px;
    }
}

@media (min-width: 768px) {
    .youkids-logo {
        height: 72px;
    }

    .game-name {
        font-size: 28px;
    }

    .game-container-wrapper {
        padding-top: 84px;
    }

    .game-area {
        padding: 32px;
    }
}

/* Slow bounce animation for animal emoji */
@keyframes bounce-slow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce-slow {
    animation: bounce-slow 2s ease-in-out infinite;
}

/* Medal pop animation */
@keyframes medal-pop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.5) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

.animate-medal-pop {
    animation: medal-pop 0.5s ease-out;
}

/* Celebration animation */
@keyframes celebration {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.5) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 0;
    }
}

.animate-celebration {
    animation: celebration 1s ease-out;
}

/* Button disabled state */
.answer-btn:disabled {
    cursor: not-allowed;
    opacity: 0.9;
}

/* Badge unlock animation */
@keyframes badge-unlock {
    0% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3) rotate(-10deg);
    }
    50% {
        transform: scale(1.3) rotate(10deg);
    }
    75% {
        transform: scale(1.3) rotate(-5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

.animate-badge-unlock {
    animation: badge-unlock 0.6s ease-out;
}

/* Confetti animation */
@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: #f0f;
    animation: confetti-fall 3s linear forwards;
    z-index: 9999;
}

/* Smooth transitions for all interactive elements */
button {
    transition: all 0.2s ease;
}

/* Correct answer bounce animation */
@keyframes correct-bounce {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(1.05);
    }
    75% {
        transform: scale(1.08);
    }
}

.animate-correct {
    animation: correct-bounce 0.5s ease-out;
}

/* Wrong answer shake animation */
@keyframes wrong-shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.animate-wrong {
    animation: wrong-shake 0.5s ease-out;
}

/* Progress block styling */
#progress-bar > div {
    min-width: 2px;
}
