:root {
    --bg-dark: #0d0a0f;
    --bg-card: #1a1020;
    --bg-card-hover: #251530;
    --accent-pink: #f472b6;
    --accent-rose: #fb7185;
    --accent-purple: #c084fc;
    --gradient-love: linear-gradient(135deg, #f472b6 0%, #c084fc 50%, #818cf8 100%);
    --gradient-subtle: linear-gradient(135deg, rgba(244, 114, 182, 0.15) 0%, rgba(192, 132, 252, 0.15) 100%);
    --glass-border: rgba(244, 114, 182, 0.2);
    --text-primary: #fff1f5;
    --text-secondary: #d4b0c3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ── Particles ─────────────────────────────── */
.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    font-size: 1.2rem;
    animation: floatUp linear infinite;
    opacity: 0;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.7;
    }

    90% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(-10vh) rotate(360deg);
        opacity: 0;
    }
}

/* ── Back Button ────────────────────────────── */
.back-btn {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 200;
    background: rgba(244, 114, 182, 0.12);
    border: 1px solid var(--glass-border);
    color: var(--accent-pink);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    text-decoration: none;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.back-btn:hover {
    background: rgba(244, 114, 182, 0.25);
    transform: translateX(-3px);
    box-shadow: 0 0 20px rgba(244, 114, 182, 0.3);
}

/* ── Hero Section ───────────────────────────── */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 1;
    background: radial-gradient(ellipse at center top, rgba(192, 132, 252, 0.15) 0%, transparent 65%),
        radial-gradient(ellipse at center bottom, rgba(244, 114, 182, 0.1) 0%, transparent 65%);
}

.hero-content {
    padding: 2rem;
    max-width: 700px;
}

.heart-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: block;
    animation: heartbeat 1.6s ease-in-out infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.15);
    }

    50% {
        transform: scale(1);
    }

    75% {
        transform: scale(1.1);
    }
}

.hero-title {
    font-family: 'Noto Serif KR', serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    background: var(--gradient-love);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.italic-accent {
    font-style: italic;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.date-badge {
    display: inline-block;
    background: var(--gradient-subtle);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 0.6rem 1.8rem;
    font-size: 0.95rem;
    color: var(--accent-pink);
    backdrop-filter: blur(10px);
    margin-bottom: 3rem;
    letter-spacing: 0.05em;
}

.scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    animation: scrollFade 2s ease-in-out infinite;
}

.scroll-arrow {
    font-size: 1.5rem;
}

@keyframes scrollFade {

    0%,
    100% {
        opacity: 0.4;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(6px);
    }
}

/* ── Gallery / Timeline ─────────────────────── */
.gallery-section {
    position: relative;
    padding: 4rem 1rem 6rem;
    max-width: 900px;
    margin: 0 auto;
    z-index: 1;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, rgba(244, 114, 182, 0.4) 10%, rgba(192, 132, 252, 0.4) 90%, transparent);
    transform: translateX(-50%);
}

@media (max-width: 640px) {
    .timeline-line {
        display: none;
    }
}

/* Photo Items */
.photo-item {
    display: flex;
    margin-bottom: 5rem;
    position: relative;
}

.photo-item.left {
    justify-content: flex-start;
    padding-right: 52%;
}

.photo-item.right {
    justify-content: flex-end;
    padding-left: 52%;
}

@media (max-width: 640px) {

    .photo-item.left,
    .photo-item.right {
        justify-content: center;
        padding: 0;
    }
}

/* Timeline Dot */
.photo-item::before {
    content: '💕';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.1rem;
    z-index: 5;
    background: var(--bg-dark);
    padding: 0.3rem;
    border-radius: 50%;
}

@media (max-width: 640px) {
    .photo-item::before {
        display: none;
    }
}

/* Card */
.photo-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    max-width: 380px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.photo-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 60px rgba(244, 114, 182, 0.2);
    border-color: rgba(244, 114, 182, 0.4);
}

/* Photo / Video / Placeholder */
.media-wrapper {
    width: 100%;
    overflow: hidden;
}

.photo-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
    cursor: zoom-in;
}

.photo-card:hover img {
    transform: scale(1.04);
}

.video-wrapper {
    width: 100%;
    background: #000;
}

.video-wrapper video {
    width: 100%;
    max-height: 320px;
    display: block;
}

.photo-placeholder {
    width: 100%;
    height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e1030 0%, #2a1240 100%);
    gap: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.placeholder-emoji {
    font-size: 3.5rem;
    animation: gentleFloat 3s ease-in-out infinite;
}

@keyframes gentleFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.placeholder-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
}

/* Caption */
.photo-caption {
    padding: 1.2rem 1.4rem;
}

.caption-date {
    display: inline-block;
    font-size: 0.78rem;
    color: var(--accent-pink);
    background: rgba(244, 114, 182, 0.1);
    border: 1px solid rgba(244, 114, 182, 0.2);
    border-radius: 50px;
    padding: 0.2rem 0.8rem;
    margin-bottom: 0.7rem;
    letter-spacing: 0.05em;
}

.caption-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ── Reveal Animation ───────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.photo-item.right.reveal {
    transform: translateX(40px);
}

.photo-item.left.reveal {
    transform: translateX(-40px);
}

.photo-item.right.reveal.visible,
.photo-item.left.reveal.visible {
    transform: translateX(0);
}

/* ── Final Message ──────────────────────────── */
.message-section {
    z-index: 1;
    position: relative;
    padding: 4rem 1rem 6rem;
    text-align: center;
}

.message-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--gradient-subtle);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3.5rem 2.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 60px rgba(244, 114, 182, 0.1);
}

.message-hearts {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    animation: heartbeat 1.6s ease-in-out infinite;
}

.message-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-style: italic;
    background: var(--gradient-love);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

.message-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.9;
    margin-bottom: 2rem;
}

.message-signature {
    color: var(--accent-pink);
    font-style: italic;
    font-size: 1rem;
    opacity: 0.8;
}

/* ── Lightbox ───────────────────────────────── */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    animation: lbFadeIn 0.25s ease;
}

#lightbox.open {
    display: flex;
}

@keyframes lbFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 0 80px rgba(244, 114, 182, 0.25);
    animation: lbZoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes lbZoomIn {
    from {
        transform: scale(0.85);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

#lightbox-close {
    position: fixed;
    top: 1.2rem;
    right: 1.5rem;
    background: rgba(244, 114, 182, 0.15);
    border: 1px solid rgba(244, 114, 182, 0.3);
    color: #fff;
    font-size: 1.6rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    line-height: 1;
}

#lightbox-close:hover {
    background: rgba(244, 114, 182, 0.35);
}

#lightbox-caption {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-family: 'Outfit', sans-serif;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    white-space: nowrap;
}