
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    overflow-x: hidden;
    background: linear-gradient(135deg, #ffe0ed, #ffc0d9, #fff0f5);
    font-family: Arial, sans-serif;
    color: #8b1748;
}

.container {
    width: 100%;
    max-width: 600px;
    min-height: 450px;
    padding: 35px 22px;
    text-align: center;
    background: rgba(255, 255, 255, 0.85);
    border: 2px solid white;
    border-radius: 28px;
    box-shadow: 0 12px 40px rgba(185, 35, 100, 0.2);
}

.heart {
    font-size: 65px;
    animation: heartbeat 1.2s infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.small-text {
    letter-spacing: 3px;
    font-size: 12px;
    color: #c04478;
}

h1 {
    font-size: clamp(32px, 7vw, 48px);
    margin: 15px 0;
}

.message {
    line-height: 1.8;
    color: #a34670;
}

h2 {
    font-size: 22px;
    margin-top: 28px;
}

.buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin: 25px 0;
}

button {
    border: none;
    border-radius: 30px;
    padding: 13px 22px;
    background: #e83e80;
    color: white;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 12px rgba(190, 30, 90, 0.18);
}

button:hover {
    background: #c91e63;
}

#noBtn {
    background: #aaa;
}

#noBtn.running {
    position: fixed;
    z-index: 10;
}

.anniversary {
    margin-top: 30px;
    padding: 22px 12px;
    border-top: 1px solid #f3bfd2;
}

.anniversary p {
    line-height: 1.6;
}

input[type="date"] {
    display: block;
    width: 100%;
    max-width: 260px;
    margin: 15px auto;
    padding: 12px;
    border: 1px solid #e99ab9;
    border-radius: 12px;
    font-size: 16px;
    color: #8b1748;
}

#errorMessage {
    color: #c91e35;
    font-weight: bold;
}

#response {
    font-weight: bold;
    line-height: 1.6;
}

.music-player {
    margin-top: 25px;
    padding: 18px;
    background: #fff0f6;
    border-radius: 20px;
}

.music-player p {
    color: #c91e63;
    font-weight: bold;
}

.music-player audio {
    width: 100%;
    max-width: 320px;
}

#hearts-container {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.floating-heart {
    position: absolute;
    bottom: -40px;
    animation: floatUp linear forwards;
    opacity: 0.75;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    15% {
        opacity: 0.75;
    }
    100% {
        transform: translateY(-110vh) rotate(35deg);
        opacity: 0;
    }
}

/* Keep the website content above the hearts */
.container {
    position: relative;
    z-index: 1;
}

.memories {
    margin-top: 30px;
    padding: 20px 10px;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}


.memory-photo {
    width: 100%;
    height: 260px;
    object-fit: contain;
    background: #fff0f6;
    border-radius: 18px;
    border: 3px solid white;
    box-shadow: 0 5px 15px rgba(185, 35, 100, 0.2);
    cursor: pointer;
    transition: transform 0.25s ease;
}


.memory-photo:hover {
    transform: scale(1.03);
}

.photo-viewer {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(35, 0, 20, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
}

.photo-viewer[hidden] {
    display: none;
}

.photo-viewer img {
    display: block;
    max-width: 100vw;
    max-height: 100dvh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    margin: 0;
    padding: 0;
}

.close-viewer {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 22px;
    background: #e83e80;
}

@media (max-width: 400px) {
    .photo-gallery {
        grid-template-columns: 1fr;
    }

    .memory-photo {
        height: 250px;
    }
}

.love-letter {
    margin-top: 35px;
    padding: 25px 18px;
    background: linear-gradient(145deg, #fff0f6, #ffe0eb);
    border: 2px solid #fff;
    border-radius: 24px;
    box-shadow: 0 8px 25px rgba(185, 35, 100, 0.12);
}

.letter-icon {
    font-size: 48px;
}

#letterContent {
    margin-top: 22px;
    padding: 20px;
    background: #fffafc;
    border-radius: 16px;
    text-align: left;
    line-height: 1.9;
    white-space: pre-line;
}

#typedLetter {
    color: #873052;
}

.letter-signature {
    margin-top: 20px;
    text-align: right;
    font-weight: bold;
    color: #c91e63;
}

/* 💌 Smooth love letter reveal */
#letterContent[hidden] {
    display: none !important;
}

#letterContent:not([hidden]) {
    animation: letterReveal 1.2s ease both;
    transform-origin: top center;
}

@keyframes letterReveal {
    0% {
        opacity: 0;
        transform: translateY(25px) scale(0.96);
    }

    60% {
        opacity: 1;
        transform: translateY(-4px) scale(1.01);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 💗 Gentle glowing button */
#openLetterBtn {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#openLetterBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 80, 150, 0.45);
}

/* ❤️ Soft pulsing letter icon */
.letter-icon {
    display: inline-block;
    animation: heartPulse 1.8s ease-in-out infinite;
}

@keyframes heartPulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

/* 📸 Smooth photo hover */
.memory-photo {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.memory-photo:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 24px rgba(255, 80, 150, 0.3);
}

/* Respect reduced-motion settings */
@media (prefers-reduced-motion: reduce) {
    #letterContent:not([hidden]),
    .letter-icon {
        animation: none;
    }

    #openLetterBtn,
    .memory-photo {
        transition: none;
    }
}

/* 💗 Floating hearts */
#hearts-container {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 9999;
}

.floating-heart {
    position: fixed;
    bottom: -40px;
    display: block;
    pointer-events: none;
    user-select: none;
    animation-name: floatHeartUp;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
    will-change: transform, opacity;
}

@keyframes floatHeartUp {
    0% {
        transform: translateY(0) rotate(0deg) scale(0.7);
        opacity: 0;
    }

    12% {
        opacity: 0.9;
    }

    85% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-115vh) rotate(35deg) scale(1.2);
        opacity: 0;
    }
}

/* 🌹 Falling rose petals */
#hearts-container::before {
    content: "🌹   🌸   🍃   🌹   🌸   🍃";
    position: absolute;
    top: -45px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 22px;
    letter-spacing: 8px;
    opacity: 0.8;
    animation: petalsFall 12s linear infinite;
    pointer-events: none;
}

@keyframes petalsFall {
    0% {
        transform: translateY(-5vh) translateX(-10px) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.7;
    }

    100% {
        transform: translateY(110vh) translateX(35px) rotate(180deg);
        opacity: 0;
    }
}

/* 📱 Keep animations gentle on small screens */
@media (max-width: 600px) {
    #hearts-container::before {
        font-size: 16px;
        letter-spacing: 3px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .floating-heart,
    #hearts-container::before {
        animation: none;
    }
}

/* 💌 Love letter reveal */
#letterContent[hidden] {
    display: none !important;
}

#letterContent:not([hidden]) {
    animation: letterOpen 0.9s ease-out both;
    transform-origin: top center;
}

@keyframes letterOpen {
    from {
        opacity: 0;
        transform: translateY(22px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ✍️ Typewriter text */
#typedLetter {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.9;
}

/* 💗 Letter button */
#openLetterBtn {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#openLetterBtn:hover:not(:disabled) {
    transform: scale(1.04);
    box-shadow: 0 0 18px rgba(255, 80, 150, 0.35);
}

#openLetterBtn:disabled {
    opacity: 0.85;
    cursor: default;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    #letterContent:not([hidden]) {
        animation: none;
    }

    #openLetterBtn {
        transition: none;
    }
}

/* 📸 Memory photo reveal animation */
.memory-photo {
    opacity: 1;
    animation: memoryReveal 0.8s ease-out forwards;
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
    will-change: transform, opacity;
}

/* Photos appear one after another */
.memory-photo:nth-child(1) { animation-delay: 0.1s; }
.memory-photo:nth-child(2) { animation-delay: 0.2s; }
.memory-photo:nth-child(3) { animation-delay: 0.3s; }
.memory-photo:nth-child(4) { animation-delay: 0.4s; }
.memory-photo:nth-child(5) { animation-delay: 0.5s; }
.memory-photo:nth-child(6) { animation-delay: 0.6s; }
.memory-photo:nth-child(7) { animation-delay: 0.7s; }
.memory-photo:nth-child(8) { animation-delay: 0.8s; }
.memory-photo:nth-child(9) { animation-delay: 0.9s; }
.memory-photo:nth-child(10) { animation-delay: 1s; }

@keyframes memoryReveal {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 💗 Gentle zoom on hover */
@media (hover: hover) {
    .memory-photo:hover {
        transform: scale(1.05);
        box-shadow: 0 8px 24px rgba(255, 80, 150, 0.3);
    }
}

/* Smooth photo viewer opening */
#photoViewer:not([hidden]) {
    animation: viewerFadeIn 0.3s ease-out;
}

#photoViewer img {
    animation: viewerPhotoZoom 0.35s ease-out;
}

@keyframes viewerFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes viewerPhotoZoom {
    from {
        opacity: 0.6;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .memory-photo,
    #photoViewer:not([hidden]),
    #photoViewer img {
        animation: none;
        opacity: 1;
        transition: none;
    }
}


/* 💖 Visible cinematic effects using your actual classes */

.container {
    animation: romanticPageIn 1s ease-out;
}

@keyframes romanticPageIn {
    from {
        opacity: 0;
        transform: translateY(22px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ❤️ Heart glow */
.heart,
.letter-icon {
    filter: drop-shadow(0 0 8px rgba(255, 60, 130, 0.45));
    animation: romanticHeartbeat 1.5s ease-in-out infinite;
}

@keyframes romanticHeartbeat {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.12);
    }
}

/* 📸 Gallery photo entrance */
.photo-gallery .memory-photo {
    animation: photoEntrance 0.7s ease-out both;
}

.photo-gallery .memory-photo:nth-child(2) { animation-delay: 0.1s; }
.photo-gallery .memory-photo:nth-child(3) { animation-delay: 0.2s; }
.photo-gallery .memory-photo:nth-child(4) { animation-delay: 0.3s; }
.photo-gallery .memory-photo:nth-child(5) { animation-delay: 0.4s; }
.photo-gallery .memory-photo:nth-child(6) { animation-delay: 0.5s; }
.photo-gallery .memory-photo:nth-child(7) { animation-delay: 0.6s; }
.photo-gallery .memory-photo:nth-child(8) { animation-delay: 0.7s; }
.photo-gallery .memory-photo:nth-child(9) { animation-delay: 0.8s; }
.photo-gallery .memory-photo:nth-child(10) { animation-delay: 0.9s; }

@keyframes photoEntrance {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 🌹 Romantic button glow */
button {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

button:hover:not(:disabled) {
    box-shadow: 0 0 20px rgba(232, 62, 128, 0.4);
    transform: translateY(-2px);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .container,
    .heart,
    .letter-icon,
    .photo-gallery .memory-photo {
        animation: none;
        opacity: 1;
    }

    button {
        transition: none;
    }
}


/* FINAL OVERRIDES: photo viewer and floating effects */
#hearts-container {
    z-index: 0;
}

.photo-viewer {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.photo-viewer[hidden] {
    display: none !important;
}

#photoViewer:not([hidden]) {
    animation: viewerFadeIn 0.3s ease-out;
}

#photoViewer img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100vw;
    max-height: 100vh;
    max-height: 100dvh;
    object-fit: contain;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 10px;
    animation: viewerPhotoZoom 0.35s ease-out;
}

.close-viewer {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
    #photoViewer:not([hidden]),
    #photoViewer img {
        animation: none;
        opacity: 1;
    }
}

/* Photo animation only */
.photo-gallery .memory-photo {
    animation: photoEntrance 0.65s ease-out backwards;
}

@keyframes photoEntrance {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Staggered photo animation */
.photo-gallery .memory-photo:nth-child(1) { animation-delay: 0s; }
.photo-gallery .memory-photo:nth-child(2) { animation-delay: 0.15s; }
.photo-gallery .memory-photo:nth-child(3) { animation-delay: 0.30s; }
.photo-gallery .memory-photo:nth-child(4) { animation-delay: 0.45s; }
.photo-gallery .memory-photo:nth-child(5) { animation-delay: 0.60s; }
.photo-gallery .memory-photo:nth-child(6) { animation-delay: 0.75s; }
.photo-gallery .memory-photo:nth-child(7) { animation-delay: 0.90s; }
.photo-gallery .memory-photo:nth-child(8) { animation-delay: 1.05s; }
.photo-gallery .memory-photo:nth-child(9) { animation-delay: 1.20s; }
.photo-gallery .memory-photo:nth-child(10) { animation-delay: 1.35s; }

/* Slide-up animation for gallery photos */
.photo-gallery .memory-photo {
    animation: photoSlideUp 0.7s ease-out both;
}

.photo-gallery .memory-photo:nth-child(1) { animation-delay: 0s; }
.photo-gallery .memory-photo:nth-child(2) { animation-delay: 0.15s; }
.photo-gallery .memory-photo:nth-child(3) { animation-delay: 0.30s; }
.photo-gallery .memory-photo:nth-child(4) { animation-delay: 0.45s; }
.photo-gallery .memory-photo:nth-child(5) { animation-delay: 0.60s; }
.photo-gallery .memory-photo:nth-child(6) { animation-delay: 0.75s; }
.photo-gallery .memory-photo:nth-child(7) { animation-delay: 0.90s; }
.photo-gallery .memory-photo:nth-child(8) { animation-delay: 1.05s; }
.photo-gallery .memory-photo:nth-child(9) { animation-delay: 1.20s; }
.photo-gallery .memory-photo:nth-child(10) { animation-delay: 1.35s; }

@keyframes photoSlideUp {
    from {
        opacity: 0;
        transform: translateY(35px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Photo zoom-in animation */
.photo-gallery .memory-photo {
    animation: photoZoomIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes photoZoomIn {
    from {
        opacity: 0;
        transform: scale(0.65);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Polaroid Memories effect */
.photo-gallery .memory-photo {
    background: #fff;
    padding: 8px 8px 24px;
    border: 1px solid #f6c9dc;
    border-radius: 5px;
    box-shadow: 0 8px 20px rgba(145, 28, 78, 0.18);
    transition:
        transform 0.4s ease,
        box-shadow 0.4s ease;
}

.photo-gallery .memory-photo:nth-child(odd) {
    transform: rotate(-2deg);
}

.photo-gallery .memory-photo:nth-child(even) {
    transform: rotate(2deg);
}

@media (hover: hover) {
    .photo-gallery .memory-photo:hover {
        transform: translateY(-8px) rotate(0deg) scale(1.04);
        box-shadow: 0 18px 32px rgba(201, 30, 99, 0.3);
        z-index: 2;
    }
}

/* Romantic Pink Glow */
.photo-gallery .memory-photo {
    border: 3px solid #ff8fc4 !important;
    border-radius: 16px !important;
    box-shadow:
        0 0 10px #ff69b4,
        0 0 25px rgba(255, 20, 147, 0.65),
        0 0 40px rgba(255, 105, 180, 0.35) !important;
    transition: box-shadow 0.3s ease, filter 0.3s ease !important;
}

@media (hover: hover) {
    .photo-gallery .memory-photo:hover {
        box-shadow:
            0 0 15px #ff1493,
            0 0 35px #ff69b4,
            0 0 55px #ff1493 !important;
        filter: brightness(1.08) !important;
    }
}

/* CINEMATIC LOVE — Gallery Effects */

.photo-gallery .memory-photo {
    position: relative;
    isolation: isolate;
    animation: cinemaReveal 0.9s ease-out both;
    transition:
        transform 0.4s ease,
        filter 0.4s ease,
        box-shadow 0.4s ease;
}

.photo-gallery .memory-photo:nth-child(1) { animation-delay: 0.05s; }
.photo-gallery .memory-photo:nth-child(2) { animation-delay: 0.15s; }
.photo-gallery .memory-photo:nth-child(3) { animation-delay: 0.25s; }
.photo-gallery .memory-photo:nth-child(4) { animation-delay: 0.35s; }
.photo-gallery .memory-photo:nth-child(5) { animation-delay: 0.45s; }
.photo-gallery .memory-photo:nth-child(6) { animation-delay: 0.55s; }
.photo-gallery .memory-photo:nth-child(7) { animation-delay: 0.65s; }
.photo-gallery .memory-photo:nth-child(8) { animation-delay: 0.75s; }
.photo-gallery .memory-photo:nth-child(9) { animation-delay: 0.85s; }
.photo-gallery .memory-photo:nth-child(10) { animation-delay: 0.95s; }

@keyframes cinemaReveal {
    from {
        opacity: 0;
        transform: scale(0.88) translateY(22px);
        filter: brightness(0.5) blur(4px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: brightness(1) blur(0);
    }
}

@media (hover: hover) {
    .photo-gallery .memory-photo:hover {
        transform: scale(1.045) translateY(-5px);
        filter: brightness(1.08) saturate(1.15);
        box-shadow:
            0 0 12px rgba(255, 105, 180, 0.8),
            0 0 30px rgba(255, 20, 147, 0.45),
            0 15px 35px rgba(100, 0, 45, 0.25);
    }
}

/* Floating cinematic particles */
#hearts-container::after {
    content: "✦  ·  ✧  ·  ✦  ·  ✧";
    position: fixed;
    top: -30px;
    left: 0;
    width: 100%;
    color: #ff69b4;
    font-size: 22px;
    letter-spacing: 15px;
    text-align: center;
    pointer-events: none;
    text-shadow: 0 0 12px #ff1493;
    animation: cinemaParticles 9s linear infinite;
}

@keyframes cinemaParticles {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    15% { opacity: 0.8; }
    to {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* ANIMATED VALENTINE BACKGROUND */

body {
    background: linear-gradient(
        -45deg,
        #ffe0ed,
        #ff9fc8,
        #ffd1e7,
        #fff0f5,
        #eecbff
    ) !important;

    background-size: 400% 400% !important;
    animation: valentineBackground 12s ease infinite !important;
}

@keyframes valentineBackground {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 🌙 ROMANTIC NIGHT SKY — MEMORIES SECTION */

.memories {
    position: relative;
    isolation: isolate;
    border-radius: 24px;
    background: linear-gradient(
        180deg,
        #080f2d 0%,
        #171644 55%,
        #39204f 100%
    );
    box-shadow:
        0 0 25px rgba(111, 87, 255, 0.25),
        inset 0 0 35px rgba(87, 100, 255, 0.12);
}

/* ⭐ Twinkling stars */
.memories::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    border-radius: inherit;

    background-image:
        radial-gradient(circle, #ffffff 1.2px, transparent 2px),
        radial-gradient(circle, #bde7ff 1px, transparent 2px),
        radial-gradient(circle, #ffe5fa 1.5px, transparent 2.5px),
        radial-gradient(circle, #ffffff 1px, transparent 2px);

    background-size:
        65px 75px,
        95px 105px,
        125px 115px,
        155px 135px;

    background-position:
        0 0,
        25px 35px,
        55px 15px,
        10px 70px;

    animation: nightStars 8s ease-in-out infinite alternate;
}

/* 🌙 Glowing moon */
.memories::after {
    content: "";
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    z-index: 0;
    pointer-events: none;
    border-radius: 50%;

    background: #fff8d9;
    box-shadow:
        0 0 12px 4px rgba(255, 248, 217, 0.65),
        0 0 30px 10px rgba(186, 196, 255, 0.3),
        0 0 55px 18px rgba(144, 130, 255, 0.15);

    animation: moonGlow 3s ease-in-out infinite alternate;
}

/* Keep photos and text above the night sky */
.memories > * {
    position: relative;
    z-index: 1;
}

@keyframes nightStars {
    from {
        opacity: 0.55;
        filter: brightness(0.8);
    }

    to {
        opacity: 1;
        filter: brightness(1.5);
    }
}

@keyframes moonGlow {
    from {
        box-shadow:
            0 0 12px 4px rgba(255, 248, 217, 0.5),
            0 0 25px 8px rgba(186, 196, 255, 0.25);
    }

    to {
        box-shadow:
            0 0 18px 6px rgba(255, 248, 217, 0.8),
            0 0 38px 13px rgba(186, 196, 255, 0.4);
    }
}

@media (prefers-reduced-motion: reduce) {
    .memories::before,
    .memories::after {
        animation: none;
    }
}

/* 🌌 NIGHT SKY — GLASS PHOTO CARDS */

.photo-gallery .memory-photo {
    background: rgba(22, 19, 65, 0.72) !important;
    border: 2px solid rgba(224, 190, 255, 0.75) !important;
    border-radius: 18px !important;

    box-shadow:
        0 0 10px rgba(187, 120, 255, 0.45),
        0 0 24px rgba(255, 80, 180, 0.28),
        inset 0 0 16px rgba(160, 130, 255, 0.12) !important;

    backdrop-filter: blur(8px);

    transition:
        box-shadow 0.35s ease,
        border-color 0.35s ease !important;
}

/* ✨ Gentle purple-pink glow on hover */
@media (hover: hover) {
    .photo-gallery .memory-photo:hover {
        border-color: #ffc8f0 !important;

        box-shadow:
            0 0 14px rgba(220, 160, 255, 0.8),
            0 0 32px rgba(255, 70, 190, 0.55) !important;

        filter: brightness(1.08);
    }
}

/* 🌙 MAGICAL CRESCENT MOON */

.memories::after {
    content: "";
    position: absolute;
    top: 24px;
    right: 24px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    z-index: 2;
    pointer-events: none;

    background: transparent;
    box-shadow:
        inset -10px 2px 0 2px #fff4c2,
        0 0 15px 4px rgba(255, 244, 194, 0.55),
        0 0 35px 10px rgba(195, 185, 255, 0.25);

    animation: crescentGlow 3s ease-in-out infinite alternate;
}

@keyframes crescentGlow {
    from {
        filter: brightness(0.9);
    }

    to {
        filter: brightness(1.35);
    }
}

/* 🌙 MAGICAL CRESCENT MOON */

.memories::after {
    content: "";
    position: absolute;
    top: 24px;
    right: 24px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    z-index: 2;
    pointer-events: none;

    background: transparent;
    box-shadow:
        inset -10px 2px 0 2px #fff4c2,
        0 0 15px 4px rgba(255, 244, 194, 0.55),
        0 0 35px 10px rgba(195, 185, 255, 0.25);

    animation: crescentGlow 3s ease-in-out infinite alternate;
}

@keyframes crescentGlow {
    from {
        filter: brightness(0.9);
    }

    to {
        filter: brightness(1.35);
    }
}

/* 🌙 Softer glowing crescent */
.memories::after {
    box-shadow:
        inset -8px 2px 0 2px #fff4c2,
        0 0 18px 5px rgba(255, 244, 194, 0.7),
        0 0 38px 12px rgba(195, 185, 255, 0.35);
}

/* ✨ Magical sparkles around the moon */
.memories {
    overflow: hidden;
}

.memories .memories-sparkles {
    display: none;
}

.memories::before {
    background-image:
        radial-gradient(circle, #fff 1.3px, transparent 2px),
        radial-gradient(circle, #bde7ff 1px, transparent 2px),
        radial-gradient(circle, #ffe5fa 1.5px, transparent 2.5px),
        radial-gradient(circle, #fff 1px, transparent 2px),
        radial-gradient(circle, #e7c8ff 2px, transparent 3px);
    background-size:
        65px 75px,
        95px 105px,
        125px 115px,
        155px 135px,
        190px 175px;
    animation: nightStars 4s ease-in-out infinite alternate;
}

/* 💖 WELCOME PAGE — DREAMY VALENTINE EFFECT */

body:has(#yesBtn) {
    background: linear-gradient(
        -45deg,
        #ffe0ef,
        #f4c8ff,
        #ffc0dc,
        #e4d7ff
    );
    background-size: 300% 300%;
    animation: welcomeDream 12s ease infinite;
}

@keyframes welcomeDream {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ✨ Soft glow around the welcome card */
body:has(#yesBtn) .container {
    border: 2px solid rgba(255, 255, 255, 0.95);
    box-shadow:
        0 12px 40px rgba(185, 35, 100, 0.2),
        0 0 28px rgba(255, 130, 195, 0.22);
}

/* 💗 Heart glow */
body:has(#yesBtn) .heart {
    filter: drop-shadow(0 0 12px rgba(255, 60, 150, 0.55));
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    body:has(#yesBtn) {
        animation: none;
    }
}


/* 💖 WELCOME PAGE — PREMIUM ROMANTIC DESIGN */
body:has(#yesBtn) .container {
    max-width: 560px;
    padding: 42px 28px;
    background: linear-gradient(
        145deg,
        rgba(255,255,255,0.94),
        rgba(255,232,246,0.88)
    );
    border: 2px solid rgba(255,255,255,0.95);
    border-radius: 32px;
    box-shadow:
        0 20px 55px rgba(176,40,105,0.22),
        0 0 35px rgba(255,130,205,0.25);
}

/* Glowing heart */
body:has(#yesBtn) .heart {
    display: inline-block;
    font-size: 76px;
    filter: drop-shadow(0 0 15px rgba(255,50,140,0.65));
    animation: welcomeHeart 1.5s ease-in-out infinite;
}

@keyframes welcomeHeart {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.13); }
}

/* Welcome heading */
body:has(#yesBtn) h1 {
    color: #b51e68;
    letter-spacing: -1px;
    text-shadow: 0 3px 15px rgba(255,80,160,0.18);
}

/* Romantic message */
body:has(#yesBtn) .message {
    font-size: 17px;
    line-height: 1.9;
    color: #93416d;
}

/* Valentine question */
body:has(#yesBtn) h2 {
    color: #9c245e;
    line-height: 1.5;
}

/* Premium buttons */
body:has(#yesBtn) .buttons button {
    padding: 15px 24px;
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: 50px;
    background: linear-gradient(135deg,#ff4f9a,#d92372);
    box-shadow: 0 8px 22px rgba(217,35,114,0.25);
    transition: transform .25s ease, box-shadow .25s ease;
}

body:has(#yesBtn) #noBtn {
    background: linear-gradient(135deg,#a8a0b5,#777083);
}

@media (hover: hover) {
    body:has(#yesBtn) .buttons button:hover {
        transform: translateY(-4px) scale(1.04);
        box-shadow: 0 12px 28px rgba(217,35,114,0.35);
    }
}

/* Anniversary question card */
body:has(#yesBtn) .anniversary {
    padding: 24px 16px;
    border: 1px solid rgba(230,120,175,0.35);
    border-radius: 22px;
    background: rgba(255,255,255,0.55);
}

/* Mobile spacing */
@media (max-width: 480px) {
    body:has(#yesBtn) .container {
        padding: 32px 18px;
        border-radius: 25px;
    }

    body:has(#yesBtn) .heart {
        font-size: 64px;
    }
}

/* 💌 Romantic Love Letter Font */
#letterContent,
#typedLetter {
    font-family: "Georgia", "Palatino Linotype", serif;
    font-size: 18px;
    line-height: 2;
    letter-spacing: 0.3px;
    color: #873052;
}

.letter-signature {
    font-family: "Brush Script MT", "Segoe Script", cursive;
    font-size: 25px;
    color: #d63384;
}

.letter-icon {
    filter: drop-shadow(0 0 10px rgba(255, 70, 150, 0.6));
}

@media (max-width: 480px) {
    #letterContent,
    #typedLetter {
        font-size: 16px;
        line-height: 1.9;
    }
}
