/* ============================================
   THE LOVE JOURNAL - Custom Styles
   ============================================ */

/* === FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;500;600;700&family=Pacifico&family=Quicksand:wght@300;400;500;600;700&family=Nunito:wght@300;400;500;600;700&display=swap');

/* === CSS VARIABLES === */
:root {
    --pink-pastel: #ffe4e6;
    --cream: #fff1f2;
    --warm-red: #e11d48;
    --soft-rose: #fb7185;
    --blush: #fda4af;
    --light-pink: #fecdd3;
    --deep-rose: #be123c;
    --warm-cream: #fef2f2;
    --gold-accent: #d4a574;
    --font-handwriting: 'Dancing Script', cursive;
    --font-title: 'Pacifico', cursive;
    --font-body: 'Quicksand', sans-serif;
    --font-body-alt: 'Nunito', sans-serif;
}

/* === GLOBAL === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: #4a3728;
    overflow-x: hidden;
    background: var(--cream);
}

/* === GRAIN / VINTAGE TEXTURE OVERLAY === */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ============================================
   SCREEN 1: THE INTRO
   ============================================ */

#intro {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe4e6 30%, #fecdd3 60%, #fff1f2 100%);
    overflow: hidden;
}

/* Decorative floating elements */
.intro-bg-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.floating-heart {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.15;
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg) scale(0.5);
        opacity: 0;
    }

    10% {
        opacity: 0.15;
    }

    90% {
        opacity: 0.15;
    }

    100% {
        transform: translateY(-10vh) rotate(360deg) scale(1.2);
        opacity: 0;
    }
}

/* Book cover container */
.book-cover {
    position: relative;
    max-width: 500px;
    width: 90%;
    padding: 3rem 2.5rem;
    background: linear-gradient(145deg, #ffffff 0%, #fff5f5 50%, #fff1f2 100%);
    border-radius: 12px;
    box-shadow:
        0 25px 60px rgba(225, 29, 72, 0.12),
        0 8px 24px rgba(225, 29, 72, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(253, 164, 175, 0.3);
    transform: perspective(800px) rotateY(-2deg);
    transition: transform 0.6s ease, box-shadow 0.6s ease;
    z-index: 10;
}

.book-cover:hover {
    transform: perspective(800px) rotateY(0deg) translateY(-4px);
    box-shadow:
        0 30px 80px rgba(225, 29, 72, 0.18),
        0 12px 32px rgba(225, 29, 72, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Book spine effect */
.book-cover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 6px;
    background: linear-gradient(180deg, var(--blush), var(--warm-red), var(--blush));
    border-radius: 3px 0 0 3px;
    opacity: 0.6;
}

/* Corner decorations */
.corner-decoration {
    position: absolute;
    width: 40px;
    height: 40px;
    opacity: 0.3;
}

.corner-decoration.top-left {
    top: 12px;
    left: 12px;
    border-top: 2px solid var(--warm-red);
    border-left: 2px solid var(--warm-red);
}

.corner-decoration.top-right {
    top: 12px;
    right: 12px;
    border-top: 2px solid var(--warm-red);
    border-right: 2px solid var(--warm-red);
}

.corner-decoration.bottom-left {
    bottom: 12px;
    left: 12px;
    border-bottom: 2px solid var(--warm-red);
    border-left: 2px solid var(--warm-red);
}

.corner-decoration.bottom-right {
    bottom: 12px;
    right: 12px;
    border-bottom: 2px solid var(--warm-red);
    border-right: 2px solid var(--warm-red);
}

/* Title area */
.book-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    15% {
        transform: scale(1.15);
    }

    30% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.1);
    }

    60% {
        transform: scale(1);
    }
}

.book-title {
    font-family: var(--font-title);
    font-size: 2.2rem;
    color: var(--warm-red);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(225, 29, 72, 0.1);
}

.book-subtitle {
    font-family: var(--font-handwriting);
    font-size: 1.3rem;
    color: var(--soft-rose);
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.welcome-container {
    height: 3.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
}

.book-welcome {
    font-family: var(--font-handwriting);
    font-size: 1.25rem;
    color: #b45670;
    line-height: 1.6;
    opacity: 0.85;
    position: relative;
}

/* Typewriter Cursor */
.book-welcome.typing::after {
    content: '|';
    position: absolute;
    right: -8px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Love Counter */
.love-counter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    transition: opacity 1s ease-in-out;
}

.love-counter.opacity-0 {
    opacity: 0;
}

.love-counter.opacity-100 {
    opacity: 1;
}

.love-counter .time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.6);
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(253, 164, 175, 0.4);
    min-width: 65px;
    box-shadow: 0 4px 10px rgba(225, 29, 72, 0.05);
}

.love-counter .time-box span:first-child {
    font-family: var(--font-body-alt);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--warm-red);
}

.love-counter .time-label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--soft-rose);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

/* Divider */
.ornamental-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.2rem 0;
    opacity: 0.5;
}

.ornamental-divider .line {
    height: 1px;
    width: 50px;
    background: linear-gradient(90deg, transparent, var(--warm-red), transparent);
}

.ornamental-divider .diamond {
    font-size: 0.6rem;
    color: var(--warm-red);
}

/* CTA Button */
.btn-open-journal {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 2.2rem;
    background: linear-gradient(135deg, var(--warm-red) 0%, var(--deep-rose) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-family: var(--font-handwriting);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow:
        0 6px 20px rgba(225, 29, 72, 0.3),
        0 2px 6px rgba(225, 29, 72, 0.15);
    position: relative;
    overflow: hidden;
}

.btn-open-journal::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    transform: scale(0);
    transition: transform 0.6s ease;
}

.btn-open-journal:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow:
        0 10px 30px rgba(225, 29, 72, 0.4),
        0 4px 10px rgba(225, 29, 72, 0.2);
}

.btn-open-journal:hover::before {
    transform: scale(1);
}

.btn-open-journal:active {
    transform: translateY(-1px) scale(1.01);
}

.btn-open-journal .btn-icon {
    font-size: 1.3rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

/* Music hint */
.music-hint {
    margin-top: 1.2rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--blush);
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

/* Petal rain */
.petal {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--blush);
    border-radius: 50% 0 50% 50%;
    opacity: 0;
    pointer-events: none;
    animation: petalFall linear infinite;
}

@keyframes petalFall {
    0% {
        transform: translateY(-20px) rotate(0deg) scale(0.8);
        opacity: 0;
    }

    10% {
        opacity: 0.6;
    }

    90% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(100vh) rotate(720deg) scale(0.3);
        opacity: 0;
    }
}

/* ============================================
   SCREEN 2: MEMORY LANE
   ============================================ */
#memory-lane {
    min-height: 100vh;
    padding: 0 1rem 2rem;
    background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 30%, #fff5f5 60%, #ffe4e6 100%);
    position: relative;
    overflow: hidden;
}

/* --- Timeline Thread --- */
.timeline-container {
    position: relative;
}

.timeline-thread {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg,
            transparent 0%,
            var(--blush) 5%,
            var(--soft-rose) 30%,
            var(--warm-red) 50%,
            var(--soft-rose) 70%,
            var(--blush) 95%,
            transparent 100%);
    transform: translateX(-50%);
    border-radius: 2px;
}

/* --- LED Lights --- */
.timeline-led-lights {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 0;
    transform: translateX(-50%);
    pointer-events: none;
}

.led-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--warm-red);
    box-shadow: 0 0 6px var(--soft-rose), 0 0 12px rgba(225, 29, 72, 0.3);
    animation: ledGlow 2s ease-in-out infinite alternate;
}

.led-dot:nth-child(odd) {
    animation-delay: 0s;
}

.led-dot:nth-child(even) {
    animation-delay: 1s;
}

@keyframes ledGlow {
    0% {
        opacity: 0.4;
        box-shadow: 0 0 4px var(--soft-rose);
    }

    100% {
        opacity: 1;
        box-shadow: 0 0 8px var(--soft-rose), 0 0 16px rgba(225, 29, 72, 0.4);
    }
}

/* --- Timeline Items --- */
.timeline-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 4rem;
    width: 100%;
}

/* --- Heart Icon on Timeline --- */
.timeline-heart {
    position: absolute;
    left: 50%;
    top: 20px;
    transform: translateX(-50%);
    z-index: 5;
    width: 44px;
    height: 44px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(225, 29, 72, 0.2);
    border: 2px solid var(--light-pink);
}

.heart-icon {
    font-size: 1.3rem;
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* --- Timeline Content (Left / Right alternation) --- */
.timeline-content {
    width: 45%;
}

.timeline-content.timeline-left {
    margin-right: auto;
    padding-right: 2rem;
    text-align: right;
}

.timeline-content.timeline-right {
    margin-left: auto;
    padding-left: 2rem;
    text-align: left;
}

/* --- Timeline Card --- */
.timeline-card {
    background: linear-gradient(145deg, #ffffff 0%, #fff8f8 50%, #fff1f2 100%);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow:
        0 8px 30px rgba(225, 29, 72, 0.08),
        0 2px 8px rgba(225, 29, 72, 0.05);
    border: 1px solid rgba(253, 164, 175, 0.25);
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blush), var(--warm-red), var(--blush));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.timeline-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 15px 40px rgba(225, 29, 72, 0.15),
        0 5px 15px rgba(225, 29, 72, 0.08);
}

.timeline-card:hover::before {
    opacity: 1;
}

/* --- Chapter Badge --- */
.chapter-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--warm-red), var(--deep-rose));
    color: white;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.8rem;
    border-radius: 50px;
    margin-bottom: 0.6rem;
    letter-spacing: 0.5px;
}

/* --- Chapter Title --- */
.chapter-title {
    font-family: var(--font-handwriting);
    font-size: 1.5rem;
    color: var(--warm-red);
    margin-bottom: 0.3rem;
    font-weight: 600;
}

/* --- Chapter Date --- */
.chapter-date {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--blush);
    margin-bottom: 0.5rem;
}

/* --- Chapter Description --- */
.chapter-desc {
    font-family: var(--font-body-alt);
    font-size: 0.9rem;
    color: #7a5a6a;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* --- Polaroid Preview --- */
.polaroid-preview {
    display: flex;
    justify-content: center;
    margin-bottom: 0.8rem;
}

.polaroid-frame {
    background: white;
    padding: 6px 6px 20px 6px;
    border-radius: 3px;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.08);
    transform: rotate(-2deg);
    transition: transform 0.4s ease;
    max-width: 200px;
}

.timeline-card:hover .polaroid-frame {
    transform: rotate(0deg) scale(1.02);
}

.polaroid-frame img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 2px;
    display: block;
}

/* --- View Album Hint --- */
.view-album-hint {
    font-family: var(--font-handwriting);
    font-size: 0.85rem;
    color: var(--blush);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.timeline-card:hover .view-album-hint {
    opacity: 1;
}

/* --- Timeline End Marker --- */
.timeline-end {
    text-align: center;
    padding-top: 2rem;
    position: relative;
}

/* ============================================
   ALBUM MODAL
   ============================================ */
.album-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.album-modal.active {
    display: flex;
    opacity: 1;
}

.album-modal-content {
    background: linear-gradient(145deg, #fff8f6 0%, #fff1f2 50%, #ffe8ea 100%);
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.5s ease;
}

@keyframes modalSlideIn {
    0% {
        transform: translateY(40px) scale(0.95);
        opacity: 0;
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.album-close-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    background: rgba(225, 29, 72, 0.1);
    border: none;
    color: var(--warm-red);
    font-size: 1.2rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.album-close-btn:hover {
    background: var(--warm-red);
    color: white;
    transform: rotate(90deg);
}

.album-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.album-chapter-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--warm-red), var(--deep-rose));
    color: white;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 1rem;
    border-radius: 50px;
    margin-bottom: 0.5rem;
}

.album-title {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}

.album-date {
    font-size: 1.1rem;
}

/* --- Album Photos Grid (scattered artistic layout) --- */
.album-photos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    padding: 0.5rem;
}

.album-photo-item {
    background: white;
    padding: 8px 8px 28px 8px;
    border-radius: 4px;
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.1),
        0 2px 6px rgba(0, 0, 0, 0.06);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
}

.album-photo-item:hover {
    transform: scale(1.03);
    box-shadow: 0 12px 35px rgba(225, 29, 72, 0.15);
    z-index: 2;
}

.album-photo-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 2px;
    display: block;
}

.album-photo-caption {
    font-family: var(--font-handwriting);
    font-size: 0.85rem;
    color: #7a5a6a;
    text-align: center;
    margin-top: 8px;
    padding: 0 4px;
}

/* ============================================
   LIGHTBOX (Fullscreen Photo Popup)
   ============================================ */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: zoom-out;
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: lightboxZoomIn 0.4s ease;
    cursor: default;
}

.lightbox-content video {
    max-width: 90vw;
    max-height: 78vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: lightboxZoomIn 0.4s ease;
    cursor: default;
}

@keyframes lightboxZoomIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-caption {
    color: white;
    font-family: var(--font-handwriting);
    font-size: 1.1rem;
    text-align: center;
    margin-top: 1rem;
    opacity: 0.85;
    max-width: 600px;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2010;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 1.8rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2010;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-nav.prev {
    left: 16px;
}

.lightbox-nav.next {
    right: 16px;
}

.lightbox-counter {
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-body);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Lazy loading placeholder */
.lazy-img {
    background: linear-gradient(135deg, #ffe4e6, #fff1f2);
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lazy-img::before {
    content: '🌸';
    font-size: 1.5rem;
    opacity: 0.4;
    animation: pulse 1.5s ease-in-out infinite;
}

.lazy-img.loaded::before {
    display: none;
}

/* ============================================
   SCREEN 3: LOVE QUIZ
   ============================================ */
#love-quiz {
    min-height: 100vh;
    padding: 4rem 1rem;
    background: linear-gradient(180deg, #fff5f5 0%, #ffe4e6 50%, #fff1f2 100%);
    position: relative;
}

.quiz-step {
    transition: opacity 0.5s ease-in-out;
}

.quiz-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-family: var(--font-body-alt);
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--blush);
    background: #fff;
    color: var(--warm-red);
    box-shadow: 0 4px 10px rgba(225, 29, 72, 0.08);
    position: relative;
    overflow: hidden;
    min-width: 140px;
    outline: none;
}

.quiz-btn:hover {
    background: var(--cream);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(225, 29, 72, 0.15);
}

.quiz-btn.btn-correct:active {
    background: var(--light-pink);
    border-color: var(--soft-rose);
    transform: translateY(0);
}

.quiz-btn.btn-runaway {
    transition: top 0.2s cubic-bezier(0.25, 1, 0.5, 1), left 0.2s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 10;
}

/* Shake Animation for Wrong Answers */
.shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0) rotate(1deg);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0) rotate(-1deg);
    }
}

.btn-wrong.shake {
    background: #fee2e2;
    border-color: #ef4444;
    color: #b91c1c;
}

/* ============================================
   SCREEN 4: THE GIFT (placeholder structure)
   ============================================ */
#the-gift {
    min-height: 100vh;
    padding: 4rem 1rem;
    background: linear-gradient(180deg, #fff1f2 0%, #fecdd3 50%, #ffe4e6 100%);
    position: relative;
}

/* ============================================
   ANIMATIONS & UTILITIES
   ============================================ */

/* Fade-in animation for scroll reveal */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Audio visualizer (subtle) */
.audio-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 50px;
    cursor: pointer;
    border: 1px solid rgba(253, 164, 175, 0.3);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.audio-indicator.show {
    opacity: 1;
}

.audio-bar {
    width: 3px;
    background: var(--warm-red);
    border-radius: 2px;
    transition: height 0.3s ease;
}

.audio-indicator.playing .audio-bar:nth-child(1) {
    animation: audioWave 0.8s ease-in-out infinite 0s;
}

.audio-indicator.playing .audio-bar:nth-child(2) {
    animation: audioWave 0.8s ease-in-out infinite 0.1s;
}

.audio-indicator.playing .audio-bar:nth-child(3) {
    animation: audioWave 0.8s ease-in-out infinite 0.2s;
}

.audio-indicator.playing .audio-bar:nth-child(4) {
    animation: audioWave 0.8s ease-in-out infinite 0.3s;
}

@keyframes audioWave {

    0%,
    100% {
        height: 6px;
    }

    50% {
        height: 18px;
    }
}

.audio-indicator:not(.playing) .audio-bar {
    height: 6px !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
    .book-cover {
        padding: 2rem 1.5rem;
        width: 92%;
    }

    .book-title {
        font-size: 1.6rem;
    }

    .book-subtitle {
        font-size: 1.1rem;
    }

    .book-welcome {
        font-size: 0.95rem;
    }

    .btn-open-journal {
        font-size: 1.1rem;
        padding: 0.8rem 1.8rem;
    }

    /* Timeline mobile: single column */
    .timeline-thread {
        left: 20px;
    }

    .timeline-led-lights {
        left: 20px;
    }

    .timeline-heart {
        left: 20px;
        width: 36px;
        height: 36px;
    }

    .heart-icon {
        font-size: 1rem;
    }

    .timeline-content {
        width: calc(100% - 50px) !important;
        margin-left: auto !important;
        margin-right: 0 !important;
        padding-left: 1.5rem !important;
        padding-right: 0 !important;
        text-align: left !important;
    }

    .timeline-item {
        margin-bottom: 2.5rem;
    }

    .chapter-title {
        font-size: 1.25rem;
    }

    .polaroid-frame {
        max-width: 160px;
    }

    .polaroid-frame img {
        height: 110px;
    }

    /* Modal mobile */
    .album-modal-content {
        padding: 1.2rem;
        max-height: 90vh;
    }

    .album-photos {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .album-photo-item img {
        height: 200px;
    }

    .album-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 380px) {
    .book-title {
        font-size: 1.4rem;
    }

    .book-cover {
        padding: 1.5rem 1.2rem;
    }
}

/* Image Captions */
.album-photo-caption {
    font-family: var(--font-body);
    font-size: 0.95rem;
    /* Softer size */
    color: #b45670;
    /* Less harsh red, softer pinkish-red */
    text-align: center;
    margin-top: 0.6rem;
    padding: 0 0.5rem;
    font-style: italic;
    font-weight: 500;
    line-height: 1.4;
}

#lightbox-caption {
    font-family: var(--font-body);
    font-size: 1.15rem;
    /* Readable but not overly huge */
    color: #fff1f2;
    /* Soft cream instead of pure white */
    text-align: center;
    margin-top: 1rem;
    padding: 0 1rem;
    max-width: 90vw;
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    /* Subtle shadow for readability on dark backgrounds */
}