/* ============================================
  Indian Festival Wishes - Premium Redesign
  Dark, luxurious, gradient-rich mobile-first UI
  ============================================ */


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}


:root {
    /* Festival Palettes - RGB triplets */
    --diwali-primary-rgb: 255,140,50;
    --diwali-secondary-rgb: 255,205,80;
    --diwali-accent-rgb: 255,80,60;


    --holi-primary-rgb: 255,90,170;
    --holi-secondary-rgb: 120,220,255;
    --holi-accent-rgb: 255,180,80;


    --raksha-primary-rgb: 240,90,140;
    --raksha-secondary-rgb: 255,215,120;
    --raksha-accent-rgb: 180,90,220;


    --dussehra-primary-rgb: 255,120,60;
    --dussehra-secondary-rgb: 255,190,80;
    --dussehra-accent-rgb: 230,70,90;


    --janmashtami-primary-rgb: 255,180,60;
    --janmashtami-secondary-rgb: 255,90,120;
    --janmashtami-accent-rgb: 155,120,255;


    --newyear-primary-rgb: 190,120,255;
    --newyear-secondary-rgb: 90,220,255;
    --newyear-accent-rgb: 255,120,220;


    --lifeline-primary-rgb: 255,80,140;
    --lifeline-secondary-rgb: 255,180,210;
    --lifeline-accent-rgb: 220,40,90;


    --independence-primary-rgb: 255,153,51;
    --independence-secondary-rgb: 19,136,8;
    --independence-accent-rgb: 0,51,102;


    --birthday-primary-rgb: 255,105,180;
    --birthday-secondary-rgb: 255,182,193;
    --birthday-accent-rgb: 147,112,219;


    /* Active theme (defaults to Janmashtami since that matches design) */
    --primary-rgb: var(--janmashtami-primary-rgb);
    --secondary-rgb: var(--janmashtami-secondary-rgb);
    --accent-rgb: var(--janmashtami-accent-rgb);


    /* Neutrals */
    --bg-base: #07030f;
    --card-bg: rgba(20, 12, 35, 0.72);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.55);
    --text-soft: rgba(255, 255, 255, 0.75);


    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Playfair Display', 'Inter', serif;


    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;


    /* Radius */
    --r-sm: 12px;
    --r-md: 16px;
    --r-lg: 22px;
    --r-xl: 28px;
    --r-2xl: 32px;
}


body[data-theme="diwali"] {
    --primary-rgb: var(--diwali-primary-rgb);
    --secondary-rgb: var(--diwali-secondary-rgb);
    --accent-rgb: var(--diwali-accent-rgb);
}
body[data-theme="holi"] {
    --primary-rgb: var(--holi-primary-rgb);
    --secondary-rgb: var(--holi-secondary-rgb);
    --accent-rgb: var(--holi-accent-rgb);
}
body[data-theme="raksha-bandhan"] {
    --primary-rgb: var(--raksha-primary-rgb);
    --secondary-rgb: var(--raksha-secondary-rgb);
    --accent-rgb: var(--raksha-accent-rgb);
}
body[data-theme="dussehra"] {
    --primary-rgb: var(--dussehra-primary-rgb);
    --secondary-rgb: var(--dussehra-secondary-rgb);
    --accent-rgb: var(--dussehra-accent-rgb);
}
body[data-theme="janmashtami"] {
    --primary-rgb: var(--janmashtami-primary-rgb);
    --secondary-rgb: var(--janmashtami-secondary-rgb);
    --accent-rgb: var(--janmashtami-accent-rgb);
}
body[data-theme="new-year"] {
    --primary-rgb: var(--newyear-primary-rgb);
    --secondary-rgb: var(--newyear-secondary-rgb);
    --accent-rgb: var(--newyear-accent-rgb);
}
body[data-theme="lifeline"] {
    --primary-rgb: var(--lifeline-primary-rgb);
    --secondary-rgb: var(--lifeline-secondary-rgb);
    --accent-rgb: var(--lifeline-accent-rgb);
}
body[data-theme="independence-day"] {
    --primary-rgb: var(--independence-primary-rgb);
    --secondary-rgb: var(--independence-secondary-rgb);
    --accent-rgb: var(--independence-accent-rgb);
}
body[data-theme="happy-birthday"] {
    --primary-rgb: var(--birthday-primary-rgb);
    --secondary-rgb: var(--birthday-secondary-rgb);
    --accent-rgb: var(--birthday-accent-rgb);
}


/* Independence Day specific decorations */
body[data-theme="independence-day"] .wish-lantern-left {
    animation: flagWave 3s ease-in-out infinite;
}
body[data-theme="independence-day"] .wish-lantern-right {
    animation: flagWave 3s ease-in-out infinite 0.5s;
}
body[data-theme="independence-day"] .wish-lantern-right-2 {
    animation: flagWave 3s ease-in-out infinite 1s;
}
body[data-theme="independence-day"] .wish-lantern-left-2 {
    top: 120px;
    left: 16px;
    transform-origin: top center;
    animation: flagWave 3s ease-in-out infinite 1.5s;
    font-size: 28px;
    opacity: 0.8;
}
body[data-theme="independence-day"] .wish-lantern-right-3 {
    top: 80px;
    right: 12px;
    transform-origin: top center;
    animation: flagWave 3s ease-in-out infinite 2s;
    font-size: 30px;
    opacity: 0.85;
}


@keyframes flagWave {
    0%, 100% { transform: rotate(-6deg) translateY(0); }
    25% { transform: rotate(4deg) translateY(-3px); }
    50% { transform: rotate(-4deg) translateY(0); }
    75% { transform: rotate(6deg) translateY(-2px); }
}


body[data-theme="independence-day"] .wish-badge {
    background: radial-gradient(circle,
    rgba(255,153,51,0.3) 0%,
    rgba(19,136,8,0.2) 50%,
    rgba(0,51,102,0.15) 100%);
    border-color: rgba(255,153,51,0.6);
    box-shadow: 0 0 30px rgba(255,153,51,0.5);
    animation: badgePulse 2s ease-in-out infinite;
}


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


body[data-theme="independence-day"] .hero-emoji {
    font-size: 9rem;
    filter: drop-shadow(0 25px 50px rgba(255,153,51,0.6));
}


body[data-theme="independence-day"] .wish-card {
    background: linear-gradient(135deg,
    rgb(255,153,51) 0%,
    rgb(19,136,8) 35%,
    rgb(0,51,102) 70%,
    rgb(255,153,51) 100%
    );
    box-shadow:
            0 20px 50px rgba(255,153,51,0.3),
            0 0 40px rgba(19,136,8,0.2);
    animation: cardGlow 4s ease-in-out infinite;
}


@keyframes cardGlow {
    0%, 100% { box-shadow: 0 20px 50px rgba(255,153,51,0.3), 0 0 40px rgba(19,136,8,0.2); }
    50% { box-shadow: 0 20px 50px rgba(255,153,51,0.5), 0 0 60px rgba(19,136,8,0.35); }
}


body[data-theme="independence-day"] .wish-card-inner {
    background:
            radial-gradient(ellipse 90% 60% at 50% 100%, rgba(255,153,51,0.15) 0%, transparent 70%),
            radial-gradient(ellipse 80% 50% at 50% 0%, rgba(19,136,8,0.12) 0%, transparent 70%),
            linear-gradient(160deg, #1a0f2e 0%, #0f0820 100%);
}


body[data-theme="independence-day"] .particle {
    background: rgb(255,153,51);
    box-shadow: 0 0 8px rgba(255,153,51,0.7);
}


body[data-theme="independence-day"] .particle:nth-child(3n) {
    background: rgb(19,136,8);
    box-shadow: 0 0 8px rgba(19,136,8,0.7);
}


body[data-theme="independence-day"] .particle:nth-child(3n+1) {
    background: rgb(0,51,102);
    box-shadow: 0 0 8px rgba(0,51,102,0.7);
}


/* Birthday specific decorations */
body[data-theme="happy-birthday"] .wish-lantern-left {
    animation: balloonFloat 4s ease-in-out infinite;
}
body[data-theme="happy-birthday"] .wish-lantern-right {
    animation: balloonFloat 4s ease-in-out infinite 0.5s;
}
body[data-theme="happy-birthday"] .wish-lantern-right-2 {
    animation: giftBounce 3s ease-in-out infinite;
}
body[data-theme="happy-birthday"] .wish-lantern-left-2 {
    top: 120px;
    left: 16px;
    transform-origin: bottom center;
    animation: balloonFloat 4s ease-in-out infinite 1.5s;
    font-size: 28px;
    opacity: 0.8;
}
body[data-theme="happy-birthday"] .wish-lantern-right-3 {
    top: 80px;
    right: 12px;
    transform-origin: bottom center;
    animation: confettiShake 2s ease-in-out infinite;
    font-size: 30px;
    opacity: 0.85;
}


@keyframes balloonFloat {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    25% { transform: translateY(-8px) rotate(2deg); }
    50% { transform: translateY(0) rotate(3deg); }
    75% { transform: translateY(-5px) rotate(-2deg); }
}


@keyframes giftBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(5deg); }
}


@keyframes confettiShake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(8deg); }
    75% { transform: rotate(-8deg); }
}


body[data-theme="happy-birthday"] .wish-badge {
    background: radial-gradient(circle,
    rgba(255,105,180,0.3) 0%,
    rgba(255,182,193,0.2) 50%,
    rgba(147,112,219,0.15) 100%);
    border-color: rgba(255,105,180,0.6);
    box-shadow: 0 0 30px rgba(255,105,180,0.5);
    animation: birthdayBadge 2s ease-in-out infinite;
}


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


body[data-theme="happy-birthday"] .hero-emoji {
    font-size: 9rem;
    filter: drop-shadow(0 25px 50px rgba(255,105,180,0.6));
    animation: cakeWiggle 3s ease-in-out infinite;
}


@keyframes cakeWiggle {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}


body[data-theme="happy-birthday"] .wish-card {
    background: linear-gradient(135deg,
    rgb(255,105,180) 0%,
    rgb(255,182,193) 35%,
    rgb(147,112,219) 70%,
    rgb(255,105,180) 100%
    );
    box-shadow:
            0 20px 50px rgba(255,105,180,0.3),
            0 0 40px rgba(147,112,219,0.2);
    animation: birthdayCardGlow 4s ease-in-out infinite;
}


@keyframes birthdayCardGlow {
    0%, 100% { box-shadow: 0 20px 50px rgba(255,105,180,0.3), 0 0 40px rgba(147,112,219,0.2); }
    50% { box-shadow: 0 20px 50px rgba(255,105,180,0.5), 0 0 60px rgba(147,112,219,0.35); }
}


body[data-theme="happy-birthday"] .wish-card-inner {
    background:
            radial-gradient(ellipse 90% 60% at 50% 100%, rgba(255,105,180,0.15) 0%, transparent 70%),
            radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255,182,193,0.12) 0%, transparent 70%),
            linear-gradient(160deg, #1a0f2e 0%, #0f0820 100%);
}


body[data-theme="happy-birthday"] .particle {
    background: rgb(255,105,180);
    box-shadow: 0 0 8px rgba(255,105,180,0.7);
}


body[data-theme="happy-birthday"] .particle:nth-child(3n) {
    background: rgb(255,182,193);
    box-shadow: 0 0 8px rgba(255,182,193,0.7);
}


body[data-theme="happy-birthday"] .particle:nth-child(3n+1) {
    background: rgb(147,112,219);
    box-shadow: 0 0 8px rgba(147,112,219,0.7);
}


/* ---------- Base ---------- */
html, body {
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


.background {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
            radial-gradient(ellipse 60% 40% at 50% 0%, rgba(var(--primary-rgb), 0.18) 0%, transparent 70%),
            radial-gradient(ellipse 70% 50% at 20% 30%, rgba(var(--accent-rgb), 0.14) 0%, transparent 65%),
            radial-gradient(ellipse 60% 45% at 80% 70%, rgba(var(--secondary-rgb), 0.12) 0%, transparent 70%),
            linear-gradient(180deg, #0a0416 0%, #050210 60%, #07030f 100%);
    animation: hueDrift 24s ease-in-out infinite;
}


@keyframes hueDrift {
    0%, 100% { filter: hue-rotate(0deg) saturate(1); }
    50% { filter: hue-rotate(15deg) saturate(1.1); }
}


.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}


.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgb(var(--secondary-rgb));
    border-radius: 50%;
    opacity: 0.6;
    box-shadow: 0 0 8px rgba(var(--secondary-rgb), 0.7);
    animation: floatUp linear infinite;
}


@keyframes floatUp {
    0%   { transform: translateY(100vh) scale(0.6); opacity: 0; }
    10%  { opacity: 0.6; }
    90%  { opacity: 0.6; }
    100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}


/* ---------- Floating hearts (Lifeline theme only) ---------- */
.hearts {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    display: none;
}


body[data-theme="lifeline"] .hearts {
    display: block;
}


/* Hide the default sparkle particles when hearts are showing */
body[data-theme="lifeline"] .particles {
    opacity: 0.35;
}


.heart {
    position: absolute;
    top: 100vh;
    line-height: 1;
    opacity: 0;
    filter: drop-shadow(0 4px 12px rgba(255, 80, 140, 0.55));
    animation: floatHeart linear infinite;
    will-change: transform, opacity;
    transform-origin: center;
}


@keyframes floatHeart {
    0%   { transform: translateY(0) translateX(0) rotate(-8deg) scale(0.6); opacity: 0; }
    10%  { opacity: 0.9; }
    25%  { transform: translateY(-25vh) translateX(20px) rotate(6deg) scale(0.95); }
    50%  { transform: translateY(-50vh) translateX(-25px) rotate(-8deg) scale(1.05); }
    75%  { transform: translateY(-75vh) translateX(15px) rotate(4deg) scale(1); }
    90%  { opacity: 0.85; }
    100% { transform: translateY(-115vh) translateX(-10px) rotate(-6deg) scale(0.9); opacity: 0; }
}


/* Bigger, beating heart badge in Lifeline mode */
body[data-theme="lifeline"] .wish-badge {
    width: 72px;
    height: 72px;
    font-size: 40px;
    background: radial-gradient(circle,
    rgba(var(--primary-rgb), 0.35) 0%,
    rgba(var(--accent-rgb), 0.15) 60%,
    transparent 100%);
    border-color: rgba(var(--primary-rgb), 0.55);
    box-shadow: 0 0 40px rgba(var(--primary-rgb), 0.55);
    animation: heartBeat 1.4s ease-in-out infinite;
}


body[data-theme="lifeline"] .hero-emoji {
    animation: heartBeat 1.4s ease-in-out infinite,
    heroFloat 5s ease-in-out infinite;
}


@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    15%      { transform: scale(1.18); }
    30%      { transform: scale(1); }
    45%      { transform: scale(1.12); }
    60%      { transform: scale(1); }
}


/* Lifeline chip gets a soft heart glow */
.chip-lifeline .chip-icon {
    background: radial-gradient(circle,
    rgba(255, 80, 140, 0.2) 0%,
    rgba(255, 80, 140, 0.05) 70%);
    border-color: rgba(255, 130, 170, 0.35);
}


/* ---------- App shell ---------- */
.app {
    position: relative;
    z-index: 2;
    max-width: 440px;
    margin: 0 auto;
    padding: 18px 18px 40px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}


/* ---------- Top bar ---------- */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 4px;
}


.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}


.icon-btn svg {
    width: 20px;
    height: 20px;
}


.icon-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.18);
}


.icon-btn:active { transform: scale(0.94); }


.icon-btn.active {
    background: rgba(var(--primary-rgb), 0.22);
    border-color: rgba(var(--primary-rgb), 0.55);
    color: rgb(var(--primary-rgb));
    box-shadow: 0 0 24px rgba(var(--primary-rgb), 0.35);
}


/* ---------- Hero ---------- */
.hero {
    position: relative;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -6px -6px 0;
    overflow: hidden;
}


.hero-glow {
    position: absolute;
    inset: -20% 10%;
    background:
            radial-gradient(ellipse 60% 55% at 50% 55%, rgba(var(--primary-rgb), 0.35) 0%, transparent 70%),
            radial-gradient(ellipse 40% 40% at 30% 60%, rgba(var(--accent-rgb), 0.28) 0%, transparent 70%),
            radial-gradient(ellipse 40% 40% at 70% 40%, rgba(var(--secondary-rgb), 0.25) 0%, transparent 70%);
    filter: blur(4px);
    animation: heroPulse 6s ease-in-out infinite;
}


@keyframes heroPulse {
    0%, 100% { opacity: 0.9; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.05); }
}


.hero-emoji {
    position: relative;
    font-size: 8rem;
    line-height: 1;
    filter: drop-shadow(0 20px 40px rgba(var(--primary-rgb), 0.5));
    animation: heroFloat 5s ease-in-out infinite;
}


@keyframes heroFloat {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50%      { transform: translateY(-10px) rotate(2deg); }
}


/* ---------- Festival selector ---------- */
.festival-selector {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 22px;
    padding: 14px 8px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}


.chips-container {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 2px 6px;
}


.chips-container::-webkit-scrollbar { display: none; }


.chip {
    flex: 0 0 auto;
    min-width: 66px;
    background: transparent;
    border: none;
    color: var(--text-soft);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 4px 2px;
    scroll-snap-align: start;
    transition: color 0.2s ease, transform 0.2s ease;
}


.chip-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 26px;
    line-height: 1;
    position: relative;
    transition: all 0.3s ease;
}


.chip-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2px;
    line-height: 1.2;
    text-align: center;
    color: var(--text-soft);
    white-space: nowrap;
}


.chip:hover .chip-icon {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}


.chip.active .chip-icon {
    border-color: rgb(var(--primary-rgb));
    box-shadow:
            0 0 0 2px rgba(var(--primary-rgb), 0.25),
            0 0 24px rgba(var(--primary-rgb), 0.55);
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.25) 0%, rgba(var(--primary-rgb), 0.05) 70%);
}


.chip.active .chip-label {
    color: #fff;
    font-weight: 600;
}


.chip:active { transform: scale(0.96); }


/* ---------- Wish card ---------- */
.wish-card {
    position: relative;
    padding: 2px;
    border-radius: 24px;
    background: linear-gradient(135deg,
    rgb(var(--secondary-rgb)) 0%,
    rgba(var(--primary-rgb), 0.9) 35%,
    rgba(var(--accent-rgb), 0.9) 70%,
    rgb(120, 200, 255) 100%
    );
    box-shadow:
            0 20px 50px rgba(var(--primary-rgb), 0.25),
            0 0 40px rgba(var(--accent-rgb), 0.15);
}


.wish-card-inner {
    position: relative;
    background:
            radial-gradient(ellipse 90% 60% at 50% 100%, rgba(var(--primary-rgb), 0.18) 0%, transparent 70%),
            radial-gradient(ellipse 80% 50% at 50% 0%, rgba(var(--accent-rgb), 0.15) 0%, transparent 70%),
            linear-gradient(160deg, #1a0f2e 0%, #0f0820 100%);
    border-radius: 22px;
    padding: 28px 22px 22px;
    text-align: center;
    overflow: hidden;
    min-height: 260px;
}


.wish-card-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
            radial-gradient(circle at 20% 40%, rgba(255,255,255,0.05) 0%, transparent 3%),
            radial-gradient(circle at 80% 60%, rgba(255,255,255,0.05) 0%, transparent 3%),
            radial-gradient(circle at 50% 30%, rgba(var(--secondary-rgb), 0.05) 0%, transparent 40%);
    pointer-events: none;
}


/* Lanterns */
.wish-lantern {
    position: absolute;
    font-size: 32px;
    filter: drop-shadow(0 4px 12px rgba(255, 165, 60, 0.6));
    opacity: 0.9;
    animation: lanternSway 4s ease-in-out infinite;
}


.wish-lantern-left {
    top: 40px;
    left: 12px;
    transform-origin: top center;
}


.wish-lantern-right {
    top: 36px;
    right: 22px;
    transform-origin: top center;
    animation-delay: 1s;
}


.wish-lantern-right-2 {
    top: 100px;
    right: 8px;
    transform-origin: top center;
    animation-delay: 2s;
    font-size: 26px;
    opacity: 0.75;
}


@keyframes lanternSway {
    0%, 100% { transform: rotate(-4deg); }
    50%      { transform: rotate(4deg); }
}


/* Badge */
.wish-badge {
    width: 54px;
    height: 54px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--secondary-rgb), 0.08);
    border: 1px solid rgba(var(--secondary-rgb), 0.35);
    font-size: 28px;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.35);
}


.wish-name {
    position: relative;
    z-index: 2;
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 700;
    font-size: 44px;
    line-height: 1.1;
    color: rgb(var(--primary-rgb));
    text-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.5);
    margin-bottom: 8px;
    word-break: break-word;
}


.wish-subline {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}


.wish-subline-text {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    color: rgba(255,255,255,0.85);
    font-size: 16px;
}


.sparkle {
    color: rgb(var(--secondary-rgb));
    font-size: 12px;
    animation: sparkle 2s ease-in-out infinite;
}


.sparkle:last-child { animation-delay: 1s; }


@keyframes sparkle {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.2); }
}


.wish-headline {
    position: relative;
    z-index: 2;
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 700;
    font-size: 30px;
    line-height: 1.15;
    background: linear-gradient(90deg,
    rgb(var(--secondary-rgb)) 0%,
    rgb(var(--primary-rgb)) 40%,
    rgb(var(--accent-rgb)) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 18px;
    letter-spacing: -0.3px;
}


.wish-divider {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}


.divider-line {
    height: 1px;
    width: 40px;
    background: linear-gradient(90deg, transparent, rgba(var(--secondary-rgb), 0.8), transparent);
}


.divider-dot {
    color: rgb(var(--secondary-rgb));
    font-size: 8px;
    opacity: 0.7;
}


.divider-emblem {
    font-size: 20px;
    filter: drop-shadow(0 2px 6px rgba(var(--secondary-rgb), 0.5));
}


/* ---------- Input ---------- */
.input-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-soft);
    padding-left: 4px;
}


.input-label-icon {
    width: 18px;
    height: 18px;
    color: rgb(var(--primary-rgb));
}


.input-wrap {
    position: relative;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    transition: border-color 0.2s ease, background 0.2s ease;
}


.input-wrap:focus-within {
    border-color: rgba(var(--primary-rgb), 0.6);
    background: rgba(var(--primary-rgb), 0.05);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}


.name-input {
    width: 100%;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    font-family: var(--font-sans);
    outline: none;
    padding: 16px 44px 16px 18px;
}


.name-input::placeholder {
    color: rgba(255,255,255,0.35);
    font-weight: 400;
}


.clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: none;
    color: rgba(255,255,255,0.55);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}


.clear-btn svg { width: 18px; height: 18px; }


.clear-btn.visible { display: flex; }


.clear-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}


/* ---------- Generate button ---------- */
.generate-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(90deg,
    rgb(var(--primary-rgb)) 0%,
    rgb(var(--secondary-rgb)) 50%,
    rgb(var(--accent-rgb)) 100%
    );
    border: none;
    border-radius: 16px;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow:
            0 12px 30px rgba(var(--primary-rgb), 0.4),
            0 0 30px rgba(var(--accent-rgb), 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}


.generate-btn svg {
    width: 22px;
    height: 22px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}


.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow:
            0 16px 40px rgba(var(--primary-rgb), 0.55),
            0 0 40px rgba(var(--accent-rgb), 0.35);
}


.generate-btn:active { transform: scale(0.98); }


/* ---------- Assurance ---------- */
.assurance {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    font-weight: 500;
}


.assurance svg {
    width: 16px;
    height: 16px;
    color: #4ade80;
}


/* ---------- Action buttons ---------- */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}


.action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}


.action-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}


.action-icon svg { width: 18px; height: 18px; }


.whatsapp-icon {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37,211,102,0.35);
}


.copy-icon {
    background: linear-gradient(135deg, #4c8bf5, #3b6dd5);
    color: #fff;
    box-shadow: 0 4px 12px rgba(76,139,245,0.35);
}


.download-icon {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: #fff;
    box-shadow: 0 4px 12px rgba(168,85,247,0.35);
}


.action-label {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    color: rgba(255,255,255,0.9);
}


.action-btn:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}


.action-btn:active { transform: scale(0.97); }


.action-whatsapp:hover {
    border-color: rgba(37,211,102,0.5);
    box-shadow: 0 8px 24px rgba(37,211,102,0.2);
}
.action-copy:hover {
    border-color: rgba(76,139,245,0.5);
    box-shadow: 0 8px 24px rgba(76,139,245,0.2);
}
.action-download:hover {
    border-color: rgba(168,85,247,0.5);
    box-shadow: 0 8px 24px rgba(168,85,247,0.2);
}


/* ---------- Toast ---------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 40px;
    transform: translate(-50%, 20px);
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 14px 22px;
    border-radius: 14px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
    z-index: 999;
    pointer-events: none;
    max-width: 90vw;
    text-align: center;
}


.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}


/* ---------- Required indicator ---------- */
.req {
    color: rgb(var(--secondary-rgb));
    margin-left: 2px;
    font-weight: 600;
}


/* ---------- Festival block wrapper ---------- */
.festival-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.festival-block .input-label {
    padding-left: 4px;
}


/* Empty state: no festival selected yet */
body.no-festival .chip .chip-icon {
    background: rgba(255,255,255,0.04);
}


body.no-festival .festival-selector {
    animation: hintPulse 2.4s ease-in-out infinite;
}


body.no-festival.attempted-generate .festival-selector {
    border-color: rgba(255, 100, 100, 0.55);
    box-shadow: 0 0 0 3px rgba(255, 100, 100, 0.15);
    animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}


@keyframes hintPulse {
    0%, 100% { border-color: rgba(255,255,255,0.06); box-shadow: none; }
    50%      { border-color: rgba(var(--primary-rgb), 0.3); box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.12); }
}


@keyframes shake {
    10%, 90%   { transform: translateX(-2px); }
    20%, 80%   { transform: translateX(3px); }
    30%, 50%, 70% { transform: translateX(-5px); }
    40%, 60%   { transform: translateX(5px); }
}


/* Wish card looks softer when no festival is picked */
body.no-festival .wish-card {
    filter: saturate(0.7);
    opacity: 0.85;
}


body.no-festival .wish-name {
    color: rgba(255,255,255,0.55);
    text-shadow: none;
}


body.no-festival .wish-headline {
    -webkit-text-fill-color: rgba(255,255,255,0.55);
    background: none;
}


body.no-festival .hero-emoji {
    opacity: 0.55;
    filter: grayscale(0.4) drop-shadow(0 20px 40px rgba(255,255,255,0.08));
}


/* ---------- Mode-based visibility ---------- */
body[data-mode="view"] .mode-create { display: none !important; }
body[data-mode="create"] .mode-view { display: none !important; }


/* Festival is locked by URL path — hide the selector, just ask for name */
body[data-path-festival][data-mode="create"] .festival-block { display: none !important; }


/* Extra emphasis in view mode */
body[data-mode="view"] .wish-card {
    box-shadow:
            0 30px 70px rgba(var(--primary-rgb), 0.35),
            0 0 60px rgba(var(--accent-rgb), 0.25);
    animation: viewCardIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}


body[data-mode="view"] .wish-name {
    font-size: 48px;
}


body[data-mode="view"] .hero {
    height: 200px;
}


@keyframes viewCardIn {
    from { opacity: 0; transform: translateY(30px) scale(0.94); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}


/* ---------- Received tag ---------- */
.received-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: center;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.12);
    border: 1px solid rgba(var(--primary-rgb), 0.35);
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.2px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: fadeSlideIn 0.6s ease-out;
}


.received-emoji {
    font-size: 15px;
    animation: heartPulse 1.6s ease-in-out infinite;
}


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


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


/* ---------- View CTA ---------- */
.view-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    animation: fadeSlideIn 0.8s ease-out 0.2s both;
}


.create-own-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 28px;
    background: linear-gradient(135deg,
    rgb(var(--primary-rgb)) 0%,
    rgb(var(--accent-rgb)) 100%
    );
    border: none;
    border-radius: 999px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow:
            0 12px 32px rgba(var(--primary-rgb), 0.45),
            0 0 30px rgba(var(--accent-rgb), 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}


.create-own-btn .heart-icon {
    font-size: 16px;
    animation: heartPulse 1.6s ease-in-out infinite;
}


.create-own-btn:hover {
    transform: translateY(-2px);
    box-shadow:
            0 16px 40px rgba(var(--primary-rgb), 0.6),
            0 0 40px rgba(var(--accent-rgb), 0.35);
}


.create-own-btn:active { transform: scale(0.97); }


.view-tagline {
    color: rgba(255,255,255,0.45);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.2px;
}


/* ---------- Confetti ---------- */
.confetti {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}


.confetti-piece {
    position: absolute;
    top: -20px;
    width: 8px;
    height: 12px;
    opacity: 0;
    animation: confettiFall linear forwards;
    will-change: transform, opacity;
}


@keyframes confettiFall {
    0%   { transform: translateY(-10vh) rotate(0deg);    opacity: 0; }
    10%  { opacity: 1; }
    100% { transform: translateY(110vh) rotate(720deg);  opacity: 0.4; }
}


/* ---------- Preview state helpers ---------- */
.hidden {
    display: none !important;
}


/* ---------- Responsive tuning ---------- */
@media (max-width: 380px) {
    .app { padding: 14px 14px 32px; gap: 18px; }
    .hero { height: 180px; }
    .hero-emoji { font-size: 6.5rem; }
    .wish-name { font-size: 36px; }
    .wish-headline { font-size: 24px; }
    .action-label { font-size: 12px; }
}


@media (min-width: 500px) {
    .app { max-width: 460px; }
}

