/* ==========================================
   Anshika's 13th Birthday CSS Style Sheet 
   Theme: Cosmic Glassmorphic Dreamland (2026)
   ========================================== */

/* Custom Reset & Base Variables */
:root {
    --bg-dark: #0a0616;
    --card-bg: rgba(25, 17, 49, 0.45);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-glow: rgba(138, 43, 226, 0.15);
    
    --gold: #ffd700;
    --gold-glow: rgba(255, 215, 0, 0.35);
    --gold-gradient: linear-gradient(135deg, #ffe066 0%, #ffd700 50%, #cca300 100%);
    
    --pink: #ff1493;
    --pink-glow: rgba(255, 20, 147, 0.4);
    --pink-gradient: linear-gradient(135deg, #ff66b2 0%, #ff1493 50%, #b30059 100%);
    
    --purple: #8a2be2;
    --purple-gradient: linear-gradient(135deg, #b366ff 0%, #8a2be2 50%, #5900b3 100%);
    
    --text-primary: #f8f6fc;
    --text-secondary: #c2b9d4;
    --font-fancy: 'Playfair Display', serif;
    --font-script: 'Great Vibes', cursive;
    --font-base: 'Outfit', sans-serif;
    
    --transition-smooth: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-dark);
}

body {
    font-family: var(--font-base);
    color: var(--text-primary);
    background-color: var(--bg-dark);
    overflow-x: hidden;
    line-height: 1.6;
    min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--pink-gradient);
}

/* Ambient Aurora Blobs Background */
.aurora-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.28;
    mix-blend-mode: screen;
    animation: blobFloat 22s infinite alternate ease-in-out;
}

.blob-1 {
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, var(--pink) 0%, transparent 80%);
    top: -10%;
    left: -10%;
    animation-duration: 25s;
}

.blob-2 {
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--purple) 0%, transparent 80%);
    bottom: -15%;
    right: -10%;
    animation-delay: -5s;
    animation-duration: 28s;
}

.blob-3 {
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, #00f0ff 0%, transparent 80%);
    top: 40%;
    left: 55%;
    animation-delay: -10s;
    animation-duration: 20s;
}

.blob-4 {
    width: 35vw;
    height: 35vw;
    background: radial-gradient(circle, var(--gold) 0%, transparent 80%);
    bottom: 45%;
    left: 15%;
    animation-delay: -15s;
    animation-duration: 24s;
}

/* Twinkling Starry Particle Background */
.particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Floating Magical Elements */
.floating-elements {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 2;
    pointer-events: none;
}

.floating-item {
    position: absolute;
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.4));
    animation: floatingPulse 8s infinite ease-in-out;
}

.item-1 { top: 15%; left: 8%; animation-delay: 0s; }
.item-2 { top: 22%; right: 10%; animation-delay: 1.5s; font-size: 2.2rem; }
.item-3 { bottom: 28%; left: 6%; animation-delay: 3s; }
.item-4 { bottom: 18%; right: 7%; animation-delay: 4.5s; font-size: 2.5rem; }
.item-5 { top: 52%; left: 4%; animation-delay: 2s; }
.item-6 { top: 68%; right: 5%; animation-delay: 5.5s; }
.item-7 { top: 8%; right: 35%; animation-delay: 3.5s; }
.item-8 { bottom: 8%; left: 32%; animation-delay: 1s; font-size: 2.3rem; }

/* Global Styling Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 5;
}

/* Header & Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 18px 0;
    background: rgba(10, 6, 22, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border);
    transition: var(--transition-smooth);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.nav-brand span {
    font-family: var(--font-fancy);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(to right, #ffffff, var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.3));
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: var(--transition-smooth);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--pink-gradient);
    border-radius: 4px;
    transition: var(--transition-smooth);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
}

.bar {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

/* Floating Music Control */
.music-control-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    display: flex;
    align-items: center;
}

.music-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(25, 17, 49, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 20, 147, 0.15);
    color: var(--text-primary);
    transition: var(--transition-smooth);
}

.music-toggle:hover {
    transform: scale(1.15) rotate(15deg);
    border-color: rgba(255, 20, 147, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 25px var(--pink-glow);
}

.music-icon {
    width: 22px;
    height: 22px;
    filter: drop-shadow(0 0 4px var(--pink-glow));
    transition: var(--transition-smooth);
}

.music-toggle.playing .music-icon {
    animation: rotateVinyl 3s linear infinite;
    color: var(--pink);
}

.music-tooltip {
    position: absolute;
    right: 70px;
    background: rgba(10, 6, 22, 0.85);
    border: 1px solid var(--card-border);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(10px);
    transition: var(--transition-smooth);
}

.music-control-wrapper:hover .music-tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* ==========================================
   HERO SECTION DESIGN
   ========================================== */
.hero-section {
    min-height: 100vh;
    padding: 120px 24px 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: center;
    max-width: 1100px;
    width: 100%;
}

/* 3D Polaroid Rotating Card */
.profile-outer-ring {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
}

.profile-outer-ring::before {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 20, 147, 0.15) 0%, transparent 70%);
    z-index: 0;
    animation: breatheGlow 6s infinite alternate ease-in-out;
}

.profile-card-3d {
    width: 290px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 16px 16px 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), 0 0 30px rgba(138, 43, 226, 0.1);
    transform-style: preserve-3d;
    transform: rotateY(-8deg) rotateX(5deg);
    transition: transform 0.5s ease;
    z-index: 1;
}

.profile-card-3d:hover {
    transform: rotateY(5deg) rotateX(-2deg) scale(1.03);
}

.polaroid-inner {
    transform-style: preserve-3d;
}

.hero-avatar {
    width: 100%;
    height: 290px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 16px;
    transform: translateZ(20px);
}

.polaroid-caption {
    font-family: var(--font-script);
    font-size: 2.2rem;
    color: var(--gold);
    text-align: center;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.2);
    transform: translateZ(15px);
}

/* Hero Texts & Badges */
.hero-text-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-subtitle-script {
    font-family: var(--font-script);
    font-size: 2.5rem;
    color: var(--pink);
    text-shadow: 0 0 10px rgba(255, 20, 147, 0.2);
    margin-bottom: -15px;
}

.hero-title {
    font-family: var(--font-fancy);
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 10%, #ffd700 40%, #ff1493 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 15px rgba(0, 0, 0, 0.3));
    margin-bottom: 5px;
}

.age-badge {
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.age-badge .age-number {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-fancy);
    background: var(--pink-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px var(--pink-glow));
    animation: scalePulse 2s infinite ease-in-out;
}

.hero-message-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.hero-paragraph {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.hero-emojis {
    font-size: 1.5rem;
    letter-spacing: 8px;
    opacity: 0.85;
}

.hero-btn-container {
    margin-top: 10px;
}

.celebrate-cta-btn {
    position: relative;
    padding: 16px 40px;
    font-family: var(--font-base);
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(45deg, var(--pink), var(--purple), var(--gold));
    background-size: 200% 200%;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(255, 20, 147, 0.25), 0 0 20px rgba(138, 43, 226, 0.2);
    transition: var(--transition-smooth);
    overflow: hidden;
    animation: gradientFlow 4s infinite linear;
}

.celebrate-cta-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(255, 20, 147, 0.4), 0 0 30px rgba(255, 215, 0, 0.3);
}

.celebrate-cta-btn:active {
    transform: translateY(-1px);
}

.celebrate-cta-btn span {
    position: relative;
    z-index: 10;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* ==========================================
   SECTION HEADER DESIGN
   ========================================== */
.section-title-wrapper {
    text-align: center;
    margin-bottom: 60px;
}

.section-label {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: var(--pink-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.section-title {
    font-family: var(--font-fancy);
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, #ffffff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 550px;
    margin: 0 auto;
}

/* ==========================================
   COUNTDOWN TIMER DESIGN
   ========================================== */
.countdown-section {
    padding: 100px 0;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.countdown-glass-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 800px;
    margin: 0 auto 50px;
}

.countdown-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 30px 16px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}

.countdown-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 215, 0, 0.2);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.08);
}

.countdown-val {
    font-family: var(--font-fancy);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px var(--gold-glow));
    margin-bottom: 10px;
}

.countdown-lbl {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

.next-bday-card {
    display: flex;
    align-items: center;
    gap: 30px;
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 24px 30px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.calendar-icon-glow {
    font-size: 3.2rem;
    filter: drop-shadow(0 0 12px rgba(255, 20, 147, 0.4));
    animation: floatingPulse 4s infinite ease-in-out;
}

.bday-details h3 {
    font-family: var(--font-fancy);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.next-date-text {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--pink);
    margin-bottom: 3px;
}

.next-msg-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ==========================================
   MEMORY LANE GALLERY (POLAROIDS)
   ========================================== */
.gallery-section {
    padding: 100px 0;
}

.photo-masonry {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.photo-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 14px 14px 20px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.photo-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 12px;
    filter: grayscale(8%) contrast(98%);
    transition: var(--transition-smooth);
}

.photo-label {
    font-family: var(--font-fancy);
    font-size: 1.15rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-primary);
    transition: var(--transition-smooth);
}

/* 3D Polaroid Hover Tilts */
.photo-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45), 0 0 20px rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.25);
}

.photo-card:hover img {
    filter: none;
    transform: scale(1.01);
}

.photo-card:hover .photo-label {
    color: var(--gold);
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.2);
}

/* Polaroid Tilt rotation variety defaults */
.photo-card:nth-child(odd) { transform: rotate(-1.5deg); }
.photo-card:nth-child(even) { transform: rotate(1.5deg); }

/* ==========================================
   LIGHTBOX VIEW DESIGN
   ========================================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(5, 2, 12, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.lightbox-container {
    position: relative;
    max-width: 780px;
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2010;
}

.lightbox-media-wrapper {
    width: 100%;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 12px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.lightbox-img {
    width: 100%;
    max-height: 68vh;
    object-fit: contain;
    border-radius: 12px;
    display: block;
}

.lightbox-btn {
    position: absolute;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.lightbox-close {
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
}

.lightbox-arrow {
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
}

.lightbox-prev {
    left: -70px;
}

.lightbox-next {
    right: -70px;
}

.lightbox-footer {
    width: 100%;
    margin-top: 20px;
    text-align: center;
}

.lightbox-caption {
    font-family: var(--font-base);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.lightbox-index {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ==========================================
   INTERACTIVE GREETING CARD / LETTER
   ========================================== */
.wishes-section {
    padding: 100px 0;
}

.letter-envelope-wrapper {
    display: flex;
    justify-content: center;
    perspective: 1500px;
    margin-top: 40px;
}

.magical-letter-card {
    position: relative;
    width: 550px;
    height: 380px;
    transform-style: preserve-3d;
    transition: transform 1.2s cubic-bezier(0.15, 0.85, 0.3, 1);
    cursor: pointer;
}

/* Envelope Front Design */
.envelope-front {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background: linear-gradient(135deg, #1b0e36 0%, #0d061e 100%);
    border: 2px solid rgba(138, 43, 226, 0.4);
    border-radius: 20px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    overflow: hidden;
    z-index: 2;
}

.envelope-front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 20, 147, 0.1) 0%, transparent 70%);
}

.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(138, 43, 226, 0.2);
    clip-path: polygon(0 0, 50% 100%, 100% 0);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.envelope-seal {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #ff1493, #b30059);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 0 25px rgba(255, 20, 147, 0.6), inset 0 2px 4px rgba(255,255,255,0.4);
    z-index: 5;
    animation: heartbeat 2s infinite ease-in-out;
    margin-bottom: 20px;
    border: 2px solid rgba(255,255,255,0.2);
}

.envelope-address {
    text-align: center;
    z-index: 5;
}

.to-text {
    font-family: var(--font-fancy);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.stamp-icon {
    font-size: 1.8rem;
    opacity: 0.8;
}

/* Card Opened State (Revealing the letter inside) */
.magical-letter-card.open {
    transform: rotateY(180deg);
}

/* Letter Inside Paper Design */
.letter-content-paper {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transform: rotateY(180deg);
    background: #faf7f2;
    border-radius: 20px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
    padding: 35px;
    display: flex;
    flex-direction: column;
    color: #2b2315;
    overflow: hidden;
    border: 3px double #d3cbb5;
    background-image: linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 100% 28px;
}

.letter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #d3cbb5;
    padding-bottom: 12px;
    margin-bottom: 15px;
}

.letter-header h3 {
    font-family: var(--font-fancy);
    font-size: 1.5rem;
    color: #4a3c26;
    font-weight: 800;
}

.language-selector {
    display: flex;
    background: #e6e0d0;
    padding: 3px;
    border-radius: 30px;
}

.lang-btn {
    background: none;
    border: none;
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 20px;
    cursor: pointer;
    color: #635338;
    transition: var(--transition-smooth);
}

.lang-btn.active {
    background: #4a3c26;
    color: #ffffff;
}

.letter-body {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.wish-lang-content {
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

.wish-lang-content.active {
    display: block;
}

.wish-para {
    font-family: var(--font-base);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.7;
    color: #3b3223;
}

.font-hindi {
    font-family: var(--font-base);
    font-size: 1.05rem;
    line-height: 1.7;
}

.letter-sign {
    font-family: var(--font-script);
    font-size: 2rem;
    text-align: right;
    color: #4a3c26;
    margin-top: 15px;
}

.close-letter-btn {
    align-self: center;
    background: #4a3c26;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 8px 24px;
    font-family: var(--font-base);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    margin-top: 10px;
    box-shadow: 0 4px 10px rgba(74,60,38,0.25);
    transition: var(--transition-smooth);
}

.close-letter-btn:hover {
    background: #635338;
    transform: translateY(-2px);
}

/* ==========================================
   INTERACTIVE CELEBRATION HUB (MODAL)
   ========================================== */
.celebration-hub {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s cubic-bezier(0.15, 0.85, 0.3, 1), visibility 0.8s cubic-bezier(0.15, 0.85, 0.3, 1);
}

.celebration-hub.active {
    opacity: 1;
    visibility: visible;
}

.celebration-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(13, 9, 30, 0.45);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow: inset 0 0 80px rgba(255, 255, 255, 0.03);
}

.celebration-content-box {
    position: relative;
    max-width: 600px;
    width: 90%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    padding: 40px;
    text-align: center;
    box-shadow: 
        0 30px 70px rgba(0, 0, 0, 0.4), 
        0 0 40px rgba(255, 20, 147, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    z-index: 3010;
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
}

.close-celebration {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.8rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    z-index: 100;
}

.close-celebration:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.08) rotate(90deg);
}

.celebration-header-text {
    margin-bottom: 25px;
}

.rainbow-title {
    font-family: var(--font-fancy);
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--pink);
    text-shadow: 0 0 15px var(--pink-glow);
    animation: rainbowTextShift 6s infinite ease-in-out;
}

.celebration-tip {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* responsive interactive cake assembly */
.cake-assembly-container {
    position: relative;
    width: 250px;
    height: 200px;
    margin: 15px auto 25px;
}

.cake-interactive {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: opacity 0.8s ease, transform 0.6s ease;
}

.cake-plate {
    width: 270px;
    height: 24px;
    position: absolute;
    bottom: 5px;
    left: -10px;
    background: linear-gradient(135deg, #f0f0f0 0%, #bfbfbf 100%);
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), inset 0 2px 4px rgba(255,255,255,0.6);
    z-index: 1;
}

.cake-layer {
    position: absolute;
    width: 230px;
    height: 45px;
    left: 10px;
    border-radius: 50% / 15px;
    background: linear-gradient(135deg, #4d3319 0%, #2b1a08 100%);
    box-shadow: inset 0 2px 5px rgba(255,255,255,0.1), 0 5px 10px rgba(0,0,0,0.3);
}

.layer-bottom {
    bottom: 15px;
    z-index: 2;
}

.layer-middle {
    bottom: 45px;
    width: 210px;
    left: 20px;
    z-index: 3;
    background: linear-gradient(135deg, #604020 0%, #3e2610 100%);
}

.layer-top {
    bottom: 75px;
    width: 190px;
    left: 30px;
    z-index: 4;
    background: linear-gradient(135deg, #734d26 0%, #4a3018 100%);
}

.cake-icing {
    position: absolute;
    bottom: 95px;
    width: 190px;
    height: 30px;
    left: 30px;
    background: linear-gradient(135deg, #fff0f5 0%, #ffc0cb 100%);
    border-radius: 50% / 10px;
    z-index: 5;
    box-shadow: inset 0 3px 5px rgba(255,255,255,0.4), 0 3px 10px rgba(0,0,0,0.25);
}

.cake-drips {
    position: absolute;
    bottom: 70px;
    width: 190px;
    left: 30px;
    height: 40px;
    z-index: 6;
    pointer-events: none;
}

.cake-drip {
    position: absolute;
    background: #ffc0cb;
    width: 12px;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.drip-1 { left: 30px; height: 18px; top: 12px; }
.drip-2 { left: 90px; height: 26px; top: 12px; }
.drip-3 { left: 140px; height: 20px; top: 12px; }

/* 13 Glowing Candles wrapper */
.candles-wrapper {
    position: absolute;
    bottom: 100px;
    width: 100%;
    height: 60px;
    z-index: 20;
}

.candle-stick {
    position: absolute;
    width: 6px;
    height: 32px;
    background: linear-gradient(to right, #ffd700, #ff8c00);
    border-radius: 4px;
    bottom: 0;
}

.candle-symbol {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.95rem;
    pointer-events: none;
    opacity: 0.9;
}

.candle-flame {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 18px;
    background: radial-gradient(circle, #ffe066 0%, #ff4500 80%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow: 0 0 8px #ffe066, 0 0 15px #ff4500;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform-origin: bottom center;
}

.candle-flame.ignited {
    opacity: 1;
    animation: flickerFlame 1.2s infinite alternate ease-in-out;
}

/* Positions of 13 candles distributed on top of the cake (190px width, centered) */
.candle-pos-1 { left: 35px; bottom: 8px; }
.candle-pos-2 { left: 52px; bottom: 15px; }
.candle-pos-3 { left: 69px; bottom: 18px; }
.candle-pos-4 { left: 86px; bottom: 20px; }
.candle-pos-5 { left: 103px; bottom: 21px; }
.candle-pos-6 { left: 120px; bottom: 21px; }
.candle-pos-7 { left: 137px; bottom: 20px; }
.candle-pos-8 { left: 154px; bottom: 18px; }
.candle-pos-9 { left: 171px; bottom: 15px; }
.candle-pos-10 { left: 188px; bottom: 8px; }
/* Outer rings of upper layer */
.candle-pos-11 { left: 75px; bottom: 2px; }
.candle-pos-12 { left: 110px; bottom: 1px; }
.candle-pos-13 { left: 145px; bottom: 2px; }

/* Cake Actions */
.cake-action-bar {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: white;
    font-family: var(--font-base);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 12px 28px;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.action-btn:hover:not(:disabled) {
    background: var(--pink-gradient);
    border-color: transparent;
    box-shadow: 0 5px 15px var(--pink-glow);
    transform: translateY(-2px);
}

.action-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Split Slice pieces */
.cake-interactive.cut {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

.cake-split-piece {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
}

.cake-split-piece.left-half {
    clip-path: polygon(0 0, 50% 0, 48% 100%, 0 100%);
    animation: slidePieceLeft 2.2s cubic-bezier(0.15, 0.85, 0.3, 1) forwards;
}

.cake-split-piece.right-half {
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 52% 100%);
    animation: slidePieceRight 2.2s cubic-bezier(0.15, 0.85, 0.3, 1) forwards;
}

/* Visual Slice Laser Line */
.slice-laser {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    background: linear-gradient(to bottom, transparent, #ffe066, #ff1493, transparent);
    box-shadow: 0 0 12px #ff1493;
    z-index: 100;
    animation: laserSlice 1.2s cubic-bezier(0.15, 0.85, 0.3, 1) forwards;
}

/* Celebration Polaroid Card */
.celebration-polaroid-frame {
    position: absolute;
    bottom: -150px;
    left: 50%;
    transform: translateX(-50%) scale(0.5);
    background: #ffffff;
    padding: 12px 12px 28px;
    border-radius: 12px;
    box-shadow: 0 20px 45px rgba(0,0,0,0.6);
    opacity: 0;
    z-index: 50;
    pointer-events: none;
    transition: transform 2.2s cubic-bezier(0.15, 0.85, 0.3, 1), opacity 1.8s ease;
}

.celebration-polaroid-frame.reveal {
    bottom: 120px;
    transform: translateX(-50%) scale(1.15) rotate(-6deg);
    opacity: 1;
}

.celebration-polaroid-frame img {
    width: 170px;
    height: 170px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 12px;
    display: block;
}

.frame-title {
    font-family: var(--font-script);
    font-size: 2rem;
    color: #2b2315;
    text-align: center;
}

/* Poppable Helium Balloons */
.balloons-float-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 35;
    overflow: hidden;
}

.floating-balloon {
    position: absolute;
    font-size: 5rem;
    pointer-events: auto;
    cursor: pointer;
    user-select: none;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.3));
    animation: balloonFloatUp 9s linear forwards;
}

/* Confetti Pieces */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2500;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0.85;
    animation: confettiSpinFall 4s linear forwards;
}

/* Eating Animation */
.eating-emoji-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 8rem;
    z-index: 3100;
    animation: eatingZoom 1.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    pointer-events: none;
}

/* ==========================================
   FOOTER DESIGN
   ========================================== */
.footer {
    padding: 50px 0;
    background: rgba(8, 4, 18, 0.85);
    border-top: 1px solid var(--card-border);
    position: relative;
    z-index: 10;
}

.footer-content {
    text-align: center;
}

.footer-main {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.shubham-signature {
    font-family: var(--font-script);
    font-size: 2.2rem;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
    vertical-align: middle;
}

.footer-sub {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ==========================================
   KEYFRAME ANIMATIONS
   ========================================== */
@keyframes blobFloat {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    50% { transform: translate(80px, -60px) scale(1.12) rotate(180deg); }
    100% { transform: translate(-50px, 40px) scale(0.92) rotate(360deg); }
}

@keyframes floatingPulse {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-16px) rotate(8deg); }
}

@keyframes scalePulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 8px var(--pink-glow)); }
    50% { transform: scale(1.12); filter: drop-shadow(0 0 18px var(--pink)); }
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

@keyframes rotateVinyl {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes breatheGlow {
    0%, 100% { transform: scale(1); opacity: 0.65; }
    50% { transform: scale(1.15); opacity: 0.95; }
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes flickerFlame {
    0%, 100% { transform: translateX(-50%) scale(1) skewX(2deg); }
    50% { transform: translateX(-50%) scale(1.1) skewX(-2deg); }
}

@keyframes balloonFloatUp {
    0% { transform: translateY(110vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.95; }
    90% { opacity: 0.95; }
    100% { transform: translateY(-120px) rotate(20deg); opacity: 0; }
}

@keyframes laserSlice {
    0% { height: 0; opacity: 1; }
    40% { height: 160px; opacity: 1; }
    100% { height: 160px; opacity: 0; }
}

@keyframes slidePieceLeft {
    0% { transform: translateX(0) rotate(0); opacity: 1; }
    30% { transform: translateX(-15px) rotate(-2deg); opacity: 1; }
    100% { transform: translateX(-80px) translateY(20px) rotate(-15deg); opacity: 0; }
}

@keyframes slidePieceRight {
    0% { transform: translateX(0) rotate(0); opacity: 1; }
    30% { transform: translateX(15px) rotate(2deg); opacity: 1; }
    100% { transform: translateX(80px) translateY(20px) rotate(15deg); opacity: 0; }
}

@keyframes confettiSpinFall {
    0% { transform: translateY(-120px) rotate(0deg); }
    100% { transform: translateY(105vh) rotate(720deg); }
}

@keyframes eatingZoom {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    20% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    80% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.3); opacity: 0; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes rainbowTextShift {
    0%, 100% { color: #ff1493; filter: drop-shadow(0 0 10px rgba(255,20,147,0.4)); }
    33% { color: #ffd700; filter: drop-shadow(0 0 10px rgba(255,215,0,0.4)); }
    66% { color: #8a2be2; filter: drop-shadow(0 0 10px rgba(138,43,226,0.4)); }
}

/* ==========================================
   MOBILE & RESPONSIVE BREAKPOINTS
   ========================================== */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    .profile-outer-ring {
        order: -1;
    }
    .age-badge {
        align-self: center;
    }
    .photo-masonry {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    .navbar {
        padding: 14px 0;
    }
    .nav-toggle {
        display: flex;
    }
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(10, 6, 22, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        gap: 40px;
        transition: var(--transition-smooth);
    }
    .nav-menu.active {
        left: 0;
    }
    .nav-link {
        font-size: 1.3rem;
    }
    .countdown-glass-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .next-bday-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    .magical-letter-card {
        width: 100%;
        max-width: 460px;
        height: 420px;
    }
    .letter-content-paper {
        padding: 20px;
    }
    .celebration-content-box {
        padding: 30px 20px;
    }
    .celebration-polaroid-frame.reveal {
        bottom: 80px;
        transform: translateX(-50%) scale(0.9) rotate(-4deg);
    }
    .cake-assembly-container {
        transform: scale(0.9);
    }
}

@media (max-width: 480px) {
    .nav-brand span {
        font-size: 1.35rem;
    }
    .hero-section {
        padding: 95px 16px 40px;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle-script {
        font-size: 2rem;
    }
    .profile-card-3d {
        width: 250px;
        padding: 12px 12px 18px;
    }
    .hero-avatar {
        height: 250px;
        margin-bottom: 12px;
    }
    .polaroid-caption {
        font-size: 1.8rem;
    }
    .age-badge {
        padding: 6px 16px;
        font-size: 1rem;
    }
    .age-badge .age-number {
        font-size: 1.7rem;
    }
    .celebrate-cta-btn {
        padding: 14px 32px;
        font-size: 1rem;
    }
    .photo-masonry {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .photo-card {
        padding: 10px 10px 16px;
    }
    .magical-letter-card {
        height: 480px;
    }
    .letter-header {
        flex-direction: column;
        gap: 8px;
        align-items: center;
        text-align: center;
    }
    .letter-header h3 {
        font-size: 1.3rem;
    }
    .letter-content-paper {
        padding: 20px 16px;
    }
    .wish-para {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    .celebration-content-box {
        padding: 24px 16px;
        width: 92%;
    }
    .rainbow-title {
        font-size: 1.8rem;
    }
    .celebration-tip {
        font-size: 0.95rem;
    }
    .cake-assembly-container {
        transform: scale(0.72);
        margin: -5px auto 10px;
    }
    .cake-action-bar {
        gap: 12px;
        margin-bottom: 15px;
    }
    .action-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    .celebration-polaroid-frame.reveal {
        bottom: 80px;
        transform: translateX(-50%) scale(0.85) rotate(-4deg);
    }
    .floating-item {
        font-size: 1.4rem !important;
        opacity: 0.15; /* Subtler floating elements on mobile text overlaps */
    }
    .close-celebration {
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
        font-size: 1.5rem;
    }
}
