*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ─── ROOT VARS ─── */
:root {
    /* Sky + Ground */
    --sky-top: #eef6ff;
    --sky-bot: #dbeafe;
    --ground1: #f8fafc;
    --ground2: #f1f5f9;
    --ground3: #e2e8f0;

    /* Sun */
    --sun: #fde68a;
    --sun-glow: #fbbf24;

    /* Leaves */
    --leaf: #86efac;
    --leaf2: #bbf7d0;
    --leaf3: #4ade80;

    /* Trunk */
    --trunk: #a16207;

    /* Human */
    --skin: #f1c27d;
    --shirt: #60a5fa;
    --pants: #94a3b8;

    /* Bubble */
    --bubble-bg: rgba(255, 255, 255, .85);
    --bubble-bd: rgba(148, 163, 184, .45);

    --text-color: #334155;
}

.animation-body {
    margin: 0;
    /* overflow: hidden; */
    font-family: 'Fredoka', cursive;
    background: var(--sky-top);
}

/* ═══════════════════════════════════
     FULL PAGE OVERLAY
   ═══════════════════════════════════ */
#page-skeleton {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bot) 60%, var(--ground1) 60%, var(--ground2) 80%, var(--ground3) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    overflow: hidden;
}

/* ═══ STARS ═══ */
.star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    animation: twinkle var(--dur, 2.5s) ease-in-out infinite;
    animation-delay: var(--del, 0s);
}

@keyframes twinkle {

    0%,
    100% {
        opacity: .15;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

/* ═══ SUN + RAYS ═══ */
.sun-wrap {
    position: absolute;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
}

.sun {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, #fff5c0 0%, var(--sun) 50%, var(--sun-glow) 100%);
    border-radius: 50%;
    box-shadow: 0 0 40px 12px rgba(244, 162, 97, .45),
        0 0 80px 30px rgba(231, 111, 81, .2);
    animation: sunPulse 4s ease-in-out infinite;
}

@keyframes sunPulse {

    0%,
    100% {
        box-shadow: 0 0 40px 12px rgba(244, 162, 97, .45), 0 0 80px 30px rgba(231, 111, 81, .2);
    }

    50% {
        box-shadow: 0 0 60px 20px rgba(244, 162, 97, .6), 0 0 100px 45px rgba(231, 111, 81, .3);
    }
}

.ray {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, rgba(244, 162, 97, .7), transparent);
    border-radius: 2px;
    transform-origin: 0 50%;
    animation: spinRays 12s linear infinite;
    opacity: .55;
}

@keyframes spinRays {
    to {
        transform: rotate(360deg);
    }
}

/* ═══ CLOUDS ═══ */
.cloud {
    position: absolute;
    background: rgba(255, 255, 255, .12);
    border-radius: 50px;
    filter: blur(1px);
    animation: cloudDrift var(--cdur, 28s) linear infinite;
    opacity: .7;
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: 50%;
}

@keyframes cloudDrift {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(var(--cdir, 110vw));
    }
}

/* ═══ TREES ═══ */
.tree {
    position: absolute;
    bottom: 0;
}

.trunk {
    background: var(--trunk);
    border-radius: 4px;
    margin: 0 auto;
}

.canopy {
    background: radial-gradient(circle, var(--leaf2) 0%, var(--leaf) 50%, var(--leaf3) 100%);
    border-radius: 50%;
    position: relative;
    top: 12px;
    margin: 0 auto;
    box-shadow: inset -8px -8px 18px rgba(0, 0, 0, .25);
    animation: sway var(--sw, 3s) ease-in-out infinite;
    transform-origin: bottom center;
}

@keyframes sway {

    0%,
    100% {
        transform: rotate(-1deg);
    }

    50% {
        transform: rotate(1.2deg);
    }
}

/* ═══ GROUND HILLS ═══ */
.hill {
    position: absolute;
    bottom: 0;
    border-radius: 50%;
    background: var(--ground1);
}

/* ═══ FIREFLIES ═══ */
.firefly {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #d4ff70;
    border-radius: 50%;
    box-shadow: 0 0 8px 3px rgba(212, 255, 112, .6);
    animation: ffFloat var(--ffdur, 6s) ease-in-out infinite,
        ffGlow 2s ease-in-out infinite;
    animation-delay: var(--ffdel, 0s), var(--ffgdel, 0s);
}

@keyframes ffFloat {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(18px, -30px);
    }

    50% {
        transform: translate(-10px, -50px);
    }

    75% {
        transform: translate(-25px, -20px);
    }

    100% {
        transform: translate(0, 0);
    }
}

@keyframes ffGlow {

    0%,
    100% {
        opacity: .3;
    }

    50% {
        opacity: 1;
    }
}

/* ═══ LEAVES FALLING ═══ */
.falling-leaf {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--leaf2);
    border-radius: 50% 0 50% 50%;
    opacity: 0;
    animation: leafFall var(--lfdur, 6s) ease-in infinite;
    animation-delay: var(--lfdel, 0s);
}

@keyframes leafFall {
    0% {
        opacity: 0;
        transform: translateY(-20px) rotate(0deg);
    }

    10% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(720deg);
    }
}

/* ═══ CHARACTER (faceless person) ═══ */
.character-wrap {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Speech Bubble */
.bubble {
    background: var(--bubble-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--bubble-bd);
    border-radius: 20px;
    padding: 14px 24px;
    position: relative;
    margin-bottom: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .25);
    animation: bubblePop .5s cubic-bezier(.34, 1.56, .64, 1) both;
}

.bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border: 10px solid transparent;
    border-top-color: var(--bubble-bd);
}

.bubble-inner::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border: 9px solid transparent;
    border-top-color: var(--bubble-bg);
}

.bubble-inner {
    position: absolute;
    inset: 0;
    background: var(--bubble-bg);
    border-radius: 20px;
}

.bubble-text {
    position: relative;
    z-index: 2;
    color: var(--text-color);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .5px;
    white-space: nowrap;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}

@keyframes bubblePop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Dots inside bubble */
.dots {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    margin-top: 6px;
}

.dots span {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: rgba(255, 255, 255, .7);
    border-radius: 50%;
    animation: dotBounce 1.4s ease infinite;
}

.dots span:nth-child(1) {
    animation-delay: 0s;
}

.dots span:nth-child(2) {
    animation-delay: .18s;
}

.dots span:nth-child(3) {
    animation-delay: .36s;
}

@keyframes dotBounce {

    0%,
    100% {
        transform: translateY(0);
        opacity: .4;
    }

    40% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* Body */
.char {
    animation: charBob 2s ease-in-out infinite;
}

@keyframes charBob {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

/* Head (faceless smooth oval) */
.head {
    width: 58px;
    height: 68px;
    background: linear-gradient(160deg, #dbb87a 0%, var(--skin) 45%, #a88050 100%);
    border-radius: 50%;
    margin: 0 auto 2px;
    box-shadow: inset -4px -6px 14px rgba(0, 0, 0, .2),
        0 4px 12px rgba(0, 0, 0, .3);
    position: relative;
    overflow: hidden;
}

/* subtle sheen on head */
.head::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 10px;
    width: 18px;
    height: 22px;
    background: radial-gradient(ellipse, rgba(255, 255, 255, .3), transparent 70%);
    border-radius: 50%;
}

/* Hair */
.hair {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 62px;
    height: 28px;
    background: linear-gradient(180deg, #3d2b1f, #5c4033);
    border-radius: 50% 50% 0 0;
    animation: hairMove 2s ease-in-out infinite;
}

@keyframes hairMove {

    0%,
    100% {
        transform: translateX(-50%) skewX(0deg);
    }

    50% {
        transform: translateX(-50%) skewX(2deg);
    }
}

/* Neck */
.neck {
    width: 22px;
    height: 16px;
    background: linear-gradient(180deg, #c49a5e, #a88050);
    margin: 0 auto;
}

/* Torso (shirt) */
.torso {
    width: 72px;
    height: 78px;
    background: linear-gradient(170deg, #000 0%, var(--shirt) 50%, #000 100%);
    border-radius: 36px 36px 24px 24px;
    margin: 0 auto;
    position: relative;
    box-shadow: inset -5px -8px 16px rgba(0, 0, 0, .25);
}

/* collar */
.torso::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 14px;
    background: rgba(255, 255, 255, .18);
    border-radius: 0 0 50% 50%;
}

/* Arms */
.arms {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 62px;
    pointer-events: none;
}

.arm {
    position: absolute;
    width: 18px;
    height: 52px;
    background: linear-gradient(180deg, #000, var(--shirt));
    border-radius: 12px;
    top: 0;
    box-shadow: inset -3px -4px 8px rgba(0, 0, 0, .2);
}

.arm.left {
    left: 2px;
    transform-origin: top center;
    animation: armSwingL 2s ease-in-out infinite;
}

.arm.right {
    right: 2px;
    transform-origin: top center;
    animation: armSwingR 2s ease-in-out infinite;
}

/* Hands */
.arm::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: var(--skin);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
}

@keyframes armSwingL {

    0%,
    100% {
        transform: rotate(-8deg);
    }

    50% {
        transform: rotate(6deg);
    }
}

@keyframes armSwingR {

    0%,
    100% {
        transform: rotate(8deg);
    }

    50% {
        transform: rotate(-6deg);
    }
}

/* Legs */
.legs {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: -4px;
}

.leg {
    width: 20px;
    height: 52px;
    background: linear-gradient(180deg, #000, var(--pants));
    border-radius: 10px 10px 14px 14px;
    box-shadow: inset -3px -4px 8px rgba(0, 0, 0, .2);
    position: relative;
}

.leg.left {
    animation: legSwingL 2s ease-in-out infinite;
    transform-origin: top center;
}

.leg.right {
    animation: legSwingR 2s ease-in-out infinite;
    transform-origin: top center;
}

@keyframes legSwingL {

    0%,
    100% {
        transform: rotate(3deg);
    }

    50% {
        transform: rotate(-3deg);
    }
}

@keyframes legSwingR {

    0%,
    100% {
        transform: rotate(-3deg);
    }

    50% {
        transform: rotate(3deg);
    }
}

/* Shoes */
.leg::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: -3px;
    width: 26px;
    height: 10px;
    background: #2c2c2c;
    border-radius: 0 0 6px 6px;
}

/* ═══ GROUND ACCENT — grass tufts ═══ */
.grass {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(180deg, transparent, var(--ground2));
}

.tuft {
    position: absolute;
    bottom: 0;
    width: 3px;
    background: var(--leaf2);
    border-radius: 2px 2px 0 0;
    animation: tuftSway 2.2s ease-in-out infinite;
    transform-origin: bottom center;
}

@keyframes tuftSway {

    0%,
    100% {
        transform: rotate(-4deg);
    }

    50% {
        transform: rotate(5deg);
    }
}

/* ═══ PROGRESS BAR ═══ */
.progress-wrap {
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    z-index: 10;
}

.progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, .15);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #000, #000, #000);
    border-radius: 3px;
    animation: progressAnim 3s cubic-bezier(.4, 0, .2, 1) infinite;
}

@keyframes progressAnim {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

.progress-label {
    text-align: center;
    margin-top: 8px;
    color: rgba(255, 255, 255, .55);
    color: #000;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: labelPulse 2s ease-in-out infinite;
}

@keyframes labelPulse {

    0%,
    100% {
        opacity: .5;
    }

    50% {
        opacity: 1;
    }
}

/* ═══ BIRDS ═══ */
.bird {
    position: absolute;
    animation: birdFly var(--bdur, 14s) linear infinite;
    animation-delay: var(--bdel, 0s);
    opacity: .7;
}

.bird svg {
    width: var(--bsize, 22px);
    height: auto;
}

@keyframes birdFly {
    0% {
        transform: translateX(-60px);
    }

    100% {
        transform: translateX(110vw);
    }
}