:root {
    --saffron: #FF9933;
    --white: #FFFFFF;
    --green: #138808;
    --chakra: #000080;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    background-color: #f0fdf4;
    scroll-behavior: smooth;
}

h1,
h2,
h3,
h4 {
    font-family: 'Montserrat', sans-serif;
}

/* Tricolor Wavy Background */
.tricolor-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(-45deg, rgba(255, 153, 51, 0.05), rgba(255, 255, 255, 0.8), rgba(19, 136, 8, 0.05));
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Intro Overlay */
#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #111;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
}

#intro-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.typewriter-text {
    font-size: 2rem;
    font-weight: 700;
    z-index: 10;
    text-align: center;
    opacity: 0;
    /* Handled by GSAP */
}

/* Flag Animation - CRITICAL SECTION */
.flag-container {
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.flag-container:hover {
    transform: scale(1.02);
}

/* The Chakra Rotation Logic
           Using pure SVG rotation around center (0,0) of the group 
        */
.chakra-group {
    transform-box: fill-box;
    transform-origin: center;
    animation: spin 12s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--saffron), var(--white), var(--green));
    border-radius: 5px;
    border: 1px solid #ddd;
}

/* Card Hover Effects */
.info-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.info-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Quiz Styles */
.option-btn {
    transition: all 0.3s;
}

.option-btn:hover {
    background-color: #f3f4f6;
    transform: translateX(5px);
}

.option-btn.correct {
    background-color: #dcfce7 !important;
    border-color: #16a34a !important;
    color: #166534;
}

.option-btn.wrong {
    background-color: #fee2e2 !important;
    border-color: #dc2626 !important;
    color: #991b1b;
}

/* Audio Control */
.audio-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--saffron), var(--green));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.3s;
}

.audio-fab:hover {
    transform: scale(1.1) rotate(10deg);
}

.music-bars span {
    display: inline-block;
    width: 3px;
    background: white;
    animation: bounce 1s infinite;
}

.music-bars span:nth-child(2) {
    animation-delay: 0.2s;
    height: 15px;
}

.music-bars span:nth-child(1),
.music-bars span:nth-child(3) {
    height: 10px;
}

@keyframes bounce {

    0%,
    100% {
        transform: scaleY(1);
    }

    50% {
        transform: scaleY(1.5);
    }
}

.playing .music-bars span {
    animation-play-state: running;
}

.paused .music-bars span {
    animation-play-state: paused;
    transform: scaleY(1);
}
