@font-face {
    font-family: 'MyNewNastaliq';
    src: url('../assets/fonts/IranNastaliq_1.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'DimaShekasteh';
    src: url('../assets/fonts/DimaShekasteh.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'ShekastehV2';
    src: url('../assets/fonts/ShekastehV2.001.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Farkhonde';
    src: url('../assets/fonts/DigiFarkhondeBold.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Neirizi';
    src: url('../assets/fonts/Neirizi.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Miremad';
    src: url('../assets/fonts/Miremad.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'font_48';
    src: url('../assets/fonts/font_48.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

/* خانواده فونت دیباج */
@font-face { font-family: 'DibajFaNum'; src: url('../assets/fonts/dibaj/DibajFaNum-ExtraLight.woff2') format('woff2'); font-weight: 200; font-style: normal; }
@font-face { font-family: 'DibajFaNum'; src: url('../assets/fonts/dibaj/DibajFaNum-Light.woff2') format('woff2'); font-weight: 300; font-style: normal; }
@font-face { font-family: 'DibajFaNum'; src: url('../assets/fonts/dibaj/DibajFaNum-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; }
@font-face { font-family: 'DibajFaNum'; src: url('../assets/fonts/dibaj/DibajFaNum-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; }
@font-face { font-family: 'DibajFaNum'; src: url('../assets/fonts/dibaj/DibajFaNum-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; }
@font-face { font-family: 'DibajFaNum'; src: url('../assets/fonts/dibaj/DibajFaNum-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; }
@font-face { font-family: 'DibajFaNum'; src: url('../assets/fonts/dibaj/DibajFaNum-ExtraBold.woff2') format('woff2'); font-weight: 800; font-style: normal; }
@font-face { font-family: 'DibajFaNum'; src: url('../assets/fonts/dibaj/DibajFaNum-Black.woff2') format('woff2'); font-weight: 900; font-style: normal; }
@font-face { font-family: 'DibajFaNum'; src: url('../assets/fonts/dibaj/DibajFaNum-ExtraBlack.woff2') format('woff2'); font-weight: 950; font-style: normal; }

/* CSS Reset & Variables */
:root {
    --gold: #d4af37;
    --gold-muted: #c5a456;
    --gold-light: #e6c875;
    --bg-color: #faf8f5;
    --text-dark: #2c2c2c;
    --text-gray: #4a4a4a;

    --font-fa: 'DibajFaNum', Tahoma, sans-serif;
    --font-nastaliq: 'Miremad', serif;
    --font-nastaliq2: 'font_48', serif;

    /* Using Great Vibes for English Names temporarily - user can change this */
    --font-en-names: 'Great Vibes', cursive;
    --font-en: 'Great Vibes', cursive;

    --ease-out: cubic-bezier(0.25, 0.8, 0.25, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    font-family: var(--font-fa);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    overflow: hidden;
}

.hidden { display: none !important; }

/* ----------------------------------
   Mobile Container
-------------------------------------*/
#mobile-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 480px;
    background-color: var(--bg-color);
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
}

@media (min-width: 481px) {
    #mobile-container {
        height: 90vh;
        max-height: 900px;
        border-radius: 20px;
    }
}

/* ----------------------------------
   Split Screen (Initial View) - Changed to Nude/Warm tone
-------------------------------------*/
#split-screen {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: #eaddd3;
    background-image: url('data:image/svg+xml,%3Csvg width="100" height="100" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noise"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100" height="100" filter="url(%23noise)" opacity="0.05"/%3E%3C/svg%3E');
    display: flex;
    z-index: 100;
    overflow: hidden;
    perspective: 1000px;
}

.split-half {
    width: 50%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    transition: transform 1.8s var(--ease-in-out), opacity 1.5s ease;
    background-color: transparent;
    transform-style: preserve-3d;
}

.split-right { justify-content: flex-start; transform-origin: right center; }
.split-left { justify-content: flex-end; transform-origin: left center; }

.split-text {
    font-family: var(--font-nastaliq);
    font-size: clamp(2.5rem, 10vw, 3.5rem);
    color: #4a3b32;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.5);
    line-height: 1.5;
}

.right-text { left: 10vw; }
.left-text { right: 10vw; }

.split-line {
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 1px; height: 100%;
    background: rgba(0,0,0,0.08);
    z-index: 101;
    transition: opacity 0.5s;
}

.wax-seal {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(80px, 25vw, 110px);
    height: clamp(80px, 25vw, 110px);
    z-index: 102;
    cursor: pointer;
    transition: all 0.5s var(--ease-out);
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.2));
    display: flex;
    justify-content: center;
    align-items: center;
}

.seal-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wax-seal:hover { transform: translate(-50%, -50%) scale(1.05); }

#split-screen.opening .wax-seal { opacity: 0; transform: translate(-50%, -50%) scale(1.5); pointer-events: none; }
#split-screen.opening .split-line { opacity: 0; }
#split-screen.opening .split-right { transform: rotateY(80deg) translateX(50%); opacity: 0; }
#split-screen.opening .split-left { transform: rotateY(-80deg) translateX(-50%); opacity: 0; }

/* ----------------------------------
   Main Screen Background & Frame
-------------------------------------*/
#main-screen {
    position: relative;
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    background-color: var(--bg-color);
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    overflow: hidden;
    background-color: var(--bg-color);
}

#main-screen:not(.hidden) .hero-bg {
    animation: heroReveal 2.5s var(--ease-out) forwards;
}

@keyframes heroReveal {
    0% { opacity: 0; transform: scale(1.15); filter: blur(5px); }
    100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

.bg-media-wrapper {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 15%, rgba(0,0,0,0) 75%);
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 15%, rgba(0,0,0,0) 75%);
}

.bg-media {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center 30%;
    /* کمتر کردن سیاه‌وسفیدی (Grayscale) تا عکس رنگی‌تر شود */
    filter: grayscale(35%) opacity(0.5);
}

.gold-frame {
    position: absolute;
    top: 15px; bottom: 15px;
    left: 15px; right: 15px;
    border: 2px solid var(--gold-muted);
    outline: 1px solid var(--gold-light);
    outline-offset: -4px;
    pointer-events: none;
    z-index: 1;
}

.corner-decor {
    position: absolute;
    width: 25px; height: 25px;
    pointer-events: none;
    z-index: 2;
}
.corner-decor::before, .corner-decor::after {
    content: ''; position: absolute;
    background-color: var(--gold); border-radius: 50%;
}
.corner-decor::before { width: 4px; height: 4px; top: 8px; left: 8px; }
.corner-decor::after { width: 5px; height: 5px; bottom: 12px; right: 12px; }

.top-right { top: 20px; right: 20px; }
.top-left { top: 20px; left: 20px; transform: scaleX(-1); }
.bottom-right { bottom: 20px; right: 20px; transform: scaleY(-1); }
.bottom-left { bottom: 20px; left: 20px; transform: scale(-1, -1); }

.ken-burns { animation: kenBurns 25s infinite alternate linear; }
@keyframes kenBurns {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

/* ----------------------------------
   Content (Fully Responsive)
-------------------------------------*/
#content-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    text-align: center;
    padding: 30px 15px 40px 15px;
    z-index: 10;
    width: 100%;
    height: 100%;
}

.sequence-text {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 3s var(--ease-out), transform 3s var(--ease-out); /* تغییر زمان به ۳ ثانیه */
}

/* افکت نشانگر چشمک‌زن برای حالت تایپ */
.typewriter::after {
    content: '|';
    animation: blink 1s infinite;
    color: var(--gold-muted);
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.sequence-text.visible {
    opacity: 1; transform: translateY(0);
}

.header-text {
    font-family: var(--font-nastaliq);
    font-size: clamp(1rem, 4vw, 1.4rem);
    color: var(--text-gray);
    margin-bottom: 0.5vh;
    line-height: 1.5;
}

.names-wrapper {
    display: flex; align-items: center; justify-content: center;
    gap: 15px;
    margin-top: 1vh;
    direction: ltr; /* Ensure English names flow correctly LTR */
}

/* English Names Styling */
.name-en {
    font-family: var(--font-en-names);
    font-size: clamp(1rem, 15vw, 3.3rem);
    color: var(--text-dark);
    line-height: 1;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
    font-weight: 400;
}

.and-text {
    font-family: var(--font-fa);
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    color: var(--gold-muted);
    font-weight: 300;
    margin: 0 5px;
}

/* عکس‌نوشته عاشقانه */
.love-typography-img {
    width: 70%;
    max-width: 300px;
    height: auto;
    max-height: 15vh;
    margin: 1.5vh 0;
    object-fit: contain;
}

.english-quote {
    font-family: var(--font-en);
    font-size: clamp(1.2rem, 5vw, 1.6rem);
    color: var(--gold-muted);
    margin-bottom: 1vh;
    letter-spacing: 1px;
}مم

.extra-info-text {
    font-family: var(--font-fa); /* تغییر به فونت تاریخ (دیباج) */
    font-size: clamp(0.9rem, 4vw, 1.1rem);
    color: var(--text-dark);
    font-weight: 600;
    margin: 0.5vh 0 1vh 0;
}

/* ----------------------------------
   طراحی تقویمی تاریخ (Responsive)
-------------------------------------*/
.elegant-date-box-new {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1vh 0;
    font-family: var(--font-fa);
    width: 90%;
}

.date-month-new {
    font-size: clamp(0.9rem, 3.5vw, 1.1rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.date-middle-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.date-side-text {
    font-size: clamp(0.7rem, 3vw, 0.9rem);
    font-weight: 600;
    color: var(--text-dark);
    padding: 4px 0;
    border-top: 1.5px solid var(--text-dark);
    border-bottom: 1.5px solid var(--text-dark);
    width: clamp(60px, 20vw, 90px);
    text-align: center;
    white-space: nowrap;
}

.date-day-new {
    font-size: clamp(2.2rem, 9vw, 3rem);
    font-weight: 700;
    color: #3b1515;
    line-height: 1;
    margin: 0 5px;
}

.date-year-new {
    font-size: clamp(0.9rem, 3.5vw, 1.1rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 5px;
    letter-spacing: 2px;
}

.address-text {
    font-family: var(--font-fa);
    font-size: clamp(0.7rem, 3vw, 0.85rem);
    color: var(--text-gray);
    line-height: 1.8;
    max-width: 90%;
    margin-top: 0.5vh;
}

.notice-text {
    font-family: var(--font-fa);
    font-size: clamp(0.6rem, 2.5vw, 0.75rem);
    color: #8c2a2a;
    line-height: 1.6;
    max-width: 85%;
    margin-top: 1vh;
    font-weight: 500;
}

/* ----------------------------------
   Buttons (Floating and Top Corner)
-------------------------------------*/
.floating-route-btn {
    position: absolute;
    bottom: 25px;
    left: 25px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--gold-muted);
    backdrop-filter: blur(5px);
    color: var(--text-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 90;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.floating-route-btn:hover { background: var(--gold-muted); color: white; }

#music-toggle {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--gold-muted);
    backdrop-filter: blur(5px);
    color: var(--text-dark);
    display: flex; justify-content: center; align-items: center;
    z-index: 90;
    cursor: pointer;
}

/* ----------------------------------
   Bottom Sheet (Details)
-------------------------------------*/
.sheet-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(3px);
    z-index: 100; opacity: 0; visibility: hidden; transition: all 0.4s ease;
}
.sheet-overlay.active { opacity: 1; visibility: visible; }

.bottom-sheet {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: var(--bg-color); border-top: 2px solid var(--gold-muted);
    border-radius: 20px 20px 0 0; padding: 20px 20px 30px;
    z-index: 101; transform: translateY(100%);
    transition: transform 0.5s var(--ease-out);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
    text-align: center;
}
.bottom-sheet.active { transform: translateY(0); }

.sheet-handle { width: 40px; height: 4px; background: #ccc; border-radius: 2px; margin: 0 auto 15px; }
.close-btn { position: absolute; top: 15px; right: 15px; background: none; border: none; color: var(--text-gray); font-size: 1.5rem; cursor: pointer; }

.sheet-title { font-family: var(--font-fa); font-size: 1.8rem; font-weight: bold; color: var(--text-dark); margin-bottom: 10px; line-height: 1.5; }
.sheet-desc { font-family: var(--font-fa); font-size: 0.9rem; color: var(--text-gray); margin-bottom: 20px; }

.routing-btn {
    font-family: var(--font-fa);
    display: inline-block; text-decoration: none;
    background: var(--gold-muted); color: white;
    padding: 12px 25px; border-radius: 4px; font-size: 1rem;
    transition: background 0.3s ease; width: 85%;
}
.routing-btn:hover { background: var(--gold); }
