/* ============================== 
    ROOT VARIABLES
============================== */
:root {
    --bg-dark: #0a041f;
    --text-primary: #ffffff;
    --text-muted: #b4a8d4;
    --primary: #ff3366;
    --secondary: #00d2ff;
    --tertiary: #9d4edd;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* ============================== 
    GLOBAL RESET & TYPOGRAPHY
============================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
    min-height: 100vh;
}

h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
}

a {
    text-decoration: none;
    color: inherit;
}

li {
    list-style: none;
}

/* ============================== 
    UTILITIES & REUSABLE
============================== */
.highlight {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
}

.section-title {
    text-align: center;
    font-size: 3.5rem;
    margin-bottom: 3rem;
    margin-top: 5rem;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.text-center {
    text-align: center;
}

.hidden {
    display: none !important;
}

.d-none {
    opacity: 0;
    pointer-events: none;
}

/* ============================== 
    ANIMATIONS 
============================== */
.blast-in {
    animation: blastIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes blastIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(50px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ============================== 
    AMBIENT BACKGROUND & BLOBS
============================== */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
    background: radial-gradient(circle at bottom, #0a041f, #04010a);
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.8;
    animation: drift 20s infinite alternate ease-in-out;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: rgba(255, 51, 102, 0.4);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: rgba(0, 210, 255, 0.3);
    bottom: -200px;
    right: -100px;
    animation-duration: 25s;
    animation-direction: alternate-reverse;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: rgba(157, 78, 221, 0.3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-duration: 30s;
}

.blob-4 {
    width: 250px;
    height: 250px;
    background: rgba(255, 215, 0, 0.2);
    top: 20%;
    right: 20%;
    animation-duration: 15s;
}

@keyframes drift {
    0% {
        transform: scale(1) translate(0, 0);
    }

    33% {
        transform: scale(1.1) translate(50px, -50px);
    }

    66% {
        transform: scale(0.9) translate(-50px, 30px);
    }

    100% {
        transform: scale(1.2) translate(-20px, 50px);
    }
}

.stars-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(white 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.25;
    animation: starsMove 100s linear infinite;
}

@keyframes starsMove {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 1000px 1000px;
    }
}

/* ============================== 
    LOADER
============================== */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

/* ============================== 
    FLASH & EXPLOSION EFFECTS
============================== */
#flash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle, #ffffff 0%, #ff3366 100%);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease-in;
    mix-blend-mode: screen;
}

#flash-overlay.active {
    opacity: 1;
    transition: opacity 0.2s ease-out;
}

#flash-overlay.fade-out {
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}



.btn-explode {
    animation: buttonExplode 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
}

@keyframes buttonExplode {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }

    50% {
        transform: scale(0.8);
        filter: brightness(1.5);
    }

    100% {
        transform: scale(5);
        opacity: 0;
        filter: blur(5px) brightness(3);
    }
}

.celebration-title {
    font-family: 'Great Vibes', cursive;
    font-size: 5.5rem;
    background: linear-gradient(to right, #ff3366, #ff8c00, #ff3366, #00d2ff);
    background-size: 300% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: 10px;
    animation: shine 3s linear infinite, popIn 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 1.8s backwards;
    text-shadow: 0 0 20px rgba(255, 51, 102, 0.4);
}

@keyframes shine {
    to {
        background-position: 300% center;
    }
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.loader-content {
    text-align: center;
}

.heartbeat-icon {
    font-size: 4rem;
    color: var(--primary);
    animation: throb 1.2s infinite ease-in-out;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 15px var(--primary));
}

@keyframes throb {

    0%,
    100% {
        transform: scale(1);
    }

    20% {
        transform: scale(1.2);
    }

    40% {
        transform: scale(1);
    }

    60% {
        transform: scale(1.2);
    }

    80% {
        transform: scale(1);
    }
}

.progress-bar {
    width: 250px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-top: 15px;
    overflow: hidden;
}

.progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    transition: width 0.1s linear;
}

/* ============================== 
    NAVIGATION
============================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(0px);
}

.navbar.scrolled {
    padding: 1rem 5%;
    background: rgba(10, 4, 31, 0.85);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-family: 'Great Vibes', cursive;
    font-size: 2.5rem;
    font-weight: bold;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links li a {
    position: relative;
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    transition: color 0.3s;
}

.nav-links li a i {
    margin-right: 5px;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: white;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav-links li a.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ============================== 
    SECTION SETTINGS (Single Page Flow)
============================== */
.section {
    min-height: 100vh;
    padding: 8rem 5% 5rem;
    display: block !important;
    /* Stack vertically instead of switching */
    opacity: 1;
    transform: none;
    background: transparent;
}

/* Hide other sections until unlock */
#journey,
#gallery,
#wishes,
.navbar {
    display: none !important;
}

body.unlocked #journey,
body.unlocked #gallery,
body.unlocked #wishes {
    display: block !important;
}

body.unlocked .navbar {
    display: flex !important;
}

/* ============================== 
    HOME: HERO & COUNTDOWN
============================== */
.hero-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 150px);
}

/* Countdown Styles */
#countdown-wrapper {
    padding: 4rem;
    text-align: center;
    max-width: 800px;
    width: 100%;
    animation: steadyGlow 6s infinite alternate ease-in-out;
}

@keyframes steadyGlow {
    0% {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(255, 51, 102, 0.1);
        transform: translateY(0);
    }

    100% {
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), inset 0 0 20px rgba(0, 210, 255, 0.2);
        transform: translateY(-5px);
    }
}

/* Floating Decorative Icons */
.dec-icon {
    position: absolute;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.8);
    animation: floatIcon 4s infinite alternate ease-in-out;
    pointer-events: none;
}

.dec-1 {
    top: -30px;
    left: -30px;
    color: var(--primary);
    animation-delay: 0s;
    transform: rotate(-15deg);
}

.dec-2 {
    bottom: -20px;
    right: -40px;
    color: var(--secondary);
    font-size: 3rem;
    animation-delay: 1s;
    transform: rotate(10deg);
}

.dec-3 {
    top: 40px;
    right: -25px;
    color: #ffd700;
    font-size: 1.5rem;
    animation-delay: 2s;
    transform: rotate(25deg);
}

.dec-4 {
    bottom: 40px;
    left: -20px;
    color: var(--tertiary);
    font-size: 1.8rem;
    animation-delay: 0.5s;
    transform: rotate(-25deg);
}

@keyframes floatIcon {
    from {
        transform: translateY(0) scale(1) rotate(inherit);
    }

    to {
        transform: translateY(-15px) scale(1.1) rotate(inherit);
    }
}

.pre-title {
    color: var(--secondary);
    letter-spacing: 5px;
    text-transform: uppercase;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-family: 'Poppins', sans-serif;
}

.main-title {
    font-size: 4rem;
    margin-bottom: 3rem;
    background: linear-gradient(to right, #fff, var(--tertiary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    padding: 1.5rem;
    min-width: 100px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.time-block span {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    margin-bottom: 5px;
}

.time-block p {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--secondary);
    letter-spacing: 2px;
}

.colon {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary);
    animation: blink 1s infinite alternate;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0.3;
    }
}

.target-date {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* Celebration Styles */
#celebration-wrapper {
    padding: 4rem 3rem;
    text-align: center;
    max-width: 700px;
    width: 100%;
    position: relative;
    z-index: 10;
}

/* Balloons */
#balloon-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.balloon {
    position: absolute;
    bottom: -150px;
    width: 60px;
    height: 80px;
    background-color: var(--primary);
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    box-shadow: inset -10px -10px 15px rgba(0, 0, 0, 0.2), 0 0 10px rgba(255, 255, 255, 0.2);
    animation: floatUp ease-in forwards;
}

.balloon::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 8px solid var(--primary);
}

.balloon::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 50px;
    background: rgba(255, 255, 255, 0.4);
}

@keyframes floatUp {
    0% {
        bottom: -150px;
        transform: translateX(0) rotate(0deg);
    }

    50% {
        transform: translateX(20px) rotate(10deg);
    }

    100% {
        bottom: 120vh;
        transform: translateX(-20px) rotate(-10deg);
    }
}

.profile-container {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 2rem;
}

.profile-ring {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--primary);
    border-bottom-color: var(--secondary);
    animation: spin 4s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.main-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--glass-bg);
    padding: 5px;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
    position: relative;
    transition: transform 0.5s;
}

.profile-container:hover .main-photo {
    transform: scale(1.05);
}

.med-badge {
    position: absolute;
    bottom: 5px;
    right: 10px;
    width: 50px;
    height: 50px;
    background: var(--tertiary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    z-index: 3;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    color: white;
    border: 3px solid var(--bg-dark);
}

.name-highlight {
    font-size: 1.5rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    color: var(--text-muted);
    animation: fadeInSlideUp 0.8s ease backwards 2.6s;
}

.hero-msg {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #ddd;
    margin-bottom: 3rem;
    font-weight: 300;
    animation: fadeInSlideUp 0.8s ease backwards 3.4s;
}

.hero-content .profile-container {
    animation: popIn 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.5s backwards;
}

.hero-content #bday-wish-btn {
    animation: fadeInSlideUp 0.8s ease backwards 4.2s;
}

@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */
.btn-outline {
    background: transparent;
    border: 2px solid var(--glass-border);
    color: white;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-gift {
    background: linear-gradient(45deg, #ff3366, #ff8c00);
    border: none;
    color: white;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(255, 51, 102, 0.4), 0 0 15px rgba(255, 140, 0, 0.4);
    animation: heartbeat 2.5s infinite;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.btn-gift:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 30px rgba(255, 51, 102, 0.6), 0 0 25px rgba(255, 140, 0, 0.6);
    animation: none;
    /* stop heartbeat on hover so it stays scaled */
}

.bounce-icon {
    font-size: 1.5rem;
    margin-right: 12px;
    animation: wiggle 1.5s infinite ease-in-out;
}

@keyframes wiggle {

    0%,
    100% {
        transform: rotate(-10deg);
    }

    50% {
        transform: rotate(15deg) scale(1.15);
    }
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    15% {
        transform: scale(1.06);
    }

    30% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.06);
    }

    60% {
        transform: scale(1);
    }
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--tertiary));
    border: none;
    color: white;
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(255, 51, 102, 0.4);
}

/* ============================== 
    TIMELINE (Journey)
============================== */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: rgba(255, 255, 255, 0.1);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    margin-bottom: 40px;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--bg-dark);
    border: 4px solid var(--secondary);
    border-radius: 50%;
    top: 20px;
    z-index: 1;
}

.left .timeline-dot {
    right: -10px;
}

.right .timeline-dot {
    left: -10px;
}

.glow-dot {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary);
}

.future-dot {
    border-color: rgba(255, 255, 255, 0.2);
    background: transparent;
}

.timeline-content {
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.timeline-content h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: white;
}

.timeline-content .year {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary);
    margin-bottom: 15px;
}

.timeline-content p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

.bg-icon {
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 100px;
    opacity: 0.05;
    transform: rotate(-15deg);
    color: white;
}

.active-card {
    border-color: rgba(255, 51, 102, 0.3);
    box-shadow: 0 10px 30px rgba(255, 51, 102, 0.1);
}

.future-card {
    opacity: 0.6;
    filter: grayscale(80%);
    border-style: dashed;
}

/* ============================== 
    POLAROID GALLERY 
============================== */
.polaroid-gallery {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    padding: 40px 20px 100px;
    max-width: 1000px;
    margin: 0 auto;
}

.polaroid {
    background: #fff;
    padding: 15px 15px 50px 15px;
    border-radius: 4px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    width: 270px;
    position: relative;
    cursor: pointer;
}

.polaroid-img {
    width: 100%;
    height: 250px;
    background: #222;
    overflow: hidden;
    position: relative;
}

.polaroid-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
    filter: sepia(0.2) contrast(1.1);
}

.polaroid:hover .polaroid-img img {
    transform: scale(1.08);
}

.polaroid-caption {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    text-align: center;
    color: #444;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: none;
}

.p1 {
    transform: rotate(-6deg) translateY(10px);
}

.p2 {
    transform: rotate(4deg) translateY(-15px);
}

.p3 {
    transform: rotate(-3deg) translateY(15px);
}

.polaroid:hover {
    transform: rotate(0deg) scale(1.05) translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 51, 102, 0.4);
    z-index: 5;
}

@media (max-width: 768px) {
    .polaroid-gallery {
        gap: 30px;
        padding-bottom: 50px;
    }

    .polaroid {
        transform: rotate(0deg) !important;
    }
}

/* ============================== 
    SPECIAL WISH LETTER
============================== */
.special-wish-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.wish-letter {
    padding: 3rem 4rem;
    position: relative;
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 51, 102, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow: hidden;
    animation: floatingLetter 6s ease-in-out infinite;
    transition: all 0.5s ease;
}

.wish-letter:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.7), inset 0 0 30px rgba(255, 51, 102, 0.2);
    border-color: rgba(255, 51, 102, 0.3);
    animation-play-state: paused;
}

@keyframes floatingLetter {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.letter-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.letter-header h3 {
    font-size: 2.2rem;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: 1px;
}

.quote-icon {
    font-size: 3rem;
    color: rgba(255, 51, 102, 0.2);
    position: absolute;
    top: -20px;
    left: -20px;
}

.quote-icon.right {
    top: auto;
    bottom: -20px;
    left: auto;
    right: -20px;
}

.letter-body p {
    font-size: 1.15rem;
    line-height: 1.9;
    color: #e2e8f0;
    margin-bottom: 1.5rem;
    text-align: justify;
    font-weight: 300;
}

.letter-footer {
    margin-top: 3rem;
    text-align: right;
    position: relative;
}

.signature {
    font-size: 1.2rem;
    font-family: 'Poppins', sans-serif;
    color: #cbd5e1;
    font-weight: 400;
}

.signature .highlight {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 700;
    font-size: 2.2rem;
    display: block;
    margin-top: 5px;
}

.floating-hearts i {
    position: absolute;
    color: var(--primary);
    opacity: 0.6;
    animation: floatHeart 4s ease-in infinite;
}

.floating-hearts .h1 {
    bottom: 20px;
    left: 30px;
    font-size: 1.5rem;
    animation-delay: 0s;
}

.floating-hearts .h2 {
    bottom: 50px;
    right: 40px;
    font-size: 2rem;
    animation-delay: 1.5s;
    color: var(--tertiary);
}

.floating-hearts .h3 {
    top: 40px;
    right: 50px;
    font-size: 1.2rem;
    animation-delay: 2.5s;
}

@keyframes floatHeart {
    0% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-20px) scale(1.2) rotate(15deg);
        opacity: 1;
    }

    100% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 0.6;
    }
}

@media (max-width: 768px) {
    .wish-letter {
        padding: 2.5rem 1.5rem;
        margin: 0 5px;
        border-radius: 20px;
    }

    .letter-header h3 {
        font-size: 1.6rem;
        line-height: 1.3;
    }

    .quote-icon {
        font-size: 2rem;
        top: -10px;
        left: -5px;
    }

    .quote-icon.right {
        bottom: -10px;
        right: -5px;
    }

    .letter-body p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }

    .signature {
        font-size: 1rem;
    }

    .signature .highlight {
        font-size: 1.7rem;
    }

    .floating-hearts .h1 {
        bottom: 10px;
        left: 10px;
        font-size: 1.2rem;
    }

    .floating-hearts .h2 {
        bottom: 30px;
        right: 15px;
        font-size: 1.5rem;
    }

    .floating-hearts .h3 {
        top: 20px;
        right: 20px;
        font-size: 1rem;
    }
}

/* ============================== 
    MUSIC CONTROLS
============================== */
.music-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
}

.music-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.music-btn.playing {
    background: var(--tertiary);
    border-color: transparent;
}

.waves {
    position: absolute;
    bottom: 10px;
    display: flex;
    gap: 2px;
}

.waves span {
    width: 3px;
    height: 10px;
    background: white;
    border-radius: 2px;
    animation: wave 1s infinite alternate;
}

.waves span:nth-child(2) {
    animation-delay: 0.2s;
}

.waves span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes wave {
    0% {
        height: 5px;
    }

    100% {
        height: 15px;
    }
}

footer {
    text-align: center;
    padding: 30px;
    font-size: 0.9rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.5);
}

/* ============================== 
    ADVANCED LAYERED ANIMATIONS & SCROLL REVEALS
============================== */
.scroll-reveal {
    opacity: 0;
    will-change: transform, opacity;
    transition: all 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scroll-reveal.reveal-left {
    transform: translateX(-100px);
}

.scroll-reveal.reveal-right {
    transform: translateX(100px);
}

.scroll-reveal.reveal-up {
    transform: translateY(100px);
}

.scroll-reveal.reveal-fade {
    transform: scale(0.9);
}

.scroll-reveal.is-visible {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* Layered Hover Enhancements (Vanilla Tilt complements this now) */
.timeline-content.glass-card,
.polaroid {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease !important;
    transform-style: preserve-3d;
}

/* 3D internal pop-out for elements inside cards */
.timeline-content h3,
.timeline-content p,
.polaroid-caption,
.polaroid-img {
    transform: translateZ(30px);
}

.timeline-content.glass-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(255, 51, 102, 0.2) !important;
    border-color: rgba(255, 51, 102, 0.5) !important;
    z-index: 10;
}

.polaroid:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(255, 51, 102, 0.4) !important;
    z-index: 100 !important;
}

/* ============================== 
    RESPONSIVE MEDIA QUERIES
============================== */
@media screen and (max-width: 900px) {
    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item.right {
        left: 0%;
    }

    .left .timeline-dot,
    .right .timeline-dot {
        left: 21px;
    }

    .wishes-container {
        grid-template-columns: 1fr;
    }

    #countdown-wrapper,
    #celebration-wrapper {
        padding: 3rem 2rem;
    }
}

@media screen and (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(10, 4, 31, 0.95);
        backdrop-filter: blur(15px);
        width: 100%;
        text-align: center;
        padding: 2rem 0;
        transition: 0.3s;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .hamburger {
        display: block;
    }

    .hero-container {
        align-items: flex-start;
        padding-top: 7rem;
        padding-bottom: 4rem;
        min-height: auto;
    }

    .profile-container {
        width: 150px;
        height: 150px;
        margin-bottom: 1.5rem;
    }

    .main-title {
        font-size: 2.8rem;
    }

    .time-block {
        min-width: 70px;
        padding: 1rem;
    }

    .time-block span {
        font-size: 2rem;
    }

    .colon {
        font-size: 2rem;
        margin: 0 5px;
    }

    .celebration-title {
        font-size: 3.5rem;
    }

    h2.name-highlight {
        font-size: 1.2rem;
    }
}

@media screen and (max-width: 480px) {
    .section-title {
        font-size: 2.5rem;
    }

    .timer {
        gap: 5px;
    }

    .time-block {
        min-width: 60px;
        padding: 10px 5px;
    }

    .time-block span {
        font-size: 1.5rem;
    }

    .colon {
        display: none;
    }

    #countdown-wrapper,
    #celebration-wrapper {
        padding: 2rem 1.5rem;
    }
}