:root {
    --sky-blue: #5CAEFF;
    /* Fallback color */
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Fredoka', sans-serif;
    background-color: var(--sky-blue);
    overflow-x: hidden;
}

.main-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
}

/* Background Scene */
.scene-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.scene-background .bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    /* Anchor ground to bottom */
}

/* Ensure container allows background to dictate bottom */
@media (max-aspect-ratio: 1/1) {
    .scene-background .bg-img {
        object-fit: cover;
        object-position: center bottom;
    }
}

/* Content Layer */
.content-layer {
    position: relative;
    z-index: 1;
}

/* Logo Section */
.logo-img {
    max-width: 350px;
    width: 80%;
    margin-top: 20px;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
}

/* Floating Character (Vovô) */
.floating-character {
    position: absolute;
    top: 20px;
    left: 10%;
    width: 250px;
    z-index: 2;
    animation: float 6s ease-in-out infinite;
}

/* Characters */
.character-row {
    margin-bottom: 2vh;
    /* Pull closer to footer if needed */
}

.character-group {
    gap: 10px;
}

.char-wrapper {
    position: relative;
    transition: transform 0.3s ease;
    display: flex;
    align-items: flex-end;
}

.char-img {
    max-height: 35vh;
    /* Responsive height based on viewport */
    width: auto;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

/* Character Specific Sizes (Fine-tuning relative sizes) */
/* Lito (Dog) seems slightly larger */
.char-wrapper:nth-child(2) .char-img {
    max-height: 22vh;
}

/* Nina (Spotted) */
.char-wrapper:nth-child(3) .char-img {
    max-height: 22vh;
}

/* Footer Buttons */
.footer-buttons {
    background: transparent;
    /* Assuming scene grass covers it */
    padding-top: 20px;
}

.btn-img {
    max-width: 100%;
    height: auto;
    max-height: 130px;
    /* Limit button size */
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.hover-scale:hover .btn-img {
    transform: scale(1.1);
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

.bounce-in {
    animation: bounceIn 1s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale3d(.3, .3, .3);
    }

    20% {
        transform: scale3d(1.1, 1.1, 1.1);
    }

    40% {
        transform: scale3d(.9, .9, .9);
    }

    60% {
        opacity: 1;
        transform: scale3d(1.03, 1.03, 1.03);
    }

    80% {
        transform: scale3d(.97, .97, .97);
    }

    100% {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .logo-img {
        max-width: 250px;
    }

    .floating-character {
        width: 150px;
        left: 5%;
        top: 10px;
    }

    .character-group {
        flex-wrap: nowrap;
        /* Force single line */
        gap: 5px;
        justify-content: center;
    }

    .char-wrapper {
        width: auto;
        /*flex: 1 1 auto;*/
    }

    .char-img {
        max-height: 18vh;
        /* Smaller on mobile/tablet */
        width: auto;
        max-width: 100%;
        object-fit: contain;
    }

    .btn-img {
        max-height: 90px;
    }
}

@media (max-width: 576px) {
    .character-group {
        gap: 2px;
        /* Tighter gap for smaller screens */
    }

    .char-img {
        max-height: 18vh;
        /* Slightly smaller height */
    }

    /* Adjust Vovô for mobile */
    .floating-character {
        left: 2%;
        width: 110px;
        top: 10px;
    }
}