/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --cream: #fffbef;
    --dark-cream: #f5ead6;
    --red: #b41a26;
    --dark-red: #8e0000;
    --dark-bg: #4f0420;
    --pink: #e38cab;
    --gold: #c9a94e;
    --text-dark: #3a1a1a;
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Caveat', cursive;
    background-color: var(--cream);
    color: var(--text-dark);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* ===== FLOATING HEARTS BACKGROUND ===== */
.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-heart {
    position: absolute;
    font-size: 20px;
    opacity: 0;
    animation: floatHeart 8s infinite ease-in-out;
    pointer-events: none;
}

@keyframes floatHeart {
    0% {
        opacity: 0;
        transform: translateY(100vh) rotate(0deg) scale(0.5);
    }

    10% {
        opacity: 0.7;
    }

    50% {
        opacity: 0.4;
    }

    90% {
        opacity: 0.1;
    }

    100% {
        opacity: 0;
        transform: translateY(-10vh) rotate(360deg) scale(1.2);
    }
}

/* ===== PAGE SYSTEM ===== */
.page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    opacity: 0;
    transition: opacity 0.8s ease;
    z-index: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.page.active {
    display: flex;
    opacity: 1;
    z-index: 2;
}

.page[data-bg="cream"] {
    background-color: var(--cream);
}

.page[data-bg="dark"] {
    background-color: var(--dark-bg);
    color: var(--cream);
}

.page-content {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    position: relative;
}

.page-content>.btn {
    margin-top: 60px;
    margin-bottom: 100px;
    flex-shrink: 0;
}

/* ===== PAGE TRANSITION ===== */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--red) 0%, var(--dark-red) 100%);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.page-transition.active {
    opacity: 1;
    pointer-events: all;
}

.transition-heart {
    font-size: 80px;
    animation: heartBeat 0.8s ease infinite;
}

@keyframes heartBeat {

    0%,
    100% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.2);
    }

    50% {
        transform: scale(1);
    }

    75% {
        transform: scale(1.15);
    }
}

/* ===== TYPOGRAPHY ===== */
.handwritten-title {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--red);
    text-align: center;
    line-height: 1.3;
    margin-bottom: 20px;
}

.handwritten-subtitle {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
    font-weight: 500;
    color: var(--red);
    text-align: center;
    margin-bottom: 30px;
}

.handwritten-message {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 600;
    color: var(--red);
    text-align: right;
    line-height: 1.4;
    margin-bottom: 40px;
}

.handwritten-note {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--red);
    text-align: center;
    line-height: 1.5;
}

.handwritten-love {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    color: var(--red);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 24px;
}

.highlight {
    color: var(--dark-red);
    font-weight: 700;
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--red);
    opacity: 0.3;
}

/* ===== BUTTONS ===== */
.btn {
    font-family: 'Dancing Script', cursive;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 16px 48px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--red), var(--dark-red));
    color: var(--cream);
    box-shadow: 0 6px 20px rgba(180, 26, 38, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(180, 26, 38, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--red);
    border: 2px solid var(--red);
}

.btn-secondary:hover {
    background: var(--red);
    color: var(--cream);
    transform: translateY(-3px);
}

.btn-accent {
    background: linear-gradient(135deg, var(--cream), var(--dark-cream));
    color: var(--red);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn-accent:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ===== ANIMATIONS ===== */
.float-animation {
    animation: float 4s ease-in-out infinite;
}

.float-animation-delayed {
    animation: float 4s ease-in-out infinite 2s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.shake-animation {
    animation: shake 3s ease-in-out infinite;
}

@keyframes shake {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-5deg);
    }

    75% {
        transform: rotate(5deg);
    }
}

/* Fade-in animation for page elements */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== PAGE 0: OPENING ===== */
.opening-page {
    justify-content: center;
    gap: 30px;
    min-height: 100vh;
    padding-top: 60px;
    padding-bottom: 40px;
    position: relative;
    overflow: hidden;
}

/* ===== OPENING PAGE ANIMATED HEARTS ===== */
.opening-hearts-deco {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.deco-heart {
    position: absolute;
    font-size: 36px;
    opacity: 0.55;
    animation: decoFloat 5s ease-in-out infinite;
    filter: drop-shadow(0 0 4px rgba(180, 26, 38, 0.3));
}

.deco-heart:nth-child(1) {
    top: 8%;
    left: 5%;
    font-size: 42px;
    animation-delay: 0s;
    color: #b41a26;
}

.deco-heart:nth-child(2) {
    top: 15%;
    right: 8%;
    font-size: 34px;
    animation-delay: 1s;
    color: #e38cab;
}

.deco-heart:nth-child(3) {
    top: 60%;
    left: 3%;
    font-size: 48px;
    animation-delay: 2s;
    color: #d4536a;
}

.deco-heart:nth-child(4) {
    top: 70%;
    right: 5%;
    font-size: 38px;
    animation-delay: 0.5s;
    color: #b41a26;
}

.deco-heart:nth-child(5) {
    top: 35%;
    left: 8%;
    font-size: 30px;
    animation-delay: 3s;
    color: #c9a94e;
}

.deco-heart:nth-child(6) {
    top: 45%;
    right: 10%;
    font-size: 40px;
    animation-delay: 1.5s;
    color: #e38cab;
}

.deco-heart:nth-child(7) {
    top: 85%;
    left: 15%;
    font-size: 36px;
    animation-delay: 2.5s;
    color: #b41a26;
}

.deco-heart:nth-child(8) {
    top: 5%;
    left: 50%;
    font-size: 28px;
    animation-delay: 4s;
    color: #d4536a;
}

.deco-heart:nth-child(9) {
    top: 90%;
    right: 20%;
    font-size: 44px;
    animation-delay: 0.8s;
    color: #c9a94e;
}

.deco-heart:nth-child(10) {
    top: 25%;
    right: 3%;
    font-size: 26px;
    animation-delay: 3.5s;
    color: #e38cab;
}

@keyframes decoFloat {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg) scale(1);
        opacity: 0.4;
    }

    25% {
        transform: translateY(-18px) rotate(12deg) scale(1.2);
        opacity: 0.7;
    }

    50% {
        transform: translateY(-10px) rotate(-8deg) scale(1.1);
        opacity: 0.5;
    }

    75% {
        transform: translateY(-25px) rotate(10deg) scale(1.25);
        opacity: 0.65;
    }
}

/* Glowing ring behind images */
.opening-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(180, 26, 38, 0.25) 0%, transparent 70%);
    animation: glowPulse 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.opening-glow.glow-left {
    top: 10%;
    left: -5%;
}

.opening-glow.glow-right {
    bottom: 15%;
    right: -5%;
    animation-delay: 1.5s;
}

@keyframes glowPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.8;
    }
}

/* Sparkle stars */
.sparkle-star {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--gold);
    border-radius: 50%;
    pointer-events: none;
    animation: sparkleTwinkle 2s ease-in-out infinite;
    box-shadow: 0 0 6px 2px rgba(201, 169, 78, 0.4);
}

.sparkle-star:nth-child(1) {
    top: 12%;
    left: 20%;
    animation-delay: 0s;
}

.sparkle-star:nth-child(2) {
    top: 30%;
    right: 15%;
    animation-delay: 0.5s;
}

.sparkle-star:nth-child(3) {
    top: 55%;
    left: 12%;
    animation-delay: 1s;
}

.sparkle-star:nth-child(4) {
    top: 75%;
    right: 25%;
    animation-delay: 1.5s;
}

.sparkle-star:nth-child(5) {
    top: 20%;
    left: 45%;
    animation-delay: 0.8s;
}

.sparkle-star:nth-child(6) {
    top: 80%;
    left: 40%;
    animation-delay: 2s;
}

@keyframes sparkleTwinkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

.opening-images {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    max-width: 700px;
}

.opening-img-left,
.opening-img-right {
    width: 45%;
    max-width: 280px;
    border-radius: 20px;
    box-shadow: 0 10px 40px var(--shadow);
}

.opening-text {
    text-align: center;
    margin: 10px 0;
}

.opening-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ===== PAGE 1: ERROR ===== */
.error-page {
    justify-content: center;
    gap: 30px;
    text-align: center;
}

.error-illustration {
    width: 100%;
    max-width: 400px;
}

.error-img {
    width: 100%;
    border-radius: 20px;
}

/* ===== PAGE 2: NOTE ===== */
.note-page {
    justify-content: center;
    gap: 40px;
    align-items: center;
}

.note-container {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.note-card {
    position: relative;
    width: 350px;
    max-width: 90vw;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    transform: rotate(-5deg);
    transition: transform 0.3s ease;
}

.note-card:hover {
    transform: rotate(0deg) scale(1.02);
}

.note-bg-img {
    width: 100%;
    display: block;
}

.note-text-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    text-align: center;
}

.note-envelope {
    width: 300px;
    max-width: 80vw;
    transform: rotate(5deg);
    transition: transform 0.3s ease;
}

.note-envelope:hover {
    transform: rotate(0deg) scale(1.05);
}

.envelope-img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* ===== PAGE 3: HOME ===== */
.home-page {
    justify-content: center;
    gap: 50px;
    padding-top: 80px;
}

.home-title {
    max-width: 700px;
}

.letters-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    width: 100%;
    max-width: 800px;
}

.letter-card {
    cursor: pointer;
    transition: transform 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.letter-card:hover {
    transform: translateY(-15px) scale(1.05);
}

.letter-envelope {
    width: 100%;
    aspect-ratio: 1.4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.envelope-body {
    width: 100%;
    max-width: 200px;
    aspect-ratio: 1.3;
    position: relative;
    perspective: 800px;
}

.envelope-front {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #f5d5d5 0%, #e8b4b4 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(180, 26, 38, 0.2);
    border: 2px solid rgba(180, 26, 38, 0.15);
}

.envelope-flap {
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(180deg, #d4a3a3 0%, #e8b4b4 100%);
    clip-path: polygon(0 0, 50% 60%, 100% 0);
    z-index: 2;
    border-radius: 8px 8px 0 0;
}

.pink .envelope-front {
    background: linear-gradient(180deg, #f5c6d5 0%, #e8a3bb 100%);
}

.pink .envelope-flap {
    background: linear-gradient(180deg, #d4a3bb 0%, #e8a3bb 100%);
}

.green .envelope-front {
    background: linear-gradient(180deg, #c6d5c6 0%, #a3bba3 100%);
}

.green .envelope-flap {
    background: linear-gradient(180deg, #a3bba3 0%, #bacfa0 100%);
}

.heart-seal {
    font-size: 2.5rem;
    z-index: 3;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    animation: heartPulse 2s ease-in-out infinite;
}

@keyframes heartPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

.letter-label {
    font-family: 'Dancing Script', cursive;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--red);
    text-align: center;
    line-height: 1.2;
}

/* ===== PAGE 4: LOVE LETTER ===== */
.love-letter-page {
    padding-top: 40px;
    gap: 40px;
}

.letter-content-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.love-letter-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.love-roses {
    width: 40%;
    max-width: 300px;
    border-radius: 20px;
}

.love-hearts {
    width: 35%;
    max-width: 250px;
    border-radius: 20px;
}

.love-letter-text {
    max-width: 600px;
    text-align: center;
    padding: 30px;
    background: rgba(255, 251, 239, 0.5);
    border-radius: 20px;
    border: 2px dashed rgba(180, 26, 38, 0.2);
}

.music-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    text-align: center;
    margin-bottom: 20px;
}

.video-container {
    width: 100%;
    max-width: 600px;
    aspect-ratio: 16 / 9;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px var(--shadow);
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border-radius: 15px;
}

.couple-img {
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    box-shadow: 0 10px 40px var(--shadow);
}

/* ===== PAGE 5: GALLERY ===== */
.gallery-page {
    padding-top: 50px;
    gap: 30px;
}

.gallery-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 900px;
    padding: 20px;
}

.gallery-frame {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px var(--shadow);
    cursor: pointer;
    transition: all 0.4s ease;
    background: white;
    padding: 10px;
}

.gallery-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.5s ease;
}

.gallery-frame:hover {
    transform: scale(1.05) rotate(-2deg);
    box-shadow: 0 15px 50px rgba(180, 26, 38, 0.3);
}

.gallery-frame:hover img {
    transform: scale(1.1);
}

.frame-1 {
    transform: rotate(-3deg);
}

.frame-2 {
    transform: rotate(2deg);
    grid-row: span 2;
}

.frame-3 {
    transform: rotate(-1deg);
}

.frame-4 {
    transform: rotate(3deg);
}

.frame-5 {
    transform: rotate(-2deg);
    grid-column: span 2;
}

.frame-6 {
    transform: rotate(1deg);
}

/* ===== PAGE 6: INVITATION ===== */
.invitation-page {
    justify-content: center;
    gap: 40px;
}

.invitation-card {
    width: 100%;
    max-width: 700px;
    background: linear-gradient(135deg, rgba(255, 251, 239, 0.95), rgba(245, 234, 214, 0.95));
    border-radius: 30px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.invitation-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(180, 26, 38, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.invitation-card::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(180, 26, 38, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.invitation-header {
    text-align: center;
}

.invitation-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 20px;
}

.invitation-decoration {
    max-width: 400px;
    margin: 0 auto;
}

.dinner-img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow);
}

.invitation-text {
    text-align: center;
    max-width: 500px;
}

.invitation-divider {
    width: 60%;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--red), transparent);
    margin: 20px auto;
}

.signature {
    font-style: italic;
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--dark-red);
}

.invitation-flower {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 200px;
    opacity: 0.3;
    pointer-events: none;
}

.flower-img {
    width: 100%;
}

/* ===== PETAL RAIN ===== */
.petal {
    position: fixed;
    width: 15px;
    height: 15px;
    background: var(--red);
    border-radius: 50% 0 50% 50%;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    animation: petalFall linear infinite;
}

@keyframes petalFall {
    0% {
        opacity: 0;
        transform: translateY(-10vh) rotate(0deg) scale(0.5);
    }

    10% {
        opacity: 0.6;
    }

    100% {
        opacity: 0;
        transform: translateY(110vh) rotate(720deg) scale(0.3);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .letters-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .letters-grid .letter-card:last-child {
        grid-column: 1 / -1;
        justify-self: center;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .frame-2 {
        grid-row: auto;
    }

    .frame-5 {
        grid-column: auto;
    }

    .opening-images {
        flex-direction: column;
        gap: 15px;
    }

    .opening-img-left,
    .opening-img-right {
        width: 65%;
    }

    .note-container {
        flex-direction: column;
    }

    .note-card {
        width: 300px;
    }

    .invitation-card {
        padding: 30px 20px;
    }

    .love-letter-visual {
        flex-direction: column;
    }

    .love-roses,
    .love-hearts {
        width: 60%;
    }
}

@media (max-width: 480px) {
    .letters-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .letters-grid .letter-card:last-child {
        grid-column: auto;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .opening-buttons {
        flex-direction: column;
        width: 80%;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .page-content {
        padding: 30px 16px;
    }
}

/* ===== SCROLLBAR ===== */
.page::-webkit-scrollbar {
    width: 6px;
}

.page::-webkit-scrollbar-track {
    background: transparent;
}

.page::-webkit-scrollbar-thumb {
    background: rgba(180, 26, 38, 0.3);
    border-radius: 3px;
}

.page::-webkit-scrollbar-thumb:hover {
    background: rgba(180, 26, 38, 0.5);
}

/* ===== SPARKLE CURSOR ===== */
.sparkle {
    position: fixed;
    pointer-events: none;
    z-index: 200;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--red);
    animation: sparkleAnim 0.6s ease forwards;
}

@keyframes sparkleAnim {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0) translateY(-30px);
    }
}

/* ===== LETTER CARD CLICK TO OPEN TEXT ===== */
.letter-card::after {
    content: 'Click to Open';
    font-family: 'Dancing Script', cursive;
    font-size: 1rem;
    color: var(--red);
    opacity: 0;
    transition: opacity 0.3s ease;
    position: absolute;
    bottom: -5px;
}

.letter-card:hover::after {
    opacity: 1;
}

/* ===== ENTRANCE ANIMATIONS ===== */
.page.active .opening-images {
    animation: fadeInUp 0.8s ease 0.2s both;
}

.page.active .opening-text {
    animation: fadeInUp 0.8s ease 0.5s both;
}

.page.active .opening-buttons {
    animation: fadeInUp 0.8s ease 0.8s both;
}

.page.active .error-illustration {
    animation: fadeInUp 0.8s ease 0.2s both;
}

.page.active .error-text {
    animation: fadeInUp 0.8s ease 0.5s both;
}

.page.active .note-container {
    animation: fadeInUp 0.8s ease 0.3s both;
}

.page.active .home-title {
    animation: fadeInUp 0.8s ease 0.2s both;
}

.page.active .letters-grid {
    animation: fadeInUp 0.8s ease 0.5s both;
}

.page.active .letter-content-wrapper {
    animation: fadeInUp 0.8s ease 0.3s both;
}

.page.active .gallery-title {
    animation: fadeInUp 0.8s ease 0.2s both;
}

.page.active .gallery-subtitle {
    animation: fadeInUp 0.8s ease 0.4s both;
}

.page.active .gallery-grid {
    animation: fadeInUp 0.8s ease 0.6s both;
}

.page.active .invitation-card {
    animation: fadeInUp 0.8s ease 0.3s both;
}