/* ================================================================
   1ST ANNIVERSARY CELEBRATION — Aahuti Sinha & Pratik Naiya
   ================================================================ */

/* ---- Pre-paint boot gating for chat.php splash ---- */
html.anniv-boot-show #splashOverlay { display: none !important; }
html.anniv-boot-show .chat-shell { animation-delay: 0s; }
html.anniv-boot-greeting .chat-shell { animation-delay: 2.52s; }
html:not(.anniv-boot-greeting) .splash-anniv-content { display: none; }
html.anniv-boot-greeting .splash-default-content { display: none; }
html.anniv-boot-greeting #splashOverlay {
    background:
        radial-gradient(circle at 50% 38%, rgba(255, 79, 152, 0.16), transparent 52%),
        radial-gradient(circle at 30% 72%, rgba(255, 200, 110, 0.10), transparent 44%),
        #05030b;
}

.splash-anniv-emblem {
    position: relative;
    width: 122px;
    height: 122px;
    display: grid;
    place-items: center;
    margin-bottom: 24px;
}
.splash-anniv-star {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 26px;
    border: 1px solid rgba(255, 214, 145, 0.34);
    background: radial-gradient(circle at 30% 25%, rgba(255, 115, 179, 0.34), rgba(102, 74, 215, 0.28) 65%, rgba(18, 12, 34, 0.9));
    box-shadow: 0 22px 58px rgba(255, 86, 155, 0.34), 0 0 28px rgba(255, 209, 125, 0.22), inset 0 1px rgba(255, 255, 255, 0.35);
    animation: annivStarBreath 2.6s ease-in-out infinite;
}
.splash-anniv-star svg {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 0 12px rgba(255, 210, 130, 0.65));
}
.splash-anniv-eyebrow {
    color: #ffd996 !important;
    letter-spacing: 0.24em !important;
}
.splash-anniv-heading {
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
    font-size: clamp(24px, 5.8vw, 35px);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.18;
    max-width: min(90vw, 520px);
    padding: 0 16px;
    color: #fff6fa;
    text-shadow: 0 4px 28px rgba(255, 110, 170, 0.38);
}
.splash-anniv-names {
    margin-top: 8px;
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
    font-size: clamp(22px, 5vw, 30px);
    font-weight: 700;
    letter-spacing: 0.04em;
    background: linear-gradient(95deg, #ffe29f 0%, #ff85b8 50%, #c6a8ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.splash-anniv-names span {
    font-style: italic;
    font-weight: 400;
    opacity: 0.9;
}
.splash-anniv-progress span {
    background: linear-gradient(90deg, #ffd17a, #ff5ea8, #9d82ff) !important;
    animation: splashLoad 2.45s var(--ease) both !important;
}

/* ---- Login page anniversary ambiance ---- */
.login-anniv-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.login-anniv-mode .login-card {
    border-color: rgba(255, 198, 135, 0.24);
    box-shadow: 0 44px 125px rgba(0, 0, 0, 0.56), 0 0 60px rgba(255, 84, 154, 0.12), inset 0 1px rgba(255, 232, 195, 0.16);
}
.login-anniv-mode .login-card::before {
    background: linear-gradient(90deg, #ffcf70, #ff63a5, #9a7dff, #4ee8d2);
}
.login-anniv-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: -14px 0 18px;
    padding: 6px 13px;
    border: 1px solid rgba(255, 209, 133, 0.3);
    border-radius: 999px;
    background: linear-gradient(120deg, rgba(255, 102, 166, 0.14), rgba(255, 207, 112, 0.12));
    color: #ffe3b0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow: 0 8px 22px rgba(255, 92, 160, 0.14);
}
.login-anniv-star {
    color: #ffd37a;
    font-size: 13px;
    animation: annivStarSpin 8s linear infinite;
}

/* ---- Chat header star replay button ---- */
.anniv-star-btn {
    position: relative;
    padding: 0;
    border-color: rgba(255, 206, 132, 0.34) !important;
    background: radial-gradient(circle at 35% 25%, rgba(255, 118, 178, 0.22), rgba(145, 118, 255, 0.14) 70%, rgba(255, 255, 255, 0.04)) !important;
    box-shadow: 0 0 18px rgba(255, 116, 184, 0.18), inset 0 1px rgba(255, 240, 205, 0.22) !important;
    overflow: visible;
}
.anniv-star-btn::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 15px;
    border: 1px solid rgba(255, 214, 145, 0.28);
    opacity: 0.6;
    pointer-events: none;
    animation: annivStarHalo 2.8s ease-in-out infinite;
}
.anniv-star-btn:hover {
    border-color: rgba(255, 220, 155, 0.65) !important;
    box-shadow: 0 0 26px rgba(255, 116, 184, 0.34), 0 0 14px rgba(255, 214, 130, 0.32) !important;
}
.anniv-star-svg {
    width: 21px !important;
    height: 21px !important;
    overflow: visible;
    filter: drop-shadow(0 0 7px rgba(255, 195, 135, 0.55));
}
.anniv-star-svg .star-core {
    transform-origin: 12px 12px;
    animation: annivStarPulse 3.2s ease-in-out infinite;
}
.anniv-star-svg .star-spark {
    transform-origin: center;
    animation: annivSparkTwinkle 2.2s ease-in-out infinite;
}
.anniv-star-svg .s2 {
    animation-delay: -1.1s;
}
.anniv-menu-icon {
    color: #ffd382 !important;
    background: rgba(255, 116, 184, 0.12) !important;
    border-color: rgba(255, 206, 132, 0.26) !important;
}
.chat-call-active .anniv-star-btn::after,
.chat-call-active .anniv-star-svg .star-core,
.chat-call-active .anniv-star-svg .star-spark {
    animation-play-state: paused !important;
}

/* ---- Fullscreen 2-minute Anniversary Cinema Overlay ---- */
.anniv-overlay {
    position: fixed;
    inset: 0;
    z-index: 9500;
    height: var(--app-height, 100dvh);
    max-height: var(--app-height, 100dvh);
    overflow: hidden;
    background: #020107;
    color: #fff;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    opacity: 1;
    transition: opacity 0.65s var(--ease);
}
.anniv-overlay.anniv-exiting {
    opacity: 0;
    pointer-events: none;
}
.anniv-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
}
.anniv-vignette {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 45%, transparent 45%, rgba(2, 1, 7, 0.55) 100%),
        linear-gradient(180deg, rgba(2, 1, 7, 0.58) 0%, transparent 18%, transparent 74%, rgba(2, 1, 7, 0.82) 100%);
}

/* Top bar with subtle Skip on the side */
.anniv-top-bar {
    position: absolute;
    z-index: 6;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: calc(14px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px));
    pointer-events: none;
}
.anniv-brand-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 220, 165, 0.16);
    border-radius: 999px;
    background: rgba(12, 8, 22, 0.52);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: rgba(255, 232, 195, 0.86);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.anniv-chip-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff66a8;
    box-shadow: 0 0 12px #ff66a8;
    animation: softBlink 2.2s ease-in-out infinite;
}
.anniv-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
}
.anniv-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(14, 10, 26, 0.62);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: rgba(255, 245, 250, 0.88);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s var(--ease), background 0.18s ease, border-color 0.18s ease, opacity 0.2s ease;
}
.anniv-pill-btn:hover {
    background: rgba(34, 22, 54, 0.82);
    border-color: rgba(255, 206, 138, 0.42);
    transform: translateY(-1px);
}
.anniv-pill-btn:active {
    transform: scale(0.96);
}
.anniv-pill-btn .ui-icon {
    width: 15px;
    height: 15px;
}
.anniv-skip-btn {
    opacity: 0.78;
}
.anniv-skip-btn:hover {
    opacity: 1;
}
.anniv-sound-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
}
.anniv-sound-bars i {
    display: block;
    width: 2.5px;
    height: 100%;
    border-radius: 2px;
    background: #ffd382;
    transform-origin: bottom;
    animation: annivEqBar 0.9s ease-in-out infinite;
}
.anniv-sound-bars i:nth-child(2) { animation-delay: -0.35s; }
.anniv-sound-bars i:nth-child(3) { animation-delay: -0.65s; }
.anniv-pill-btn.is-muted .anniv-sound-bars i {
    animation: none;
    transform: scaleY(0.28);
    background: rgba(255, 255, 255, 0.45);
}

/* Couple portrait layer aligned precisely with particle synthesis bounds */
.anniv-portrait-layer {
    position: absolute;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 2.2s ease, transform 2.2s var(--ease);
}
.anniv-portrait-layer.is-visible {
    opacity: 1;
    transform: scale(1);
}
.anniv-portrait-aura {
    position: absolute;
    inset: -16px;
    border-radius: 30px;
    background: radial-gradient(circle at 50% 45%, rgba(255, 202, 118, 0.28), rgba(255, 86, 162, 0.18) 56%, transparent 74%);
    filter: blur(18px);
    opacity: 0.85;
}
.anniv-portrait-frame {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 224, 166, 0.34);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.72), 0 0 36px rgba(255, 110, 175, 0.22), inset 0 0 28px rgba(4, 2, 10, 0.55);
    background: rgba(6, 3, 14, 0.35);
}
.anniv-portrait-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    display: block;
    opacity: var(--photo-reveal, 0);
    filter: saturate(1.1) contrast(1.04) brightness(0.98);
    transition: opacity 0.4s linear;
}
.anniv-portrait-sheen {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 42%, transparent 56%, rgba(4, 2, 10, 0.52) 100%);
    pointer-events: none;
}

/* Luminous narrative text overlay */
.anniv-stage-text {
    position: absolute;
    z-index: 4;
    left: 50%;
    top: 50%;
    width: min(92vw, 760px);
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    padding: 0 16px;
    transition: top 0.9s var(--ease), transform 0.9s var(--ease), opacity 0.7s ease;
}
.anniv-stage-text.pos-bottom {
    top: auto;
    bottom: calc(108px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
}
.anniv-stage-text.pos-top {
    top: calc(64px + env(safe-area-inset-top, 0px));
    transform: translateX(-50%);
}
.anniv-stage-text.pos-hidden {
    opacity: 0;
}
.anniv-eyebrow {
    margin: 0 0 10px;
    color: #ffd894;
    font-size: clamp(10px, 2.2vw, 12.5px);
    font-weight: 800;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    text-shadow: 0 2px 14px rgba(255, 200, 110, 0.4);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.85s ease, transform 0.85s var(--ease);
}
.anniv-headline {
    margin: 0;
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
    font-size: clamp(27px, 6.2vw, 54px);
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: -0.01em;
    background: linear-gradient(110deg, #fff9fc 0%, #ffdba3 35%, #ff8bc2 72%, #c9b5ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 6px 26px rgba(255, 88, 162, 0.36));
    opacity: 0;
    transform: translateY(14px) scale(0.98);
    transition: opacity 0.95s ease, transform 0.95s var(--ease);
}
.anniv-names-line {
    margin: 12px 0 0;
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
    font-size: clamp(19px, 4.4vw, 31px);
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #fff2f8;
    text-shadow: 0 0 24px rgba(255, 114, 182, 0.52), 0 0 10px rgba(255, 214, 130, 0.32);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.95s ease 0.12s, transform 0.95s var(--ease) 0.12s;
}
.anniv-subline {
    margin: 10px auto 0;
    max-width: 540px;
    color: rgba(235, 224, 246, 0.86);
    font-size: clamp(13px, 3.1vw, 17px);
    font-weight: 500;
    line-height: 1.55;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.85);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.95s ease 0.18s, transform 0.95s var(--ease) 0.18s;
}
.anniv-milestone {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 8px 18px;
    border: 1px solid rgba(255, 212, 138, 0.36);
    border-radius: 999px;
    background: linear-gradient(120deg, rgba(255, 92, 160, 0.18), rgba(145, 108, 255, 0.18));
    color: #ffe7b8;
    font-size: clamp(12px, 3vw, 15px);
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    box-shadow: 0 8px 30px rgba(255, 90, 162, 0.24);
    opacity: 0;
    transform: scale(0.94);
    transition: opacity 0.8s ease, transform 0.8s var(--spring);
}
.anniv-stage-text.is-shown .anniv-eyebrow,
.anniv-stage-text.is-shown .anniv-headline,
.anniv-stage-text.is-shown .anniv-names-line,
.anniv-stage-text.is-shown .anniv-subline,
.anniv-stage-text.is-shown .anniv-milestone {
    opacity: 1;
    transform: none;
}

/* Audio unlock shimmer prompt (vanishes automatically once sound starts or Finale appears) */
.anniv-tap-sound {
    position: absolute;
    z-index: 7;
    left: 50%;
    bottom: calc(26px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: calc(100vw - 32px);
    padding: 11px 19px;
    border: 1px solid rgba(255, 216, 148, 0.42);
    border-radius: 999px;
    background: linear-gradient(120deg, rgba(28, 14, 42, 0.86), rgba(48, 14, 34, 0.86));
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    color: #fff2db;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55), 0 0 24px rgba(255, 108, 174, 0.28);
    cursor: pointer;
    animation: annivTapFloat 2.4s ease-in-out infinite;
}
.anniv-tap-pulse {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ffd37a;
    box-shadow: 0 0 0 4px rgba(255, 211, 122, 0.25);
}

/* Grand Finale bar */
.anniv-finale-bar {
    position: absolute;
    z-index: 6;
    left: 50%;
    bottom: calc(28px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%) translateY(16px);
    width: min(94vw, 560px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 16px 20px 18px;
    border: 1px solid rgba(255, 216, 152, 0.24);
    border-radius: 26px;
    background: linear-gradient(160deg, rgba(18, 11, 30, 0.84), rgba(10, 6, 18, 0.92));
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.68), 0 0 40px rgba(255, 86, 158, 0.16);
    opacity: 0;
    transition: opacity 1.1s ease, transform 1.1s var(--ease);
}
.anniv-finale-bar.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.anniv-finale-names {
    margin: 0;
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
    font-size: clamp(20px, 4.8vw, 28px);
    font-weight: 700;
    letter-spacing: 0.03em;
    background: linear-gradient(95deg, #ffe3a8, #ff8ac0, #cbb4ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.anniv-finale-names span {
    color: #ff6ca9;
    -webkit-text-fill-color: #ff6ca9;
    margin: 0 6px;
}
.anniv-finale-wish {
    margin: 0;
    min-height: 22px;
    color: rgba(255, 236, 244, 0.92);
    font-size: clamp(13px, 3.2vw, 15.5px);
    font-weight: 600;
    transition: opacity 0.45s ease;
}
.anniv-finale-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
}
.anniv-enter-btn,
.anniv-replay-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s var(--ease), box-shadow 0.2s ease, background 0.2s ease;
}
.anniv-enter-btn {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #ff4f97, #9855ff);
    box-shadow: 0 12px 30px rgba(255, 79, 151, 0.36), inset 0 1px rgba(255, 255, 255, 0.3);
}
.anniv-enter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 38px rgba(255, 79, 151, 0.48);
}
.anniv-replay-btn {
    border: 1px solid rgba(255, 218, 155, 0.28);
    color: #ffebd0;
    background: rgba(255, 255, 255, 0.06);
}
.anniv-replay-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}
.anniv-enter-btn .ui-icon,
.anniv-replay-btn .ui-icon {
    width: 16px;
    height: 16px;
}

/* Hairline progress bar */
.anniv-progress-wrap {
    position: absolute;
    z-index: 6;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0 max(18px, env(safe-area-inset-left, 0px)) calc(10px + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
}
.anniv-progress-track {
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.anniv-progress-track span {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, #ffd37a, #ff5aa5, #9a7dff, #4ee8d2);
    box-shadow: 0 0 10px rgba(255, 90, 165, 0.65);
}

/* ---- Keyframes ---- */
@keyframes annivStarBreath {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}
@keyframes annivStarSpin {
    to { transform: rotate(360deg); }
}
@keyframes annivStarHalo {
    0%, 100% { opacity: 0.35; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.05); }
}
@keyframes annivStarPulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(6deg); }
}
@keyframes annivSparkTwinkle {
    0%, 100% { opacity: 0.45; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.15); }
}
@keyframes annivEqBar {
    0%, 100% { transform: scaleY(0.35); }
    50% { transform: scaleY(1); }
}
@keyframes annivTapFloat {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-4px); }
}

@media (max-width: 540px) {
    .anniv-brand-chip { display: none; }
    .anniv-top-bar { justify-content: flex-end; }
    .anniv-finale-bar { padding: 14px 16px 16px; border-radius: 22px; }
    .anniv-enter-btn, .anniv-replay-btn { min-height: 41px; padding: 0 16px; font-size: 13px; }
}
