:root {
    color-scheme: dark;
    --sky: radial-gradient(circle at 30% 20%, #2e3a7a, #0a0c1a 70%);
    --moon: #f2f2f2;
    --moon-shadow: rgba(0, 0, 0, 0.15);
    --wind: rgba(173, 216, 230, 0.45);
    --wind-strong: rgba(173, 216, 230, 0.75);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--sky);
    color: #fff;
}

.sky {
    position: relative;
    width: min(480px, 90vw);
    aspect-ratio: 1 / 1.2;
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

.stars {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(2px 2px at 20% 30%, #fff, transparent),
                      radial-gradient(1.5px 1.5px at 60% 10%, #fff, transparent),
                      radial-gradient(1.2px 1.2px at 80% 55%, #fff, transparent),
                      radial-gradient(1.8px 1.8px at 30% 80%, #fff, transparent);
    animation: twinkle 4s linear infinite;
}

.moon {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: var(--moon);
    top: 25%;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: inset -18px -18px 25px var(--moon-shadow), 0 0 50px rgba(255, 255, 255, 0.3);
}

.crater {
    position: absolute;
    border-radius: 50%;
    background: var(--moon-shadow);
    opacity: 0.7;
}

.crater.one {
    width: 40px;
    height: 40px;
    top: 30%;
    left: 25%;
}

.crater.two {
    width: 22px;
    height: 22px;
    top: 55%;
    left: 60%;
}

.crater.three {
    width: 30px;
    height: 30px;
    top: 60%;
    left: 35%;
}

.wind-layer {
    position: absolute;
    width: 200%;
    height: 60px;
    top: 58%;
    left: -50%;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--wind) 30%,
        var(--wind-strong) 50%,
        var(--wind) 70%,
        transparent 100%);
    filter: blur(3px);
    border-radius: 50%;
    animation: gust 6s ease-in-out infinite;
}

.wind-layer.delay {
    top: 65%;
    animation-delay: 1.5s;
    opacity: 0.8;
}

.caption {
    position: absolute;
    bottom: 24px;
    width: 100%;
    text-align: center;
    letter-spacing: 0.08em;
    font-size: 1rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
}

@keyframes gust {
    0% {
        transform: translateX(-20%) skewX(-8deg);
    }
    50% {
        transform: translateX(30%) skewX(-5deg) scaleY(0.85);
    }
    100% {
        transform: translateX(120%) skewX(-8deg);
    }
}

@keyframes twinkle {
    from {
        opacity: 0.5;
    }
    to {
        opacity: 1;
    }
}

.music-toggle {
    position: fixed;
    bottom: 16px;
    right: 16px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(10, 12, 26, 0.7);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
}

.music-toggle.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.music-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Make sure layers stack nicely */
.stars {
    z-index: 0;
}

.moon {
    z-index: 2;
}

.wind-layer {
    z-index: 1;
}

/* Kids standing on the moon */
.kids {
    position: absolute;
    top: -15%; /* closer to the top edge of the moon */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.kid {
    display: flex;
    flex-direction: column;
    align-items: center;
    image-rendering: pixelated;
}

/* Head (shared) */
.kid .head {
    width: 16px;
    height: 16px;
    background: #f5d7b2; /* skin tone */
    position: relative;
}

/* Girl hair – blonde */
.kid.girl .head::before {
    content: "";
    position: absolute;
    top: -3px;
    left: -2px;
    right: -2px;
    height: 9px;
    background: #f7e08c;
}

/* Little pigtails */
.kid.girl .head::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: -3px;
    width: 4px;
    height: 6px;
    background: #f7e08c;
    box-shadow: 18px 0 0 #f7e08c;
}

/* Boy hair – brown */
.kid.boy .head::before {
    content: "";
    position: absolute;
    top: -3px;
    left: -1px;
    right: -1px;
    height: 7px;
    background: #8b4513;
}

/* Body (shared base) */
.kid .body {
    margin-top: 2px;
    width: 12px;
    height: 14px;
    position: relative;
}

/* Girl dress */
.kid.girl .body {
    background: #ff7aa2;
}

/* Boy shirt */
.kid.boy .body {
    background: #4aa3ff;
}

/* Legs (two little blocks) */
.kid .body::before {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 1px;
    width: 4px;
    height: 6px;
    background: #3c3c60;
    box-shadow: 6px 0 0 #3c3c60; /* second leg */
}
