/* ===========================================
   PASSION PROJECT — GAME WORLD THEME
   Playful, warm, bouncy — for 5th graders
   Inspired by pixel art, retro games, and discovery
   =========================================== */

/* ===========================================
   FONTS
   Fredoka: chunky rounded display (playful, game-like)
   Nunito: friendly readable body
   =========================================== */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@400;600;700;800&family=Press+Start+2P&display=swap');

/* ===========================================
   CSS CUSTOM PROPERTIES
   =========================================== */
:root {
    /* Palette: warm earth tones from Clonk + sky blue + pixel green */
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-warm: #0f3460;
    --text-primary: #f0f0f0;
    --text-secondary: #b8c5d6;
    --accent: #53d769;
    --accent-glow: rgba(83, 215, 105, 0.4);
    --pixel-green: #53d769;
    --pixel-blue: #4fc3f7;
    --pixel-orange: #ff9f43;
    --pixel-red: #ff6b6b;
    --pixel-purple: #a29bfe;
    --pixel-yellow: #feca57;
    --sky-blue: #74b9ff;
    --earth-brown: #b97a56;
    --cloud-white: #dfe6e9;

    /* Typography */
    --font-display: 'Fredoka', sans-serif;
    --font-body: 'Nunito', sans-serif;
    --font-pixel: 'Press Start 2P', monospace;

    /* Spacing */
    --slide-padding: clamp(2rem, 5vw, 5rem);

    /* Animation — bouncy game-like easing */
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --duration-normal: 0.6s;
    --duration-fast: 0.3s;
    --duration-slow: 1s;
}

/* ===========================================
   BASE STYLES
   =========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    font-size: 18px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    cursor: default;
}

/* ===========================================
   PARTICLE CANVAS — floating pixels background
   =========================================== */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ===========================================
   CURSOR TRAIL — pixel sparkle following mouse
   =========================================== */
.cursor-trail {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    opacity: 0;
    animation: cursor-fade 0.6s ease-out forwards;
}

@keyframes cursor-fade {
    0% { opacity: 0.9; transform: scale(1) rotate(0deg); }
    50% { opacity: 0.5; transform: scale(1.5) rotate(90deg); }
    100% { opacity: 0; transform: scale(0) rotate(180deg) translateY(-15px); }
}

/* ===========================================
   PROGRESS BAR — XP bar with shimmer
   =========================================== */
.progress-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--pixel-green), var(--pixel-blue), var(--pixel-purple));
    z-index: 1000;
    transition: width 0.5s var(--ease-bounce);
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 12px var(--accent-glow), 0 0 4px var(--pixel-green);
    overflow: hidden;
}

.progress-indicator::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* ===========================================
   NAV DOTS — pixel-style
   =========================================== */
.nav-dots {
    position: fixed;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.nav-dot {
    width: 14px;
    height: 14px;
    border: 2px solid var(--pixel-green);
    background: transparent;
    border-radius: 3px; /* pixel square, not circle */
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-bounce);
    padding: 0;
}

.nav-dot:hover {
    background: var(--pixel-green);
    transform: scale(1.4) rotate(45deg);
    box-shadow: 0 0 10px var(--accent-glow);
}

.nav-dot.active {
    background: var(--pixel-green);
    transform: rotate(45deg);
    box-shadow: 0 0 8px var(--accent-glow);
}

/* ===========================================
   SLIDE COUNTER
   =========================================== */
.slide-counter {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    font-family: var(--font-pixel);
    font-size: 0.6rem;
    color: var(--text-secondary);
    z-index: 100;
    letter-spacing: 2px;
    opacity: 0.5;
}

/* ===========================================
   SLIDE CONTAINER
   =========================================== */
.slide {
    min-height: 100vh;
    padding: var(--slide-padding);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.slide-content {
    max-width: 1100px;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* ===========================================
   REVEAL ANIMATIONS — game juice!
   =========================================== */

/* --- Bounce up (default) --- */
.reveal {
    opacity: 0;
    transform: translateY(60px) scale(0.9);
    transition: opacity var(--duration-normal) var(--ease-out-expo),
                transform var(--duration-normal) var(--ease-bounce);
}

.slide.visible .reveal {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Stagger children with increasing delays */
.reveal:nth-child(1) { transition-delay: 0.05s; }
.reveal:nth-child(2) { transition-delay: 0.15s; }
.reveal:nth-child(3) { transition-delay: 0.25s; }
.reveal:nth-child(4) { transition-delay: 0.35s; }
.reveal:nth-child(5) { transition-delay: 0.45s; }
.reveal:nth-child(6) { transition-delay: 0.55s; }

/* --- Pop in (for emphasis) --- */
.reveal-pop {
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.4s ease,
                transform 0.6s var(--ease-elastic);
}

.slide.visible .reveal-pop {
    opacity: 1;
    transform: scale(1);
}

/* --- Slide from left --- */
.reveal-left {
    opacity: 0;
    transform: translateX(-80px) rotate(-3deg);
    transition: opacity var(--duration-normal) ease,
                transform var(--duration-normal) var(--ease-bounce);
}

.slide.visible .reveal-left {
    opacity: 1;
    transform: translateX(0) rotate(0deg);
}

/* --- Slide from right --- */
.reveal-right {
    opacity: 0;
    transform: translateX(80px) rotate(3deg);
    transition: opacity var(--duration-normal) ease,
                transform var(--duration-normal) var(--ease-bounce);
}

.slide.visible .reveal-right {
    opacity: 1;
    transform: translateX(0) rotate(0deg);
}

/* --- Pixel glitch reveal --- */
.reveal-glitch {
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s ease;
    animation: none;
}

.slide.visible .reveal-glitch {
    opacity: 1;
    transform: translateX(0);
    animation: glitch-in 0.6s var(--ease-out-expo);
}

@keyframes glitch-in {
    0% { transform: translateX(-10px); filter: blur(4px); opacity: 0; }
    20% { transform: translateX(5px) skewX(-5deg); filter: blur(0); opacity: 1; }
    40% { transform: translateX(-3px) skewX(2deg); }
    60% { transform: translateX(2px) skewX(-1deg); }
    80% { transform: translateX(-1px); }
    100% { transform: translateX(0); }
}

/* --- Float animation (continuous) --- */
.float {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* --- Wobble on hover --- */
.wobble:hover {
    animation: wobble 0.5s var(--ease-elastic);
}

@keyframes wobble {
    0% { transform: rotate(0); }
    25% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
    75% { transform: rotate(-3deg); }
    100% { transform: rotate(0); }
}

/* --- Screen shake (for emphasis moments) --- */
.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-8px) rotate(-1deg); }
    20% { transform: translateX(8px) rotate(1deg); }
    30% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    50% { transform: translateX(-4px); }
    60% { transform: translateX(4px); }
    70% { transform: translateX(-2px); }
    80% { transform: translateX(2px); }
}

/* --- Power-up pulse --- */
.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.05); filter: brightness(1.2); }
}

/* ===========================================
   TYPOGRAPHY
   =========================================== */
h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.8rem, 7vw, 5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

h3 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    line-height: 1.3;
}

p, li {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    line-height: 1.6;
    color: var(--text-secondary);
}

.pixel-text {
    font-family: var(--font-pixel);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ===========================================
   HIGHLIGHT / ACCENT STYLES
   =========================================== */

/* Colored text */
.text-green { color: var(--pixel-green); }
.text-blue { color: var(--pixel-blue); }
.text-orange { color: var(--pixel-orange); }
.text-red { color: var(--pixel-red); }
.text-purple { color: var(--pixel-purple); }
.text-yellow { color: var(--pixel-yellow); }

/* Glow text */
.glow {
    text-shadow: 0 0 20px var(--accent-glow), 0 0 40px var(--accent-glow);
}

/* Sparkle text — JS spawns particles around these */
.sparkle {
    position: relative;
    display: inline-block;
}

/* Rainbow shimmer text */
.shimmer-text {
    background: linear-gradient(90deg, var(--pixel-green), var(--pixel-blue), var(--pixel-purple), var(--pixel-orange), var(--pixel-green));
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: text-shimmer 4s linear infinite;
}

@keyframes text-shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

/* Highlight text with animated underline */
.highlight-underline {
    position: relative;
    display: inline;
}

.highlight-underline::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--pixel-green), var(--pixel-blue));
    transition: width 0.8s var(--ease-out-expo);
    box-shadow: 0 0 10px var(--accent-glow);
}

.slide.visible .highlight-underline::after {
    width: 100%;
}

/* Game-style badge / label */
.badge {
    display: inline-block;
    font-family: var(--font-pixel);
    font-size: 0.55rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 6px 14px;
    border: 2px solid;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.badge-green { border-color: var(--pixel-green); color: var(--pixel-green); background: rgba(83, 215, 105, 0.1); }
.badge-blue { border-color: var(--pixel-blue); color: var(--pixel-blue); background: rgba(79, 195, 247, 0.1); }
.badge-orange { border-color: var(--pixel-orange); color: var(--pixel-orange); background: rgba(255, 159, 67, 0.1); }
.badge-purple { border-color: var(--pixel-purple); color: var(--pixel-purple); background: rgba(162, 155, 254, 0.1); }

/* ===========================================
   IMAGE STYLES
   =========================================== */
.game-image {
    border-radius: 12px;
    border: 3px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4),
                0 0 0 1px rgba(255,255,255,0.05);
    transition: transform 0.4s var(--ease-bounce),
                box-shadow 0.4s ease;
    max-width: 100%;
    height: auto;
}

.game-image:hover {
    transform: scale(1.03) rotate(0.5deg);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5),
                0 0 30px var(--accent-glow);
}

/* Pixel-perfect image rendering for retro screenshots */
.pixel-image {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* Side-by-side image layout */
.image-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.image-compare img {
    width: 100%;
    border-radius: 12px;
}

/* Full-width image with overlay text */
.image-hero {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.image-hero img {
    width: 100%;
    border-radius: 16px;
}

.image-hero .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    border-radius: 0 0 16px 16px;
}

/* ===========================================
   CARD COMPONENTS
   =========================================== */
.card {
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.3s var(--ease-bounce),
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: var(--pixel-green);
    box-shadow: 0 8px 25px rgba(83, 215, 105, 0.15);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* ===========================================
   BOOK COMPONENT — 3D hover tilt
   =========================================== */
.book-shelf {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    flex-wrap: wrap;
    perspective: 800px;
}

.book {
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 1.8rem 1.5rem;
    width: 220px;
    text-align: center;
    transition: transform 0.5s var(--ease-bounce),
                box-shadow 0.4s ease,
                border-color 0.3s ease;
    cursor: default;
}

.book:hover {
    transform: rotateY(-8deg) rotateX(3deg) translateY(-8px) scale(1.05);
    box-shadow: 10px 10px 30px rgba(0,0,0,0.3);
}

.book:nth-child(1):hover { border-color: var(--pixel-orange); box-shadow: 10px 10px 30px rgba(0,0,0,0.3), 0 0 20px rgba(255, 159, 67, 0.2); }
.book:nth-child(2):hover { border-color: var(--pixel-blue); box-shadow: 10px 10px 30px rgba(0,0,0,0.3), 0 0 20px rgba(79, 195, 247, 0.2); }
.book:nth-child(3):hover { border-color: var(--pixel-purple); box-shadow: 10px 10px 30px rgba(0,0,0,0.3), 0 0 20px rgba(162, 155, 254, 0.2); }

.book-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.book h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.book p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ===========================================
   QUOTE / CALLOUT
   =========================================== */
.big-quote {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    color: var(--text-primary);
    max-width: 800px;
    margin: 0 auto;
}

.big-quote .highlight {
    background: linear-gradient(120deg, var(--pixel-green), var(--pixel-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===========================================
   GAME-THEMED BACKGROUNDS PER SLIDE
   =========================================== */

/* Title slide — starfield */
.slide-title {
    background: radial-gradient(ellipse at 50% 0%, rgba(22, 33, 62, 1) 0%, var(--bg-primary) 70%);
}

/* Clonk slides — earthy/sky palette */
.slide-clonk {
    background: linear-gradient(180deg,
        rgba(116, 185, 255, 0.08) 0%,
        var(--bg-primary) 40%,
        rgba(185, 122, 86, 0.06) 100%
    );
}

/* Half-Life slides — industrial/sci-fi */
.slide-halflife {
    background: linear-gradient(180deg,
        var(--bg-primary) 0%,
        rgba(15, 52, 96, 0.4) 50%,
        var(--bg-primary) 100%
    );
}

/* Superpower / emotional slides */
.slide-super {
    background: radial-gradient(ellipse at 50% 50%,
        rgba(83, 215, 105, 0.06) 0%,
        var(--bg-primary) 60%
    );
}

/* AI / demo slides */
.slide-ai {
    background: radial-gradient(ellipse at 30% 70%,
        rgba(79, 195, 247, 0.08) 0%,
        var(--bg-primary) 50%
    ),
    radial-gradient(ellipse at 70% 30%,
        rgba(162, 155, 254, 0.06) 0%,
        var(--bg-primary) 50%
    );
}

/* ===========================================
   SPECIAL COMPONENTS
   =========================================== */

/* Animated arrow for "next" cues */
.bounce-arrow {
    display: inline-block;
    animation: bounce-arrow 1.5s ease-in-out infinite;
    font-size: 2rem;
    opacity: 0.4;
}

@keyframes bounce-arrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* XP bar component — with shimmer & particles */
.xp-bar {
    width: 100%;
    max-width: 500px;
    height: 24px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.1);
    overflow: hidden;
    position: relative;
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--pixel-green), var(--pixel-blue));
    border-radius: 10px;
    width: 0%;
    transition: width 1.5s var(--ease-out-expo);
    box-shadow: 0 0 15px var(--accent-glow);
    position: relative;
    overflow: hidden;
}

.xp-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    animation: xp-shimmer 1.5s ease-in-out infinite;
}

@keyframes xp-shimmer {
    0% { left: -60%; }
    100% { left: 160%; }
}

.slide.visible .xp-bar-fill {
    width: var(--xp-width, 75%);
}

/* XP bar wrapper — to hold sparkle particles at the fill edge */
.xp-bar-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 500px;
}

/* Level-up text */
.level-up {
    font-family: var(--font-pixel);
    font-size: 0.8rem;
    letter-spacing: 3px;
    color: var(--pixel-yellow);
    text-shadow: 0 0 10px rgba(254, 202, 87, 0.5);
}

/* Countdown / emphasis number */
.big-number {
    font-family: var(--font-display);
    font-size: clamp(5rem, 15vw, 10rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--pixel-orange), var(--pixel-red));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

/* Versus / comparison arrow */
.vs-arrow {
    font-size: 3rem;
    color: var(--pixel-yellow);
    text-align: center;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Typewriter effect */
.typewriter {
    font-family: var(--font-pixel);
    font-size: 0.7rem;
    letter-spacing: 1px;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--pixel-green);
    width: 0;
    animation: none;
}

.slide.visible .typewriter {
    animation: typing 2s steps(30) 0.5s forwards,
               blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--pixel-green); }
}

/* ===========================================
   SLIDE TRANSITIONS — page turn juice
   =========================================== */
.slide {
    transition: none;
}

/* When entering view, add a subtle zoom-settle */
.slide.visible {
    animation: slide-enter 0.8s var(--ease-out-expo);
}

@keyframes slide-enter {
    from {
        opacity: 0.5;
        transform: scale(0.97);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===========================================
   CONFETTI — celebration on final slide
   =========================================== */
.confetti-piece {
    position: fixed;
    z-index: 9998;
    pointer-events: none;
    animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
    0% { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
    80% { opacity: 1; }
    100% { opacity: 0; transform: translateY(100vh) rotate(720deg) scale(0.3); }
}

/* ===========================================
   SPARKLE PARTICLE — spawned by JS on .sparkle elements
   =========================================== */
.sparkle-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10;
    animation: sparkle-burst 0.8s ease-out forwards;
}

@keyframes sparkle-burst {
    0% {
        opacity: 1;
        transform: scale(0) translate(0, 0);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) translate(var(--sx, 10px), var(--sy, -10px));
    }
    100% {
        opacity: 0;
        transform: scale(0.5) translate(var(--ex, 20px), var(--ey, -30px));
    }
}

/* Star shape sparkle variant */
.sparkle-star {
    position: absolute;
    pointer-events: none;
    z-index: 10;
    font-size: 14px;
    animation: star-twinkle 1s ease-out forwards;
}

@keyframes star-twinkle {
    0% { opacity: 0; transform: scale(0) rotate(0deg); }
    30% { opacity: 1; transform: scale(1.3) rotate(90deg); }
    100% { opacity: 0; transform: scale(0) rotate(180deg) translateY(-20px); }
}

/* ===========================================
   POWER-UP FLASH — screen flash on slide entry
   =========================================== */
.slide-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9990;
    pointer-events: none;
    opacity: 0;
}

.slide-flash.active {
    animation: flash-bang 0.4s ease-out;
}

@keyframes flash-bang {
    0% { opacity: 0.3; }
    100% { opacity: 0; }
}

/* ===========================================
   COIN COLLECT — animated counter
   =========================================== */
.coin-counter {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    font-family: var(--font-pixel);
    font-size: 0.65rem;
    color: var(--pixel-yellow);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.6;
    transition: opacity 0.3s ease, transform 0.3s var(--ease-bounce);
}

.coin-counter .coin-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    background: var(--pixel-yellow);
    border-radius: 50%;
    border: 2px solid var(--pixel-orange);
    animation: coin-spin 2s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(254, 202, 87, 0.4);
}

@keyframes coin-spin {
    0%, 100% { transform: scaleX(1); }
    50% { transform: scaleX(0.2); }
}

.coin-counter.bump {
    opacity: 1;
    transform: scale(1.3);
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 768px) {
    html { font-size: 16px; }

    .nav-dots { display: none; }
    .slide-counter { display: none; }
    .coin-counter { display: none; }

    .image-compare {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .book-shelf {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .book { width: 100%; max-width: 300px; }

    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* ===========================================
   REDUCED MOTION
   =========================================== */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    .reveal, .reveal-pop, .reveal-left, .reveal-right, .reveal-glitch {
        transition: opacity 0.3s ease;
        transform: none;
        animation: none;
    }

    .float, .wobble, .pulse, .shake, .bounce-arrow {
        animation: none;
    }

    .slide.visible {
        animation: none;
    }

    .typewriter {
        width: 100%;
        animation: none;
        border-right: none;
    }
}
