/* تنظیمات کلی صفحه و فعال‌سازی اسکرول هوشمند */
html, body {
    min-height: 100dvh;
    height: auto;
    margin: 0;
    padding: 0;
    overflow-y: auto; 
    overflow-x: hidden;
    background: var(--game-bg, #1a0f0c) var(--game-pattern, url('/img/pattern.png')) repeat;
    background-size: 140px;
    background-attachment: fixed;
    font-family: 'Vazir', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    display: flex;
    justify-content: center;
    align-items: flex-start; 
}

.container {
    width: 100%;
    max-width: 480px;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; 
    padding: 5px 14px 40px 14px; 
    gap: 8px; 
    box-sizing: border-box;
}

/* لوگو */
.logo {
    width: 24vh;
    max-width: 135px;
    aspect-ratio: 1 / 1;
    background: var(--game-logo, url('/img/Icon.png')) no-repeat center center;
    background-size: contain;
    margin-top: 10px;
    filter: drop-shadow(0 8px 15px rgba(0,0,0,0.6));
    flex-shrink: 0;
}

/* نام بازی به‌صورت متن — برای بازی‌هایی که نامشان روی Icon.png نوشته نشده */
.game-wordmark {
    margin: 6px 0 2px;
    font-family: 'Vazirmatn', 'Vazir', sans-serif;
    font-weight: 800;
    font-size: clamp(28px, 9vw, 44px);
    line-height: 1.25;
    text-align: center;
    flex-shrink: 0;
    background: linear-gradient(180deg, #ffe9a8 0%, #ffc63d 45%, #e8951b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.55));
}

/* هدر تصویر */
.header-text {
    width: 85%;
    max-width: 300px;
    flex-shrink: 0;
}
.header-text img { width: 100%; height: auto; display: block; }

/* تیتر نسخه عادی */
.section-title {
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 4px 20px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: bold;
    flex-shrink: 0;
}

/* دکمه‌های مارکت */
.buttons {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
    flex-shrink: 0;
}

.buttons a {
    width: 100%;
    max-width: 260px;
    transform: scale(0.65); 
    transform-origin: center;
    margin: -12px 0 !important; 
    transition: transform 0.2s ease;
}

.buttons a:hover {
    transform: scale(0.70);
}

.buttons a img { width: 100%; height: auto; display: block; }

/* --- بخش جدید: انیمیشن‌ها --- */

/* ۱. انیمیشن ضربان دکمه مستقیم (قبلی) */
@keyframes pulse {
    0% { transform: translateX(-50%) scale(1); filter: brightness(1); }
    50% { transform: translateX(-50%) scale(1.04); filter: brightness(1.15); }
    100% { transform: translateX(-50%) scale(1); filter: brightness(1); }
}

/* ۲. انیمیشن نوار براق طلایی (جدید) */
@keyframes golden-shine {
    0% { left: -150%; } /* شروع از خیلی عقب‌تر */
    100% { left: 150%; } /* پایان در جلوتر بدون هیچ مکثی */
}


/* بخش بنر پیشنهاد ما - اصلاح شده برای انیمیشن */
.premium-section {
    position: relative;
    width: 100%;
    max-width: 350px;
    margin-top: 5px;
    z-index: 5;
    flex-shrink: 0;
    
    /* مهم: برای اینکه نوار براق از کادر بیرون نزند */
    overflow: hidden; 
    
    /* مهم: برای اینکه گوشه‌های براق تیز نباشند و با بنر هماهنگ شوند */
    border-radius: 15px; 
}

.offer-bg {
    width: 100%;
    height: auto;
    display: block;
}

/* --- ساخت لایه نوار براق (Gold Shine Layer) --- */
.premium-section::before {
    content: '';
    position: absolute;
    top: 0;
    width: 40%; /* عرض نوار براق */
    height: 100%;
    
    /* ایجاد شیب طلایی ملایم (از شفاف به طلایی و دوباره شفاف) */
    background: linear-gradient(
        to right, 
        rgba(255, 255, 255, 0) 0%,
        var(--game-shine, rgba(255, 220, 100, 0.2)) 30%, /* رنگ ملایم اختصاصی بازی */
        rgba(255, 255, 255, 0.6) 50%, /* مرکز براق و سفید */
        var(--game-shine, rgba(255, 220, 100, 0.2)) 70%,
        rgba(255, 255, 255, 0) 100%
    );
    
    /* کج کردن نوار برای زیبایی بیشتر */
    transform: skewX(-25deg); 
    
    /* اجرای انیمیشن */
    animation: golden-shine 2s infinite ease-in-out; 
    
    z-index: 6; /* قرارگیری روی بنر و زیر دکمه مستقیم */
    pointer-events: none; /* جلوگیری از تداخل با کلیک دکمه مستقیم */
}


/* دکمه دانلود مستقیم روی بنر */
.direct-download-btn {
    position: absolute;
    bottom: 28px !important; 
    left: 50%;
    transform: translateX(-50%);
    width: 65%;
    z-index: 10; /* حتماً روی نوار براق باشد */
    animation: pulse 2s infinite ease-in-out;
}

.direct-download-btn img { width: 100%; height: auto; display: block; }

/* دکمه‌ی دانلود مستقیم وقتی هنوز لینک APK ندارد: دیده می‌شود ولی کلیک نمی‌خورد */
.direct-download-btn.is-inactive {
    cursor: default;
    pointer-events: none;
}

/* عکس زیر بنر (Under) */
.under-box {
    width: 100%;
    max-width: 280px;
    margin-top: -5px; 
    z-index: 1;
    flex-shrink: 0;
}

.under-box img { width: 100%; height: auto; display: block; }

/* استایل اسکرول‌بار سیستمی */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--game-bg, #1a0f0c); }
::-webkit-scrollbar-thumb { background: var(--game-scroll, #4d332d); border-radius: 10px; }

/* بهینه‌سازی برای نمایشگرهای خیلی کوچک */
@media (max-height: 620px) {
    .logo { width: 18vh; }
    .buttons a { transform: scale(0.75); }
}