@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;800&display=swap');

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

body {
    width: 100vw;
    height: 100vh;
    background-color: #0b0f19;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    font-family: 'Outfit', sans-serif;
}

#gameContainer {
    position: relative;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    overflow: hidden;
    container-type: size;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.screen.active {
    display: flex;
    opacity: 1;
}

#startScreen {
    background-image: url('assets/images/bg/start_bg%20%282%29.png');
    background-size: cover;
    background-position: center;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3vmin;
}

#titleImage {
    max-width: 65vmin;
    height: auto;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.6));
    animation: titleFloatingAnimation 4s ease-in-out infinite;
}

#startButton {
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.2s ease;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
    transform: translateY(-2vmin);
}

#startButton:hover {
    transform: translateY(-2vmin) scale(1.08);
}

#startButton:active {
    transform: translateY(-2vmin) scale(0.95);
}

#startButton img {
    max-width: 30vmin;
    height: auto;
    animation: startButtonPulse 2s infinite ease-in-out;
}

#mainGameScreen {
    flex-direction: row;
    position: relative;
}

#scrollingBackground {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/images/bg/game%20bg.png');
    background-repeat: repeat-x;
    background-size: auto 100%;
    z-index: 1;
}

#cloudContainer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

.cloudElement {
    position: absolute;
    width: 14.4vmin;
    height: auto;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.2s ease, opacity 0.2s ease;
    user-select: none;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.25));
}

.cloudElement:hover {
    transform: scale(1.05);
}

.cloudElement.popped {
    pointer-events: none;
    animation: cloudPoppingAnimation 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

#vayudevaCharacter {
    position: absolute;
    left: 8%;
    top: 50%;
    width: 28.08vmin;
    height: auto;
    transform: translateY(-50%);
    z-index: 4;
    transition: top 0.1s ease;
}

#vayudevaCharacter img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.3));
}

.vayudevaFloating {
    animation: vayudevaFlyingAnimation 4s ease-in-out infinite;
}

.vayudevaShaking {
    animation: vayudevaShakingAnimation 0.5s ease-in-out;
}

#windOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.windStreak {
    position: absolute;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0) 100%);
    height: 2px;
    width: 120px;
    border-radius: 50%;
    animation: windFlowAnimation 2s linear infinite;
}

#rainOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

#rainOverlay.active {
    opacity: 1;
}

#rainCanvas {
    width: 100%;
    height: 100%;
}

#snowOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

#snowOverlay.active {
    opacity: 1;
}

#snowCanvas {
    width: 100%;
    height: 100%;
}

#thunderOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    z-index: 6;
    pointer-events: none;
    opacity: 0;
}

#thunderOverlay.flash {
    animation: thunderFlashAnimation 4s ease-out;
}

#stormOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(94, 76, 55, 0.25);
    backdrop-filter: blur(0px);
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease, backdrop-filter 0.5s ease;
}

#stormOverlay.active {
    opacity: 1;
}

#dustCloudParticleContainer {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#goldenGlowOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.25) 0%, rgba(255, 215, 0, 0) 70%);
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

#goldenGlowOverlay.active {
    opacity: 1;
}

#messageOverlay {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    z-index: 7;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#messageOverlay.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

#messageBubble {
    background: rgba(18, 24, 38, 0.85);
    backdrop-filter: blur(12px);
    color: #ff9f43;
    padding: 1.5vmin 3vmin;
    border-radius: 50px;
    font-size: 3.5vmin;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 0 2px rgba(255, 159, 67, 0.3);
    text-align: center;
}

#congratulationsScreen {
    background-image: url('assets/images/bg/end_bg.png');
    background-size: cover;
    background-position: center;
    justify-content: flex-end;
    align-items: center;
    padding-right: 8%;
}

#congratulationsText {
    max-width: 60vmin;
    height: auto;
    filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.7));
    animation: endTextPulseAnimation 3s ease-in-out infinite;
}

@keyframes titleFloatingAnimation {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes vayudevaFloatingAnimation {
    0% {
        transform: translateY(-50%) translateY(0);
    }
    50% {
        transform: translateY(-50%) translateY(-25px);
    }
    100% {
        transform: translateY(-50%) translateY(0);
    }
}

@keyframes vayudevaShakingAnimation {
    0%, 100% {
        transform: translateY(-50%) rotate(0deg) translateX(0);
    }
    20%, 60% {
        transform: translateY(-50%) rotate(-1deg) translateX(-4px);
    }
    40%, 80% {
        transform: translateY(-50%) rotate(1deg) translateX(4px);
    }
}

@keyframes cloudPoppingAnimation {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.3) rotate(15deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(0) rotate(90deg);
        opacity: 0;
    }
}

@keyframes thunderFlashAnimation {
    0%, 100% {
        opacity: 0;
    }
    2%, 10% {
        opacity: 1;
    }
    5% {
        opacity: 0.3;
    }
    15%, 80% {
        opacity: 0;
    }
}

@keyframes endTextPulseAnimation {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.04);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes dustDriftAnimation {
    0% {
        left: 110%;
        transform: scale(1) rotate(0deg);
    }
    100% {
        left: -30%;
        transform: scale(1.5) rotate(360deg);
    }
}

@keyframes startButtonPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes windFlowAnimation {
    0% {
        left: 110%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        left: -20%;
        opacity: 0;
    }
}

@keyframes vayudevaFlyingAnimation {
    0% {
        transform: translateY(-50%) rotate(0deg) translateX(0);
    }
    50% {
        transform: translateY(-50%) rotate(1.5deg) translateX(8px);
    }
    100% {
        transform: translateY(-50%) rotate(0deg) translateX(0);
    }
}

#lightningSvg {
    width: 100%;
    height: 100%;
}

.lightningBolt {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: lightningStrikeAnimation 4s ease-out infinite;
}

@keyframes lightningStrikeAnimation {
    0% {
        stroke-dashoffset: 1200;
        opacity: 0;
    }
    5%, 15% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
    10% {
        opacity: 0.2;
    }
    20%, 100% {
        stroke-dashoffset: 1200;
        opacity: 0;
    }
}

