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

body {
    font-family: 'Vazirmatn', sans-serif;
    color: #fff;
    height: 100vh;
    overflow: hidden;
    width: 100%;
    background-color: #0a0005;
}

/* --- استایل WebGL Canvas --- */
#webGLApp {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; pointer-events: all;
}

/* --- انیمیشن متن جدید (استخراج شده از فایل ارسالی) --- */
@keyframes blurFadeIn {
    0% {
        opacity: 0;
        text-shadow: 0px 0px 40px #fff;
        transform: scale(1.3);
        filter: blur(10px);
    }
    50% {
        opacity: 0.5;
        text-shadow: 0px 0px 10px #fff;
        transform: scale(1.1);
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        text-shadow: 0px 0px 1px rgba(255,255,255,0);
        transform: scale(1);
        filter: blur(0px);
    }
}

.magical-text {
    /* این کلاس توسط JS به اسلاید فعال اضافه می‌شود */
    animation: blurFadeIn 1.5s ease-out forwards;
    opacity: 0; /* قبل از شروع انیمیشن مخفی باشد */
}

/* --- دکمه موزیک --- */
.music-control {
    position: fixed; top: 20px; left: 20px; z-index: 1000;
    width: 50px; height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    cursor: pointer; backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.music-control:active { transform: scale(0.9); }
.music-icon { width: 24px; height: 24px; fill: #fff; }
.playing-animation { animation: pulse-music 2s infinite; }
@keyframes pulse-music {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

/* --- لایه محتوا --- */
.content-layer {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 2; pointer-events: none;
}
.slide.active, .btn-container, .envelope-wrapper, .full-letter, .music-control {
    pointer-events: auto;
}

/* اسلایدها */
.slide {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; padding: 20px;
}
.slide.active { opacity: 1; visibility: visible; }

h1 {
    font-size: clamp(2.5rem, 10vw, 4.5rem); /* سایز فونت بزرگتر برای دیده شدن افکت */
    font-weight: 900;
    text-align: center;
    line-height: 1.4;
    color: transparent; /* برای افکت بلر */
    text-shadow: 0 0 10px rgba(255,255,255,0.5); /* حالت اولیه */
    /* بازگردانی رنگ برای انیمیشن نهایی */
    color: #fff;
}

/* گالری */
.gallery-wrapper {
    position: relative; width: 100%; height: 50vh;
    perspective: 1000px; display: flex; justify-content: center; align-items: center;
}
.photo-card {
    position: absolute; width: 65vw; max-width: 280px; aspect-ratio: 3/4;
    border-radius: 15px; overflow: hidden;
    border: 4px solid rgba(255,255,255,0.9);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    background: #333;
}
.photo-card img { width: 100%; height: 100%; object-fit: cover; }

/* دکمه‌ها */
.btn-container {
    display: flex; flex-direction: column; gap: 20px;
    margin-top: 40px; position: relative; width: 100%; align-items: center;
}
.yes-btn {
    background: rgba(255, 255, 255, 0.95);
    color: #DC0437; padding: 16px 50px; border-radius: 50px;
    font-size: 1.5rem; font-weight: 900; border: none;
    box-shadow: 0 8px 32px rgba(220, 4, 55, 0.3); z-index: 10; cursor: pointer;
}
.no-btn {
    background: rgba(255, 255, 255, 0.1); color: #fff;
    padding: 12px 35px; border-radius: 50px; border: 1px solid rgba(255,255,255,0.3);
    font-size: 1.1rem; position: relative; backdrop-filter: blur(10px); cursor: pointer;
}

/* پاکت نامه */
.envelope-wrapper {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; justify-content: center; align-items: center;
    z-index: 50; visibility: hidden; opacity: 0;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(8px);
}
.envelope {
    position: relative; width: 300px; height: 200px;
    background: #800020; cursor: pointer;
    transform-style: preserve-3d;
    box-shadow: 0 25px 60px rgba(0,0,0,0.5);
}
.envelope-flap {
    position: absolute; top: 0; left: 0; width: 0; height: 0;
    border-left: 150px solid transparent; border-right: 150px solid transparent;
    border-top: 110px solid #a31545; transform-origin: top;
    z-index: 4; transition: transform 0.6s ease;
}
.envelope-pocket {
    position: absolute; bottom: 0; left: 0; width: 0; height: 0;
    border-left: 150px solid transparent; border-right: 150px solid transparent;
    border-bottom: 200px solid #5c0017; z-index: 3;
}
.envelope-back {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: #5c0017; z-index: 1;
}
.heart-seal {
    position: absolute; top: 40px; left: 50%; transform: translate(-50%, -50%);
    font-size: 40px; color: gold; z-index: 5; text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.letter-content {
    position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 90%; height: 80%; background: #fff; z-index: 2;
    transition: all 0.5s ease; border-radius: 5px;
}
.full-letter {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 85vw; max-width: 400px; min-height: 50vh; max-height: 80vh;
    background: rgba(255, 255, 255, 0.95); color: #333;
    padding: 30px 20px; border-radius: 20px;
    box-shadow: 0 20px 80px rgba(0,0,0,0.5); z-index: 100;
    opacity: 0; overflow-y: auto; font-weight: 500;
    line-height: 1.8; text-align: right;
    border: 1px solid rgba(255,255,255,0.5);
}
.full-letter p { margin-bottom: 15px; font-size: 1.1rem; }
.full-letter .signature { text-align: left; font-family: 'Dancing Script', cursive; font-size: 1.5rem; color: #DC0437; margin-top: 20px;}

.tap-hint {
    position: fixed; bottom: 40px; left: 0; width: 100%;
    text-align: center; color: rgba(255,255,255,0.8);
    font-size: 0.9rem; animation: pulse 2s infinite; pointer-events: none;
    font-weight: 500; letter-spacing: 1px; z-index: 5;
}
@keyframes pulse { 50% { opacity: 0.4; transform: scale(0.98); } }