/* فایل: splash.css - نسخه تمام انیمیشن (بدون ویدیو) */

body.modal-open-locked {
    overflow: hidden !important;
}

#welcome-splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    min-height: 100vh;
    z-index: 99999;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 12px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.25);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

/* --- گل‌های ایموجی کوچک رنگارنگ (مثل کیبورد چت موبایل)، اشکال متنوع --- */
#petals-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.flower-emoji {
    position: absolute;
    top: -5%;
    display: inline-block;
    line-height: 1;
    opacity: 0.9;
    animation: falling linear forwards;
    user-select: none;
}

@keyframes falling {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: translate(var(--drift-x, 0), 110vh) rotate(360deg); opacity: 0; }
}

/* --- سه مدل شمع متفاوت، گوشه پایین چپ، سایز دو برابر --- */
.candles-row {
    position: absolute;
    bottom: 0;
    left: 24px;
    right: auto;
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    gap: 12px;
    z-index: 10;
}

.candles-row .candle-wrapper {
    position: relative;
    flex-shrink: 0;
}

/* مدل ۱: شمع بلند باریک (کلاسیک) — سایز دو برابر فعلی */
.candles-row .candle-type-1 {
    width: 144px;
    height: 400px;
}
.candles-row .candle-type-1 .candle-body {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 72px;
    height: 240px;
    background: linear-gradient(#fffcf0, #e0d8b0);
    border-radius: 6px;
    box-shadow: inset -10px 0 12px rgba(0,0,0,0.12);
}
.candles-row .candle-type-1 .wick {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 24px;
    background: #333;
}
.candles-row .candle-type-1 .flame {
    position: absolute;
    top: -72px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 72px;
    background: radial-gradient(ellipse at bottom, #ffeb3b 0%, #ff9800 60%, transparent 100%);
    border-radius: 50% 50% 20% 20%;
    filter: blur(2px);
    animation: flicker 0.1s infinite alternate;
    box-shadow: 0 0 48px 12px rgba(255, 165, 0, 0.5);
}

/* مدل ۲: شمع کوتاه و پهن (پیلار/وتیو) — سایز دو برابر */
.candles-row .candle-type-2 {
    width: 160px;
    height: 320px;
}
.candles-row .candle-type-2 .candle-body {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 96px;
    height: 180px;
    background: linear-gradient(#fff8e7, #e5dcc5);
    border-radius: 8px;
    box-shadow: inset -12px 0 16px rgba(0,0,0,0.1);
}
.candles-row .candle-type-2 .wick {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 20px;
    background: #2a2a2a;
}
.candles-row .candle-type-2 .flame {
    position: absolute;
    top: -56px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 56px;
    background: radial-gradient(ellipse at bottom, #fff176 0%, #ffb74d 50%, transparent 100%);
    border-radius: 50% 50% 22% 22%;
    filter: blur(2px);
    animation: flicker 0.12s infinite alternate;
    box-shadow: 0 0 40px 10px rgba(255, 180, 0, 0.55);
}

/* مدل ۳: شمع بلندتر با موم عاجی/سفید — سایز دو برابر */
.candles-row .candle-type-3 {
    width: 136px;
    height: 440px;
}
.candles-row .candle-type-3 .candle-body {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 64px;
    height: 280px;
    background: linear-gradient(#fefaf5, #e8e2d0);
    border-radius: 4px;
    box-shadow: inset -8px 0 10px rgba(0,0,0,0.08);
}
.candles-row .candle-type-3 .wick {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 28px;
    background: #1a1a1a;
}
.candles-row .candle-type-3 .flame {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 80px;
    background: radial-gradient(ellipse at bottom, #ffeb3b 0%, #ffa726 55%, transparent 100%);
    border-radius: 50% 50% 18% 18%;
    filter: blur(2px);
    animation: flicker 0.09s infinite alternate;
    box-shadow: 0 0 44px 10px rgba(255, 167, 38, 0.5);
}

@media (max-width: 480px) {
    .candles-row { bottom: 0; left: 16px; gap: 10px; }
    .candles-row .candle-type-1 { width: 72px; height: 200px; }
    .candles-row .candle-type-1 .candle-body { width: 36px; height: 120px; }
    .candles-row .candle-type-1 .wick { width: 3px; height: 12px; top: -12px; }
    .candles-row .candle-type-1 .flame { width: 20px; height: 36px; top: -36px; filter: blur(1px); }
    .candles-row .candle-type-2 { width: 80px; height: 160px; }
    .candles-row .candle-type-2 .candle-body { width: 48px; height: 90px; }
    .candles-row .candle-type-2 .wick { width: 2.5px; height: 10px; top: -10px; }
    .candles-row .candle-type-2 .flame { width: 16px; height: 28px; top: -28px; filter: blur(1px); }
    .candles-row .candle-type-3 { width: 68px; height: 220px; }
    .candles-row .candle-type-3 .candle-body { width: 32px; height: 140px; }
    .candles-row .candle-type-3 .wick { width: 2.5px; height: 14px; top: -14px; }
    .candles-row .candle-type-3 .flame { width: 18px; height: 40px; top: -40px; filter: blur(1px); }
}

@keyframes flicker {
    0% { transform: translateX(-50%) scale(1); opacity: 0.9; }
    100% { transform: translateX(-51%) scale(1.05); opacity: 1; }
}

@keyframes breathe {
    0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.8; transform: translateX(-50%) scale(1.1); }
}

/* --- استایل کادر سفید --- */
.splash-content {
    background-color: #fff;
    width: 85%;
    max-width: 380px;
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid var(--color-gray-mid);
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    position: relative;
    z-index: 20;
    font-family: 'Vazir', 'Tahoma', sans-serif;
    animation: zoomIn 0.6s ease-out;
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.splash-decoration { font-size: 2.5rem; margin-bottom: 15px; color: #d4af37; }
.splash-title { font-size: 1.3rem; font-weight: bold; color: #333; margin-bottom: 10px; }
.splash-text { font-size: 1rem; color: #555; margin-bottom: 25px; }

/* دکمه آمین — همان عرض، فونت، اندازه و استایل دکمه «متوجه شدم» در heartfelt */
.btn-enter-amen {
    width: 48%;
    display: block;
    margin-left: auto;
    margin-right: auto;
    background-color: var(--color-primary);
    border: 1px solid var(--color-primary);
    color: var(--color-navy-deep);
    height: 40px;
    padding: 0 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    box-shadow: none;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.btn-enter-amen:hover,
.btn-enter-amen:focus {
    background-color: var(--color-primary-hover) !important;
    border-color: var(--color-primary-hover) !important;
    color: var(--color-navy-deep);
    box-shadow: none;
    outline: none;
}

/* ضربدر بستن — ۲۰٪ بزرگ‌تر از مدال heartfelt؛ بدون بک‌گراند؛ رنگ عادی خاکستری متوسط، هاور خاکستری تیره */
#welcome-splash .splash-content .splash-close-btn {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    right: auto;
    margin: 0;
    padding: 0.3em;
    width: 1.2em;
    height: 1.2em;
    background: none !important;
    background-image: none !important;
    mask: none !important;
    -webkit-mask: none !important;
    border: none !important;
    color: var(--color-gray-mid);
    cursor: pointer;
    opacity: 1;
    transition: color 0.15s;
}
#welcome-splash .splash-content .splash-close-btn::before,
#welcome-splash .splash-content .splash-close-btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.2em;
    height: 2.4px;
    background: currentColor;
    transform-origin: center;
}
#welcome-splash .splash-content .splash-close-btn::before {
    transform: translate(-50%, -50%) rotate(45deg);
}
#welcome-splash .splash-content .splash-close-btn::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}
#welcome-splash .splash-content .splash-close-btn:hover {
    color: var(--color-gray-dark) !important;
}
#welcome-splash .splash-content .splash-close-btn:focus {
    outline: none;
    box-shadow: none;
}
#welcome-splash .splash-content .splash-close-btn:focus:not(:hover) {
    color: var(--color-gray-mid);
}

.splash-hidden { display: none !important; }

/* ========== ریسپانسیو مدال: تبلت و موبایل ========== */

/* تبلت (حدود ۷۶۸px و پایین‌تر) */
@media (max-width: 767px) {
    #welcome-splash {
        padding: 10px;
        align-items: center;
        justify-content: center;
    }
    .splash-content {
        width: 90%;
        max-width: 360px;
        padding: 24px 16px;
        border-radius: 12px;
    }
    .splash-title { font-size: 1.15rem; margin-bottom: 8px; }
    .splash-text { font-size: 0.9rem; margin-bottom: 20px; }
    .btn-enter-amen { height: 38px; font-size: 0.8125rem; }
    #welcome-splash .splash-content .splash-close-btn {
        top: 0.5rem;
        left: 0.5rem;
    }
    .candles-row {
        left: 12px;
        gap: 8px;
    }
    .candles-row .candle-type-1 { width: 100px; height: 280px; }
    .candles-row .candle-type-1 .candle-body { width: 50px; height: 168px; }
    .candles-row .candle-type-1 .wick { width: 4px; height: 16px; top: -16px; }
    .candles-row .candle-type-1 .flame { width: 26px; height: 48px; top: -48px; }
    .candles-row .candle-type-2 { width: 110px; height: 224px; }
    .candles-row .candle-type-2 .candle-body { width: 66px; height: 126px; }
    .candles-row .candle-type-2 .wick { width: 3px; height: 14px; top: -14px; }
    .candles-row .candle-type-2 .flame { width: 22px; height: 40px; top: -40px; }
    .candles-row .candle-type-3 { width: 94px; height: 308px; }
    .candles-row .candle-type-3 .candle-body { width: 44px; height: 196px; }
    .candles-row .candle-type-3 .wick { width: 3px; height: 20px; top: -20px; }
    .candles-row .candle-type-3 .flame { width: 24px; height: 56px; top: -56px; }
}

/* موبایل (حدود ۴۸۰px و پایین‌تر) — کادر وسط صفحه تا روی شمع‌ها نیفتد */
@media (max-width: 480px) {
    #welcome-splash {
        padding: 8px;
        align-items: center;
        justify-content: center;
    }
    .splash-content {
        width: 94%;
        max-width: none;
        padding: 20px 14px;
        border-radius: 10px;
    }
    .splash-title { font-size: 1.05rem; margin-bottom: 6px; }
    .splash-text { font-size: 0.85rem; margin-bottom: 16px; }
    .btn-enter-amen {
        width: 56%;
        height: 36px;
        font-size: 0.8rem;
    }
    #welcome-splash .splash-content .splash-close-btn {
        top: 0.4rem;
        left: 0.4rem;
        width: 1em;
        height: 1em;
    }
    #welcome-splash .splash-content .splash-close-btn::before,
    #welcome-splash .splash-content .splash-close-btn::after {
        width: 1em;
        height: 2px;
    }
    .flower-emoji { font-size: 1rem !important; }
}

/* موبایل خیلی کوچک (۳۶۰px و پایین‌تر) */
@media (max-width: 360px) {
    #welcome-splash { padding: 6px; }
    .splash-content {
        padding: 16px 12px;
        border-radius: 8px;
    }
    .splash-title { font-size: 0.95rem; }
    .splash-text { font-size: 0.8rem; margin-bottom: 12px; }
    .btn-enter-amen { width: 60%; height: 34px; }
    .candles-row { left: 8px; gap: 6px; }
}