/* ===================== ROOT / RESET ===================== */
:root {
    --purple-deep: #241242;
    --purple-mid: #3d1e6d;
    --pink: #ff6f9c;
    --pink-deep: #ff3f7f;
    --gold: #ffd76e;
    --gold-deep: #e8ab2f;
    --cream: #fff7ec;
    --text-dark: #3a2145;
    --card-bg: rgba(255, 247, 236, 0.96);
    --shadow: 0 20px 50px rgba(30, 8, 60, 0.45);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    overflow-x: hidden;
}

body {
    background: linear-gradient(-45deg, #241242, #3d1e6d, #6a2a6e, #3d1e6d);
    background-size: 400% 400%;
    animation: gradientShift 18s ease infinite;
    min-height: 100vh;
    position: relative;
}

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

h1, h2, h3 {
    font-family: 'Dancing Script', cursive;
    margin: 0 0 0.4em;
}

p {
    margin: 0 0 1em;
    line-height: 1.6;
}

button {
    font-family: inherit;
    cursor: pointer;
}

.hidden {
    display: none !important;
}

/* ===================== BACKGROUND DECOR ===================== */
.bg-decor {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.15; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

.bg-balloon {
    position: absolute;
    bottom: -20%;
    border-radius: 50% 50% 48% 48%;
    opacity: 0.55;
    animation: floatUp linear infinite;
}

.bg-balloon::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 100%;
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.4);
    transform: translateX(-50%);
}

@keyframes floatUp {
    0% { transform: translateY(0) translateX(0) rotate(-4deg); }
    50% { transform: translateY(-55vh) translateX(30px) rotate(4deg); }
    100% { transform: translateY(-115vh) translateX(-10px) rotate(-4deg); }
}

/* Puppy paw prints walking across the background */
.bg-paw {
    position: absolute;
    font-size: 1.3rem;
    opacity: 0;
    animation: pawStep 3.4s ease forwards;
}

@keyframes pawStep {
    0% { opacity: 0; scale: 0.5; }
    12% { opacity: 0.55; scale: 1; }
    70% { opacity: 0.55; }
    100% { opacity: 0; }
}

/* Sparkles that follow the cursor / finger */
.float-emoji {
    position: fixed;
    z-index: 998;
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: floatAway 0.9s ease-out forwards;
}

@keyframes floatAway {
    from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    to { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% - var(--rise, 36px))) scale(0.4) rotate(25deg); }
}

#confetti-canvas {
    position: fixed;
    inset: 0;
    z-index: 999;
    pointer-events: none;
}

/* ===================== MUSIC BUTTON ===================== */
.music-toggle {
    position: fixed;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 450;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: calc(100vw - 32px);
    padding: 10px 16px 10px 14px;
    border: 2px solid var(--gold);
    border-radius: 999px;
    background: rgba(36, 18, 66, 0.85);
    backdrop-filter: blur(6px);
    color: var(--cream);
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.music-toggle[hidden] {
    display: none;
}

.music-toggle:hover {
    transform: translateY(-2px) scale(1.03);
}

.music-toggle:not(.playing) {
    animation: musicNudge 2s ease-in-out infinite;
}

@keyframes musicNudge {
    0%, 100% { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35); }
    50% { box-shadow: 0 0 0 6px rgba(255, 215, 110, 0.25), 0 10px 24px rgba(0, 0, 0, 0.35); }
}

.music-toggle.expanded {
    box-shadow: 0 0 30px rgba(255, 215, 110, 0.45), 0 10px 24px rgba(0, 0, 0, 0.35);
}

.music-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    animation: fadeInUp 0.5s ease both;
}

/* Little equaliser that dances while the song plays */
.music-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 16px;
    flex-shrink: 0;
}

.music-bars i {
    display: block;
    width: 3px;
    height: 4px;
    border-radius: 2px;
    background: var(--gold);
}

.music-toggle.playing .music-bars i {
    animation: eqBounce 0.9s ease-in-out infinite;
}

.music-toggle.playing .music-bars i:nth-child(2) { animation-delay: -0.3s; }
.music-toggle.playing .music-bars i:nth-child(3) { animation-delay: -0.6s; }
.music-toggle.playing .music-bars i:nth-child(4) { animation-delay: -0.15s; }

@keyframes eqBounce {
    0%, 100% { height: 4px; }
    50% { height: 16px; }
}

/* ===================== SCREENS ===================== */
.screen {
    display: none;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.screen.active {
    display: flex;
    animation: screenFade 0.6s ease;
}

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

.card {
    background: var(--card-bg);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: clamp(24px, 5vw, 48px);
    max-width: 620px;
    width: 100%;
    text-align: center;
    backdrop-filter: blur(6px);
    position: relative;
}

.section-title {
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    color: var(--pink-deep);
}

.subtitle {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    color: #6b4b7a;
}

/* ===================== BUTTONS ===================== */
.btn {
    border: none;
    border-radius: 999px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--pink), var(--pink-deep));
    color: #fff;
    box-shadow: 0 10px 25px rgba(255, 63, 127, 0.4);
}

/* Light sweep that glides across primary buttons */
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: skewX(-20deg);
    animation: btnShine 3.2s ease-in-out infinite;
    pointer-events: none;
}

.btn-primary:disabled::after {
    display: none;
}

@keyframes btnShine {
    0% { left: -75%; }
    40%, 100% { left: 130%; }
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 14px 30px rgba(255, 63, 127, 0.5);
}

.btn-ghost {
    background: transparent;
    color: var(--pink-deep);
    border: 2px solid var(--pink-deep);
    padding: 12px 28px;
}

.btn-ghost:hover {
    background: rgba(255, 63, 127, 0.08);
}

.btn-small {
    padding: 9px 20px;
    font-size: 0.85rem;
    background: linear-gradient(135deg, var(--gold), var(--gold-deep));
    color: #4a3200;
}

.btn:disabled,
.btn-locked {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-primary.unlocked {
    animation: pulseGlow 1.6s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 10px 25px rgba(255, 215, 110, 0.5); }
    50% { box-shadow: 0 10px 45px rgba(255, 215, 110, 0.95); }
}

.link-btn {
    background: none;
    border: none;
    color: #a3689b;
    text-decoration: underline;
    font-size: 0.85rem;
    margin-top: 8px;
}

/* ===================== COUNTDOWN SCREEN ===================== */
.countdown-screen {
    overflow: hidden;
}

/* Her photo, blurred and slowly drifting, fills the background */
.countdown-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(14px) brightness(0.45) saturate(1.2);
    animation: bgDrift 20s ease-in-out infinite alternate;
}

@keyframes bgDrift {
    from { transform: scale(1.15) translate(-1%, -1%); }
    to { transform: scale(1.25) translate(1%, 1%); }
}

.countdown-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: radial-gradient(ellipse at 50% 30%, rgba(61, 30, 109, 0.3), rgba(36, 18, 66, 0.85));
}

.countdown-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 560px;
    text-align: center;
    color: #fff;
}

.countdown-photo-ring {
    position: relative;
    width: 170px;
    aspect-ratio: 3 / 4;
    margin: 0 auto 26px;
    animation: fadeInUp 0.9s ease both;
}

.countdown-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
    border-radius: 999px 999px 18px 18px;
    border: 4px solid var(--gold);
    animation: photoGlow 3s ease-in-out infinite;
}

@keyframes photoGlow {
    0%, 100% { box-shadow: 0 0 0 6px rgba(255, 111, 156, 0.35), 0 0 30px rgba(255, 215, 110, 0.3), 0 20px 50px rgba(0, 0, 0, 0.5); }
    50% { box-shadow: 0 0 0 10px rgba(255, 111, 156, 0.2), 0 0 60px rgba(255, 215, 110, 0.6), 0 20px 50px rgba(0, 0, 0, 0.5); }
}

.countdown-lock {
    position: absolute;
    bottom: -16px;
    left: 50%;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    transform: translateX(-50%);
    animation: lockWiggle 2.5s ease-in-out infinite;
}

@keyframes lockWiggle {
    0%, 80%, 100% { transform: translateX(-50%) rotate(0deg); }
    85% { transform: translateX(-50%) rotate(-14deg); }
    90% { transform: translateX(-50%) rotate(12deg); }
    95% { transform: translateX(-50%) rotate(-6deg); }
}

.countdown-title {
    font-size: clamp(2rem, 7vw, 3rem);
    color: var(--gold);
    text-shadow: 0 0 24px rgba(255, 111, 156, 0.6);
    text-wrap: balance;
    animation: fadeInUp 0.9s ease 0.2s both;
}

.countdown-sub {
    color: #f3e3f7;
    text-wrap: balance;
    animation: fadeInUp 0.9s ease 0.35s both;
}

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    max-width: 460px;
    margin: 24px auto 18px;
    animation: fadeInUp 0.9s ease 0.5s both;
}

.cd-box {
    padding: 14px 4px 10px;
    border: 1px solid rgba(255, 215, 110, 0.45);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 10px 24px rgba(0, 0, 0, 0.3);
    perspective: 300px;
}

.cd-num {
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2.4rem, 11vw, 3.6rem);
    line-height: 1;
    color: #fff;
    text-shadow: 0 0 18px rgba(255, 111, 156, 0.7);
    animation: cdFlip 0.5s cubic-bezier(0.3, 1.5, 0.5, 1);
}

@keyframes cdFlip {
    from { opacity: 0; transform: rotateX(90deg) scale(0.8); }
    to { opacity: 1; transform: none; }
}

.cd-label {
    display: block;
    margin-top: 4px;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold);
}

.countdown-note {
    font-size: 0.85rem;
    color: #caa8d6;
    animation: fadeInUp 0.9s ease 0.65s both;
}

/* ===================== LOGIN SCREEN ===================== */
.lock-wrap {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lock-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 110, 0.55), transparent 70%);
    animation: ringPulse 2.4s ease-in-out infinite;
}

@keyframes ringPulse {
    0%, 100% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.15); opacity: 1; }
}

.lock-icon {
    font-size: 2.6rem;
    z-index: 1;
}

.site-title {
    font-size: clamp(2rem, 6vw, 2.8rem);
    background: linear-gradient(135deg, var(--gold-deep), var(--pink-deep));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.login-question {
    font-weight: 600;
    color: var(--text-dark);
}

#login-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 6px;
}

#login-input {
    flex: 1 1 220px;
    padding: 14px 18px;
    border-radius: 999px;
    border: 2px solid #eecfe0;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease;
}

#login-input:focus {
    border-color: var(--pink-deep);
}

.login-feedback {
    min-height: 1.4em;
    font-weight: 600;
}

.login-feedback.error {
    color: #d1436a;
    animation: shake 0.4s ease;
}

.login-feedback.success {
    color: #2f9e5a;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.hint-text {
    font-size: 0.85rem;
    color: #8a6c92;
    margin-top: 6px;
}

/* ===================== WELCOME SCREEN ===================== */
.welcome-heading {
    font-size: clamp(2.1rem, 7vw, 3.2rem);
    color: var(--pink-deep);
    min-height: 1.3em;
}

.welcome-heading .typed-cursor {
    display: inline-block;
    width: 2px;
    background: var(--pink-deep);
    margin-left: 2px;
    animation: blink 0.8s steps(1) infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.welcome-message {
    font-style: italic;
    color: #6b4b7a;
}

.cake-wrap {
    margin: 20px 0;
}

.cake {
    position: relative;
    width: 200px;
    height: 150px;
    margin: 0 auto 8px;
}

.cake-plate {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 190px;
    height: 14px;
    background: linear-gradient(180deg, #f2c9e0, #e2a4c9);
    border-radius: 50%;
}

.cake-layer {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 10px;
}

.cake-layer-bottom {
    bottom: 12px;
    width: 170px;
    height: 55px;
    background: linear-gradient(180deg, #ffb6d5, #ff8fb8);
}

.cake-layer-top {
    bottom: 62px;
    width: 120px;
    height: 42px;
    background: linear-gradient(180deg, #ffd9ea, #ffb6d5);
}

.cake-drip {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 130px;
    height: 14px;
    background: var(--cream);
    border-radius: 0 0 40px 40px;
    box-shadow: 0 4px 0 -1px var(--cream);
}

.cake-number {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-shadow: 0 2px 0 var(--pink-deep), 0 0 12px rgba(255, 255, 255, 0.8);
    animation: cakeNumber 2.4s ease-in-out infinite;
}

@keyframes cakeNumber {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.12); }
}

.candles {
    position: absolute;
    bottom: 104px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 14px;
}

.candle {
    position: relative;
    width: 6px;
    height: 34px;
    background: repeating-linear-gradient(180deg, var(--gold) 0 6px, var(--gold-deep) 6px 12px);
    border-radius: 3px;
    cursor: pointer;
}

.candle .flame {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.1rem;
    transition: opacity 0.2s ease, transform 0.2s ease;
    animation: flicker 0.5s ease-in-out infinite alternate;
}

@keyframes flicker {
    from { transform: translateX(-50%) scale(1) rotate(-2deg); }
    to { transform: translateX(-50%) scale(1.15) rotate(2deg); }
}

.candle.out .flame {
    opacity: 0;
    transform: translateX(-50%) scale(0.4);
}

.candle.out::after {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    width: 10px;
    height: 16px;
    background: radial-gradient(circle, rgba(180, 180, 180, 0.6), transparent 70%);
    transform: translateX(-50%);
    animation: smokeRise 1s ease forwards;
}

@keyframes smokeRise {
    from { opacity: 0.8; transform: translate(-50%, 0) scale(0.6); }
    to { opacity: 0; transform: translate(-50%, -26px) scale(1.4); }
}

.cake-hint {
    font-size: 0.85rem;
    color: #8a6c92;
    margin-bottom: 0;
}

.wish-made {
    font-weight: 600;
    color: var(--gold-deep);
    animation: screenFade 0.6s ease;
}

/* ===================== TREASURE SCREEN ===================== */
.chest-wrap {
    perspective: 900px;
    margin: 30px auto;
}

.chest {
    position: relative;
    width: 200px;
    height: 150px;
    margin: 0 auto;
    cursor: pointer;
}

.chest-glow {
    position: absolute;
    left: 50%;
    top: 30%;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(255, 215, 110, 0.9), transparent 70%);
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 0;
    transition: transform 1s ease, opacity 1s ease;
    pointer-events: none;
}

.chest.open .chest-glow {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.7);
    animation: glowPulse 2.4s ease-in-out infinite 1s;
}

@keyframes glowPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

.chest-body {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 105px;
    background: linear-gradient(180deg, #b5722f, #8a4f1e);
    border: 4px solid var(--gold-deep);
    border-radius: 0 0 16px 16px;
    box-shadow: inset 0 -10px 20px rgba(0, 0, 0, 0.25);
}

.chest-body::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -4px;
    transform: translateX(-50%);
    width: 14px;
    height: 40px;
    background: var(--gold-deep);
    border-radius: 4px;
}

.chest-lock {
    position: absolute;
    left: 50%;
    top: -6px;
    transform: translate(-50%, 0);
    font-size: 1.4rem;
    background: var(--gold);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: 2;
}

.chest.open .chest-lock {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.3) rotate(30deg);
}

.chest-lid {
    position: absolute;
    top: 0;
    left: -4px;
    width: calc(100% + 8px);
    height: 65px;
    background: linear-gradient(180deg, #d68a3c, #b5722f);
    border: 4px solid var(--gold-deep);
    border-radius: 50% 50% 0 0 / 40px 40px 0 0;
    transform-origin: bottom center;
    transition: transform 1s cubic-bezier(0.4, 1.6, 0.4, 1);
    box-shadow: inset 0 6px 14px rgba(255, 255, 255, 0.2);
}

.chest.open .chest-lid {
    transform: rotateX(-120deg) translateY(-6px);
}

.letter-wrap {
    margin-top: 30px;
    animation: letterRise 0.8s ease;
}

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

.letter-paper {
    background: var(--cream);
    border-radius: 14px;
    padding: clamp(20px, 5vw, 36px);
    text-align: left;
    box-shadow: 0 14px 34px rgba(60, 20, 60, 0.3);
    border: 1px solid #ecd3c8;
}

.letter-paper h3 {
    font-size: 1.8rem;
    color: var(--pink-deep);
}

/* Letter lines fade in one by one (delays set in JS) */
.letter-paper h3,
.letter-paper p,
.letter-signature {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.letter-paper p {
    color: var(--text-dark);
    line-height: 1.75;
}

.letter-signature {
    text-align: right;
    font-style: italic;
    font-family: 'Dancing Script', cursive;
    font-size: 1.4rem;
    color: var(--gold-deep);
    margin-top: 18px;
}

/* ===================== GRAND ENTRANCE ===================== */
.entrance-screen {
    background: radial-gradient(ellipse at 50% 40%, rgba(255, 215, 110, 0.12), transparent 60%);
    cursor: pointer;
}

.entrance-wrap {
    position: relative;
    text-align: center;
    padding: 20px;
}

.entrance-age {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 0;
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(11rem, 55vw, 24rem);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2px rgba(255, 215, 110, 0.45);
    text-shadow: 0 0 60px rgba(255, 111, 156, 0.35);
    transform: translate(-50%, -55%) scale(0.2);
    opacity: 0;
    animation: ageZoom 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards, agePulse 3s ease-in-out 1.8s infinite;
    pointer-events: none;
}

@keyframes ageZoom {
    to { opacity: 1; transform: translate(-50%, -55%) scale(1); }
}

@keyframes agePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.entrance-wrap > *:not(.entrance-age) {
    position: relative;
    z-index: 1;
}

.entrance-name {
    font-family: 'Dancing Script', cursive;
    font-weight: 700;
    font-size: clamp(3rem, 15vw, 6.5rem);
    background: linear-gradient(135deg, var(--gold), var(--pink-deep) 60%, var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 60px rgba(255, 215, 110, 0.5);
    opacity: 0;
    transform: scale(0.4);
    animation: entranceZoom 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes entranceZoom {
    0% { opacity: 0; transform: scale(0.3) rotate(-4deg); }
    60% { opacity: 1; transform: scale(1.12) rotate(1deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.entrance-sub {
    color: #f3e3f7;
    font-size: clamp(1rem, 3vw, 1.3rem);
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 1.2s;
}

.entrance-tap {
    color: #caa8d6;
    font-size: 0.85rem;
    opacity: 0;
    animation: fadeInUp 1s ease forwards, tapPulse 1.8s ease-in-out infinite 2.4s;
    animation-delay: 2s;
}

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

@keyframes tapPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ===================== LITTLE ANU (CHILDHOOD) ===================== */
.childhood-card {
    max-width: 760px;
}

.child-timeline {
    position: relative;
    margin: 28px 0 8px;
}

/* Glowing line running down the middle of the timeline */
.child-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    transform: translateX(-50%);
    border-radius: 4px;
    background: linear-gradient(180deg, var(--gold), var(--pink), #a86bd4);
    box-shadow: 0 0 12px rgba(255, 111, 156, 0.5);
}

.child-item {
    position: relative;
    width: 50%;
    padding: 0 34px 34px;
}

.child-item.right {
    margin-left: 50%;
}

.child-dot {
    position: absolute;
    top: 18px;
    z-index: 1;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 3px solid var(--gold);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 6px 14px rgba(60, 20, 60, 0.25);
    transform: scale(0);
    transition: transform 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) 0.25s;
}

.child-item.left .child-dot { right: -21px; }
.child-item.right .child-dot { left: -21px; }

.child-item.visible .child-dot {
    transform: scale(1);
}

.child-frame {
    margin: 0;
    padding: 10px 10px 12px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(60, 20, 60, 0.22);
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

.child-item.left .child-frame { transform: translateX(-60px) rotate(-10deg); }
.child-item.right .child-frame { transform: translateX(60px) rotate(10deg); }

.child-item.visible .child-frame {
    opacity: 1;
    transform: rotate(var(--tilt, 0deg));
}

.child-item.visible .child-frame:hover {
    transform: rotate(0deg) scale(1.04);
    transition-duration: 0.3s;
}

/* Soft vintage tint that fades away on hover */
.child-frame img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center 25%;
    border-radius: 4px;
    filter: sepia(0.18) saturate(1.05);
    transition: filter 0.4s ease;
}

.child-frame:hover img {
    filter: none;
}

.child-frame figcaption {
    margin-top: 10px;
    font-family: 'Dancing Script', cursive;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
    color: #7a4a86;
    text-align: center;
    text-wrap: balance;
}

.child-chapter {
    display: block;
    margin-bottom: 3px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.16em;
    color: var(--pink-deep);
}

/* ---- "And now... 25" finale ---- */
.child-now {
    margin: 6px 0 26px;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}

.child-now.visible {
    opacity: 1;
    transform: none;
}

.child-now-ring {
    position: relative;
    width: 170px;
    height: 170px;
    margin: 0 auto 16px;
}

/* Spinning rainbow-gold ring behind the photo */
.child-now-ring::before {
    content: '';
    position: absolute;
    inset: -7px;
    border-radius: 50%;
    background: conic-gradient(var(--gold), var(--pink), #a86bd4, var(--pink-deep), var(--gold));
    animation: spin 4s linear infinite;
}

.child-now-img {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid #fff;
    object-fit: cover;
    object-position: center 30%;
}

.child-now-age {
    position: absolute;
    right: -8px;
    bottom: -4px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: linear-gradient(135deg, var(--pink), var(--pink-deep));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    box-shadow: 0 6px 16px rgba(255, 63, 127, 0.45);
    animation: cakeNumber 2s ease-in-out infinite;
}

.child-now-text {
    margin: 0 0 4px;
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.7rem, 5vw, 2.2rem);
    font-weight: 700;
    color: var(--pink-deep);
}

.child-now-sub {
    color: #6b4b7a;
}

/* On phones the timeline line moves to the left edge */
@media (max-width: 600px) {
    .child-timeline::before {
        left: 21px;
    }

    .child-item,
    .child-item.right {
        width: 100%;
        margin-left: 0;
        padding: 0 0 30px 56px;
    }

    .child-item.left .child-dot,
    .child-item.right .child-dot {
        left: 0;
        right: auto;
    }

    .child-item.left .child-frame,
    .child-item.right .child-frame {
        transform: translateX(50px) rotate(8deg);
    }

    .child-item.visible .child-frame {
        transform: rotate(var(--tilt, 0deg));
    }
}

/* ===================== PHOTO GALLERY ===================== */
.gallery-card {
    max-width: 780px;
}

/* Puppy sitting on the gallery card */
.gallery-card::before {
    content: '🐶';
    position: absolute;
    top: -30px;
    right: 28px;
    font-size: 2.2rem;
    animation: puppyBob 2.8s ease-in-out infinite;
}

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

.polaroid-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 16px;
    margin: 22px 0 28px;
}

.polaroid {
    position: relative;
    background: #fff;
    padding: 8px 8px 10px;
    border-radius: 6px;
    box-shadow: 0 8px 18px rgba(60, 20, 60, 0.25);
    cursor: pointer;
    opacity: 0;
    transform: translateY(24px) rotate(var(--tilt, 0deg)) scale(0.85);
    animation: polaroidIn 0.6s ease forwards;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.polaroid:hover {
    transform: rotate(0deg) scale(1.06) translateY(-4px);
    box-shadow: 0 14px 28px rgba(60, 20, 60, 0.35);
    z-index: 2;
}

@keyframes polaroidIn {
    to { opacity: 1; transform: translateY(0) rotate(var(--tilt, 0deg)) scale(1); }
}

/* Washi tape holding each polaroid up */
.polaroid::before {
    content: '';
    position: absolute;
    top: -9px;
    left: 50%;
    width: 54px;
    height: 18px;
    transform: translateX(-50%) rotate(-4deg);
    background: rgba(255, 215, 110, 0.8);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.polaroid:nth-child(3n + 2)::before {
    background: rgba(255, 111, 156, 0.7);
    transform: translateX(-50%) rotate(3deg);
}

.polaroid:nth-child(3n)::before {
    background: rgba(168, 107, 212, 0.6);
    transform: translateX(-50%) rotate(-2deg);
}

.polaroid img {
    transition: filter 0.25s ease;
}

.polaroid:hover img {
    filter: saturate(1.2) brightness(1.05);
}

.polaroid img {
    width: 100%;
    aspect-ratio: 1 / 1.02;
    object-fit: cover;
    object-position: center 22%;
    border-radius: 3px;
    display: block;
}

.polaroid-cap {
    text-align: center;
    font-family: 'Dancing Script', cursive;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.15;
    color: #7a4a86;
    margin-top: 8px;
    padding: 0 2px;
    min-height: 2.3em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Lightbox ---- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(15, 6, 26, 0.94);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox.open {
    display: flex;
    animation: screenFade 0.3s ease;
}

.lightbox-frame {
    max-width: min(500px, 86vw);
    text-align: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 68vh;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: lbZoom 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

@keyframes lbZoom {
    from { opacity: 0; transform: scale(0.85) rotate(-2deg); }
    to { opacity: 1; transform: none; }
}

.lightbox-caption {
    color: var(--cream);
    margin: 14px 0 0;
    font-family: 'Dancing Script', cursive;
    font-size: 1.5rem;
    animation: fadeInUp 0.5s ease 0.1s both;
}

.lightbox-close {
    position: fixed;
    top: env(safe-area-inset-top, 18px);
    right: 18px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.1rem;
}

.lightbox-nav {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ===================== MEMORY REEL ===================== */
.reel-trigger {
    display: block;
    margin: 22px auto 0;
}

.memory-reel {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 400;
    background: radial-gradient(ellipse at center, #241242 0%, #0f0616 85%);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 16px;
}

.memory-reel.open {
    display: flex;
    animation: screenFade 0.4s ease;
}

.reel-slide-wrap {
    position: relative;
    width: min(520px, 90vw);
    height: min(520px, 62vh);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    background: #000;
}

.reel-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.15);
    transition: opacity 1.2s ease;
}

.reel-slide.active {
    opacity: 1;
    animation: kenBurns 4.2s ease-in-out forwards;
}

@keyframes kenBurns {
    from { transform: scale(1.15) translate(1%, -1%); }
    to { transform: scale(1.32) translate(-2%, 2%); }
}

.reel-progress {
    width: min(520px, 90vw);
    height: 3px;
    margin-top: 14px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.15);
    overflow: hidden;
}

#reel-progress-fill {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--pink));
    animation: reelProgress 4.2s linear forwards;
}

@keyframes reelProgress {
    to { width: 100%; }
}

.reel-caption {
    color: var(--cream);
    margin-top: 12px;
    font-family: 'Dancing Script', cursive;
    font-size: 1.7rem;
    text-align: center;
    max-width: 520px;
    min-height: 1.4em;
    animation: fadeInUp 0.7s ease both;
}

.reel-close {
    position: fixed;
    top: env(safe-area-inset-top, 18px);
    right: 18px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.1rem;
    z-index: 401;
}

/* ===================== THALAPATHY SPECIAL ===================== */
.thala-screen {
    background: radial-gradient(ellipse at 50% 30%, #3a0b12 0%, #12040a 55%, #050105 100%);
    overflow: hidden;
    color: #fff;
}

/* Cinema letterbox bars */
.thala-screen::before,
.thala-screen::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 22px;
    background: #000;
    z-index: 8;
}

.thala-screen::before { top: 0; }
.thala-screen::after { bottom: 0; }

/* Two golden spotlight beams sweeping behind the poster */
.thala-beams span {
    position: absolute;
    bottom: -10%;
    width: 38vw;
    max-width: 380px;
    height: 140vh;
    background: linear-gradient(to top, rgba(255, 215, 110, 0.32), transparent 75%);
    clip-path: polygon(45% 100%, 55% 100%, 100% 0, 0 0);
    transform-origin: 50% 100%;
    filter: blur(4px);
    animation: beamSweep 5s ease-in-out infinite alternate;
}

.thala-beams span:first-child {
    left: 0;
    --from: -25deg;
    --to: 20deg;
}

.thala-beams span:last-child {
    right: 0;
    --from: 25deg;
    --to: -20deg;
    animation-delay: -2.5s;
}

@keyframes beamSweep {
    from { transform: rotate(var(--from)); }
    to { transform: rotate(var(--to)); }
}

/* ---- Intro: 3-2-1 countdown, then the mass entry shot ---- */
.thala-intro {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #050105;
    cursor: pointer;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.thala-screen.revealed .thala-intro {
    opacity: 0;
    visibility: hidden;
}

.thala-count {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(7rem, 38vw, 14rem);
    line-height: 1;
    color: var(--gold);
    text-shadow: 0 0 40px rgba(255, 63, 63, 0.8);
    animation: countSlam 0.7s ease forwards;
}

@keyframes countSlam {
    0% { opacity: 0; transform: scale(2.6); }
    30% { opacity: 1; transform: scale(1); }
    80% { opacity: 1; transform: scale(0.95); }
    100% { opacity: 0; transform: scale(0.7); }
}

.thala-entry {
    position: absolute;
    inset: 0;
    display: none;
    overflow: hidden;
}

.thala-screen.entry .thala-entry {
    display: block;
}

.thala-entry-bg,
.thala-entry-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.thala-entry-bg {
    object-fit: cover;
    filter: blur(18px) brightness(0.45);
    transform: scale(1.2);
}

.thala-entry-img {
    object-fit: contain;
    filter: saturate(1.3) contrast(1.1) brightness(0.85);
    animation: entryZoom 1.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes entryZoom {
    from { transform: scale(1.6); }
    to { transform: scale(1.02); }
}

.thala-entry::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, transparent 35%, rgba(120, 0, 10, 0.75) 100%);
}

.thala-speedlines {
    position: absolute;
    inset: -50%;
    z-index: 1;
    background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.16) 0deg 1.5deg, transparent 1.5deg 9deg);
    -webkit-mask: radial-gradient(circle, transparent 22%, #000 60%);
    mask: radial-gradient(circle, transparent 22%, #000 60%);
    animation: spin 1.4s linear infinite;
}

.thala-entry-text {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14%;
    z-index: 2;
    margin: 0;
    text-align: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3.5rem, 16vw, 7rem);
    letter-spacing: 0.08em;
    color: #fff;
    text-shadow: 4px 4px 0 #d7263d, 0 0 30px rgba(255, 215, 110, 0.8);
    animation: entrySlam 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) 0.35s both;
}

@keyframes entrySlam {
    from { opacity: 0; transform: scale(3) rotate(-6deg); }
    to { opacity: 1; transform: scale(1) rotate(-3deg); }
}

.thala-flash {
    position: absolute;
    inset: 0;
    z-index: 7;
    background: #fff;
    opacity: 0;
    pointer-events: none;
}

.thala-screen.revealed .thala-flash {
    animation: flashOut 0.8s ease-out;
}

@keyframes flashOut {
    from { opacity: 0.95; }
    to { opacity: 0; }
}

/* ---- Poster stage ---- */
.thala-stage {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 380px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.6s ease 0.1s;
}

.thala-screen.revealed .thala-stage {
    opacity: 1;
}

.thala-stage.shake {
    animation: bigShake 0.45s ease;
}

@keyframes bigShake {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(-7px, 4px); }
    40% { transform: translate(6px, -5px); }
    60% { transform: translate(-5px, 3px); }
    80% { transform: translate(4px, -2px); }
}

.thala-kicker,
.thala-tagline,
.thala-credits,
.thala-punch,
.polaroid-cap,
.lightbox-caption,
.reel-caption {
    text-wrap: balance;
}

.thala-kicker {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 14px;
}

.thala-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 14px;
    overflow: hidden;
    border: 3px solid var(--gold);
    opacity: 0;
    transform: translateY(40px) scale(0.9);
}

.thala-screen.revealed .thala-poster {
    animation: posterIn 0.9s cubic-bezier(0.2, 0.9, 0.25, 1.2) forwards, posterGlow 2.6s ease-in-out 1s infinite;
}

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

@keyframes posterGlow {
    0%, 100% { box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 63, 63, 0.3); }
    50% { box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 60px rgba(255, 215, 110, 0.55); }
}

/* Glossy shine that sweeps across the poster */
.thala-poster::after {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    z-index: 4;
    width: 40%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-18deg);
    animation: posterShine 4s ease-in-out 1.6s infinite;
    pointer-events: none;
}

@keyframes posterShine {
    0% { left: -60%; }
    35%, 100% { left: 130%; }
}

.thala-hero {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 60%;
}

.thala-screen.revealed .thala-hero {
    animation: heroZoom 8s ease-out forwards;
}

@keyframes heroZoom {
    from { transform: scale(1.18); }
    to { transform: scale(1.02); }
}

.thala-shade {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(to top, rgba(10, 2, 6, 0.95) 0%, rgba(120, 10, 20, 0.55) 36%, transparent 60%),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent 22%);
}

.thala-cert {
    position: absolute;
    top: 4%;
    right: 4%;
    z-index: 3;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    background: rgba(0, 0, 0, 0.55);
    color: var(--gold);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.05rem;
    line-height: 1;
}

.thala-cert small {
    font-family: 'Poppins', sans-serif;
    font-size: 0.45rem;
    letter-spacing: 0.08em;
}

/* Optional Thalapathy photo + speech bubble (only when photos/thalapathy.jpg exists) */
.thala-star-wrap {
    position: absolute;
    top: 4%;
    left: 4%;
    z-index: 3;
    width: 80%;
    display: none;
    align-items: flex-start;
    gap: 10px;
}

.thala-poster.has-star .thala-star-wrap {
    display: flex;
}

.thala-star {
    width: 34%;
    aspect-ratio: 3 / 4;
    border-radius: 999px 999px 12px 12px;
    object-fit: cover;
    object-position: center 20%;
    border: 3px solid var(--gold);
    box-shadow: 0 0 0 3px rgba(215, 38, 61, 0.8), 0 8px 20px rgba(0, 0, 0, 0.5);
    opacity: 0;
}

.thala-screen.revealed .thala-star {
    animation: starIn 0.6s cubic-bezier(0.3, 1.5, 0.5, 1) 1.3s forwards;
}

@keyframes starIn {
    from { opacity: 0; transform: translateX(-40px) scale(0.6) rotate(-12deg); }
    to { opacity: 1; transform: none; }
}

.thala-bubble {
    position: relative;
    margin-top: 8%;
    max-width: 58%;
    padding: 8px 12px;
    border-radius: 14px;
    background: #fff;
    color: #2a0a10;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: left;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform-origin: left center;
}

.thala-bubble::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 12px;
    border: 7px solid transparent;
    border-left: 0;
    border-right-color: #fff;
}

.thala-screen.revealed .thala-bubble {
    animation: bubblePop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) 1.8s forwards;
}

@keyframes bubblePop {
    from { opacity: 0; transform: scale(0.4); }
    to { opacity: 1; transform: scale(1); }
}

.thala-poster-text {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    padding: 0 16px 14px;
}

.thala-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    background: #d7263d;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(215, 38, 61, 0.5);
    opacity: 0;
}

.thala-screen.revealed .thala-tag {
    animation: fadeInUp 0.5s ease 0.2s forwards;
}

.thala-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(4.2rem, 21vw, 6.4rem);
    line-height: 0.9;
    letter-spacing: 0.08em;
    margin: 6px 0 2px;
}

.thala-title span {
    display: inline-block;
    opacity: 0;
    background: linear-gradient(180deg, #fffbe6 0%, #ffd76e 45%, #e8ab2f 62%, #fff1b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 3px 0 #7a0d1a) drop-shadow(0 0 16px rgba(255, 80, 60, 0.55));
}

.thala-title span.digit {
    background: linear-gradient(180deg, #fff 0%, #ff8a8a 35%, #d7263d 70%, #8a0f1f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 3px 0 #3a0008) drop-shadow(0 0 18px rgba(255, 215, 110, 0.6));
}

.thala-screen.revealed .thala-title span {
    animation: letterSlam 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) forwards;
}

@keyframes letterSlam {
    0% { opacity: 0; transform: scale(3) translateY(-10px); }
    60% { opacity: 1; transform: scale(0.92); }
    100% { opacity: 1; transform: scale(1); }
}

.thala-tagline {
    margin: 0 0 8px;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #fff;
    opacity: 0;
}

.thala-screen.revealed .thala-tagline {
    animation: fadeInUp 0.6s ease 1.1s forwards;
}

.thala-credits {
    margin: 0;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 215, 110, 0.35);
    font-size: 0.52rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    opacity: 0;
}

.thala-screen.revealed .thala-credits {
    animation: fadeInUp 0.6s ease 1.3s forwards;
}

.thala-punch {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.4em;
    margin: 18px 0 10px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(1.4rem, 5.5vw, 1.9rem);
    line-height: 1.15;
    letter-spacing: 0.05em;
    color: var(--gold);
    text-shadow: 2px 2px 0 #7a0d1a, 0 0 18px rgba(255, 80, 60, 0.5);
    animation: punchSlam 0.5s cubic-bezier(0.3, 1.5, 0.5, 1);
}

@keyframes punchSlam {
    from { opacity: 0; transform: scale(1.7); filter: blur(4px); }
    to { opacity: 1; transform: scale(1); filter: blur(0); }
}

.thala-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.thala-btn {
    background: linear-gradient(135deg, var(--gold), var(--gold-deep));
    color: #3a1500;
    box-shadow: 0 10px 25px rgba(232, 171, 47, 0.45);
}

.thala-btn:hover {
    transform: translateY(-3px) scale(1.03);
}

.thala-btn:active {
    transform: scale(0.95);
}

.photo-credit {
    margin: 14px 0 0;
    font-size: 0.6rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.45);
}

/* ===================== 25 WISHES ===================== */
.wishes-card {
    max-width: 560px;
}

.wish-display {
    position: relative;
    min-height: 118px;
    margin: 16px 0 20px;
    padding: 18px 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, #3d1e6d, #6a2a6e);
    color: #fff;
    box-shadow: 0 12px 30px rgba(61, 30, 109, 0.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Soft glow drifting across the wish panel */
.wish-display::before {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 110, 0.35), transparent 70%);
    animation: glowDrift 6s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes glowDrift {
    from { transform: translate(-140px, -30px); }
    to { transform: translate(140px, 30px); }
}

.wish-display-num {
    position: relative;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.18em;
    color: var(--gold);
    animation: fadeInUp 0.4s ease both;
}

.wish-display-text {
    position: relative;
    margin: 6px 0 0;
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.35rem, 4.5vw, 1.7rem);
    font-weight: 700;
    line-height: 1.3;
    text-wrap: balance;
    animation: wishReveal 0.6s cubic-bezier(0.3, 1.4, 0.5, 1) both;
}

@keyframes wishReveal {
    from { opacity: 0; transform: scale(0.8) translateY(10px); filter: blur(3px); }
    to { opacity: 1; transform: none; filter: blur(0); }
}

.wish-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    max-width: 400px;
    margin: 0 auto 12px;
}

.wish-tile {
    aspect-ratio: 1;
    padding: 0;
    border: none;
    background: none;
    perspective: 500px;
    animation: popIn 0.4s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}

.wish-tile-inner {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
}

.wish-tile:hover:not(.opened) .wish-tile-inner {
    transform: translateY(-4px) rotate(-4deg);
}

.wish-tile.opened .wish-tile-inner {
    transform: rotateY(180deg);
}

.wish-face {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    backface-visibility: hidden;
}

.wish-front {
    background: linear-gradient(135deg, var(--gold), var(--gold-deep));
    color: #4a3200;
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(1.3rem, 5vw, 1.7rem);
    box-shadow: 0 6px 14px rgba(232, 171, 47, 0.45), inset 0 -3px 0 rgba(0, 0, 0, 0.12);
}

.wish-back {
    background: linear-gradient(135deg, var(--pink), var(--pink-deep));
    font-size: clamp(1.1rem, 4.5vw, 1.5rem);
    transform: rotateY(180deg);
    box-shadow: 0 6px 14px rgba(255, 63, 127, 0.35);
}

.wish-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: #8a6c92;
}

.wish-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

/* ---- Thalapathy clapping pop-up ---- */
.clap-pop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 350;
    padding: 20px;
    align-items: center;
    justify-content: center;
    background: rgba(15, 4, 10, 0.88);
    backdrop-filter: blur(4px);
}

.clap-pop.open {
    display: flex;
    animation: screenFade 0.4s ease;
}

.clap-card {
    width: min(340px, 100%);
    padding: 22px 20px 16px;
    border-radius: 22px;
    border: 3px solid var(--gold);
    background: radial-gradient(ellipse at 50% 0%, #3a0b12, #12040a 75%);
    text-align: center;
    box-shadow: 0 0 50px rgba(255, 215, 110, 0.35);
    animation: clapIn 0.7s cubic-bezier(0.3, 1.5, 0.5, 1);
}

@keyframes clapIn {
    from { transform: scale(0.5) rotate(-6deg); opacity: 0; }
    to { transform: none; opacity: 1; }
}

.clap-img {
    width: 70%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: center 20%;
    border-radius: 999px 999px 14px 14px;
    border: 3px solid var(--gold);
    box-shadow: 0 0 0 4px rgba(215, 38, 61, 0.7), 0 12px 30px rgba(0, 0, 0, 0.5);
    animation: clapBounce 0.9s ease-in-out infinite;
}

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

.clap-text {
    margin: 16px 0 14px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    line-height: 1.15;
    letter-spacing: 0.04em;
    color: var(--gold);
    text-shadow: 2px 2px 0 #7a0d1a;
    text-wrap: balance;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 420px) {
    .cake {
        transform: scale(0.85);
    }
}
