/* ==========================================
   فایل: style.css (طراحی Premium و VIP)
========================================== */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;700;900&display=swap');

/* ----- ۶ پوسته (Theme) لوکس و چشم‌نواز ----- */

/* 1. دارک کلاسیک (Midnight) */
body.theme-dark {
    --bg-main: #0f111a;
    --glass-bg: rgba(22, 27, 34, 0.65);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --accent-primary: #3b82f6;
    --accent-glow: 0 0 15px rgba(59, 130, 246, 0.3);
    --card-hover: rgba(255, 255, 255, 0.05);
}

/* 2. لایت مرواریدی (Pearl) - بدون اذیت چشم */
body.theme-light {
    --bg-main: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.05);
    --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --accent-primary: #2563eb;
    --accent-glow: 0 5px 15px rgba(37, 99, 235, 0.2);
    --card-hover: rgba(0, 0, 0, 0.03);
}

/* 3. اقیانوسی (Deep Ocean) */
body.theme-ocean {
    --bg-main: #081229;
    --glass-bg: rgba(13, 25, 48, 0.7);
    --glass-border: rgba(56, 189, 248, 0.1);
    --glass-shadow: 0 10px 40px rgba(4, 9, 20, 0.8);
    --text-main: #f0f9ff;
    --text-muted: #bae6fd;
    --accent-primary: #0ea5e9;
    --accent-glow: 0 0 20px rgba(14, 165, 233, 0.4);
    --card-hover: rgba(56, 189, 248, 0.08);
}

/* 4. زمردی کریپتویی (Emerald) */
body.theme-emerald {
    --bg-main: #061f14;
    --glass-bg: rgba(6, 43, 26, 0.65);
    --glass-border: rgba(52, 211, 153, 0.1);
    --glass-shadow: 0 10px 40px rgba(2, 10, 6, 0.8);
    --text-main: #ecfdf5;
    --text-muted: #a7f3d0;
    --accent-primary: #10b981;
    --accent-glow: 0 0 20px rgba(16, 185, 129, 0.4);
    --card-hover: rgba(52, 211, 153, 0.08);
}

/* 5. غروب طلایی (Sunset) */
body.theme-sunset {
    --bg-main: #1c1917;
    --glass-bg: rgba(30, 27, 24, 0.75);
    --glass-border: rgba(245, 158, 11, 0.1);
    --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    --text-main: #fffbeb;
    --text-muted: #fde68a;
    --accent-primary: #f59e0b;
    --accent-glow: 0 0 20px rgba(245, 158, 11, 0.4);
    --card-hover: rgba(245, 158, 11, 0.08);
}

/* 6. بنفش سلطنتی (Amethyst) */
body.theme-amethyst {
    --bg-main: #170b24;
    --glass-bg: rgba(35, 15, 55, 0.7);
    --glass-border: rgba(168, 85, 247, 0.15);
    --glass-shadow: 0 10px 40px rgba(10, 3, 18, 0.8);
    --text-main: #faf5ff;
    --text-muted: #e9d5ff;
    --accent-primary: #a855f7;
    --accent-glow: 0 0 20px rgba(168, 85, 247, 0.4);
    --card-hover: rgba(168, 85, 247, 0.08);
}

/* رنگ‌های ثابت */
:root {
    --status-success: #10b981;
    --status-danger: #ef4444;
    --text-gold: #fbbf24;
}

/* تنظیمات پایه */
* {
    margin: 0; padding: 0; box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
    user-select: none; -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main); color: var(--text-main);
    transition: background-color 0.4s ease, color 0.4s ease;
    min-height: 100vh; display: flex; flex-direction: column;
}

/* پنل‌های شیشه‌ای لوکس */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: background 0.4s ease, border 0.4s ease;
}

/* ================= هدر VIP ================= */
.vip-header {
    position: fixed; top: 0; left: 0; width: 100%; height: 70px; z-index: 100;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 20px; border-radius: 0 0 25px 25px;
}

.header-right { flex: 1; display: flex; justify-content: flex-start; }
.header-center { flex: 2; text-align: center; font-size: 18px; font-weight: 900; letter-spacing: 1px; }
.header-left { flex: 1; display: flex; justify-content: flex-end; gap: 10px; }

/* موجودی */
.balance-pill {
    background: rgba(0, 0, 0, 0.2); padding: 6px 15px; border-radius: 20px;
    font-weight: 900; font-size: 16px; display: flex; align-items: center; gap: 8px;
    border: 1px solid var(--glass-border); box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}
body.theme-light .balance-pill { background: rgba(255, 255, 255, 0.5); }

.icon-btn {
    background: transparent; border: none; color: var(--text-main); font-size: 22px;
    cursor: pointer; width: 45px; height: 45px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center; transition: 0.3s;
}
.icon-btn:hover { background: var(--card-hover); }

/* ================= محتوای اصلی ================= */
.main-content {
    flex: 1; padding: 90px 15px 100px 15px;
    max-width: 500px; margin: 0 auto; width: 100%;
}

.view-section { display: none; animation: scaleFade 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.view-section.active { display: block; }

@keyframes scaleFade { from { opacity: 0; transform: scale(0.97) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* ================= آمار حساب کاربری ================= */
.vip-profile-card {
    padding: 30px 20px; text-align: center; border-radius: 24px; margin-bottom: 20px;
    display: flex; flex-direction: column; align-items: center;
}
.avatar { width: 90px; height: 90px; border-radius: 50%; border: 4px solid var(--accent-primary); box-shadow: var(--accent-glow); margin-bottom: 15px; }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.stat-box {
    padding: 20px 15px; border-radius: 20px; display: flex; flex-direction: column; align-items: center; gap: 8px;
    border: 1px solid var(--glass-border); transition: 0.3s;
}
.stat-box:hover { background: var(--card-hover); transform: translateY(-3px); }
.stat-box i { font-size: 28px; }
.stat-title { font-size: 13px; color: var(--text-muted); font-weight: bold; }
.stat-value { font-size: 22px; font-weight: 900; }

/* ================= لیست بازی‌ها ================= */
.game-card {
    padding: 15px; display: flex; align-items: center; gap: 15px; border-radius: 20px;
    cursor: pointer; transition: 0.3s; border: 1px solid var(--glass-border); margin-bottom: 15px;
}
.game-card:hover { transform: translateY(-4px); box-shadow: var(--accent-glow); border-color: var(--accent-primary); }
.game-icon { width: 60px; height: 60px; border-radius: 16px; display: flex; justify-content: center; align-items: center; font-size: 28px; color: white; }
.bg-orange { background: linear-gradient(135deg, #f59e0b, #ea580c); box-shadow: 0 5px 15px rgba(245, 158, 11, 0.3); }
.game-info { flex: 1; }

/* ================= منوی پایین ================= */
.bottom-nav {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    width: calc(100% - 40px); max-width: 400px; height: 70px; z-index: 100;
    display: flex; justify-content: space-evenly; align-items: center; border-radius: 25px;
}
.nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    color: var(--text-muted); text-decoration: none; font-size: 12px; font-weight: bold;
    transition: 0.3s; padding: 10px 20px; border-radius: 18px;
}
.nav-item i { font-size: 22px; transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.nav-item.active { color: var(--accent-primary); background: rgba(59, 130, 246, 0.1); }
.nav-item.active i { transform: translateY(-3px) scale(1.1); }

/* ================= مودال تنظیمات ================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); z-index: 999;
    display: flex; justify-content: center; align-items: center;
}
.modal-content { width: 90%; max-width: 350px; padding: 30px 25px; border-radius: 25px; text-align: center; }

.settings-group { margin-bottom: 25px; text-align: right; }
.settings-group label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 10px; font-weight: bold; }

.theme-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lang-options { display: flex; gap: 10px; }

.theme-btn, .lang-btn {
    padding: 10px 0; border: 1px solid var(--glass-border); background: rgba(0,0,0,0.3);
    border-radius: 12px; color: var(--text-main); font-weight: bold; cursor: pointer; transition: 0.3s;
    font-size: 13px;
}
body.theme-light .theme-btn, body.theme-light .lang-btn { background: rgba(255,255,255,0.7); }

.theme-btn:hover, .lang-btn:hover { filter: brightness(1.2); }
.theme-btn.active, .lang-btn.active { box-shadow: var(--accent-glow); border-color: var(--accent-primary); background: var(--accent-primary); color: #fff; }

/* رنگ‌های راهنمای زیر دکمه‌های تم */
.theme-btn.btn-dark { border-bottom: 3px solid #3b82f6; }
.theme-btn.btn-light { border-bottom: 3px solid #2563eb; }
.theme-btn.btn-ocean { border-bottom: 3px solid #0ea5e9; }
.theme-btn.btn-emerald { border-bottom: 3px solid #10b981; }
.theme-btn.btn-sunset { border-bottom: 3px solid #f59e0b; }
.theme-btn.btn-amethyst { border-bottom: 3px solid #a855f7; }

/* استایل دکمه‌های عمومی */
.btn {
    display: inline-block; text-align: center; padding: 12px 20px; font-size: 16px;
    font-weight: bold; border-radius: 12px; cursor: pointer; transition: all 0.2s; border: none;
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: linear-gradient(135deg, var(--accent-primary), #2563eb); color: white; box-shadow: var(--accent-glow); }
.btn-success { background: linear-gradient(135deg, var(--status-success), #059669); color: white; }
.btn-danger { background: linear-gradient(135deg, var(--status-danger), #b91c1c); color: white; }
.mt-3 { margin-top: 15px; } .w-100 { width: 100%; }
                            /* اضافه کردن به انتهای فایل CSS حکم */

/* پشت کارت روی میز در حالت انتظار */
.deck-placeholder {
    width: 60px; height: 90px;
    background: repeating-linear-gradient(45deg, #1a1a1a, #1a1a1a 10px, #2a2a2a 10px, #2a2a2a 20px);
    border: 3px solid #fff;
    border-radius: 8px;
    box-shadow: 2px 2px 15px rgba(0,0,0,0.8), -2px -2px 0px rgba(255,255,255,0.2) inset;
    position: absolute;
    transform: rotate(-15deg);
    display: flex; justify-content: center; align-items: center;
}
.deck-placeholder::after {
    content: '👑'; font-size: 30px; opacity: 0.5;
}

/* انیمیشن حباب‌های اکت (Reaction Bubbles) */
.chat-bubble {
    position: absolute;
    bottom: 100%; /* نمایش بالای سر آواتار */
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: linear-gradient(135deg, #ffffff, #f0f0f0);
    color: #000;
    font-size: 11px;
    font-weight: 900;
    padding: 6px 12px;
    border-radius: 16px 16px 16px 2px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.6);
    z-index: 100;
    opacity: 0;
    white-space: nowrap;
    border: 2px solid rgba(212, 175, 55, 0.8);
    pointer-events: none;
    transition: none;
}

.chat-bubble.show-bubble {
    animation: popBubble 3.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popBubble {
    0% { transform: translateX(-50%) scale(0) translateY(10px); opacity: 0; }
    10% { transform: translateX(-50%) scale(1.1) translateY(0); opacity: 1; }
    15% { transform: translateX(-50%) scale(1) translateY(0); opacity: 1; }
    85% { transform: translateX(-50%) scale(1) translateY(0); opacity: 1; }
    100% { transform: translateX(-50%) scale(0) translateY(-20px); opacity: 0; }
}
