/* ==========================================
   SENDWISH — Mobile-First Birthday SPA v2
   ========================================== */

:root {
    --primary: #ff6b9d;
    --primary-dark: #e84577;
    --secondary: #c44dff;
    --accent: #ffd32a;
    --gradient-1: linear-gradient(135deg, #ff6b9d, #c44dff);
    --gradient-2: linear-gradient(135deg, #667eea, #764ba2);
    --gradient-3: linear-gradient(135deg, #f093fb, #f5576c);
    --gradient-4: linear-gradient(135deg, #4facfe, #00f2fe);
    --bg: #030308;
    --bg-card: rgba(255, 255, 255, 0.025);
    --bg-card-hover: rgba(255, 255, 255, 0.055);
    --bg-glass: rgba(255, 255, 255, 0.018);
    --text: #e8eaf2;
    --text-muted: rgba(255, 255, 255, 0.38);
    --text-light: rgba(255, 255, 255, 0.72);
    --border: rgba(255, 255, 255, 0.045);
    --border-glow: rgba(255, 107, 157, 0.12);
    --glow: rgba(255, 107, 157, 0.22);
    --glow-secondary: rgba(196, 77, 255, 0.18);
    --radius: 20px;
    --radius-sm: 14px;
    --radius-pill: 50px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --nav-h: 68px;
    --top-h: 56px;
    --shadow-sm: 0 2px 16px rgba(0,0,0,0.35);
    --shadow-md: 0 8px 40px rgba(0,0,0,0.45);
    --shadow-glow: 0 0 50px rgba(255,107,157,0.12);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; }

body {
    font-family: 'Poppins', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
}

/* Animated Gradient Background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(255,107,157,0.05) 0%, transparent 50%),
        radial-gradient(ellipse 60% 60% at 80% 20%, rgba(196,77,255,0.04) 0%, transparent 50%),
        radial-gradient(ellipse 50% 80% at 50% 80%, rgba(79,172,254,0.035) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
    animation: bgShift 20s ease-in-out infinite alternate;
}
@keyframes bgShift {
    0% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 0.8; transform: scale(1.02) translateX(2%); }
}

/* ==========================================
   PRELOADER
   ========================================== */
#preloader {
    position: fixed; inset: 0; background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    z-index: 10000; transition: opacity 0.5s, visibility 0.5s;
}
#preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-content { text-align: center; }
.cake-loader { position: relative; width: 90px; height: 110px; margin: 0 auto 20px; }
.cake-layer {
    position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    border-radius: 8px; animation: cakeFloat 1.5s ease-in-out infinite;
}
.layer-1 { width: 74px; height: 28px; background: var(--gradient-1); }
.layer-2 { width: 58px; height: 22px; background: var(--gradient-2); bottom: 28px; animation-delay: 0.2s; }
.layer-3 { width: 44px; height: 18px; background: var(--gradient-3); bottom: 50px; animation-delay: 0.4s; }
.candle { position: absolute; bottom: 68px; left: 50%; transform: translateX(-50%); width: 6px; height: 18px; background: var(--accent); border-radius: 2px; }
.flame {
    position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
    width: 10px; height: 16px;
    background: radial-gradient(ellipse at bottom, #ffd32a, #ff6b6b, transparent);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flicker 0.4s ease-in-out infinite alternate;
}
.loader-text { color: var(--text-muted); font-size: 0.85rem; animation: pulse 1.5s ease-in-out infinite; }
@keyframes cakeFloat { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(-4px)} }
@keyframes flicker { 0%{transform:translateX(-50%) scale(1) rotate(-2deg);opacity:1} 100%{transform:translateX(-50%) scale(1.12) rotate(2deg);opacity:.8} }
@keyframes pulse { 0%,100%{opacity:.5} 50%{opacity:1} }

/* ==========================================
   CELEBRATION TAP OVERLAY
   ========================================== */
.celeb-tap-overlay {
    position: fixed; inset: 0; z-index: 9600;
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
#overlayStars {
    position: absolute; inset: 0; z-index: 0;
}
.tap-content {
    position: relative; z-index: 1;
    text-align: center; padding: 32px 24px;
    animation: fadeInUp 0.8s ease both;
}
.tap-gift-bounce {
    font-size: 4rem;
    animation: giftBounce 1.5s ease-in-out infinite;
    display: inline-block; margin-bottom: 20px;
}
@keyframes giftBounce {
    0%,100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-16px) rotate(-5deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(-10px) rotate(5deg); }
}
.tap-title {
    font-size: 1.6rem; font-weight: 700; line-height: 1.3;
    margin-bottom: 12px;
}
.tap-title span {
    background: var(--gradient-1); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
    font-family: 'Great Vibes', cursive; font-size: 2.2rem;
}
.tap-from {
    color: var(--text-muted); font-size: 0.9rem;
    margin-bottom: 32px;
}
.tap-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 18px 40px; border-radius: var(--radius-pill);
    background: var(--gradient-1); color: white;
    font-family: 'Poppins', sans-serif; font-size: 1.1rem; font-weight: 600;
    border: none; cursor: pointer;
    box-shadow: 0 6px 30px rgba(255,107,157,0.4);
    animation: tapPulse 2s ease-in-out infinite;
    transition: transform 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.tap-btn:active { transform: scale(0.95); }
@keyframes tapPulse {
    0%,100% { box-shadow: 0 6px 30px rgba(255,107,157,0.4); }
    50% { box-shadow: 0 8px 50px rgba(255,107,157,0.7); }
}
.tap-hint {
    color: var(--text-muted); font-size: 0.75rem;
    margin-top: 20px; opacity: 0.7;
}
.tap-hint i { margin-right: 4px; }

/* ==========================================
   PARTICLES
   ========================================== */
#particles-container { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.particle { position: absolute; pointer-events: none; animation: particleFloat linear infinite; }
@keyframes particleFloat {
    0%{transform:translateY(100vh) rotate(0);opacity:0}
    10%{opacity:1} 90%{opacity:1}
    100%{transform:translateY(-80px) rotate(720deg);opacity:0}
}

/* ==========================================
   TOP BAR
   ========================================== */
.top-bar {
    position: fixed; top: 0; left: 0; width: 100%; height: var(--top-h);
    background: rgba(3,3,8,0.88); backdrop-filter: blur(24px) saturate(1.8);
    display: flex; align-items: center; justify-content: center;
    z-index: 900; border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 24px rgba(0,0,0,0.4);
}
.top-bar-logo {
    font-size: 1.2rem; font-weight: 700; color: var(--text); text-decoration: none;
    display: flex; align-items: center; gap: 7px;
}
.top-bar-logo i { color: var(--primary); font-size: 1.1rem; }
.top-bar-logo span {
    background: var(--gradient-1); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}

/* ==========================================
   BOTTOM NAV
   ========================================== */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; width: 100%; height: var(--nav-h);
    background: rgba(3,3,8,0.94); backdrop-filter: blur(24px) saturate(1.8);
    border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-around;
    z-index: 900;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -1px 24px rgba(0,0,0,0.4);
}
.bottom-nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    text-decoration: none; color: var(--text-muted); font-size: 0.6rem;
    padding: 6px 0; border-radius: 12px; transition: color 0.25s var(--ease);
    position: relative; flex: 1; max-width: 72px;
    -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item i { font-size: 1.15rem; transition: transform 0.25s var(--ease); }
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item.active i { transform: scale(1.12); }
.bottom-nav-item.active::after {
    content: ''; position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
    width: 20px; height: 2.5px; background: var(--gradient-1); border-radius: 0 0 3px 3px;
}
.create-tab .create-fab {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--gradient-1); display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.3rem; margin-top: -20px;
    box-shadow: 0 4px 24px var(--glow), 0 0 0 4px rgba(255,107,157,0.08);
    transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease);
}
.create-tab.active .create-fab, .create-tab:active .create-fab {
    transform: scale(1.08); box-shadow: 0 6px 30px rgba(255,107,157,0.5);
}

/* ==========================================
   PAGES
   ========================================== */
.page {
    display: none;
    min-height: 100dvh;
    padding-top: calc(var(--top-h) + 12px);
    padding-bottom: calc(var(--nav-h) + 20px);
    position: relative; z-index: 1;
    animation: pageFade 0.3s var(--ease);
}
.page.active { display: block; }
.page-center { display: flex; flex-direction: column; align-items: center; }
@keyframes pageFade { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }

.page-inner { max-width: 600px; margin: 0 auto; padding: 16px 16px 32px; }
.page-header { text-align: center; margin-bottom: 24px; }
.page-title {
    font-size: 1.5rem; font-weight: 700; margin-bottom: 4px;
    background: var(--gradient-1); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}
.page-subtitle { color: var(--text-muted); font-size: 0.85rem; }
.section-divider { height: 1px; background: var(--border); margin: 36px 0; }

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 24px; border-radius: var(--radius-pill);
    font-size: 0.9rem; font-weight: 600; text-decoration: none;
    cursor: pointer; border: none; transition: all 0.25s var(--ease);
    font-family: 'Poppins', sans-serif; white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.btn-glow {
    background: var(--gradient-1); color: white;
    box-shadow: 0 4px 20px var(--glow), 0 0 0 1px rgba(255,107,157,0.1);
    position: relative; overflow: hidden;
}
.btn-glow::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s var(--ease);
}
.btn-glow:active::after { left: 120%; }
.btn-glow:active { transform: scale(0.97); box-shadow: 0 2px 12px var(--glow); }
.btn-glass {
    background: var(--bg-card); color: var(--text-light);
    border: 1px solid var(--border);
}
.btn-glass:active { background: var(--bg-card-hover); }
.btn-full { width: 100%; justify-content: center; }

/* ==========================================
   HERO
   ========================================== */
.hero-content { text-align: center; padding: 24px 0 16px; position: relative; z-index: 2; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 8px 18px; background: var(--bg-card);
    border: 1px solid var(--border-glow); border-radius: var(--radius-pill);
    font-size: 0.78rem; margin-bottom: 18px; color: var(--text-light);
    box-shadow: 0 0 20px rgba(255,107,157,0.08);
    animation: fadeInDown 0.8s ease both;
}
.hero-title { font-size: 2rem; font-weight: 800; line-height: 1.1; margin-bottom: 14px; letter-spacing: -0.02em; }
.title-line { display: block; }
.title-highlight {
    background: var(--gradient-1); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
    font-family: 'Great Vibes', cursive; font-size: 3rem;
    filter: drop-shadow(0 0 20px rgba(255,107,157,0.3));
}
.hero-subtitle { font-size: 0.88rem; color: var(--text-muted); max-width: 360px; margin: 0 auto 20px; line-height: 1.6; }
.hero-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Feature Cards */
.feature-cards {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
    margin: 28px 0 0; width: 100%;
}
.feature-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px 12px;
    text-align: center; cursor: pointer; transition: all 0.35s var(--ease);
    -webkit-tap-highlight-color: transparent;
    position: relative; overflow: hidden;
}
.feature-card::before {
    content: ''; position: absolute; inset: 0;
    background: var(--gradient-1); opacity: 0; transition: opacity 0.35s;
    z-index: 0;
}
.feature-card:active::before { opacity: 0.06; }
.feature-card:active { transform: scale(0.96); border-color: var(--border-glow); box-shadow: var(--shadow-glow); }
.feature-icon { font-size: 1.8rem; display: block; margin-bottom: 8px; }
.feature-card h3 { font-size: 0.78rem; margin-bottom: 2px; }
.feature-card p { font-size: 0.65rem; color: var(--text-muted); line-height: 1.4; }

/* ==========================================
   COUNTDOWN
   ========================================== */
.countdown-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px 22px;
    text-align: center; margin-top: 24px; width: 100%;
    position: relative; overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.countdown-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: var(--gradient-1);
}
.countdown-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.countdown-card h3 i { color: var(--primary); }
.countdown-desc { color: var(--text-muted); font-size: 0.8rem; margin-bottom: 12px; }
.date-input {
    padding: 10px 14px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: rgba(255,255,255,0.04);
    color: var(--text); font-family: 'Poppins', sans-serif; font-size: 0.85rem;
    outline: none; width: 100%; max-width: 220px; margin-bottom: 14px;
    transition: border-color 0.25s;
}
.date-input:focus { border-color: var(--primary); }
.countdown-timer { display: flex; gap: 6px; align-items: center; justify-content: center; }
.time-block {
    text-align: center; background: var(--gradient-1);
    border-radius: var(--radius-sm); padding: 12px 14px; min-width: 58px;
    box-shadow: 0 4px 16px rgba(255,107,157,0.2);
    transition: transform 0.3s var(--ease-spring);
}
.time-block:active { transform: scale(1.05); }
.time-value { display: block; font-size: 1.4rem; font-weight: 700; line-height: 1; }
.time-label { font-size: 0.58rem; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.5px; }
.time-sep { font-size: 1.2rem; font-weight: 700; color: var(--primary); animation: pulse 1s infinite; }

/* ==========================================
   FUN FACTS
   ========================================== */
.facts-strip { margin-top: 24px; width: 100%; }
.facts-title { font-size: 1.05rem; margin-bottom: 10px; text-align: center; }
.facts-scroll {
    display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.facts-scroll::-webkit-scrollbar { display: none; }
.fact-chip {
    flex-shrink: 0; scroll-snap-align: start;
    padding: 12px 16px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: 0.75rem; color: var(--text-light);
    min-width: 200px; line-height: 1.5;
}

/* ==========================================
   WISHES
   ========================================== */
.wish-categories {
    display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px;
    margin-bottom: 20px; scrollbar-width: none;
}
.wish-categories::-webkit-scrollbar { display: none; }
.category-btn {
    padding: 8px 16px; border-radius: var(--radius-pill);
    border: 1px solid var(--border); background: var(--bg-card);
    color: var(--text-light); font-family: 'Poppins', sans-serif;
    font-size: 0.75rem; cursor: pointer; transition: all 0.25s var(--ease);
    white-space: nowrap; flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.category-btn:active, .category-btn.active {
    background: var(--gradient-1); border-color: transparent; color: white;
}

.wishes-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.wish-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 22px;
    transition: all 0.35s var(--ease); position: relative; overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.wish-card::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 100%; height: 3px; background: var(--gradient-1);
    transform: scaleX(0); transition: transform 0.25s;
    transform-origin: left;
}
.wish-card:active { background: var(--bg-card-hover); }
.wish-card:active::before { transform: scaleX(1); }
.wish-emoji { font-size: 1.8rem; margin-bottom: 10px; display: block; }
.wish-text { font-size: 0.85rem; color: var(--text-light); line-height: 1.7; margin-bottom: 10px; font-style: italic; }
.wish-category {
    display: inline-block; padding: 3px 10px;
    background: rgba(255,107,157,0.12); color: var(--primary);
    border-radius: var(--radius-pill); font-size: 0.7rem; text-transform: capitalize;
}
.wish-actions { display: flex; gap: 8px; margin-top: 10px; }
.wish-action-btn {
    padding: 6px 14px; border-radius: var(--radius-pill);
    border: 1px solid var(--border); background: transparent;
    color: var(--text-muted); font-size: 0.72rem; cursor: pointer;
    transition: all 0.25s var(--ease); font-family: 'Poppins', sans-serif;
    -webkit-tap-highlight-color: transparent;
}
.wish-action-btn:active { background: var(--gradient-1); color: white; border-color: transparent; }

/* ==========================================
   CARDS CAROUSEL
   ========================================== */
.cards-carousel { position: relative; }
.cards-track {
    display: flex; gap: 14px; overflow-x: auto; scroll-behavior: smooth;
    padding: 12px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.cards-track::-webkit-scrollbar { display: none; }
.birthday-card {
    min-width: 200px; height: 270px; border-radius: var(--radius);
    overflow: hidden; cursor: pointer; transition: transform 0.25s var(--ease); flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.birthday-card:active { transform: scale(0.96); }
.birthday-card .card-bg {
    width: 100%; height: 100%; display: flex; flex-direction: column;
    align-items: center; justify-content: center; padding: 20px; text-align: center;
}
.card-emoji { font-size: 2.6rem; margin-bottom: 10px; animation: bounce 2s ease-in-out infinite; }
.card-title { font-family: 'Great Vibes', cursive; font-size: 1.5rem; margin-bottom: 6px; }
.card-subtitle { font-size: 0.75rem; opacity: 0.85; }
.card-select-btn {
    margin-top: 14px; padding: 7px 18px; background: rgba(255,255,255,0.9); color: #333;
    border: none; border-radius: var(--radius-pill); font-weight: 600;
    font-family: 'Poppins', sans-serif; cursor: pointer; font-size: 0.75rem;
}
@keyframes bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }

.carousel-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid var(--border); background: rgba(11,11,30,0.85);
    backdrop-filter: blur(8px);
    color: var(--text); font-size: 0.85rem; cursor: pointer;
    display: none; align-items: center; justify-content: center;
    transition: all 0.25s var(--ease);
}
.carousel-arrow.left { left: -6px; }
.carousel-arrow.right { right: -6px; }
.carousel-arrow:hover { background: var(--gradient-1); border-color: transparent; }

/* ==========================================
   CREATE FLOW
   ========================================== */
.create-flow { max-width: 500px; margin: 0 auto; }

.steps-bar {
    display: flex; gap: 3px; margin-bottom: 24px;
    background: var(--bg-card); border-radius: var(--radius-pill);
    padding: 5px; border: 1px solid var(--border);
    overflow: hidden;
}
.step {
    flex: 1; text-align: center; padding: 9px 4px;
    border-radius: var(--radius-pill); font-size: 0.62rem;
    color: var(--text-muted); transition: all 0.25s var(--ease);
    display: flex; align-items: center; justify-content: center; gap: 4px;
}
.step span {
    width: 20px; height: 20px; border-radius: 50%; display: inline-flex;
    align-items: center; justify-content: center;
    background: rgba(255,255,255,0.05); font-weight: 700; font-size: 0.65rem;
    flex-shrink: 0;
}
.step b { font-weight: 500; }
.step.active { color: white; background: var(--gradient-1); }
.step.active span { background: rgba(255,255,255,0.2); }
.step.done { color: var(--primary); }
.step.done span { background: rgba(255,107,157,0.18); }

.create-step { display: none; animation: pageFade 0.25s var(--ease); }
.create-step.active { display: block; }

.step-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px 18px;
    box-shadow: var(--shadow-sm);
    position: relative; overflow: hidden;
}
.step-card::before {
    content: ''; position: absolute; inset: -1px; border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(255,107,157,0.15), transparent 40%, transparent 60%, rgba(196,77,255,0.15));
    z-index: -1; opacity: 0; transition: opacity 0.4s;
    pointer-events: none;
}
.create-step.active .step-card::before { opacity: 1; }

.step-nav { display: flex; gap: 10px; margin-top: 20px; }
.step-nav .btn { flex: 1; justify-content: center; }

/* Form */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block; font-size: 0.85rem; font-weight: 600;
    margin-bottom: 8px; color: var(--text-light);
}
.form-group label i { color: var(--primary); margin-right: 5px; }
.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 10px; line-height: 1.5; }

.form-input, .form-textarea {
    width: 100%; padding: 14px 16px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: rgba(255,255,255,0.03);
    color: var(--text); font-family: 'Poppins', sans-serif; font-size: 0.88rem;
    outline: none; transition: border-color 0.3s, box-shadow 0.3s, background 0.3s; resize: none;
}
.form-input:focus, .form-textarea:focus {
    border-color: var(--primary); 
    box-shadow: 0 0 0 3px rgba(255,107,157,0.1), 0 0 20px rgba(255,107,157,0.05);
    background: rgba(255,255,255,0.05);
}
.form-input::placeholder, .form-textarea::placeholder { color: rgba(255,255,255,0.22); }

.theme-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.theme-option {
    width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
    transition: all 0.25s var(--ease); border: 3px solid transparent;
    -webkit-tap-highlight-color: transparent;
}
.theme-option:active { transform: scale(1.1); }
.theme-option.active { border-color: white; box-shadow: 0 0 16px rgba(255,255,255,0.2); transform: scale(1.1); }

/* AI Button */
.btn-ai {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 18px; border-radius: var(--radius-pill);
    border: 1px solid rgba(196,77,255,0.3);
    background: linear-gradient(135deg, rgba(196,77,255,0.1), rgba(79,172,254,0.1));
    color: #c44dff; font-family: 'Poppins', sans-serif;
    font-size: 0.78rem; font-weight: 600; cursor: pointer;
    margin-top: 10px; transition: all 0.25s var(--ease);
    position: relative; overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}
.btn-ai::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 200%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(196,77,255,0.06), transparent);
    animation: aiShimmer 3s linear infinite;
}
@keyframes aiShimmer { 0%{left:-100%} 100%{left:100%} }
.btn-ai:active { background: linear-gradient(135deg, rgba(196,77,255,0.22), rgba(79,172,254,0.22)); }
.btn-ai.loading { pointer-events: none; opacity: 0.65; }
.btn-ai.loading i { animation: spin 1s linear infinite; }
@keyframes spin { from{transform:rotate(0)} to{transform:rotate(360deg)} }

/* Quick Templates */
.quick-templates { margin-top: 16px; }
.template-label {
    font-size: 0.78rem; color: var(--text-muted); margin-bottom: 8px;
    display: flex; align-items: center; gap: 5px;
}
.template-label i { color: var(--accent); }
.template-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.template-chip {
    padding: 7px 14px; border-radius: var(--radius-pill);
    border: 1px solid var(--border); background: var(--bg-card);
    color: var(--text-light); font-family: 'Poppins', sans-serif;
    font-size: 0.72rem; cursor: pointer; transition: all 0.2s var(--ease);
    -webkit-tap-highlight-color: transparent;
}
.template-chip:active { background: var(--gradient-1); border-color: transparent; color: white; transform: scale(0.95); }

/* Song Input */
.song-input-row { display: flex; gap: 8px; }
.song-input-row .form-input { flex: 1; }
.song-input-row .btn { padding: 13px 16px; }

/* Song Results Mini */
.song-results-mini {
    display: flex; flex-direction: column; gap: 8px;
    max-height: 280px; overflow-y: auto; margin-top: 10px;
    scrollbar-width: thin; scrollbar-color: var(--primary) transparent;
}
.song-mini-card {
    display: flex; align-items: center; gap: 10px;
    padding: 10px; background: var(--bg-glass); border: 1px solid var(--border);
    border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s var(--ease);
    -webkit-tap-highlight-color: transparent;
}
.song-mini-card:active { background: var(--bg-card-hover); border-color: var(--primary); }
.song-mini-art { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--gradient-2); flex-shrink: 0; }
.song-mini-info { flex: 1; min-width: 0; }
.song-mini-title { font-size: 0.8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.song-mini-artist { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.song-mini-play { color: var(--primary); font-size: 1rem; }

/* Selected Song */
.selected-song-card {
    display: flex; align-items: center; gap: 12px;
    padding: 12px; background: rgba(196,77,255,0.08);
    border: 1px solid rgba(196,77,255,0.25);
    border-radius: var(--radius-sm); margin-top: 14px;
}
.sel-song-art {
    width: 46px; height: 46px; border-radius: 8px; background: var(--gradient-2);
    background-size: cover; background-position: center; flex-shrink: 0;
}
.sel-song-info { flex: 1; min-width: 0; }
.sel-song-info strong { display: block; font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-song-info span { font-size: 0.72rem; color: var(--text-muted); }
.btn-icon {
    width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border);
    background: transparent; color: var(--text-muted); cursor: pointer; font-size: 0.75rem;
    display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.btn-icon:active { background: var(--primary); color: white; }

/* Preview Card */
.preview-card {
    background: var(--gradient-1); border-radius: var(--radius);
    padding: 40px 24px; text-align: center; min-height: 300px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    position: relative; overflow: hidden; transition: background 0.4s;
    box-shadow: 0 12px 48px rgba(255,107,157,0.25);
}
.preview-card::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    animation: shimmer 4s ease-in-out infinite;
}
@keyframes shimmer { 0%,100%{transform:translate(-30%,-30%)} 50%{transform:translate(30%,30%)} }
.preview-deco { font-size: 1.3rem; letter-spacing: 6px; position: relative; }
.preview-deco.top { margin-bottom: 12px; animation: bounce 2s ease-in-out infinite; }
.preview-deco.bottom { margin-top: 12px; }
.preview-heading { font-family: 'Great Vibes', cursive; font-size: 2rem; margin-bottom: 8px; position: relative; }
.preview-name { font-size: 1rem; font-weight: 600; margin-bottom: 12px; position: relative; }
.preview-message { font-size: 0.85rem; line-height: 1.7; opacity: 0.92; margin-bottom: 12px; font-style: italic; position: relative; max-width: 90%; }
.preview-sender { font-size: 0.82rem; opacity: 0.8; position: relative; }
.preview-song { font-size: 0.75rem; opacity: 0.7; margin-top: 8px; position: relative; }

/* Share */
.share-section {
    margin-top: 20px; text-align: center;
    padding: 24px 18px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    position: relative; overflow: hidden;
}
.share-section::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: var(--gradient-1);
}
.share-section h3 { font-size: 1.05rem; margin-bottom: 6px; }
.share-desc { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 14px; line-height: 1.5; }
.share-link-box { display: flex; gap: 6px; margin-bottom: 14px; }
.share-link-box .form-input { flex: 1; font-size: 0.7rem; padding: 11px 12px; }
.share-link-box .btn { padding: 11px 14px; }
.share-buttons { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.share-btn {
    padding: 9px 16px; border-radius: var(--radius-pill); border: none;
    font-family: 'Poppins', sans-serif; font-size: 0.75rem; cursor: pointer;
    transition: all 0.2s var(--ease); display: flex; align-items: center; gap: 6px; color: white;
    -webkit-tap-highlight-color: transparent;
}
.share-btn:active { transform: scale(0.95); }
.share-btn.native { background: var(--gradient-1); }
.share-btn.whatsapp { background: #25D366; }
.share-btn.twitter { background: #1DA1F2; }

/* ==========================================
   SONGS PAGE
   ========================================== */
.song-search-box {
    display: flex; align-items: center; gap: 0;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-pill); padding: 5px 5px 5px 16px;
    transition: border-color 0.25s, box-shadow 0.25s; margin-bottom: 14px;
}
.song-search-box:focus-within { border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(196,77,255,0.08); }
.song-search-box > i { color: var(--text-muted); font-size: 0.85rem; }
.song-search-box .form-input { border: none; background: transparent; padding: 10px; flex: 1; font-size: 0.85rem; }
.song-search-box .form-input:focus { border: none; box-shadow: none; }
.song-search-box .btn { padding: 9px 16px; font-size: 0.82rem; }

.song-suggestions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 20px; }
.suggestion-tag {
    padding: 6px 12px; border-radius: var(--radius-pill);
    border: 1px solid var(--border); background: var(--bg-card);
    color: var(--text-muted); font-size: 0.72rem; cursor: pointer;
    transition: all 0.2s var(--ease);
    -webkit-tap-highlight-color: transparent;
}
.suggestion-tag:active { background: var(--gradient-2); border-color: transparent; color: white; }

.song-results { display: flex; flex-direction: column; gap: 10px; }
.song-placeholder { text-align: center; padding: 40px 16px; color: var(--text-muted); }
.song-placeholder i { font-size: 2.2rem; margin-bottom: 10px; display: block; opacity: 0.25; }
.song-placeholder p { font-size: 0.85rem; }
.song-hint { font-size: 0.7rem; opacity: 0.6; display: block; margin-top: 6px; }

.song-card {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 12px;
    transition: all 0.2s var(--ease);
}
.song-card:active { background: var(--bg-card-hover); }
.song-card-art {
    width: 52px; height: 52px; border-radius: 10px; object-fit: cover;
    background: var(--gradient-2); flex-shrink: 0;
}
.song-card-body { flex: 1; min-width: 0; }
.song-card-title { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-card-artist { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.song-card-actions { display: flex; gap: 6px; margin-top: 6px; }
.song-play-btn, .song-dedicate-btn {
    padding: 5px 12px; border-radius: var(--radius-pill);
    border: 1px solid var(--border); background: transparent;
    color: var(--text-muted); font-size: 0.68rem; cursor: pointer;
    transition: all 0.2s var(--ease); font-family: 'Poppins', sans-serif;
    display: inline-flex; align-items: center; gap: 4px;
    -webkit-tap-highlight-color: transparent;
}
.song-play-btn:active { background: var(--gradient-1); border-color: transparent; color: white; }
.song-dedicate-btn:active { background: var(--gradient-2); border-color: transparent; color: white; }

.song-loading { text-align: center; padding: 28px; }
.loader-dots { display: inline-flex; gap: 5px; }
.loader-dots span {
    width: 9px; height: 9px; border-radius: 50%; background: var(--secondary);
    animation: dotPulse 1.4s ease-in-out infinite;
}
.loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.loader-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse { 0%,80%,100%{transform:scale(.6);opacity:.4} 40%{transform:scale(1);opacity:1} }

/* Now Playing */
.now-playing-bar {
    position: fixed; bottom: var(--nav-h); left: 0; width: 100%;
    background: rgba(3,3,8,0.96); backdrop-filter: blur(24px) saturate(1.8);
    border-top: 1px solid var(--border); padding: 10px 16px;
    display: flex; align-items: center; justify-content: space-between;
    z-index: 850; animation: slideUp 0.3s var(--ease);
    flex-wrap: wrap; box-shadow: 0 -4px 24px rgba(0,0,0,0.45);
}
@keyframes slideUp { from{transform:translateY(100%)} to{transform:translateY(0)} }
.np-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.np-art {
    width: 38px; height: 38px; border-radius: 8px;
    background: var(--gradient-2); background-size: cover; background-position: center; flex-shrink: 0;
}
.np-details { display: flex; flex-direction: column; min-width: 0; }
.np-title { font-size: 0.78rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist { font-size: 0.65rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-progress {
    width: 100%; height: 3px; background: rgba(255,255,255,0.08);
    border-radius: 2px; margin-top: 4px; order: 10;
}
.np-progress-fill {
    height: 100%; background: var(--gradient-1); border-radius: 2px;
    width: 0%; transition: width 0.3s linear;
}
.np-controls { display: flex; gap: 6px; }
.np-btn {
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid var(--border); background: transparent;
    color: var(--text); cursor: pointer; transition: all 0.2s;
    font-size: 0.75rem; display: flex; align-items: center; justify-content: center;
}
.np-btn:active { background: var(--gradient-1); border-color: transparent; }

/* ==========================================
   GALLERY
   ========================================== */
.gallery-grid { display: flex; flex-direction: column; gap: 12px; }
.gallery-card {
    padding: 24px 18px; border-radius: var(--radius);
    text-align: center; position: relative; overflow: hidden;
    min-height: 150px; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s var(--ease);
}
.gallery-card:active { transform: scale(0.97); }
.gallery-emoji { font-size: 1.8rem; margin-bottom: 8px; }
.gallery-text { font-size: 0.82rem; line-height: 1.6; margin-bottom: 8px; font-style: italic; }
.gallery-from { font-size: 0.72rem; opacity: 0.7; }
.gallery-heart {
    position: absolute; top: 10px; right: 10px; font-size: 1rem;
    cursor: pointer; transition: transform 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.gallery-heart:active { transform: scale(1.3); }

/* Cake */
.cake-area {
    margin-top: 36px; text-align: center;
    padding: 28px 16px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius);
}
.cake-area h3 { margin-bottom: 4px; font-size: 1.05rem; }
.cake-sub { color: var(--text-muted); font-size: 0.8rem; margin-bottom: 16px; }
.candles-row { display: flex; gap: 16px; justify-content: center; margin-bottom: 6px; }
.i-candle {
    display: flex; flex-direction: column; align-items: center;
    cursor: pointer; transition: transform 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.i-candle:active { transform: scale(1.15); }
.i-flame { font-size: 1.4rem; transition: all 0.3s; animation: flicker 0.5s ease-in-out infinite alternate; }
.i-candle:not(.lit) .i-flame { opacity: 0; transform: scale(0); }
.i-stick { width: 6px; height: 28px; background: linear-gradient(180deg, #ffd32a, #f39c12); border-radius: 3px; }
.cake-emoji-big { font-size: 3.5rem; line-height: 1; }
.cake-instruction { font-size: 0.85rem; color: var(--text-muted); margin-top: 8px; }
.relight-btn { margin-top: 10px; }

/* ==========================================
   CELEBRATION VIEW
   ========================================== */
.celebration-view {
    position: fixed; inset: 0; z-index: 9500;
    background: var(--bg); overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
#celebConfetti { position: fixed; inset: 0; z-index: 9501; pointer-events: none; }
#celebFireworks { position: fixed; inset: 0; z-index: 9501; pointer-events: none; }
.celeb-particles { position: fixed; inset: 0; z-index: 9500; pointer-events: none; }

.celeb-content {
    position: relative; z-index: 9502;
    max-width: 480px; margin: 0 auto;
    padding: 40px 20px 56px; text-align: center;
    display: flex; flex-direction: column; align-items: center;
}
.celeb-emojis { font-size: 2.6rem; margin-bottom: 12px; animation: bounce 2s ease-in-out infinite; }
.celeb-title {
    font-family: 'Great Vibes', cursive; font-size: 2.8rem;
    background: var(--gradient-1); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
    margin-bottom: 6px; animation: fadeInDown 1s ease;
    filter: drop-shadow(0 0 30px rgba(255,107,157,0.4));
}
.celeb-name { font-size: 1.6rem; font-weight: 700; margin-bottom: 20px; animation: fadeInUp 1s ease 0.3s both; }
.celeb-message-box {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px 18px;
    margin-bottom: 16px; width: 100%;
    animation: fadeInUp 1s ease 0.5s both;
}
.celeb-message {
    font-size: 0.92rem; line-height: 1.75; font-style: italic; color: var(--text-light);
    min-height: 1.75em;
}
.celeb-message.typing { border-right: 2px solid var(--primary); animation: blink-cursor 0.7s step-end infinite; }
@keyframes blink-cursor { 50% { border-color: transparent; } }
.celeb-from { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 20px; animation: fadeInUp 1s ease 0.7s both; }

/* Emoji Reactions */
.celeb-reactions {
    display: flex; gap: 10px; justify-content: center;
    margin-bottom: 24px; position: relative;
    animation: fadeInUp 1s ease 0.9s both;
}
.reaction-btn {
    width: 48px; height: 48px; border-radius: 50%;
    border: 1px solid var(--border); background: var(--bg-card);
    font-size: 1.4rem; cursor: pointer; transition: all 0.2s var(--ease);
    display: flex; align-items: center; justify-content: center;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}
.reaction-btn:active { transform: scale(1.3); border-color: var(--primary); background: var(--bg-card-hover); }
.floating-reaction {
    position: absolute; font-size: 1.5rem; pointer-events: none; z-index: 10;
    animation: floatReact 2s ease-out forwards;
}
@keyframes floatReact {
    0% { transform: translateY(0) scale(0.5); opacity: 1; }
    100% { transform: translateY(-120px) scale(1.5); opacity: 0; }
}

.celeb-song { width: 100%; margin-bottom: 24px; animation: fadeInUp 1s ease 1s both; }
.celeb-song-label { font-size: 0.85rem; color: var(--primary); margin-bottom: 10px; }
.celeb-song-card {
    display: flex; align-items: center; gap: 12px;
    padding: 12px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.celeb-audio-progress {
    width: 100%; height: 3px; background: rgba(255,255,255,0.08);
    border-radius: 2px; margin-top: 8px;
}
.celeb-audio-fill {
    height: 100%; background: var(--gradient-1); border-radius: 2px;
    width: 0%; transition: width 0.3s linear;
}

.celeb-cake-area {
    width: 100%; padding: 24px 14px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); margin-bottom: 24px;
    animation: fadeInUp 1s ease 1.2s both;
}
.celeb-cake-label { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 14px; }
.celeb-cake-emoji { font-size: 3.5rem; }
.celeb-blow-text { font-size: 0.82rem; color: var(--primary); margin-top: 8px; }

/* ==========================================
   MODAL
   ========================================== */
.modal {
    position: fixed; inset: 0; z-index: 5000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: all 0.3s var(--ease);
}
.modal.active { opacity: 1; visibility: visible; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.65); backdrop-filter: blur(8px); }
.modal-content {
    position: relative; background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px 20px; max-width: 400px; width: 90%;
    transform: scale(0.92); transition: all 0.3s var(--ease); z-index: 1;
}
.modal.active .modal-content { transform: scale(1); }
.modal-close {
    position: absolute; top: 10px; right: 10px; width: 30px; height: 30px;
    border-radius: 50%; border: 1px solid var(--border); background: transparent;
    color: var(--text); cursor: pointer; font-size: 0.8rem;
    display: flex; align-items: center; justify-content: center;
}

/* Canvas & Toast */
#confettiCanvas { position: fixed; inset: 0; pointer-events: none; z-index: 9999; }

.toast {
    position: fixed; bottom: calc(var(--nav-h) + 14px); left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: rgba(3,3,8,0.94); backdrop-filter: blur(20px) saturate(1.5);
    border: 1px solid var(--border-glow);
    color: white; padding: 12px 22px; border-radius: var(--radius-pill);
    font-family: 'Poppins', sans-serif; font-size: 0.78rem; font-weight: 500;
    z-index: 10000; opacity: 0; transition: all 0.3s var(--ease);
    white-space: nowrap; max-width: 90vw; overflow: hidden; text-overflow: ellipsis;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5), var(--shadow-glow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Animations */
@keyframes fadeInUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeInDown { from{opacity:0;transform:translateY(-20px)} to{opacity:1;transform:translateY(0)} }
.animate-in { opacity: 0; transform: translateY(16px); transition: opacity 0.4s, transform 0.4s; }
.animate-in.visible { opacity: 1; transform: translateY(0); }

/* ==========================================
   TABLET+
   ========================================== */
@media (min-width: 600px) {
    .page-inner { max-width: 580px; padding: 24px 24px 40px; }
    .hero-title { font-size: 2.4rem; }
    .title-highlight { font-size: 3.6rem; }
    .wishes-grid { grid-template-columns: 1fr 1fr; }
    .gallery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
    .carousel-arrow { display: flex; }
    .feature-card:hover::before { opacity: 0.06; }
    .feature-card:hover { border-color: var(--border-glow); box-shadow: var(--shadow-glow); }
    .stat-card:hover::after { transform: scaleX(1); }
    .btn-glow:hover::after { left: 120%; }
}

@media (min-width: 768px) {
    .page-inner { max-width: 700px; padding: 32px 32px 48px; }
    .feature-cards { gap: 16px; }
    .feature-card { padding: 28px 16px; }
    .feature-icon { font-size: 2.2rem; }
    .feature-card h3 { font-size: 0.9rem; }
}

@media (min-width: 1024px) {
    .page-inner { max-width: 820px; }
    .wishes-grid { grid-template-columns: repeat(3, 1fr); }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    .hero-title { font-size: 3.2rem; }
    .title-highlight { font-size: 4.8rem; }
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ==========================================
   DARK/LIGHT TOGGLE
   ========================================== */
.dark-light-toggle {
    position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid var(--border); background: var(--bg-card);
    color: var(--text-muted); cursor: pointer; font-size: 0.85rem;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s var(--ease);
    -webkit-tap-highlight-color: transparent;
}
.dark-light-toggle:active { transform: translateY(-50%) scale(0.9); }
body.light-mode { --bg: #f8f6f3; --text: #1a1a2e; --text-muted: rgba(0,0,0,0.42); --text-light: rgba(0,0,0,0.72); --bg-card: rgba(0,0,0,0.03); --bg-card-hover: rgba(0,0,0,0.06); --bg-glass: rgba(0,0,0,0.02); --border: rgba(0,0,0,0.07); --border-glow: rgba(255,107,157,0.12); --shadow-sm: 0 2px 12px rgba(0,0,0,0.06); --shadow-md: 0 8px 32px rgba(0,0,0,0.08); }
body.light-mode::before {
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(255,107,157,0.05) 0%, transparent 50%),
        radial-gradient(ellipse 60% 60% at 80% 20%, rgba(196,77,255,0.04) 0%, transparent 50%),
        radial-gradient(ellipse 50% 80% at 50% 80%, rgba(79,172,254,0.03) 0%, transparent 50%);
}
body.light-mode .top-bar,
body.light-mode .bottom-nav { background: rgba(248,246,243,0.88); box-shadow: 0 1px 12px rgba(0,0,0,0.06); }
body.light-mode .now-playing-bar { background: rgba(248,246,243,0.95); box-shadow: 0 -2px 12px rgba(0,0,0,0.06); }
body.light-mode .toast { background: rgba(248,246,243,0.92); color: var(--text); box-shadow: 0 8px 32px rgba(0,0,0,0.1); }
body.light-mode .form-input, body.light-mode .form-textarea { color: var(--text); }
body.light-mode .date-input { color: var(--text); color-scheme: light; }
body.light-mode .form-input::placeholder, body.light-mode .form-textarea::placeholder { color: rgba(0,0,0,0.25); }

/* ==========================================
   STATS SECTION
   ========================================== */
.stats-section { margin-top: 28px; width: 100%; }
.stats-heading { font-size: 1.05rem; text-align: center; margin-bottom: 14px; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px 12px; text-align: center;
    transition: all 0.35s var(--ease);
    position: relative; overflow: hidden;
}
.stat-card::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
    background: var(--gradient-1); transform: scaleX(0); transition: transform 0.4s var(--ease);
}
.stat-card:active { transform: scale(0.97); }
.stat-card:active::after { transform: scaleX(1); }
.stat-value {
    display: block; font-size: 1.6rem; font-weight: 700;
    background: var(--gradient-1); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-label { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

@media (min-width: 600px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

/* ==========================================
   WISH HISTORY
   ========================================== */
.wish-history-section { margin-top: 24px; width: 100%; }
.history-heading { font-size: 1.05rem; text-align: center; margin-bottom: 12px; }
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s var(--ease);
    -webkit-tap-highlight-color: transparent;
}
.history-item:active { background: var(--bg-card-hover); }
.history-emoji { font-size: 1.3rem; flex-shrink: 0; }
.history-info { flex: 1; min-width: 0; }
.history-name { font-size: 0.82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-date { font-size: 0.65rem; color: var(--text-muted); }
.history-copy {
    width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border);
    background: transparent; color: var(--text-muted); font-size: 0.7rem;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    transition: all 0.2s; flex-shrink: 0;
}
.history-copy:active { background: var(--gradient-1); color: white; border-color: transparent; }

/* ==========================================
   CHARACTER COUNTER
   ========================================== */
.char-counter {
    text-align: right; font-size: 0.68rem; color: var(--text-muted);
    margin-top: 4px; transition: color 0.25s;
}
.char-counter.warn { color: #f59e0b; }
.char-counter.danger { color: #ef4444; }

/* ==========================================
   AI TONE PICKER
   ========================================== */
.ai-tone-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.tone-picker { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.tone-label { font-size: 0.72rem; color: var(--text-muted); flex-shrink: 0; }
.tone-btn {
    padding: 4px 10px; border-radius: var(--radius-pill);
    border: 1px solid var(--border); background: transparent;
    color: var(--text-muted); font-family: 'Poppins', sans-serif;
    font-size: 0.65rem; cursor: pointer; transition: all 0.2s var(--ease);
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.tone-btn:active, .tone-btn.active { background: var(--gradient-2); border-color: transparent; color: white; }

/* ==========================================
   AGE BADGE
   ========================================== */
.form-hint-inline { font-size: 0.7rem; color: var(--text-muted); font-weight: 400; }
.age-badge {
    margin-top: 8px; display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: var(--radius-pill);
    background: linear-gradient(135deg, rgba(255,107,157,0.12), rgba(196,77,255,0.12));
    border: 1px solid rgba(255,107,157,0.2);
    color: var(--primary); font-size: 0.8rem; font-weight: 600;
    animation: fadeInUp 0.3s ease;
}
.zodiac-badge {
    margin-top: 6px; margin-left: 6px; display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 12px; border-radius: var(--radius-pill);
    background: linear-gradient(135deg, rgba(79,172,254,0.12), rgba(102,126,234,0.12));
    border: 1px solid rgba(79,172,254,0.2);
    color: #4facfe; font-size: 0.75rem; font-weight: 600;
    cursor: help; animation: fadeInUp 0.3s ease 0.1s both;
}

/* Badge dot (hero) */
.badge-dot {
    width: 6px; height: 6px; border-radius: 50%; background: #22c55e;
    display: inline-block; animation: pulse 2s ease-in-out infinite;
    margin-right: 2px;
}

/* ==========================================
   QR CODE
   ========================================== */
.qr-section {
    margin-top: 16px; text-align: center;
    padding: 16px; background: white; border-radius: var(--radius-sm);
}
.qr-label {
    font-size: 0.75rem; color: #666; margin-bottom: 8px;
}
.qr-label i { margin-right: 4px; }
#qrCanvas { border-radius: 4px; image-rendering: pixelated; }

/* ==========================================
   EXTRA SHARE BUTTONS
   ========================================== */
.share-btn.telegram { background: #0088cc; }
.share-btn.email { background: var(--gradient-2); }

/* ==========================================
   SCROLL TO TOP
   ========================================== */
.scroll-top-btn {
    position: fixed; bottom: calc(var(--nav-h) + 14px); right: 14px;
    width: 44px; height: 44px; border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(3,3,10,0.92); backdrop-filter: blur(16px);
    color: var(--text); font-size: 0.9rem; cursor: pointer;
    z-index: 800; display: flex; align-items: center; justify-content: center;
    transition: all 0.3s var(--ease); box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    -webkit-tap-highlight-color: transparent;
}
.scroll-top-btn:active { transform: scale(0.9); background: var(--gradient-1); border-color: transparent; }
body.light-mode .scroll-top-btn { background: rgba(245,243,240,0.9); box-shadow: 0 4px 20px rgba(0,0,0,0.1); }

/* ==========================================
   SPARKLE TRAIL
   ========================================== */
#sparkleCanvas {
    position: fixed; inset: 0; pointer-events: none; z-index: 9998;
}

/* ==========================================
   HOROSCOPE CARD
   ========================================== */
.horoscope-card {
    margin-top: 16px; padding: 20px;
    background: linear-gradient(135deg, rgba(79,172,254,0.08), rgba(196,77,255,0.08));
    border: 1px solid rgba(79,172,254,0.15);
    border-radius: var(--radius); text-align: center;
    animation: fadeInUp 0.4s ease both;
}
.horo-header { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 10px; }
.horo-icon { font-size: 2rem; }
.horo-header h4 {
    font-size: 0.95rem; font-weight: 700;
    background: var(--gradient-4); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}
.horo-text { font-size: 0.82rem; color: var(--text-light); line-height: 1.7; font-style: italic; }

/* ==========================================
   COMPATIBILITY CARD
   ========================================== */
.compat-card {
    margin-top: 12px; padding: 18px;
    background: linear-gradient(135deg, rgba(255,107,157,0.06), rgba(255,211,42,0.06));
    border: 1px solid rgba(255,107,157,0.12);
    border-radius: var(--radius); text-align: center;
    animation: fadeInUp 0.4s ease 0.15s both;
}
.compat-card h4 { font-size: 0.9rem; margin-bottom: 12px; color: var(--primary); }
.compat-bar-wrap {
    height: 8px; background: rgba(255,255,255,0.06); border-radius: 4px;
    overflow: hidden; margin-bottom: 8px;
}
.compat-bar-fill {
    height: 100%; border-radius: 4px; transition: width 1.5s var(--ease-spring);
    background: linear-gradient(90deg, #ff6b9d, #ffd32a, #7bed9f);
}
.compat-score {
    font-size: 1.8rem; font-weight: 800;
    background: var(--gradient-1); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}
.compat-desc { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

/* ==========================================
   ADMIN ANALYTICS PANEL (Hidden)
   ========================================== */
.admin-overlay {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(12px);
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.admin-panel {
    width: 94%; max-width: 520px; max-height: 88vh;
    background: #0a0a14; border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius); overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 60px rgba(196,77,255,0.08);
}
.admin-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(135deg, rgba(196,77,255,0.08), rgba(79,172,254,0.06));
}
.admin-header h2 {
    font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 8px;
    background: var(--gradient-2); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}
.admin-header h2 i {
    background: none; -webkit-text-fill-color: #c44dff;
}
.admin-close {
    width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.08);
    background: transparent; color: var(--text-muted); cursor: pointer; font-size: 0.8rem;
    display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.admin-close:hover { background: rgba(239,68,68,0.15); color: #ef4444; border-color: rgba(239,68,68,0.3); }
.admin-body { padding: 16px 20px; overflow-y: auto; flex: 1; }
.admin-stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.admin-stat {
    text-align: center; padding: 12px 6px;
    background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.04);
    border-radius: var(--radius-sm);
}
.admin-stat-val {
    display: block; font-size: 1.2rem; font-weight: 800;
    background: var(--gradient-1); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}
.admin-stat-lbl { font-size: 0.55rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }
.admin-section { margin-bottom: 18px; }
.admin-section h3 { font-size: 0.82rem; color: var(--text-light); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.admin-section h3 i { color: var(--secondary); font-size: 0.75rem; }
.admin-bars { display: flex; flex-direction: column; gap: 6px; }
.admin-bar-row { display: flex; align-items: center; gap: 8px; font-size: 0.72rem; }
.admin-bar-label { width: 70px; color: var(--text-muted); text-align: right; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-bar-track { flex: 1; height: 6px; background: rgba(255,255,255,0.04); border-radius: 3px; overflow: hidden; }
.admin-bar-fill { height: 100%; border-radius: 3px; background: var(--gradient-1); transition: width 0.6s var(--ease); }
.admin-bar-count { width: 32px; color: var(--text-muted); font-size: 0.65rem; }
.admin-log {
    max-height: 140px; overflow-y: auto; font-size: 0.7rem; color: var(--text-muted);
    background: rgba(0,0,0,0.3); border-radius: var(--radius-sm); padding: 10px;
    font-family: 'Courier New', monospace; line-height: 1.6;
    scrollbar-width: thin; scrollbar-color: var(--secondary) transparent;
}
.admin-log .log-entry { padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
.admin-log .log-time { color: var(--secondary); }
.admin-actions {
    display: flex; gap: 8px; margin-top: 8px; padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.04);
}
.admin-actions .btn { flex: 1; justify-content: center; font-size: 0.72rem; padding: 10px 12px; }
