/* ============================================
   Ana's Website - Styles
   Theme: Dark Blue Sumikko Gurashi
   ============================================ */

/* === CSS Custom Properties === */
:root {
    /* Primary Colors - Dark Blue Night Sky */
    --bg-gradient-start: #1e3a8a;
    --bg-gradient-end: #0c1a2d;
    --bg-dark: #0a1525;

    /* Accent Colors */
    --accent-blue: #60a5fa;
    --accent-blue-light: #93c5fd;
    --accent-pink: #f9d5e6;
    --accent-pink-soft: #fce7f3;
    --accent-cream: #fef3c7;

    /* Sumikko Pastels */
    --sumikko-pink: #f9d5e6;
    --sumikko-blue: #e0f2fe;
    --sumikko-yellow: #fef9c3;
    --sumikko-green: #d1fae5;

    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    /* Fonts */
    --font-handwritten: 'Caveat', cursive;
    --font-body: 'Nunito', sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;

    /* Border Radius - Soft Sumikko style */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 50%;

    /* Shadows */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(96, 165, 250, 0.3);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* === Reset & Base === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background-attachment: fixed;
    /* Ensure bg covers full scroll height */
}

/* === Stars Background === */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite ease-in-out;
}

@keyframes twinkle {

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

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* === Milky Way Effect === */
.milky-way {
    position: fixed;
    top: 0;
    left: 500px;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* CRITICAL: Allows clicking through */
    z-index: 1;
    /* Moved up to ensure visibility */
    opacity: 0;
    transition: opacity 2s ease-in-out;
    background: radial-gradient(circle at 50% 50%,
            rgba(147, 197, 253, 0.6) 0%,
            /* Much brighter center */
            rgba(167, 139, 250, 0.4) 15%,
            /* visible purple ring */
            rgba(76, 29, 149, 0.3) 30%,
            /* deep purple edge */
            transparent 70%),
        linear-gradient(120deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 20%,
            /* brighter stardust */
            rgba(255, 255, 255, 0.2) 30%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 90%);
    background-blend-mode: screen;
    filter: blur(10px);
    /* Soften edges but keep core visible */
    mix-blend-mode: plus-lighter;
    /* Make it glow */
}

.milky-way.active {
    opacity: 1;
}



/* === Main Container === */
.journey-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: var(--space-md);
    max-width: 1200px;
    margin: 0 auto;
}

/* === Center Stage Walking Area === */
.walking-stage {
    position: relative;
    width: 100%;
    height: 250px;
    margin: calc(var(--space-lg) - 50px) 0 0 0;
    /* Reduced bottom margin to 0 to bring cards closer */
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg,
            transparent 0%,
            rgba(0, 0, 0, 0.1) 70%,
            rgba(0, 0, 0, 0.3) 100%);
}

/* Ground/Path at bottom */
.ground-path {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(90deg,
            rgba(96, 165, 250, 0.1) 0%,
            rgba(96, 165, 250, 0.2) 50%,
            rgba(96, 165, 250, 0.1) 100%);
    border-top: 2px dashed rgba(96, 165, 250, 0.3);
}

/* === Tonkatsu Walker with Sprite Animation === */
.tonkatsu-walker {
    position: absolute;
    bottom: 105px;
    left: 5%;
    width: 80px;
    height: 80px;
    z-index: 10;
    transition: left 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.sprite-container {
    width: 80px;
    height: 80px;
    background-image: url('assets/images/tonkatsu/Walking_Tonkatsu.png');
    background-size: 600% 100%;
    /* 6 frames horizontal strip */
    background-position: 0% 0%;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    animation: walkCycle 0.6s steps(1) infinite;
}

/* Walking animation - cycles through 6 horizontal frames */
@keyframes walkCycle {
    0% {
        background-position: 0% 0%;
    }

    16.66% {
        background-position: 20% 0%;
    }

    33.33% {
        background-position: 40% 0%;
    }

    50% {
        background-position: 60% 0%;
    }

    66.66% {
        background-position: 80% 0%;
    }

    83.33% {
        background-position: 100% 0%;
    }
}

/* Pause walking animation when stopped */
.tonkatsu-walker.stopped .sprite-container {
    animation-play-state: paused;
    background-position: 16.66% 0%;
    /* Frame 2 - neutral standing */
}

/* === Shrimp Walker with Sprite Animation === */
.shrimp-walker {
    position: absolute;
    bottom: 105px;
    left: 0%;
    /* Behind Tonkatsu */
    width: 65px;
    height: 65px;
    z-index: 9;
    /* Behind Tonkatsu */
    transition: left 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.shrimp-sprite {
    width: 65px;
    height: 65px;
    background-image: url('assets/images/shrimp/Walking_Shrimp.png');
    background-size: 600% 100%;
    /* 6 frames horizontal strip */
    background-position: 0% 0%;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    animation: shrimpWalk 0.6s steps(1) infinite;
}

/* Shrimp walking animation - cycles through 6 horizontal frames */
@keyframes shrimpWalk {
    0% {
        background-position: 0% 0%;
    }

    16.66% {
        background-position: 20% 0%;
    }

    33.33% {
        background-position: 40% 0%;
    }

    50% {
        background-position: 60% 0%;
    }

    66.66% {
        background-position: 80% 0%;
    }

    83.33% {
        background-position: 100% 0%;
    }
}

/* Pause shrimp walking animation when stopped */
.shrimp-walker.stopped .shrimp-sprite {
    animation-play-state: paused;
    background-position: 16.66% 0%;
}

/* === Stage Milestones === */
.stage-milestones {
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 5%;
    z-index: 5;
}

.milestone-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    opacity: 0.5;
    transition: all var(--transition-smooth);
}

.milestone-marker.active {
    opacity: 1;
    transform: scale(1.1);
}

.milestone-marker.completed {
    opacity: 0.8;
}

.marker-dot {
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid var(--accent-blue);
    border-radius: 50%;
    transition: all var(--transition-smooth);
}

.marker-dot.active {
    background: var(--accent-blue);
    box-shadow: 0 0 15px var(--accent-blue);
}

.marker-dot.completed {
    background: var(--sumikko-green);
    border-color: var(--sumikko-green);
}

.marker-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* === Tonkatsu Character === */
.tonkatsu-character {
    position: absolute;
    left: 2%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

/* Image-based character (when asset provided) */
.tonkatsu-img {
    width: 50px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: tonkatsuWalk 0.4s infinite alternate ease-in-out;
}

.tonkatsu-character.paused .tonkatsu-img {
    animation: tonkatsuIdle 2s infinite ease-in-out;
}

/* Emoji placeholder (fallback) */
.tonkatsu-placeholder {
    font-size: 2.5rem;
    display: none;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: tonkatsuWalk 0.4s infinite alternate ease-in-out;
}

.tonkatsu-character.paused .tonkatsu-placeholder {
    animation: tonkatsuIdle 2s infinite ease-in-out;
}

/* Walking animation */
@keyframes tonkatsuWalk {
    0% {
        transform: translateY(0) rotate(-5deg);
    }

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

/* Idle animation */
@keyframes tonkatsuIdle {

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

    50% {
        transform: translateY(-3px) scale(1.05);
    }
}

/* Click bounce reaction */
.tonkatsu-character.bounce .tonkatsu-img,
.tonkatsu-character.bounce .tonkatsu-placeholder {
    animation: tonkatsuBounce 0.5s ease;
}

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

    30% {
        transform: scale(1.3) translateY(-10px);
    }

    50% {
        transform: scale(0.9);
    }

    70% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* === Slides === */
.slides-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 400px;
}

.slide {
    position: absolute;
    top: -120px;
    /* Pull up closer (-100px) as requested */
    width: 100%;
    max-width: 700px;
    padding: var(--space-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateX(50px);
    transition: all var(--transition-smooth);
}

.slide.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.slide.exit-left {
    transform: translateX(-50px);
}

.slide-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-soft);
    text-align: center;
    /* Center button */
}

/* === Typography === */
.slide-title {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
    color: var(--accent-cream);
}

.slide-title.handwritten {
    font-family: var(--font-handwritten);
    font-size: 3rem;
    font-weight: 700;
}

.slide-subtitle {
    font-size: 1.25rem;
    color: var(--accent-blue-light);
    margin-bottom: var(--space-md);
}

.slide-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.slide-text.emphasis {
    color: var(--sumikko-pink);
    font-weight: 600;
    font-style: italic;
}

/* === Start Button === */
.start-journey-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bg-dark);
    background: linear-gradient(135deg, var(--accent-cream), var(--sumikko-pink));
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition-bounce);
    box-shadow: var(--shadow-soft);
}

.start-journey-btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 30px rgba(249, 213, 230, 0.4);
}

.btn-sparkle {
    animation: sparkle 1s infinite;
}

@keyframes sparkle {

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

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* === Slide Visuals === */
.slide-visual {
    text-align: center;
    font-size: 3rem;
    margin-top: var(--space-lg);
}

.rain-cloud {
    animation: float 3s infinite ease-in-out;
}

.growing-flower {
    font-size: 2rem;
}

@keyframes float {

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

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

/* === Photo Carousel === */
.photo-carousel {
    position: relative;
    width: 100%;
    height: 350px;
    /* Increased height for larger photos + captions */
    margin-top: var(--space-lg);
    overflow: hidden;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.2);
}

.carousel-track {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    transition: transform var(--transition-smooth);
}

.photo-placeholder {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
    border: 2px dashed var(--accent-blue);
}

.photo-item {
    flex-shrink: 0;
    width: 260px;
    /* Enlarged width */
    height: 300px;
    /* Increased height to include caption space */
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* Stack image and caption */
    align-items: center;
    border: 3px solid rgba(255, 255, 255, 0.2);
    /* Thicker border */
    padding-bottom: 10px;
}

.photo-frame {
    width: 100%;
    height: 260px;
    /* Square area for photo */
    overflow: hidden;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}

.photo-caption {
    margin-top: auto;
    font-family: var(--font-handwritten);
    font-size: 1.2rem;
    color: var(--accent-cream);
    text-align: center;
    padding: 0 5px;
}

.photo-item:hover {
    border-color: var(--accent-blue);
    background: rgba(0, 0, 0, 0.5);
}

.photo-item:hover img {
    transform: scale(1.05);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    margin-top: 100px;
    /* Shift down by 30px as requested */
    width: 40px;
    height: 40px;
    border: none;
    border-radius: var(--radius-full);
    background: var(--accent-blue);
    color: var(--bg-dark);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-fast);
    z-index: 5;
}

.carousel-btn:hover {
    background: var(--accent-blue-light);
    transform: translateY(-50%) scale(1.1);
}

/* Ensure parent is relative for absolute positioning of buttons */
.slide-content {
    position: relative;
}

.carousel-btn.prev {
    left: 0;
}

.carousel-btn.next {
    right: 0;
}

/* === Quiet Moments === */
.quiet-moments {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin: var(--space-sm) 0;
}

.moment-card {
    background: rgba(249, 213, 230, 0.1);
    border-left: 4px solid var(--sumikko-pink);
    padding: var(--space-sm);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.moment-card:hover {
    background: rgba(249, 213, 230, 0.2);
    transform: translateX(5px);
}

/* === Final Slide CTA === */
.goal-line {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    border-radius: var(--radius-md);
    animation: goalPulse 2s infinite;
}

@keyframes goalPulse {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

.cta-container {
    text-align: center;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.cta-btn {
    display: inline-block;
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition-bounce);
    border: none;
}

.cta-btn.primary {
    background: linear-gradient(135deg, var(--sumikko-green), var(--accent-blue));
    color: var(--bg-dark);
}

.cta-btn.secondary {
    background: transparent;
    border: 2px solid var(--sumikko-pink);
    color: var(--sumikko-pink);
}

.cta-btn.sad-btn {
    background: transparent;
    border: 2px solid var(--text-muted);
    color: var(--text-muted);
    font-size: 0.9rem;
    /* Slightly smaller to de-emphasize */
    opacity: 0.7;
}

.cta-btn.sad-btn:hover {
    opacity: 1;
    border-color: var(--text-secondary);
    color: var(--text-secondary);
    transform: none;
    /* No bounce for the sad button */
}

.cta-btn:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 10px 30px rgba(96, 165, 250, 0.3);
}

/* === Letter Scroll === */
.letter-scroll {
    margin-top: var(--space-xl);
    max-height: 0;
    overflow: hidden;
    transition: max-height 1s ease-out;
}

.letter-scroll.visible {
    max-height: 60vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Custom Scrollbar for Webkit */
    scrollbar-width: thin;
    scrollbar-color: var(--accent-blue) rgba(255, 255, 255, 0.1);
}

/* Custom Scrollbar Styling */
.letter-scroll::-webkit-scrollbar {
    width: 8px;
}

.letter-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
}

.letter-scroll::-webkit-scrollbar-thumb {
    background-color: var(--accent-blue);
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    /* padding effect */
    background-clip: content-box;
}

.letter-scroll::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent-blue-light);
}

/* Scroll Hint */
.scroll-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    backdrop-filter: blur(5px);
    color: var(--accent-pink);
    font-weight: 600;
    font-size: 0.9rem;
    pointer-events: none;
    /* Click through to content */
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: 10002;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.scroll-hint.hidden {
    opacity: 0;
}

.scroll-arrow {
    font-size: 1.2rem;
    animation: bounceHint 1.5s infinite;
}

@keyframes bounceHint {

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

    50% {
        transform: translateY(5px);
    }
}

.letter-scroll.hidden {
    display: none;
}

.scroll-paper {
    background: linear-gradient(180deg, var(--accent-cream), #f5e6d3);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    color: #4a3728;
    box-shadow: var(--shadow-soft);
}

.letter-content {
    font-family: var(--font-handwritten);
    font-size: 1.3rem;
    line-height: 1.8;
}

.letter-greeting {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
}

.letter-body {
    margin-bottom: var(--space-lg);
}

.letter-signature {
    text-align: right;
    font-size: 1.4rem;
}

.letter-content strong {
    font-weight: 700;
    color: #2d2d44;
    /* Slightly darker/contrast */
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.1);
    /* Fake bold boost */
}

/* === Rejection Message === */
.rejection-message {
    padding: var(--space-lg);
    font-family: var(--font-handwritten);
    font-size: 1.5rem;
    color: var(--text-muted);
    font-style: italic;
    opacity: 1;
    transition: opacity 2s ease;
}

.rejection-message.hidden {
    display: none;
    opacity: 0;
}

.fade-in-text {
    animation: fadeIn 3s ease-in forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) 0;
    margin-top: auto;
    transform: translateY(-50px);
    /* Explicitly shift up by 50px */
    position: relative;
    z-index: 50;
    pointer-events: none;
    /* CRITICAL: Allow clicks to pass through empty space */
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
    pointer-events: auto;
    /* Re-enable clicks for buttons */
}

.nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-arrow {
    font-size: 1.2rem;
}

/* === Progress Dots === */
.progress-dots {
    display: none;
    gap: var(--space-sm);
    pointer-events: auto;
    /* Re-enable clicks for dots */
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    transition: var(--transition-smooth);
    cursor: pointer;
}

.dot.active {
    background: var(--accent-blue);
    transform: scale(1.2);
    box-shadow: var(--shadow-glow);
}

.dot.completed {
    background: var(--sumikko-green);
}



/* === Mobile Responsive === */
@media (max-width: 768px) {
    .journey-container {
        padding: var(--space-sm);
    }

    .journey-path {
        height: 80px;
        margin: var(--space-md) 0;
    }

    .milestone-label {
        font-size: 0.6rem;
    }

    .milestone-dot {
        width: 14px;
        height: 14px;
    }

    .tonkatsu-placeholder {
        font-size: 1.8rem;
    }

    .slide {
        padding: var(--space-md);
    }

    .slide-content {
        padding: var(--space-lg);
    }

    .slide-title.handwritten {
        font-size: 2rem;
    }

    .slide-text {
        font-size: 1rem;
    }

    .nav-text {
        display: none;
    }

    .photo-carousel {
        height: 200px;
    }

    .photo-placeholder {
        width: 150px;
        height: 150px;
    }
}

/* === Touch/Swipe hint for mobile === */
@media (max-width: 768px) {
    .slides-wrapper::after {
        content: '← Swipe →';
        position: absolute;
        bottom: -30px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.8rem;
        color: var(--text-muted);
        opacity: 0.5;
    }
}

/* === Banana Sprinkles Confetti === */
.banana-sprinkle {
    position: fixed;
    font-size: 1.5rem;
    pointer-events: none;
    z-index: 9999;
    animation: bananaSprinkleFall 2s ease-out forwards;
}

@keyframes bananaSprinkleFall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(720deg) scale(0.5);
    }
}

/* === Rain Drizzle Effect (for Bad Times slide) === */
.rain-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.5s ease;
    overflow: hidden;
}

.rain-container.active {
    opacity: 1;
}

.rain-drop {
    position: absolute;
    width: 2px;
    height: 15px;
    background: linear-gradient(to bottom, rgba(174, 194, 224, 0), rgba(174, 194, 224, 0.6));
    border-radius: 0 0 5px 5px;
    animation: rainFall linear infinite;
}

@keyframes rainFall {
    0% {
        transform: translateY(-100px);
        opacity: 0.6;
    }

    100% {
        transform: translateY(100vh);
        opacity: 0.3;
    }
}

/* === Growth Phase Visual Effects (Slide 3) === */

/* Golden glow on card for Growth slide */
.slide-3.active .slide-content {
    box-shadow:
        0 0 30px rgba(255, 215, 0, 0.3),
        0 0 60px rgba(255, 183, 77, 0.2),
        0 4px 20px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg,
            rgba(255, 248, 220, 0.15),
            rgba(255, 223, 186, 0.1));
}

/* Warm flowery background overlay */
.growth-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.8s ease;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(255, 182, 193, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 218, 185, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 250, 205, 0.1) 0%, transparent 70%);
}

.growth-background.active {
    opacity: 1;
}

/* Floating flower petals */
.flower-petal {
    position: fixed;
    font-size: 1.2rem;
    pointer-events: none;
    z-index: 50;
    animation: floatPetal 4s ease-in-out infinite;
}

@keyframes floatPetal {

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

    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

/* === Glowing Stars (for Growth slide) === */
.glowing-stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 60;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.glowing-stars-container.active {
    opacity: 1;
}

/* Small glowing stars - positioned to avoid card area */
.glow-star {
    position: absolute;
    font-size: 1rem;
    animation: twinkleGlow 2s ease-in-out infinite;
    text-shadow: 0 0 10px #ffd700, 0 0 20px #ffa500, 0 0 30px #ff8c00;
}

@keyframes twinkleGlow {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Big interactive star - positioned close to right edge */
.big-star {
    position: fixed;
    top: 50%;
    right: 20%;
    transform: translateY(-50%);
    font-size: 4rem;
    cursor: pointer;
    pointer-events: auto;
    animation: gentleGlow 3s ease-in-out infinite;
    text-shadow: 0 0 15px #ffd700, 0 0 30px #ffa500;
    z-index: 70;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.3s ease;
}

.glowing-stars-container.active .big-star {
    opacity: 1;
}

/* Gentle glow animation - slow and subtle */
@keyframes gentleGlow {

    0%,
    100% {
        filter: brightness(1);
        text-shadow: 0 0 15px #ffd700, 0 0 30px #ffa500;
    }

    50% {
        filter: brightness(1.3);
        text-shadow: 0 0 25px #ffd700, 0 0 50px #ffa500;
    }
}

.big-star:hover {
    transform: translateY(-50%) scale(1.1);
}

.big-star:hover {
    transform: scale(1.3);
}

/* Speech bubble */
.star-bubble {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1a1a2e, #2d2d44);
    color: #ffd700;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    animation: bubbleBounce 1s ease-in-out infinite;
    text-shadow: 0 0 8px #ffd700, 0 0 16px #ffa500, 0 0 24px #ff8c00;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.star-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #2d2d44;
}

@keyframes bubbleBounce {

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

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

.star-bubble.clicked {
    animation: none;
    background: linear-gradient(135deg, #2a2a4a, #3d3d5c);
    text-shadow: 0 0 12px #ffd700, 0 0 24px #ffa500, 0 0 36px #ff8c00;
}

/* === Music Indicator === */
.music-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 2.5rem;
    z-index: 100;
    pointer-events: none;
    animation: vibrate 0.5s infinite alternate ease-in-out;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.6));
}

@keyframes vibrate {
    0% {
        transform: rotate(-10deg) scale(1);
    }

    100% {
        transform: rotate(10deg) scale(1.1);
    }
}

/* === Balloon Animation (Slide 6) === */
.balloon-container {
    position: fixed;
    /* Fixed to cover entire screen/map */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 5;
    /* Behind the card (which is z-index 10 usually) but above background */
    overflow: hidden;
}

/* Individual Unit (Balloon + Weight) */
.balloon-unit {
    position: absolute;
    bottom: -150px;
    /* Start below screen */
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Rise animation defaults */
    opacity: 0;
}

.balloon-container.rising .balloon-unit {
    animation: unitRise linear forwards;
    /* duration set in JS */
    opacity: 1;
}

.balloon {
    position: relative;
    width: 40px;
    height: 50px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4) 20%, var(--color, #ff6b6b) 100%);
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    box-shadow: inset -5px -5px 10px rgba(0, 0, 0, 0.1);
    /* Sway animation */
    animation: sway 3s ease-in-out infinite alternate;
}

/* Balloon String */
.balloon::after {
    content: '';
    position: absolute;
    bottom: -40px;
    /* String length */
    left: 50%;
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.6);
    transform-origin: top center;
}

/* The weight at the bottom of the unit */
.balloon-weight {
    margin-top: 40px;
    /* Match string length */
    width: 12px;
    height: 10px;
    background: #444;
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes unitRise {
    0% {
        bottom: -150px;
        transform: translateX(0);
    }

    100% {
        bottom: 110vh;
        transform: translateX(var(--drift, 20px));
    }
}

@keyframes sway {
    0% {
        transform: rotate(-8deg);
    }

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



/* === Hope Star (Phase 3) === */
.hope-star {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scale(0);
    font-size: 2rem;
    /* Big emoji size */
    z-index: 10;
    opacity: 0;
    transition: all 0.5s ease;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
}

/* Burst Mode: Balloon Disappears */
.balloon-unit.burst-mode .balloon,
.balloon-unit.burst-mode .balloon-weight {
    animation: popEffect 0.5s forwards ease-out;
}

/* Burst Mode: Star Appears */
.balloon-unit.burst-mode .hope-star {
    animation: starBorn 1s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

    50% {
        transform: scale(1.4);
        opacity: 0.8;
    }

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

@keyframes starBorn {
    0% {
        transform: translateX(-50%) scale(0) rotate(-180deg);
        opacity: 0;
    }

    100% {
        transform: translateX(-50%) scale(1.5) rotate(0deg);
        opacity: 1;
        text-shadow: 0 0 20px #ffd700, 0 0 40px #ff6b6b;
    }
}

/* === CRITICAL FIXES: Layer Management === */
/* Prevent atmospheric effects from blocking clicks */
.stars-container,
.rain-container,
.balloon-container,
.glowing-stars,
.milky-way {
    pointer-events: none !important;
    z-index: 0 !important;
}

/* Ensure Buttons are above everything and interactable */
.cta-buttons {
    position: relative;
    z-index: 9999 !important;
}

.cta-btn {
    position: relative;
    z-index: 10000 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Ensure Scroll is on top */
.letter-scroll {
    position: relative;
    z-index: 10001 !important;
}