:root {
    /* Elite Palette */
    --midnight: #0a0a0c;
    --deep-purple: #1a1a2e;
    --rose-gold: #e5a1a1;
    --vivid-pink: #ff66b2;
    --champagne: #f1d592;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-accent: 'Playfair Display', serif;
    --font-script: 'Dancing Script', cursive;

    /* Effects */
    --blur: blur(20px);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
    --transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--midnight);
    color: #fff;
    font-family: var(--font-body);
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- MESH BACKGROUND --- */
.mesh-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 1) 0, transparent 50%),
        radial-gradient(at 0% 100%, hsla(339, 49%, 30%, 1) 0, transparent 50%),
        radial-gradient(at 50% 100%, hsla(225, 39%, 30%, 1) 0, transparent 50%),
        radial-gradient(at 100% 100%, hsla(253, 16%, 7%, 1) 0, transparent 50%);
    opacity: 0.6;
}

/* --- INTRO SECTION --- */
.intro-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    z-index: 10;
    transition: var(--transition);
}

.intro-content {
    max-width: 800px;
}

.cinematic-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 700;
    letter-spacing: -2px;
    background: linear-gradient(to bottom, #fff, var(--rose-gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1.2s forwards 0.5s;
}

.intro-subtitle {
    font-family: var(--font-accent);
    font-style: italic;
    font-size: 1.5rem;
    color: var(--rose-gold);
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInUp 1.2s forwards 0.8s;
}

.glow-btn {
    background: transparent;
    border: 1px solid var(--rose-gold);
    color: #fff;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-family: var(--font-heading);
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 1.2s forwards 1.1s;
}

.glow-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: var(--rose-gold);
    transition: var(--transition);
    border-radius: 50%;
    z-index: -1;
    transform: translate(-50%, -50%) scale(0);
}

.glow-btn:hover {
    color: var(--midnight);
    border-color: transparent;
    box-shadow: 0 0 30px rgba(229, 161, 161, 0.4);
}

.glow-btn:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

/* --- MAIN CONTAINER --- */
.main-container {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
    transition: var(--transition);
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.hidden {
    display: none !important;
}

.fade-out {
    opacity: 0;
    transform: scale(1.1);
    pointer-events: none;
}

/* --- GLASSMORPHISM 2.0 --- */
.glass-card {
    background: var(--glass);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.header-glass {
    text-align: center;
    margin-bottom: 80px;
}

.pre-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 4px;
    color: var(--vivid-pink);
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
}

.main-heading {
    font-family: var(--font-script);
    font-size: 4rem;
    color: #fff;
}

/* --- TIMELINE JOURNEY --- */
.timeline-journey {
    position: relative;
    margin: 100px 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--rose-gold), transparent);
    transform: translateX(-50%);
}

.gift-path {
    display: flex;
    flex-direction: column;
    gap: 150px;
}

.gift-node {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
}

.gift-sphere {
    width: 80px;
    height: 80px;
    background: var(--glass);
    border: 2px solid var(--rose-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 5;
    box-shadow: 0 0 20px rgba(229, 161, 161, 0.2);
}

.gift-sphere:hover {
    transform: scale(1.2);
    background: var(--rose-gold);
    color: var(--midnight);
    box-shadow: 0 0 40px var(--rose-gold);
}

.gift-sphere.locked {
    filter: grayscale(1) opacity(0.5);
    cursor: not-allowed;
    border-style: dashed;
}

.gift-info {
    position: absolute;
    width: 40%;
    padding: 20px;
}

.gift-node:nth-child(odd) .gift-info {
    left: 10%;
    text-align: right;
}

.gift-node:nth-child(even) .gift-info {
    right: 10%;
    text-align: left;
}

.day-label {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--champagne);
    font-weight: 600;
}

.gift-title {
    font-family: var(--font-accent);
    font-size: 1.8rem;
}

/* --- MUSIC CONTROLLER --- */
.music-controller {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.glass-circle {
    width: 60px;
    height: 60px;
    background: var(--glass);
    backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.glass-circle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1) rotate(15deg);
}

/* --- BOKEH PARTICLES --- */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.bokeh-particle {
    position: absolute;
    border-radius: 50%;
}

@keyframes floatParticle {

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

    33% {
        transform: translateY(-30px) translateX(20px);
    }

    66% {
        transform: translateY(20px) translateX(-15px);
    }
}

/* --- MODAL SYSTEM --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content {
    max-width: 600px;
    width: 100%;
    position: relative;
    text-align: center;
    animation: modalSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.6;
    transition: 0.3s;
}

.close-modal:hover {
    opacity: 1;
}

.parcel-opening-anim {
    padding: 40px;
}

.opening-icon {
    font-size: 5rem;
    display: block;
    margin-bottom: 20px;
    animation: wiggle 0.5s infinite;
}

.revealed-emoji {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.content-body {
    margin: 20px 0;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

.media-placeholder {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 15px;
    margin-top: 20px;
    border: 1px dashed var(--rose-gold);
    color: var(--rose-gold);
    font-style: italic;
}

.close-reveal-btn {
    margin-top: 20px;
    background: var(--rose-gold);
    color: var(--midnight);
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.close-reveal-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(229, 161, 161, 0.4);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }

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

@keyframes wiggle {

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

    25% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }
}

@keyframes popIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .timeline-line {
        left: 30px;
    }

    .gift-node {
        justify-content: flex-start;
        padding-left: 15px;
    }

    .gift-info {
        position: relative;
        width: calc(100% - 100px);
        left: 20px !important;
        right: auto !important;
        text-align: left !important;
    }
}

/* --- MAGICAL CURSOR TRAIL --- */
#cursor-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.trail-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--rose-gold);
    box-shadow: 0 0 10px var(--rose-gold);
    pointer-events: none;
    animation: trailFade 0.8s ease-out forwards;
}

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

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

/* --- SECTION TITLES --- */
.section-title {
    font-family: var(--font-accent);
    font-size: 2.5rem;
    text-align: center;
    margin: 80px 0 40px;
    color: var(--rose-gold);
    font-style: italic;
    opacity: 0;
    animation: titleSlideIn 1s ease-out forwards;
    animation-delay: 0.3s;
}

@keyframes titleSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

/* --- MEMORY WALL --- */
.memory-wall-section {
    margin: 100px 0;
}

.polaroid-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 40px 20px;
}

.polaroid {
    background: #fff;
    padding: 15px;
    padding-bottom: 60px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: rotate(var(--rotation));
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    animation: polaroidFloat 3s ease-in-out infinite;
    animation-delay: var(--delay);
}

.polaroid:hover {
    transform: rotate(0deg) scale(1.1);
    z-index: 10;
}

.polaroid.flipped {
    transform: rotateY(180deg) scale(1.1);
}

.polaroid-front,
.polaroid-back {
    backface-visibility: hidden;
}

.polaroid-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotateY(180deg);
    background: #f5f5dc;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.polaroid-image {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--deep-purple), var(--vivid-pink));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.polaroid-caption {
    position: absolute;
    bottom: 10px;
    left: 15px;
    right: 15px;
    font-family: var(--font-script);
    color: #333;
    font-size: 1.1rem;
    text-align: center;
}

.memory-note {
    font-family: 'Courier New', monospace;
    color: #333;
    font-size: 0.9rem;
    line-height: 1.6;
    text-align: center;
}

@keyframes polaroidFloat {

    0%,
    100% {
        transform: translateY(0) rotate(var(--rotation));
    }

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

/* --- LOVE BUBBLES --- */
.love-bubbles-section {
    margin: 100px 0;
    min-height: 400px;
    position: relative;
}

.bubbles-container {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.love-bubble {
    position: absolute;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), rgba(255, 102, 178, 0.1));
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    animation: bubbleFloat 6s ease-in-out infinite;
    animation-delay: var(--delay);
    transition: all 0.3s;
    box-shadow: 0 8px 20px rgba(255, 102, 178, 0.3);
}

.love-bubble:hover {
    transform: scale(1.2);
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.5), rgba(255, 102, 178, 0.3));
}

.love-bubble.popped {
    animation: bubblePop 0.5s forwards;
}

.bubble-message {
    position: absolute;
    background: var(--glass);
    backdrop-filter: var(--blur);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    color: #fff;
    font-family: var(--font-accent);
    font-size: 1.2rem;
    text-align: center;
    animation: messageFloat 3s ease-out forwards;
    pointer-events: none;
    max-width: 300px;
}

@keyframes bubbleFloat {

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

    25% {
        transform: translateY(-20px) translateX(10px);
    }

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

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

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

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

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

@keyframes messageFloat {
    0% {
        opacity: 0;
        transform: translateY(0);
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateY(-100px);
    }
}

/* --- BIRTHDAY CAKE --- */
.cake-section {
    margin: 100px 0;
    text-align: center;
}

.cake-container {
    display: flex;
    justify-content: center;
    padding: 60px 0;
}

.cake {
    width: 300px;
    height: 200px;
    background: linear-gradient(to bottom, #ff69b4, #ff1493);
    border-radius: 20px 20px 0 0;
    position: relative;
    box-shadow: 0 10px 40px rgba(255, 105, 180, 0.5);
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding-top: 20px;
}

.candle {
    width: 20px;
    height: 80px;
    background: linear-gradient(to bottom, #fff, #f0e68c);
    border-radius: 5px 5px 0 0;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
}

.candle:hover {
    transform: scale(1.1);
}

.flame {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 25px;
    background: radial-gradient(ellipse at center, #ffff00, #ff6600);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flicker 0.3s infinite alternate;
    box-shadow: 0 0 20px #ff6600;
}

.candle.blown .flame {
    animation: blowOut 0.5s forwards;
}

@keyframes flicker {
    0% {
        transform: translateX(-50%) scale(1);
    }

    100% {
        transform: translateX(-50%) scale(1.1, 0.9);
    }
}

@keyframes blowOut {
    0% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }

    50% {
        opacity: 0.5;
        transform: translateX(-50%) scale(1.5, 0.5);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) scale(2, 0.1);
    }
}

/* --- TIME CAPSULE --- */
.time-capsule-section {
    margin: 100px 0;
    padding: 60px 20px;
}

.capsule-lock {
    text-align: center;
    padding: 60px 20px;
}

.lock-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: lockShake 2s ease-in-out infinite;
}

.lock-message {
    font-family: var(--font-accent);
    font-size: 1.5rem;
    color: var(--rose-gold);
    margin: 20px 0;
}

#capsule-countdown {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--champagne);
    margin-top: 20px;
}

.capsule-letter {
    max-width: 800px;
    margin: 0 auto;
    background: var(--glass);
    backdrop-filter: var(--blur);
    padding: 60px 40px;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
}

.letter-title {
    font-family: var(--font-accent);
    font-size: 2.5rem;
    color: var(--rose-gold);
    margin-bottom: 40px;
    text-align: center;
}

.typing-letter {
    font-family: var(--font-body);
    font-size: 1.2rem;
    line-height: 2;
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
}

.typing-letter::after {
    content: '|';
    animation: blink 0.7s infinite;
}

@keyframes lockShake {

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

    25% {
        transform: rotate(-5deg);
    }

    75% {
        transform: rotate(5deg);
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* --- VINYL PLAYER --- */
.vinyl-player {
    position: fixed;
    bottom: 110px;
    right: 30px;
    z-index: 1000;
}

.vinyl-record {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, #1a1a1a 30%, #333 30%, #333 35%, #1a1a1a 35%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    border: 3px solid var(--rose-gold);
}

.vinyl-record:hover {
    transform: scale(1.1);
}

.vinyl-record.spinning {
    animation: spin 3s linear infinite;
}

.vinyl-label {
    width: 30px;
    height: 30px;
    background: var(--rose-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--midnight);
}

.track-info {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: var(--glass);
    backdrop-filter: var(--blur);
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    margin-bottom: 10px;
    white-space: nowrap;
    font-size: 0.9rem;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* --- RESPONSIVE --- */