:root {
    --bg-color: #0a0a0f;
    --text-primary: #f8f4ef;
    --text-secondary: #a89f91;
    --accent-gold: #c9a962;
    --accent-rose: #d4a5a5;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --font-decor: 'Cinzel', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
    min-height: 100vh;
}

/* Background Stars */
#stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(ellipse at bottom, #1a1a24 0%, #0a0a0f 100%);
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0.7;
    animation: twinkle var(--duration, 4s) infinite ease-in-out;
    will-change: opacity;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

/* ========================================
   FALLING ROSE PETALS
   ======================================== */
#petals-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.petal {
    position: absolute;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #fb7185 0%, #d4a5a5 100%);
    border-radius: 50% 0 50% 50%;
    opacity: 0.6;
    animation: fall var(--duration, 15s) linear infinite;
    transform-origin: center;
}

@keyframes fall {
    0% {
        transform: translateY(-10vh) rotate(0deg);
        opacity: 0.6;
    }

    100% {
        transform: translateY(110vh) rotate(720deg);
        opacity: 0;
    }
}

/* ========================================
   CURSOR SPARKLE TRAIL
   ======================================== */
.sparkle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #fff 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    animation: sparkle-fade 0.8s ease-out forwards;
}

@keyframes sparkle-fade {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* ========================================
   CONSTELLATION CANVAS
   ======================================== */
#constellation-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ========================================
   DEPTH EFFECT HERO (iPhone Style)
   ======================================== */
.depth-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    /* Dynamic viewport height for mobile */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.depth-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* Background Text Layer - Behind Image */
.background-text {
    z-index: 1;
}

.big-name {
    font-family: var(--font-decor);
    font-size: clamp(5rem, 22vw, 12rem);
    font-weight: 400;
    color: rgba(201, 169, 98, 0.35);
    /* Increased visibility for mobile */
    text-transform: uppercase;
    letter-spacing: 0.15em;
    user-select: none;
    text-shadow: 0 0 30px rgba(201, 169, 98, 0.3);
    /* Add glow for depth */
    transform: translateZ(-20px) scale(1.05);
    /* Push back visually */
}

/* Image Layer - Middle */
.image-layer {
    z-index: 2;
}

.depth-image {
    max-height: 70vh;
    max-width: 80vw;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.7));
    /* Stronger shadow */
    animation: subtle-float 8s ease-in-out infinite;
    transform: translateZ(10px);
    /* Push forward */
    position: relative;
    z-index: 2;
}

@keyframes subtle-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* Update highlight-section to accommodate image */
.highlight-section {
    flex-direction: column;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* ========================================
   INTERACTIVE LOVE PULSE
   ======================================== */
.interactive-section {
    min-height: 50vh;
    gap: 2rem;
}

.interactive-instruction {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    opacity: 0.8;
}

.love-pulse-container {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.love-pulse-container:active {
    transform: scale(0.9);
}

.pulse-core {
    width: 20px;
    height: 20px;
    background: var(--accent-rose);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--accent-rose);
    z-index: 2;
    transition: all 0.5s ease;
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px solid var(--accent-rose);
    border-radius: 50%;
    opacity: 0;
    animation: pulse-ring 2s infinite;
}

.pulse-ring::before,
.pulse-ring::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: 1px solid var(--accent-rose);
    border-radius: 50%;
    animation: pulse-ring 2s infinite;
}

.pulse-ring::before {
    animation-delay: 0.6s;
}

.pulse-ring::after {
    animation-delay: 1.2s;
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Active State */
.love-pulse-container.active .pulse-core {
    transform: scale(20);
    opacity: 0;
}

.hidden-message {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease;
    text-shadow: 0 0 20px rgba(251, 113, 133, 0.5);
}

.hidden-message.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Floating Hearts */
.floating-heart {
    position: fixed;
    pointer-events: none;
    font-size: 1.5rem;
    animation: floatUp 3s ease-in forwards;
    z-index: 100;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) scale(0.5) rotate(360deg);
        opacity: 0;
    }
}

/* Foreground Text Layer - In Front */
.foreground-text {
    z-index: 3;
    flex-direction: column;
    text-align: center;
    padding-bottom: 15vh;
    /* Push text towards bottom */
    justify-content: flex-end;
}

/* ========================================
   CUTE MASCOT (SHY STAR)
   ======================================== */
.mascot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mascot-container:hover {
    transform: translateY(-5px);
}

.mascot-body {
    width: 60px;
    height: 60px;
    background: #fbbf24;
    /* Star Gold */
    border-radius: 50%;
    /* Using circle for cute blob look */
    border: 3px solid #fff;
    box-shadow: 0 5px 15px rgba(251, 191, 36, 0.4);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: bounce-mascot 3s infinite ease-in-out;
}

/* Make it look like a rounded star/blob */
.mascot-body::before,
.mascot-body::after {
    content: '';
    position: absolute;
    background: #fbbf24;
    border-radius: 10px;
    z-index: -1;
}

.mascot-face {
    position: relative;
    width: 100%;
    height: 100%;
}

.eye {
    width: 8px;
    height: 8px;
    background: #0f172a;
    border-radius: 50%;
    position: absolute;
    top: 35%;
    animation: blink 4s infinite;
}

.eye.left {
    left: 25%;
}

.eye.right {
    right: 25%;
}

.mouth {
    width: 12px;
    height: 6px;
    border-bottom: 3px solid #0f172a;
    border-radius: 0 0 10px 10px;
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.2s;
}

.cheeks {
    position: absolute;
    top: 45%;
    width: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.cheeks::before,
.cheeks::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 4px;
    background: #fb7185;
    border-radius: 50%;
}

.cheeks::before {
    left: 15%;
}

.cheeks::after {
    right: 15%;
}

/* Bubble */
.speech-bubble {
    position: absolute;
    bottom: 80px;
    right: 0;
    background: white;
    color: #0f172a;
    padding: 10px 15px;
    border-radius: 15px;
    border-bottom-right-radius: 0;
    font-family: var(--font-body);
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(10px) scale(0.8);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    font-weight: 600;
}

.speech-bubble.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Animations */
@keyframes bounce-mascot {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes blink {

    0%,
    96%,
    100% {
        transform: scaleY(1);
    }

    98% {
        transform: scaleY(0.1);
    }
}

/* Interactions */
.mascot-container.happy .mouth {
    height: 10px;
    border-radius: 0 0 20px 20px;
}

.mascot-container.happy .cheeks {
    opacity: 1;
}

.mascot-container.happy .mascot-body {
    background: #fcd34d;
}

.tagline {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 7vw, 3rem);
    font-weight: 400;
    font-style: italic;
    color: var(--accent-gold);
    text-shadow: 0 5px 25px rgba(0, 0, 0, 0.9), 0 0 20px rgba(201, 169, 98, 0.3);
    /* Stronger depth shadow */
    margin-bottom: 0.3rem;
    letter-spacing: 0.05em;
}

.sub-tagline {
    font-family: var(--font-body);
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: lowercase;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.8);
    /* Add depth shadow */
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    opacity: 0.6;
    animation: bounce 2.5s infinite ease-in-out;
    font-size: 1.5rem;
    cursor: pointer;
    pointer-events: auto;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ========================================
   STORY SECTIONS
   ======================================== */
section {
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    text-align: center;
}

.story-section {
    min-height: 70vh;
}

.text-content {
    font-size: clamp(1.1rem, 4vw, 1.4rem);
    max-width: 600px;
    color: var(--text-primary);
    font-weight: 300;
    line-height: 1.9;
}

.highlight-text {
    font-size: clamp(1.3rem, 5vw, 1.8rem);
    font-family: var(--font-heading);
}

.name-highlight {
    color: var(--accent-rose);
    font-weight: 600;
    font-style: italic;
    text-shadow: 0 0 15px rgba(251, 113, 133, 0.5);
}

/* ========================================
   LOVE LETTER SECTION
   ======================================== */
.love-letter-section {
    min-height: 90vh;
    padding: 4rem 2rem;
}

.letter-container {
    max-width: 600px;
    background: linear-gradient(to bottom, #f8f4ef 0%, #ede8e3 100%);
    padding: 3rem 2.5rem;
    border-radius: 8px;
    box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.4);
    position: relative;
    font-family: 'Courier New', monospace;
    color: #2d2d2d;
}

.letter-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 29px,
            rgba(201, 169, 98, 0.2) 29px,
            rgba(201, 169, 98, 0.2) 30px);
    pointer-events: none;
}

.letter-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(201, 169, 98, 0.3);
}

.letter-to {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.letter-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

.letter-body {
    line-height: 2;
    font-size: 1rem;
}

.letter-body p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.letter-body p:first-child {
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--accent-rose);
}

.letter-signature {
    margin-top: 2rem;
    text-align: right;
    font-family: 'Brush Script MT', cursive;
    font-size: 1.2rem;
    color: var(--accent-gold);
    font-style: italic;
}

/* ========================================
   FINAL MESSAGE
   ======================================== */

/* ========================================
   FINAL MESSAGE
   ======================================== */
.final-message-section {
    min-height: 90vh;
}

.card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2.5rem 2rem;
    border-radius: 24px;
    max-width: 90%;
    width: 380px;
    box-shadow: 0 15px 50px -15px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(251, 113, 133, 0.4), transparent);
}

.message-body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.9;
    margin-bottom: 1.5rem;
    text-align: left;
    color: rgba(255, 255, 255, 0.9);
}

.closing {
    font-family: var(--font-decor);
    font-size: 1.1rem;
    color: var(--accent-gold);
    text-align: center;
}

/* ========================================
   FOOTER & UTILITIES
   ======================================== */
footer {
    min-height: auto;
    padding: 3rem 2rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Reveal Animation */
.fade-on-scroll {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 1s ease-out, transform 1s ease-out;
    will-change: opacity, transform;
}

.fade-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   MOBILE ADJUSTMENTS
   ======================================== */
@media (max-width: 768px) {

    /* Enhanced depth perception on mobile */
    .big-name {
        color: rgba(201, 169, 98, 0.4);
        /* Even more visible on mobile */
        font-size: clamp(4.5rem, 20vw, 10rem);
    }

    .depth-image {
        max-height: 55vh;
        max-width: 85vw;
        filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.85));
        /* Extra strong shadow */
    }

    .foreground-text {
        padding-bottom: 12vh;
    }

    .tagline,
    .sub-tagline {
        text-shadow: 0 8px 30px rgba(0, 0, 0, 1);
        /* Very strong shadow for mobile */
    }

    .card {
        padding: 2rem 1.5rem;
        width: 90%;
    }

    .text-content {
        padding: 0 1rem;
    }
}

@media (max-height: 700px) {
    .depth-image {
        max-height: 50vh;
    }

    .foreground-text {
        padding-bottom: 8vh;
    }
}