/* ═══════════════════════════════════════════════════════
   PLAYGROUND.CSS — All styles for the cat playground
   ═══════════════════════════════════════════════════════ */

:root {
    --black: #0a0a0a;
    --cream: #f0ebe0;
    --accent: #e85533;
    --text-light: #f5f5f5;
    --text-muted: rgba(255, 255, 255, 0.45);
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background: var(--black);
    color: var(--text-light);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 50% 40%, rgba(232, 85, 51, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

/* ═══════════════════════════════════════════
   PAGE LAYOUT
   ═══════════════════════════════════════════ */

.coming-soon {
    text-align: center;
    position: relative;
    z-index: 1;
}

.coming-soon .label {
    font-family: var(--font-body);
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 32px;
    display: inline-block;
    /* FIX: shrink to text width for accurate platform bounds */
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.2s;
}

.coming-soon h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(48px, 10vw, 120px);
    line-height: 0.9;
    letter-spacing: -3px;
    text-transform: uppercase;
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.4s;
}

.coming-soon h1 span {
    display: inline-block;
    /* FIX: was 'block' — shrink to text width for platform bounds */
    background: linear-gradient(90deg, var(--text-light), var(--accent), var(--text-light));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s ease-in-out infinite;
}

.coming-soon .sub {
    font-size: 17px;
    font-weight: 300;
    color: var(--text-muted);
    max-width: 420px;
    margin: 0 auto 48px;
    line-height: 1.6;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.6s;
}

.back-link {
    position: fixed;
    top: 28px;
    right: 32px;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.1s;
}

.back-link:hover {
    color: var(--accent);
}

.back-link svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.world-btn {
    position: fixed;
    top: 60px;
    right: 32px;
    z-index: 100;
    font-family: var(--font-body);
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.2s;
}

.world-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(232, 85, 51, 0.06);
}

/* ─── Audio Toggle / Equalizer ─── */
.audio-toggle {
    position: fixed;
    top: 210px;
    right: 32px;
    z-index: 100;
    width: 40px;
    height: 32px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.4s;
}

.audio-toggle:hover {
    border-color: var(--accent);
    background: rgba(232, 85, 51, 0.06);
}

.audio-toggle:hover .eq-bar {
    background: var(--accent);
}

.eq-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 16px;
}

.eq-bar {
    width: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 1px;
    transition: background 0.3s ease;
}

/* Static heights when not playing */
.eq-bar:nth-child(1) {
    height: 6px;
}

.eq-bar:nth-child(2) {
    height: 10px;
}

.eq-bar:nth-child(3) {
    height: 4px;
}

.eq-bar:nth-child(4) {
    height: 8px;
}

/* Animated when audio is playing (muted or unmuted) */
.audio-toggle.animating .eq-bar {
    animation: eqBounce 0.8s ease-in-out infinite alternate;
}

.audio-toggle.animating .eq-bar:nth-child(1) {
    animation-duration: 0.6s;
    animation-delay: 0s;
}

.audio-toggle.animating .eq-bar:nth-child(2) {
    animation-duration: 0.7s;
    animation-delay: 0.15s;
}

.audio-toggle.animating .eq-bar:nth-child(3) {
    animation-duration: 0.5s;
    animation-delay: 0.08s;
}

.audio-toggle.animating .eq-bar:nth-child(4) {
    animation-duration: 0.65s;
    animation-delay: 0.2s;
}

/* Unmuted — bars light up accent orange */
.audio-toggle.playing .eq-bar {
    background: var(--accent);
}

@keyframes eqBounce {
    0% {
        height: 4px;
    }

    100% {
        height: 16px;
    }
}

.accent-line {
    width: 48px;
    height: 2px;
    background: var(--accent);
    margin: 0 auto 32px;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.5s;
    box-shadow: 0 0 16px rgba(232, 85, 51, 0.4);
}

.floating-logo {
    position: fixed;
    top: 28px;
    left: 32px;
    z-index: 100;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.1s;
}

.floating-logo img {
    height: 36px;
    width: auto;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.floating-logo img:hover {
    opacity: 1;
}

/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {

    0%,
    100% {
        background-position: 0% center;
    }

    50% {
        background-position: 200% center;
    }
}

/* ═══════════════════════════════════════════
   ONEKO CAT (sprite-based)
   ═══════════════════════════════════════════ */

#oneko {
    width: 32px;
    height: 32px;
    position: fixed;
    image-rendering: pixelated;
    background-image: url(./oneko.gif);
    z-index: 50;
    cursor: pointer;
    pointer-events: auto;
    transform: scale(2);
    transform-origin: bottom center;
}

/* Particles (hearts, zzz, food) */
.particle {
    position: fixed;
    z-index: 51;
    pointer-events: none;
    font-size: 16px;
    opacity: 1;
}

.particle.float {
    animation: particleFloat 1.2s ease-out forwards;
}

.particle.zzz {
    animation: zzzFloat 2s ease-out forwards;
}

@keyframes particleFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(0.5);
    }

    30% {
        opacity: 1;
        transform: translateY(-20px) scale(1.1);
    }

    100% {
        opacity: 0;
        transform: translateY(-50px) scale(0.3);
    }
}

@keyframes zzzFloat {
    0% {
        opacity: 0.8;
        transform: translateY(0) translateX(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-35px) translateX(15px);
    }
}

/* Ground items */
.ground-item {
    position: fixed;
    z-index: 49;
    font-size: 18px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ground-item.visible {
    opacity: 1;
}

.ground-item.consumed {
    animation: itemConsume 0.5s ease forwards;
}

@keyframes itemConsume {
    to {
        opacity: 0;
        transform: scale(0) translateY(-10px);
    }
}

/* Status bubble */
.cat-status {
    position: fixed;
    z-index: 52;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent);
    font-family: var(--font-body);
    pointer-events: none;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
}

.cat-status.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════
   INTERACTION BAR
   ═══════════════════════════════════════════ */

.cat-controls {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    gap: 8px;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 1.2s;
}

.cat-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 18px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 13px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cat-btn:hover {
    background: rgba(232, 85, 51, 0.12);
    border-color: rgba(232, 85, 51, 0.35);
    color: var(--text-light);
}

.cat-btn:active {
    transform: scale(0.95);
}

.cat-btn .emoji {
    font-size: 16px;
}

/* Button feedback flash */
.cat-btn.active {
    background: rgba(232, 85, 51, 0.25);
    border-color: var(--accent);
    color: var(--text-light);
    transition: none;
}

/* ═══════════════════════════════════════════
   CLICK RIPPLE — delicate layered rings
   ═══════════════════════════════════════════ */

.click-ripple {
    position: fixed;
    width: 8px;
    height: 8px;
    pointer-events: none;
    z-index: 48;
}

/* Soft center dot */
.click-ripple::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(232, 85, 51, 0.15);
    animation: rippleDot 0.5s ease-out forwards;
}

/* Outer ring */
.click-ripple::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid rgba(232, 85, 51, 0.2);
    animation: rippleRing 0.7s ease-out forwards;
}

/* Second ring (via extra element spawned in JS) */
.click-ripple-outer {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid rgba(240, 235, 224, 0.08);
    pointer-events: none;
    z-index: 47;
    animation: rippleRingSlow 0.9s ease-out forwards;
}

@keyframes rippleDot {
    0% {
        transform: scale(0);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 0.15;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes rippleRing {
    0% {
        transform: scale(0);
        opacity: 0.35;
    }

    100% {
        transform: scale(5);
        opacity: 0;
    }
}

@keyframes rippleRingSlow {
    0% {
        transform: scale(0);
        opacity: 0.15;
    }

    100% {
        transform: scale(8);
        opacity: 0;
    }
}

/* ═══════════════════════════════════════════
   SPAWN ITEMS (yarn, toys)
   ═══════════════════════════════════════════ */

.spawn-item {
    position: fixed;
    z-index: 49;
    font-size: 22px;
    pointer-events: none;
    opacity: 0;
    transform: scale(0) translateY(-20px);
    animation: spawnPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes spawnPop {
    0% {
        opacity: 0;
        transform: scale(0) translateY(-20px);
    }

    60% {
        opacity: 1;
        transform: scale(1.3) translateY(-5px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.spawn-item.consumed {
    animation: itemConsume 0.5s ease forwards;
}

/* ═══════════════════════════════════════════
   FIREWORK PARTICLES
   ═══════════════════════════════════════════ */

.firework {
    position: fixed;
    z-index: 55;
    pointer-events: none;
    font-size: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: fireworkBurst 1s ease-out forwards;
}

@keyframes fireworkBurst {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }

    60% {
        opacity: 0.8;
    }

    100% {
        opacity: 0;
        transform: translate(var(--fx), var(--fy)) scale(0.2);
    }
}

/* ═══════════════════════════════════════════
   SCREEN FLICKER / GLITCH
   ═══════════════════════════════════════════ */

.screen-flicker {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    background: rgba(232, 85, 51, 0.03);
    animation: flickerPulse 0.15s ease-in-out 3;
}

@keyframes flickerPulse {

    0%,
    100% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}

.screen-glitch {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    animation: glitchShake 0.3s ease-in-out;
}

@keyframes glitchShake {

    0%,
    100% {
        transform: translate(0);
        filter: none;
    }

    20% {
        transform: translate(-2px, 1px);
        filter: hue-rotate(20deg);
    }

    40% {
        transform: translate(2px, -1px);
        filter: hue-rotate(-20deg);
    }

    60% {
        transform: translate(-1px, 2px);
        filter: hue-rotate(10deg);
    }

    80% {
        transform: translate(1px, -2px);
    }
}

/* ═══════════════════════════════════════════
   BOUNCING BALL
   ═══════════════════════════════════════════ */

.toy-ball:not(.foxy-item) {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ff8866, var(--accent) 50%, #b83a1a);
    box-shadow: 0 0 8px rgba(232, 85, 51, 0.4), inset -1px -1px 3px rgba(0, 0, 0, 0.4), inset 1px 1px 2px rgba(255, 255, 255, 0.2);
    z-index: 45;
    pointer-events: none;
    transition: none;
    transform-origin: center center;
    will-change: transform, left, top;
}

.toy-ball-shadow {
    position: fixed;
    height: 3px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.25), transparent 70%);
    pointer-events: none;
    z-index: 44;
    transition: none;
    will-change: opacity, width, left;
}

/* ═══════════════════════════════════════════
   AMBIENT DUST MOTES
   ═══════════════════════════════════════════ */

.dust-mote {
    position: fixed;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(240, 235, 224, 0.08);
    pointer-events: none;
    z-index: 5;
}

/* ═══════════════════════════════════════════
   NIGHT STARS
   ═══════════════════════════════════════════ */

.night-star {
    position: fixed;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.15);
    pointer-events: none;
    z-index: 3;
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.05;
    }

    50% {
        opacity: 0.25;
    }
}

/* ═══════════════════════════════════════════
   WORLD EVENTS
   ═══════════════════════════════════════════ */

.world-bird {
    position: fixed;
    font-family: var(--font-body);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.2);
    pointer-events: none;
    z-index: 8;
    letter-spacing: -1px;
}

.world-leaf {
    position: fixed;
    font-size: 12px;
    color: rgba(232, 85, 51, 0.25);
    pointer-events: none;
    z-index: 8;
}

.world-star-streak {
    position: fixed;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    z-index: 6;
    box-shadow: -8px 4px 0 rgba(255, 255, 255, 0.6),
        -16px 8px 0 rgba(255, 255, 255, 0.3),
        -24px 12px 0 rgba(255, 255, 255, 0.1);
}

/* ═══════════════════════════════════════════
   ATMOSPHERE OVERLAY
   ═══════════════════════════════════════════ */

#atmosphereOverlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    transition: background 8s ease;
}

/* ═══════════════════════════════════════════
   GAME JUICE — Particle System
   ═══════════════════════════════════════════ */

.juice-particle {
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    will-change: transform, opacity;
    border-radius: 50%;
}

/* ═══════════════════════════════════════════
   V1 ARCHIVE LINK
   ═══════════════════════════════════════════ */

.v1-link {
    position: fixed;
    bottom: 20px;
    right: 20px;
    color: rgba(255, 255, 255, 0.25);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition: all 0.3s ease;
    z-index: 100;
}

.v1-link:hover {
    color: rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ═══════════════════════════════════════════
   RAIN
   ═══════════════════════════════════════════ */

.rain-drop {
    position: absolute;
    width: 1.5px;
    height: 14px;
    background: linear-gradient(to bottom, transparent, rgba(140, 170, 220, 0.5));
    border-radius: 0 0 2px 2px;
    pointer-events: none;
}

.rain-splash {
    position: absolute;
    width: 4px;
    height: 2px;
    border-radius: 50%;
    background: rgba(140, 170, 220, 0.3);
    pointer-events: none;
    transform-origin: center bottom;
}

/* Rain toggle button active state */
.cat-btn.rain-active {
    background: rgba(100, 150, 220, 0.25);
    border-color: rgba(100, 150, 220, 0.5);
    color: var(--text-light);
}

/* ═══════════════════════════════════════════
   WORLD4.CSS — All styles for world4.html
   Design tokens, forest, content, Foxy UI
   ═══════════════════════════════════════════ */

/* ── DESIGN TOKENS ── */
:root {
    --black: #0a0a0a;
    --cream: #f0ebe0;
    --accent: #e85533;
    --text-light: #f5f5f5;
    --text-muted: rgba(255, 255, 255, 0.45);
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background: var(--black);
    color: var(--text-light);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 50% 40%, rgba(232, 85, 51, 0.04) 0%, transparent 60%);
    pointer-events: none;
}


/* ═══════════════════════════════════════════
   PIXEL FOREST — tree silhouettes
   ═══════════════════════════════════════════ */
.forest-layer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.tree-silhouette {
    position: absolute;
    bottom: 0;
    image-rendering: pixelated;
    opacity: 0;
    animation: treeAppear 3s ease forwards;
}

.tree-silhouette img {
    image-rendering: pixelated;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom;
}

.tree-silhouette.layer-back {
    filter: brightness(0.08) saturate(0.3);
}

.tree-silhouette.layer-mid {
    filter: brightness(0.12) saturate(0.4);
}

.tree-silhouette.layer-front {
    filter: brightness(0.15) saturate(0.5);
}

@keyframes treeAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: var(--tree-opacity, 0.5);
        transform: translateY(0);
    }
}

.ground-fade {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(to top, rgba(15, 30, 15, 0.6) 0%, transparent 100%);
    z-index: 0;
    pointer-events: none;
}

/* Fireflies */
.firefly {
    position: fixed;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #7fff00;
    box-shadow: 0 0 6px 2px rgba(127, 255, 0, 0.4);
    pointer-events: none;
    z-index: 5;
    opacity: 0;
}

@keyframes fireflyFloat {
    0% {
        opacity: 0;
        transform: translate(0, 0);
    }

    15% {
        opacity: 0.8;
    }

    50% {
        opacity: 0.3;
        transform: translate(var(--fx, 20px), var(--fy, -30px));
    }

    85% {
        opacity: 0.7;
    }

    100% {
        opacity: 0;
        transform: translate(var(--fx2, -10px), var(--fy2, -50px));
    }
}


/* ═══════════════════════════════════════════
   STILL RENDERING CONTENT
   ═══════════════════════════════════════════ */
.coming-soon {
    text-align: center;
    position: relative;
    z-index: 10;
}

.coming-soon .label {
    font-family: var(--font-body);
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 32px;
    display: inline-block;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.2s;
}

.coming-soon h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(48px, 10vw, 120px);
    line-height: 0.9;
    letter-spacing: -3px;
    text-transform: uppercase;
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.4s;
}

.coming-soon h1 span {
    display: inline-block;
    background: linear-gradient(90deg, var(--text-light), var(--accent), var(--text-light));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s ease-in-out infinite;
}

.coming-soon .sub {
    font-size: 17px;
    font-weight: 300;
    color: var(--text-muted);
    max-width: 420px;
    margin: 0 auto 48px;
    line-height: 1.6;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.6s;
}

.accent-line {
    width: 48px;
    height: 2px;
    background: var(--accent);
    margin: 0 auto 32px;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.5s;
    box-shadow: 0 0 16px rgba(232, 85, 51, 0.4);
}


/* ═══════════════════════════════════════════
   NAV
   ═══════════════════════════════════════════ */
.back-link {
    position: fixed;
    top: 28px;
    right: 32px;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.1s;
}

.back-link:hover {
    color: var(--accent);
}

.back-link svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.floating-logo {
    position: fixed;
    top: 28px;
    left: 32px;
    z-index: 100;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.1s;
}

.floating-logo img {
    height: 36px;
    width: auto;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.floating-logo img:hover {
    opacity: 1;
}


/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {

    0%,
    100% {
        background-position: 0% center;
    }

    50% {
        background-position: 200% center;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}


/* ═══════════════════════════════════════════
   FOXY SPRITE
   ═══════════════════════════════════════════ */
#foxyCanvas {
    position: fixed;
    image-rendering: pixelated;
    z-index: 50;
    cursor: grab;
    touch-action: none;
    /* prevent scroll/zoom when grabbing Foxy on mobile */
    opacity: 0;
    animation: fadeUp 1s ease forwards 1.2s;
}

#vfxCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 49;
    pointer-events: none;
}


/* ═══════════════════════════════════════════
   AI STATUS — top right, under monogram
   ═══════════════════════════════════════════ */
.ai-status {
    position: fixed;
    top: 250px;
    right: 32px;
    z-index: 100;
    font-family: var(--font-body);
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.25);
    pointer-events: none;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 1.6s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-status .dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #4caf50;
    animation: pulse 2s ease-in-out infinite;
}

.ai-status .dot.off {
    background: #666;
    animation: none;
}


/* ═══════════════════════════════════════════
   FOXY CONTROLS — vertical, right side, auto-fade
   ═══════════════════════════════════════════ */
.foxy-controls {
    position: fixed;
    right: 20px;
    top: 100px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 1.4s;
}

/* Auto-fade: dim by default, brighten on hover */
.foxy-controls::after {
    /* This ensures the hover zone extends slightly beyond buttons */
    content: '';
    position: absolute;
    inset: -12px;
    pointer-events: none;
}

.foxy-controls {
    /* Default dimmed state once the fadeUp completes */
    animation: fadeUp 0.8s ease forwards 1.4s, controlsFade 0.5s ease 2.6s forwards;
}

@keyframes controlsFade {
    to {
        opacity: 0.15;
    }
}

.foxy-controls:hover {
    opacity: 1 !important;
    transition: opacity 0.3s ease;
}

.foxy-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 7px 12px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 11px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.foxy-btn:hover {
    background: rgba(232, 85, 51, 0.12);
    border-color: rgba(232, 85, 51, 0.35);
    color: var(--text-light);
}

.foxy-btn:active {
    transform: scale(0.95);
}

.foxy-btn.active {
    background: rgba(232, 85, 51, 0.25);
    border-color: var(--accent);
    color: var(--text-light);
    transition: none;
}


/* ═══════════════════════════════════════════
   THOUGHT BUBBLE
   ═══════════════════════════════════════════ */
.thought-bubble {
    position: fixed;
    z-index: 90;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%) translateY(8px) scale(0.85);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.thought-bubble.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
}

.thought-text {
    background: rgba(15, 15, 15, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 8px 16px;
    font-family: var(--font-body);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.3px;
    white-space: nowrap;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.thought-tail {
    width: 8px;
    height: 8px;
    background: rgba(15, 15, 15, 0.7);
    border-radius: 50%;
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.thought-tail-sm {
    width: 5px;
    height: 5px;
    background: rgba(15, 15, 15, 0.6);
    border-radius: 50%;
    position: absolute;
    bottom: -18px;
    left: 52%;
}


/* ═══════════════════════════════════════════
   MOOD BADGE
   ═══════════════════════════════════════════ */
.mood-badge {
    display: none !important;
}

.mood-badge.visible {
    display: none !important;
}


/* ═══════════════════════════════════════════
   MEMORY STATUS
   ═══════════════════════════════════════════ */
.memory-status {
    position: fixed;
    top: 88px;
    right: 32px;
    z-index: 100;
    font-family: var(--font-body);
    font-size: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.12);
    pointer-events: none;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 2s;
}


/* ═══════════════════════════════════════════
   FOXY QUESTION BUBBLE
   ═══════════════════════════════════════════ */
.question-bubble {
    position: fixed;
    z-index: 92;
    opacity: 0;
    transform: translateX(-50%) translateY(8px) scale(0.85);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(232, 85, 51, 0.15);
    border-radius: 16px;
    padding: 12px 16px;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.5);
    max-width: 280px;
    min-width: 160px;
}

.question-bubble.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
    pointer-events: auto;
}

.question-text {
    font-family: var(--font-body);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.3px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.question-options {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.question-opt {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 6px 12px;
    font-family: var(--font-body);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.question-opt:hover {
    background: rgba(232, 85, 51, 0.15);
    border-color: rgba(232, 85, 51, 0.4);
    color: var(--text-light);
    transform: scale(1.02);
}

.question-opt:active {
    transform: scale(0.97);
}

.question-tail {
    width: 8px;
    height: 8px;
    background: rgba(15, 15, 15, 0.8);
    border-radius: 50%;
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.question-tail-sm {
    width: 5px;
    height: 5px;
    background: rgba(15, 15, 15, 0.65);
    border-radius: 50%;
    position: absolute;
    bottom: -18px;
    left: 52%;
}

/* ─── CHAT INPUT ─── */
.foxy-chat {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 1000;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.foxy-chat:hover,
.foxy-chat:focus-within {
    opacity: 1;
}

#foxyChatInput {
    width: 240px;
    padding: 8px 14px;
    background: rgba(15, 15, 15, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-body);
    font-size: 12px;
    outline: none;
    backdrop-filter: blur(10px);
}

#foxyChatInput::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

#foxyChatInput:focus {
    border-color: rgba(255, 255, 255, 0.25);
}

#foxyChatSend {
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 20px;
}

/* ─── WORLD PROPS ─── */

.world-prop {
    position: fixed;
    z-index: 5;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    pointer-events: none;
}

.world-prop-house {
    bottom: 0;
    right: 12%;
    width: auto;
    height: auto;
    transform: scale(3) translateY(100%);
    transform-origin: bottom center;
    animation: prop-rise 2s cubic-bezier(0.34, 1.56, 0.64, 1) 1.5s forwards;
}

@keyframes prop-rise {
    0% {
        transform: scale(3) translateY(100%);
        opacity: 0;
    }

    60% {
        opacity: 1;
    }

    100% {
        transform: scale(3) translateY(10%);
        opacity: 1;
    }
}

/* ─── PROPS ─── */
.foxy-prop {
    position: fixed;
    pointer-events: none;
    /* Let clicks pass through to the ground */
    image-rendering: pixelated;
    transition: transform 0.3s ease;
}

.foxy-prop img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.foxy-prop.house {
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.4));
}

.foxy-prop.crate {
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.5));
}

/* ─── BOWLS ─── */
.bowl-base {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: #5d5d5d;
    border-radius: 4px 4px 10px 10px;
    border: 3px solid #333;
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.3);
}

.bowl-base.food {
    background: #8b4513;
    /* Brown ceramic bowl */
}

.water-fill {
    position: absolute;
    bottom: 5px;
    left: 5px;
    right: 5px;
    height: 12px;
    background: #00d2ff;
    border-radius: 2px;
    opacity: 0.8;
    animation: waterRipple 3s ease-in-out infinite;
}

.kibble-fill {
    position: absolute;
    bottom: 5px;
    left: 5px;
    right: 5px;
    height: 15px;
    background: radial-gradient(circle, #654321 20%, transparent 20%),
        radial-gradient(circle, #4b3010 20%, transparent 20%);
    background-size: 8px 8px;
    background-position: 0 0, 4px 4px;
}

@keyframes waterRipple {

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

    50% {
        transform: scaleY(1.1);
        opacity: 0.9;
    }
}

/* ═══ NEED ICONS — Tamagotchi care bubbles ═══ */
.foxy-need-icons {
    display: none !important;
}

.need-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    pointer-events: all;
    opacity: 0;
    transform: translateY(10px) scale(0.5);
    animation: needPopIn 0.4s ease forwards;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.need-icon:hover {
    transform: translateY(-4px) scale(1.2) !important;
    background: rgba(255, 140, 50, 0.5);
    border-color: rgba(255, 180, 100, 0.6);
}

.need-icon:active {
    transform: scale(0.9) !important;
}

.need-icon.critical {
    border-color: rgba(255, 80, 80, 0.6);
    animation: needPopIn 0.4s ease forwards, needPulse 1.5s ease-in-out infinite;
}

.need-icon.popping-out {
    animation: needPopOut 0.3s ease forwards !important;
}

@keyframes needPopIn {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.5);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes needPopOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-10px) scale(0.3);
    }
}

@keyframes needPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 80, 80, 0.3);
    }

    50% {
        box-shadow: 0 0 12px 4px rgba(255, 80, 80, 0.4);
    }
}

@keyframes needBob {

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

    50% {
        transform: translateY(-4px);
    }
}

/* ═══ CARE POPUP — floating score feedback ═══ */
.care-popup {
    position: fixed;
    font-size: 24px;
    font-weight: 700;
    color: #4ade80;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    z-index: 600;
    animation: careFloat 1.2s ease-out forwards;
}

@keyframes careFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    50% {
        opacity: 1;
        transform: translateY(-40px) scale(1.2);
    }

    100% {
        opacity: 0;
        transform: translateY(-80px) scale(0.8);
    }
}


/* ═══════════════════════════════════════════
   WORLD ITEMS — things Foxy interacts with
   ═══════════════════════════════════════════ */

.foxy-item {
    position: fixed;
    bottom: 68px;
    z-index: 85;
    pointer-events: none;
    opacity: 0;
    animation: fadeUp 1.2s ease forwards 2.5s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Ground shadow under each item */
.foxy-item::before {
    content: '';
    position: absolute;
    bottom: -4px;
    width: 80%;
    height: 6px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 50%;
    filter: blur(2px);
}

/* Label below item */
.foxy-item .item-label {
    font-family: var(--font-body);
    font-size: 8px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 8px;
    white-space: nowrap;
    animation: labelPulse 4s ease-in-out infinite;
}

@keyframes labelPulse {

    0%,
    100% {
        color: rgba(255, 255, 255, 0.25);
    }

    50% {
        color: rgba(255, 255, 255, 0.45);
    }
}

.foxy-item .item-sprite {
    image-rendering: pixelated;
    transition: transform 0.3s ease;
}

/* ─── Water bowl ─── */
.foxy-item.water-bowl {
    left: 15%;
}

.water-sprite {
    width: 48px;
    height: 28px;
    position: relative;
    /* Pixel art bowl using box-shadow technique */
    background: transparent;
}

/* Pixel-art water bowl built from layered divs */
.water-sprite::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 20px;
    background: #6b4c3b;
    border-radius: 0 0 8px 8px;
    box-shadow:
        inset 0 -4px 0 #4a3228,
        inset 0 4px 0 #8b6b5a;
}

.water-sprite::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 10px;
    background: linear-gradient(180deg, #7ec8e3 0%, #4a9ebe 100%);
    border-radius: 0 0 4px 4px;
    animation: waterShimmer 3s ease-in-out infinite;
}

@keyframes waterShimmer {

    0%,
    100% {
        opacity: 0.9;
    }

    50% {
        opacity: 1;
        background: linear-gradient(180deg, #8dd4ef 0%, #5aadcd 100%);
    }
}

/* ─── Food dish (cherry sprite) ─── */
.foxy-item.food-dish {
    left: 72%;
}

.food-dish .item-sprite {
    width: 48px;
    height: 48px;
}

/* ─── Tennis ball ─── */
.foxy-item.toy-ball {
    left: 42%;
    transition: left 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        bottom 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: auto !important;
    cursor: grab;
    z-index: 1100 !important;
    touch-action: none;
    /* prevent scroll on mobile drag */
    -webkit-user-select: none;
    user-select: none;
}

/* When being dragged — no transitions, ball follows cursor/finger */
.foxy-item.toy-ball.dragging {
    transition: none !important;
    cursor: grabbing;
}

.foxy-item.toy-ball.dragging .ball-sprite {
    transform: scale(1.25);
    box-shadow:
        inset -3px -3px 0 #6aa52e,
        inset 3px 3px 0 #e2f77a,
        0 8px 20px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(200, 230, 78, 0.5);
}

/* Thrown state — smooth landing arc */
.foxy-item.toy-ball.thrown {
    transition: left 0.5s cubic-bezier(0.22, 0.61, 0.36, 1),
        bottom 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.ball-sprite {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 35% 35%, #e2f77a 0%, #c8e64e 40%, #8cc63f 80%, #6aa52e 100%);
    border-radius: 50%;
    image-rendering: pixelated;
    position: relative;
    box-shadow:
        inset -3px -3px 0 #6aa52e,
        inset 3px 3px 0 #e2f77a,
        0 3px 8px rgba(0, 0, 0, 0.5),
        0 0 12px rgba(200, 230, 78, 0.3);
    animation: ballIdle 2s ease-in-out infinite;
}

/* Pixel stripe on ball */
.ball-sprite::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 4px;
    width: 32px;
    height: 6px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 3px;
    transform: rotate(-15deg);
}

/* Second stripe for tennis ball look */
.ball-sprite::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 4px;
    width: 32px;
    height: 6px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 3px;
    transform: rotate(15deg);
}

/* Gentle idle wobble to draw attention */
@keyframes ballIdle {

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

    50% {
        transform: translateY(-3px) rotate(5deg);
    }
}

/* Ball kicked state — bounce arc */
.foxy-item.toy-ball.kicked {
    transition: left 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.foxy-item.toy-ball.kicked .ball-sprite {
    animation: ballBounce 0.8s cubic-bezier(0.36, 0, 0.66, -0.56) 1,
        ballRoll 0.3s linear 3;
}

@keyframes ballBounce {
    0% {
        transform: translateY(0) scale(1, 1);
    }

    15% {
        transform: translateY(-60px) scale(0.9, 1.1);
    }

    30% {
        transform: translateY(0) scale(1.2, 0.8);
    }

    45% {
        transform: translateY(-25px) scale(0.95, 1.05);
    }

    60% {
        transform: translateY(0) scale(1.1, 0.9);
    }

    75% {
        transform: translateY(-8px) scale(1, 1);
    }

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

@keyframes ballRoll {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Item eating jiggle */
.foxy-item.eating {
    animation: itemEatJiggle 0.4s ease 3;
}

@keyframes itemEatJiggle {
    0% {
        transform: rotate(0deg) scale(1);
    }

    25% {
        transform: rotate(-5deg) scale(1.05);
    }

    50% {
        transform: rotate(3deg) scale(0.95);
    }

    75% {
        transform: rotate(-2deg) scale(1.02);
    }

    100% {
        transform: rotate(0deg) scale(1);
    }
}

/* Item drinking ripple */
.foxy-item.drinking {
    animation: itemDrinkRipple 0.6s ease 2;
}

@keyframes itemDrinkRipple {
    0% {
        transform: scaleX(1) scaleY(1);
    }

    25% {
        transform: scaleX(1.08) scaleY(0.95);
    }

    50% {
        transform: scaleX(0.96) scaleY(1.04);
    }

    75% {
        transform: scaleX(1.04) scaleY(0.98);
    }

    100% {
        transform: scaleX(1) scaleY(1);
    }
}