/* ============================================================
   Amir BTC Assistant - Premium Dark Theme v3.4
   با استایل‌های جدید برای سرتیترها، نوتیفیکیشن، پاپ‌آپ جوین و تنظیمات
   ============================================================ */

/* #region پایه و متغیرهای سراسری */
/* ============================================================================ */
/* این بخش متغیرهای طراحی، ریست اولیه و رفتارهای عمومی رابط را تعریف می‌کند. */
/* ============================================================================ */
:root {
    --bg-primary: #0b1220;
    --bg-secondary: #111827;
    --bg-card: #1a2332;
    --border: rgba(255,255,255,0.06);
    --text: #ffffff;
    --text-dim: #94a3b8;
    --text-sub: #64748b;
    --accent: #f7931a;
    --accent-hover: #e07c0f;
    --green: #00c896;
    --red: #ff4d4d;
    --radius: 16px;
    --shadow: 0 8px 32px rgba(0,0,0,0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; -webkit-tap-highlight-color: transparent; }
body { background: var(--bg-primary); color: var(--text); padding-bottom: 85px; overflow-x: hidden; font-size: 14px; line-height: 1.5; }

#mandatory-join-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2147483647;
    padding: 20px;
}

body.user-loading .profile-loading-target.skeleton-text {
    color: transparent !important;
    background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.06) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.2s ease-in-out infinite;
    border-radius: 6px;
    min-width: 80px;
    display: inline-block;
}
@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.join-status-msg {
    font-size: 12px;
    color: var(--text-sub);
    margin-top: 12px;
    line-height: 1.5;
}
.join-status-msg.join-status-error {
    color: var(--red);
}

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }

/* #endregion */

/* ============================================================================ */
/* #region هدر */
/* این بخش استایل‌های مرتبط با "هدر" را در خود نگه می‌دارد. */
/* ============================================================================ */
.app-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; background: rgba(11,18,32,0.85); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-left { display: flex; align-items: center; gap: 10px; }
.brand-dot { width: 10px; height: 10px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 12px var(--accent); }
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: 0.5px; }
.header-right { display: flex; align-items: center; gap: 12px; }
.notif-btn { background: rgba(255,255,255,0.04); border: 1px solid var(--border); width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--text); cursor: pointer; position: relative; }
.notif-badge { position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

/* #endregion */

/* ============================================================================ */
/* #region صفحات */
/* این بخش استایل‌های مرتبط با "صفحات" را در خود نگه می‌دارد. */
/* ============================================================================ */
.page { display: none; padding: 12px 0 20px; animation: fadeSlide 0.3s ease; }
.page.active { display: block; }
@keyframes fadeSlide { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* #endregion */

/* ============================================================================ */
/* #region بخش‌ها و سرتیترها (زیباسازی شده) */
/* این بخش استایل‌های مرتبط با "بخش‌ها و سرتیترها (زیباسازی شده)" را در خود نگه می‌دارد. */
/* ============================================================================ */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 15px;  /* فاصله بیشتر */
}
.section-title {
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-icon { width: 20px; height: 20px; flex-shrink: 0; color: var(--accent); stroke: var(--accent); }
.page-title-with-icon { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.modal-title-with-icon { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.modal-icon { width: 20px; height: 20px; flex-shrink: 0; color: var(--accent); stroke: var(--accent); }
.modal-close-btn { background: rgba(255,255,255,0.05); border: 1px solid var(--border); width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--text-dim); cursor: pointer; flex-shrink: 0; }
.section-more {
    font-size: 12px;
    color: var(--text-dim);
    cursor: pointer;
}
.add-watch-btn {
    background: var(--accent);
    border: none;
    color: #000;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* #endregion */

/* ============================================================================ */
/* #region Hero Banner */
/* این بخش استایل‌های مرتبط با "Hero Banner" را در خود نگه می‌دارد. */
/* ============================================================================ */
.hero-banner { margin: 0 20px 16px; padding: 16px; background: linear-gradient(135deg, rgba(247,147,26,0.12), rgba(0,200,150,0.06)); border: 1px solid rgba(247,147,26,0.15); border-radius: var(--radius); position: relative; overflow: hidden; cursor: pointer; min-height: 130px; }
.hero-inner { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.hero-glow { position: absolute; top: -40%; right: -20%; width: 200px; height: 200px; background: radial-gradient(circle, rgba(247,147,26,0.08), transparent 70%); pointer-events: none; }
.hero-content { flex: 1; min-width: 0; position: relative; z-index: 1; }
.hero-art { flex: 0 0 48%; max-width: 170px; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.hero-logo { width: 100%; height: auto; max-height: 140px; object-fit: contain; filter: drop-shadow(0 6px 24px rgba(247,147,26,0.35)); transition: transform 0.3s ease; }
.hero-banner:active .hero-logo { transform: scale(0.97); }
.hero-badge { display: inline-block; background: rgba(247,147,26,0.15); color: var(--accent); font-size: 10px; font-weight: 700; padding: 2px 10px; border-radius: 20px; margin-bottom: 6px; }
.hero-content h2 { font-size: 18px; font-weight: 800; margin: 4px 0; }
.hero-content p { font-size: 12px; color: var(--text-dim); margin-bottom: 10px; line-height: 1.4; }
.hero-cta { background: var(--accent); border: none; color: #000; font-weight: 700; padding: 8px 20px; border-radius: 10px; cursor: pointer; font-size: 13px; pointer-events: none; }
.join-icon-wrap { margin-bottom: 15px; }
.join-logo { width: 90px; height: auto; object-fit: contain; filter: drop-shadow(0 4px 16px rgba(247,147,26,0.3)); }

/* #endregion */

/* ============================================================================ */
/* #region اسلایدر */
/* این بخش استایل‌های مرتبط با "اسلایدر" را در خود نگه می‌دارد. */
/* ============================================================================ */
.slider-container { margin: 0 20px 20px; border-radius: var(--radius); overflow: hidden; height: 170px; background: var(--bg-card); border: 1px solid var(--border); position: relative; }
.slider-track { width: 100%; height: 100%; position: relative; }
.slide-item { width: 100%; height: 100%; position: relative; cursor: pointer; }
.slide-img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.5); }
.slide-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 16px; background: linear-gradient(0deg, rgba(0,0,0,0.85), transparent); }
.slide-overlay h4 { font-size: 15px; font-weight: 700; color: var(--accent); }
.slide-overlay p { font-size: 12px; color: var(--text-dim); margin: 4px 0; }
.slide-author { font-size: 11px; color: rgba(255,255,255,0.4); }
.slider-dots { position: absolute; bottom: 8px; left: 16px; display: flex; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.2); }
.dot.active { background: var(--accent); width: 18px; border-radius: 4px; }
.slide-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text-dim); }

/* #endregion */

/* ============================================================================ */
/* #region واچ‌لیست */
/* این بخش استایل‌های مرتبط با "واچ‌لیست" را در خود نگه می‌دارد. */
/* ============================================================================ */
.watchlist-grid {
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding: 0 20px 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.watchlist-grid::-webkit-scrollbar { display: none; }
.watch-item {
    flex: 0 0 118px;
    scroll-snap-align: start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 8px;
    text-align: center;
    position: relative;
    cursor: pointer;
}
.watch-item .watch-icon { width: 28px; height: 28px; margin-bottom: 4px; border-radius: 50%; }
.watch-sym { display: block; font-weight: 700; font-size: 12px; }
.watch-price { font-size: 12px; color: var(--text-dim); }
.watch-change { font-size: 11px; font-weight: 600; }
.watch-change.up { color: var(--green); }
.watch-change.down { color: var(--red); }
.remove-watch { position: absolute; top: 4px; right: 6px; color: var(--text-dim); cursor: pointer; }

/* #endregion */

/* ============================================================================ */
/* #region اخبار مهم */
/* این بخش استایل‌های مرتبط با "اخبار مهم" را در خود نگه می‌دارد. */
/* ============================================================================ */
.important-news-list { padding: 0 20px 16px; display: flex; flex-direction: column; gap: 8px; }
.important-news-item { display: flex; gap: 10px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 10px; cursor: pointer; }
.important-news-img { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.important-news-content { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.important-news-title { font-size: 13px; font-weight: 600; line-height: 1.3; }
.important-news-source { font-size: 11px; color: var(--text-dim); }

/* #endregion */

/* ============================================================================ */
/* #region صفحه مارکت */
/* این بخش استایل‌های مرتبط با "صفحه مارکت" را در خود نگه می‌دارد. */
/* ============================================================================ */
.search-bar { padding: 0 20px 12px; }
.search-input { width: 100%; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--border); background: rgba(255,255,255,0.03); color: var(--text); font-size: 14px; outline: none; }
.search-input:focus { border-color: var(--accent); }
.market-tabs { display: flex; gap: 4px; padding: 0 20px 12px; overflow-x: auto; scrollbar-width: none; }
.market-tabs::-webkit-scrollbar { display: none; }
.tab-btn { flex-shrink: 0; padding: 8px 16px; border: none; background: transparent; color: var(--text-dim); font-size: 13px; font-weight: 600; cursor: pointer; border-radius: 20px; transition: all 0.2s; }
.tab-btn.active { background: var(--accent); color: #000; }
.coin-list { padding: 0 20px; }
.coin-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.coin-item:last-child { border-bottom: none; }
.coin-left { display: flex; align-items: center; gap: 10px; }
.coin-rank { font-size: 11px; color: var(--text-sub); width: 24px; }
.coin-icon { width: 28px; height: 28px; border-radius: 50%; }
.coin-sym { font-weight: 700; font-size: 14px; }
.coin-name { font-size: 11px; color: var(--text-dim); }
.coin-right { display: flex; align-items: center; gap: 10px; }
.coin-price { font-weight: 600; font-family: monospace; }
.coin-change { font-size: 12px; font-weight: 600; padding: 2px 6px; border-radius: 6px; }
.coin-change.up { color: var(--green); background: rgba(0,200,150,0.1); }
.coin-change.down { color: var(--red); background: rgba(255,77,77,0.1); }
.watch-star { cursor: pointer; opacity: 0.3; transition: 0.2s; display: inline-flex; }
.watch-star.active { opacity: 1; }

/* #endregion */

/* ============================================================================ */
/* #region صفحه تحلیل */
/* این بخش استایل‌های مرتبط با "صفحه تحلیل" را در خود نگه می‌دارد. */
/* ============================================================================ */
.analysis-header { display: flex; justify-content: space-between; align-items: center; padding: 0 20px 14px; }
.analysis-header h2 { font-size: 18px; }
.admin-btn {
    background: linear-gradient(135deg, var(--accent), #ffb347);
    border: none;
    color: #000;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 13px;
    box-shadow: 0 4px 15px rgba(247, 147, 26, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}
.analysis-grid { padding: 0 20px; }
.analysis-card { display: flex; gap: 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; cursor: pointer; }
.analysis-cover { width: 80px; height: 80px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.analysis-body { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.analysis-body h4 { font-size: 14px; }
.tf-badge { font-size: 11px; background: rgba(247,147,26,0.1); color: var(--accent); padding: 1px 8px; border-radius: 4px; }
.analysis-body p { font-size: 12px; color: var(--text-dim); margin: 4px 0; }
.analysis-meta { font-size: 11px; color: var(--text-sub); }
.delete-analysis-btn { background: rgba(255,77,77,0.12); border: 1px solid rgba(255,77,77,0.2); color: var(--red); padding: 4px 10px; border-radius: 8px; font-size: 12px; cursor: pointer; margin-top: 6px; align-self: flex-start; display: flex; align-items: center; gap: 4px; transition: 0.2s; }
.delete-analysis-btn:hover { background: rgba(255,77,77,0.2); }
.analysis-admin-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.edit-analysis-btn { background: rgba(247,147,26,0.12); border: 1px solid rgba(247,147,26,0.25); color: var(--accent); padding: 4px 10px; border-radius: 8px; font-size: 12px; cursor: pointer; display: flex; align-items: center; gap: 4px; transition: 0.2s; }
.edit-analysis-btn:hover { background: rgba(247,147,26,0.2); }
.analysis-detail-box { max-width: 480px; }
.analysis-detail-img { width: 100%; border-radius: 14px; margin: 8px 0 12px; max-height: 260px; object-fit: cover; }
.analysis-detail-text { color: var(--text-dim); line-height: 1.7; font-size: 14px; white-space: pre-wrap; margin-bottom: 16px; }
.modal-box-wide { max-width: 520px; }

/* #endregion */

/* ============================================================================ */
/* #region صفحه اخبار */
/* این بخش استایل‌های مرتبط با "صفحه اخبار" را در خود نگه می‌دارد. */
/* ============================================================================ */
.news-tabs { display: flex; gap: 4px; padding: 0 20px 12px; overflow-x: auto; scrollbar-width: none; }
.news-tabs::-webkit-scrollbar { display: none; }
.news-tab { flex-shrink: 0; padding: 6px 14px; border: none; background: transparent; color: var(--text-dim); font-size: 13px; cursor: pointer; border-radius: 20px; }
.news-tab.active { background: rgba(247,147,26,0.15); color: var(--accent); }
.news-list { padding: 0 20px; }
.news-item { display: flex; gap: 12px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; cursor: pointer; }
.news-img { width: 70px; height: 70px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.news-content { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.news-title { font-weight: 600; font-size: 13px; line-height: 1.4; }
.news-source { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

/* #endregion */

/* ============================================================================ */
/* #region تقویم اقتصادی */
/* این بخش استایل‌های کارت‌های رویداد و وضعیت‌های تقویم اقتصادی را تعریف می‌کند. */
/* ============================================================================ */
.eco-event-card { display: flex; justify-content: space-between; align-items: center; background: var(--bg-card); padding: 12px; margin-bottom: 8px; border-radius: 12px; border: 1px solid var(--border); }
.eco-event-left { display: flex; align-items: center; gap: 10px; }
.eco-flag { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 24px; border-radius: 4px; font-size: 9px; font-weight: 800; letter-spacing: 0.5px; color: #fff; flex-shrink: 0; }
.eco-flag-us { background: linear-gradient(180deg, #b22234 40%, #fff 40%, #fff 60%, #b22234 60%); color: #3c3b6e; text-shadow: none; }
.eco-flag-eu { background: linear-gradient(180deg, #003399 50%, #ffcc00 50%); }
.eco-event-title { font-size: 13px; font-weight: 700; }
.eco-event-meta { font-size: 11px; color: var(--text-dim); }
.eco-impact { font-size: 11px; font-weight: bold; padding: 4px 8px; border-radius: 6px; white-space: nowrap; }
.eco-impact-high { background: rgba(255,77,77,0.1); color: var(--red); }
.eco-impact-medium { background: rgba(247,147,26,0.1); color: var(--accent); }

/* #endregion */

/* ============================================================================ */
/* #region پروفایل */
/* این بخش استایل‌های مرتبط با "پروفایل" را در خود نگه می‌دارد. */
/* ============================================================================ */
.profile-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 20px; margin: 0 20px 16px; text-align: center; position: relative; }
.profile-settings { position: absolute; top: 16px; right: 16px; cursor: pointer; }
.profile-avatar { width: 80px; height: 80px; margin: 0 auto 10px; border-radius: 50%; border: 2px solid var(--accent); overflow: hidden; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-size: 18px; font-weight: 700; }
.profile-username { display: block; font-size: 13px; color: var(--text-dim); }
.profile-id { font-size: 12px; color: var(--text-sub); margin-top: 4px; }

/* #endregion */

/* ============================================================================ */
/* #region رفرال */
/* این بخش استایل‌های لینک دعوت، آمار ارجاع و پاداش‌ها را مشخص می‌کند. */
/* ============================================================================ */
.referral-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin: 0 20px 16px; }
.ref-header { display: flex; gap: 12px; margin-bottom: 14px; }
.ref-header svg { flex-shrink: 0; }
.ref-header h4 { font-size: 15px; font-weight: 700; }
.ref-header p { font-size: 12px; color: var(--text-dim); }
.ref-input { display: flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 10px; }
.ref-input input { flex: 1; padding: 10px 12px; background: transparent; border: none; color: var(--text); font-size: 12px; outline: none; }
.ref-input button { background: rgba(255,255,255,0.05); border: none; color: var(--accent); font-weight: 600; padding: 0 16px; cursor: pointer; }
.ref-share-btn { width: 100%; padding: 10px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-weight: 600; cursor: pointer; margin-bottom: 14px; }
.ref-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.ref-stats div span:first-child { display: block; font-size: 11px; color: var(--text-sub); }
.ref-stats strong { font-size: 16px; font-weight: 700; }
.ref-rewards-soon { margin-top: 14px; border: 1px dashed rgba(247,147,26,0.2); border-radius: 12px; padding: 14px; background: rgba(247,147,26,0.02); }
.soon-badge-row { margin-bottom: 10px; }
.soon-badge { display: inline-block; background: var(--accent); color: #000; font-size: 9px; font-weight: 700; padding: 3px 10px; border-radius: 6px; letter-spacing: 0.3px; white-space: nowrap; }
.ref-rewards-soon h5 { font-size: 13px; margin-bottom: 6px; line-height: 1.4; text-align: center; }
.ref-rewards-soon p { font-size: 11px; color: var(--text-dim); line-height: 1.5; text-align: center; }

/* #endregion */

/* ============================================================================ */
/* #region گردونه غیرفعال */
/* این بخش پیش‌نمایش بصری قابلیت آینده‌دار گردونه جوایز را استایل‌دهی می‌کند. */
/* ============================================================================ */
.wheel-preview-wrap { display: flex; justify-content: center; margin: 12px 0 14px; }
.wheel-preview {
    position: relative;
    width: 160px;
    height: 160px;
    opacity: 0.35;
    filter: grayscale(0.45) saturate(0.7);
    pointer-events: none;
    user-select: none;
}
.wheel-preview-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid rgba(247,147,26,0.25);
    box-shadow: 0 0 30px rgba(247,147,26,0.08), inset 0 0 20px rgba(0,0,0,0.35);
}
.wheel-preview-segments {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    overflow: hidden;
    background: conic-gradient(
        from 0deg,
        rgba(247,147,26,0.35) 0deg 45deg,
        rgba(0,200,150,0.25) 45deg 90deg,
        rgba(247,147,26,0.2) 90deg 135deg,
        rgba(100,116,139,0.25) 135deg 180deg,
        rgba(247,147,26,0.3) 180deg 225deg,
        rgba(0,200,150,0.2) 225deg 270deg,
        rgba(247,147,26,0.25) 270deg 315deg,
        rgba(100,116,139,0.2) 315deg 360deg
    );
}
.wheel-preview-segments span {
    position: absolute;
    width: 50%;
    height: 2px;
    background: rgba(255,255,255,0.08);
    top: 50%;
    left: 50%;
    transform-origin: left center;
}
.wheel-preview-segments span:nth-child(1) { transform: rotate(0deg); }
.wheel-preview-segments span:nth-child(2) { transform: rotate(45deg); }
.wheel-preview-segments span:nth-child(3) { transform: rotate(90deg); }
.wheel-preview-segments span:nth-child(4) { transform: rotate(135deg); }
.wheel-preview-segments span:nth-child(5) { transform: rotate(180deg); }
.wheel-preview-segments span:nth-child(6) { transform: rotate(225deg); }
.wheel-preview-segments span:nth-child(7) { transform: rotate(270deg); }
.wheel-preview-segments span:nth-child(8) { transform: rotate(315deg); }
.wheel-preview-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(145deg, #1a2332, #0b1220);
    border: 2px solid rgba(247,147,26,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.wheel-preview-pointer {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 18px solid rgba(247,147,26,0.45);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* #endregion */

/* ============================================================================ */
/* #region تنظیمات و زبان */
/* این بخش استایل‌های مودال تنظیمات، انتخاب زبان و ظرف‌های تمام‌صفحه را تعریف می‌کند. */
/* ============================================================================ */
.settings-modal-box { max-width: 400px; }
.settings-menu { display: flex; flex-direction: column; gap: 4px; }
.setting-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 12px; border-radius: 12px; background: rgba(255,255,255,0.02); border: 1px solid var(--border); cursor: pointer; transition: background 0.2s; }
.setting-item:active { background: rgba(247,147,26,0.08); }
.setting-arrow { color: var(--text-sub); font-size: 18px; }

.lang-options { display: flex; flex-direction: column; gap: 8px; }
.lang-option { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border); cursor: pointer; background: rgba(255,255,255,0.02); }
.lang-label { display: flex; align-items: center; gap: 10px; }
.lang-flag { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 20px; border-radius: 4px; font-size: 10px; font-weight: 800; letter-spacing: 0.5px; }
.lang-flag-fa { background: linear-gradient(180deg, #239f40 33%, #fff 33%, #fff 66%, #da0000 66%); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.lang-flag-en { background: linear-gradient(135deg, #012169 40%, #fff 40%, #fff 55%, #c8102e 55%); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.lang-option:active { border-color: var(--accent); background: rgba(247,147,26,0.06); }
.lang-check { color: var(--green); font-weight: 700; display: inline-flex; min-width: 20px; }

.full-modal { align-items: flex-end; padding: 0; }
.full-modal .modal-box-wide { max-width: 100%; width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; margin: 0; }
.modal-box-wide { max-width: 480px; }

/* #endregion */

/* ============================================================================ */
/* #region تیکت‌ها */
/* این بخش استایل‌های فرم تیکت، لیست پیام‌ها و پاسخ‌های پشتیبانی را نگه می‌دارد. */
/* ============================================================================ */
.ticket-form { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.ticket-section-title { font-size: 13px; font-weight: 700; color: var(--text-dim); margin-bottom: 10px; }
.ticket-list { max-height: 45vh; overflow-y: auto; }
.ticket-item { background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.ticket-item-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.ticket-item-header strong { font-size: 14px; flex: 1; }
.ticket-user { font-size: 11px; color: var(--text-sub); margin-bottom: 6px; }
.ticket-body-text { font-size: 13px; color: var(--text-dim); line-height: 1.5; margin-bottom: 8px; }
.ticket-status { font-size: 10px; padding: 3px 8px; border-radius: 6px; white-space: nowrap; flex-shrink: 0; }
.ticket-status.open { background: rgba(255,77,77,0.15); color: var(--red); }
.ticket-status.answered { background: rgba(0,200,150,0.15); color: var(--green); }
.ticket-thread { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.ticket-reply { background: rgba(0,200,150,0.06); border-right: 3px solid var(--green); border-radius: 8px; padding: 10px 12px; font-size: 13px; color: var(--text); line-height: 1.5; }
.ticket-reply.admin { border-right-color: var(--accent); background: rgba(247,147,26,0.06); }
.ticket-reply-meta { font-size: 10px; color: var(--text-sub); margin-top: 4px; }
.ticket-actions { display: flex; gap: 8px; margin-top: 10px; }
.ticket-delete-btn { background: rgba(255,77,77,0.1); border: 1px solid rgba(255,77,77,0.2); color: var(--red); padding: 6px 12px; border-radius: 8px; font-size: 11px; cursor: pointer; }
.ticket-reply-form { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.ticket-reply-input { min-height: 60px; resize: vertical; }
.ticket-reply-btn { padding: 10px; font-size: 13px; }
.ticket-date { font-size: 10px; color: var(--text-sub); text-align: left; margin-top: 6px; }

/* #endregion */

/* ============================================================================ */
/* #region هشدار قیمت */
/* این بخش استایل‌های فرم ثبت هشدار و لیست هشدارهای فعال را مشخص می‌کند. */
/* ============================================================================ */
.alert-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.alert-section-header h4 { font-size: 14px; margin: 0; }
.alert-hint { font-size: 10px; color: var(--accent); background: rgba(247,147,26,0.1); padding: 3px 8px; border-radius: 6px; }
.alert-form { display: flex; gap: 8px; margin-bottom: 12px; }
.alert-price-input { flex: 1; margin-bottom: 0 !important; }
.alert-submit-btn { width: auto !important; padding: 12px 16px !important; white-space: nowrap; }
.alert-list { display: flex; flex-direction: column; gap: 6px; }
.alert-item { display: flex; justify-content: space-between; align-items: center; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.alert-item-info { display: flex; flex-direction: column; gap: 2px; }
.alert-item-symbol { font-weight: 700; color: var(--accent); }
.alert-item-target { font-size: 11px; color: var(--text-dim); }
.alert-remove-btn { background: none; border: none; color: var(--red); cursor: pointer; padding: 4px; }
.alert-empty { font-size: 12px; color: var(--text-dim); text-align: center; padding: 8px; }

.input-field { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255,255,255,0.03); color: var(--text); margin-bottom: 10px; outline: none; }
.submit-btn { width: 100%; padding: 12px; background: var(--accent); border: none; color: #000; font-weight: 700; border-radius: 12px; cursor: pointer; }

/* #endregion */

/* ============================================================================ */
/* #region درباره */
/* این بخش استایل‌های پنجره معرفی برنامه و لینک کانال رسمی را ارائه می‌کند. */
/* ============================================================================ */
.about-content { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.about-content h3 { margin-bottom: 10px; }
.about-content p { color: var(--text-dim); margin-bottom: 6px; }
.about-content a { color: var(--accent); text-decoration: none; }

/* #endregion */

/* ============================================================================ */
/* #region مودال‌ها */
/* این بخش استایل‌های مرتبط با "مودال‌ها" را در خود نگه می‌دارد. */
/* ============================================================================ */
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(12px); display: none; align-items: center; justify-content: center; z-index: 9999; padding: 20px; }
.modal-box { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); max-width: 420px; width: 100%; max-height: 80vh; overflow-y: auto; padding: 20px; }
.join-box { max-width: 380px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-header h3 { font-size: 16px; display: flex; align-items: center; gap: 6px; }
.modal-header button { background: none; border: none; color: var(--text-dim); font-size: 20px; cursor: pointer; }
.modal-header .modal-close-btn { background: rgba(255,255,255,0.05); border: 1px solid var(--border); width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: inherit; }
.modal-list { max-height: 200px; overflow-y: auto; }
.modal-coin-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.modal-coin-item.disabled { opacity: 0.4; cursor: not-allowed; }
.modal-actions { display: flex; gap: 10px; margin-top: 10px; }
.cancel-btn { flex: 1; padding: 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--text); border-radius: 12px; cursor: pointer; }

/* #endregion */

/* ============================================================================ */
/* #region جزئیات کوین */
/* این بخش استایل‌های نمودار، آمار کوین و ناحیه هشدار قیمت را نگه می‌دارد. */
/* ============================================================================ */
.detail-chart { height: 200px; border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.detail-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 12px; }
.detail-stats div { background: rgba(255,255,255,0.02); padding: 8px 12px; border-radius: 8px; }
.detail-stats span { display: block; font-size: 11px; color: var(--text-sub); }
.detail-stats strong { font-size: 14px; }
.alert-section { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 10px; }
.alert-section h4 { font-size: 14px; margin-bottom: 8px; }

/* #endregion */

/* ============================================================================ */
/* #region نوتیفیکیشن‌ها (دکمه‌های کوچک و شیک) */
/* این بخش استایل‌های مرتبط با "نوتیفیکیشن‌ها (دکمه‌های کوچک و شیک)" را در خود نگه می‌دارد. */
/* ============================================================================ */
.notif-list { max-height: 300px; overflow-y: auto; }
.notif-item { padding: 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.notif-item.unread { background: rgba(247,147,26,0.04); border-left: 3px solid var(--accent); }
.notif-title { font-weight: 600; }
.notif-body { font-size: 12px; color: var(--text-dim); }
.notif-date { font-size: 10px; color: var(--text-sub); text-align: right; }

.mark-all-read-btn {
    background: rgba(0, 200, 150, 0.1);
    border: 1px solid rgba(0,200,150,0.3);
    color: var(--green);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    cursor: pointer;
    transition: 0.2s;
}
.mark-all-read-btn:hover { background: rgba(0,200,150,0.2); }

.clear-notif-btn {
    width: 100%;
    padding: 10px;
    background: rgba(255, 77, 77, 0.05);
    border: 1px solid rgba(255, 77, 77, 0.2);
    border-radius: 10px;
    color: var(--red);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.clear-notif-btn:hover { background: rgba(255, 77, 77, 0.15); }

/* #endregion */

/* ============================================================================ */
/* #region منوی پایینی */
/* این بخش استایل‌های مرتبط با "منوی پایینی" را در خود نگه می‌دارد. */
/* ============================================================================ */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: 72px; background: rgba(11,18,32,0.92); backdrop-filter: blur(20px); border-top: 1px solid var(--border); display: flex; justify-content: space-around; align-items: center; z-index: 1000; padding-bottom: env(safe-area-inset-bottom); }
.nav-item { background: none; border: none; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--text-sub); cursor: pointer; transition: all 0.2s; padding: 4px 12px; }
.nav-item.active { color: var(--accent); }
.nav-item svg { width: 24px; height: 24px; }
.nav-item span { font-size: 10px; font-weight: 500; }

/* #endregion */

/* ============================================================================ */
/* #region وضعیت خالی */
/* این بخش استایل‌های مرتبط با "وضعیت خالی" را در خود نگه می‌دارد. */
/* ============================================================================ */
.empty-state { text-align: center; color: var(--text-dim); padding: 24px 10px; font-size: 13px; }

/* #endregion */

/* ============================================================================ */
/* #region واکنش‌گرایی */
/* این بخش استایل‌های مرتبط با "واکنش‌گرایی" را در خود نگه می‌دارد. */
/* ============================================================================ */
@media (max-width: 400px) {
    .ref-stats { grid-template-columns: 1fr 1fr; }
    .hero-art { flex: 0 0 42%; max-width: 130px; }
    .hero-logo { max-height: 110px; }
    .hero-content h2 { font-size: 16px; }
    .hero-content p { font-size: 11px; }
}

/* #endregion */

/* ============================================================================ */
/* #region Online users badge */
/* این بخش استایل‌های مرتبط با "Online users badge" را در خود نگه می‌دارد. */
/* ============================================================================ */
.online-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--green);
    background: rgba(0, 200, 150, 0.08);
    border: 1px solid rgba(0, 200, 150, 0.2);
    padding: 4px 10px;
    border-radius: 20px;
    margin-top: 8px;
}
.online-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* #endregion */

/* ============================================================================ */
/* #region Economic calendar enhancements */
/* این بخش استایل‌های مرتبط با "Economic calendar enhancements" را در خود نگه می‌دارد. */
/* ============================================================================ */
.eco-event-card.past { opacity: 0.45; }
.eco-event-card.live { border-color: var(--green); box-shadow: 0 0 12px rgba(0,200,150,0.15); }
.eco-event-card.upcoming { opacity: 1; }
.eco-status { font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.eco-status-past { background: rgba(255,255,255,0.06); color: var(--text-sub); }
.eco-status-live { background: rgba(0,200,150,0.15); color: var(--green); }
.eco-status-upcoming { background: rgba(247,147,26,0.12); color: var(--accent); }
.eco-flag-emoji { font-size: 20px; margin-left: 8px; }
.chart-exchange-badge { font-size: 10px; color: var(--text-sub); text-align: center; margin-bottom: 6px; }

/* #endregion */

/* ============================================================================ */
/* #region AI Assistant */
/* این بخش استایل‌های مرتبط با "AI Assistant" را در خود نگه می‌دارد. */
/* ============================================================================ */
.ai-assistant-root {
    position: fixed;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px) + 8px);
    inset-inline-end: 12px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none;
    width: auto;
    max-width: min(280px, calc(100vw - 24px));
}

.ai-assistant-root > * {
    pointer-events: auto;
}

.ai-speech-bubble {
    position: relative;
    max-width: min(260px, calc(100vw - 88px));
    padding: 12px 14px 12px 12px;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.82), rgba(30, 27, 75, 0.72));
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.45),
        0 2px 12px rgba(99, 102, 241, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 0.4s ease, transform 0.4s ease;
    animation: ai-bubble-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    flex-shrink: 0;
}

.ai-speech-bubble.ai-speech-hidden {
    display: none;
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    pointer-events: none;
}

.ai-speech-bubble .ai-speech-text {
    margin: 0;
    padding: 8px 4px 0 24px;
    font-size: 13px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.ai-bubble-close {
    position: absolute;
    top: 6px;
    inset-inline-start: 6px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    z-index: 2;
}

.ai-bubble-close:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.ai-bubble-close:active {
    transform: scale(0.9);
}

.ai-bubble-tail {
    position: absolute;
    bottom: -6px;
    inset-inline-end: 22px;
    width: 14px;
    height: 14px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.82), rgba(30, 27, 75, 0.72));
    border-inline-end: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.ai-fab {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 45%, #ec4899 100%);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 6px 24px rgba(99, 102, 241, 0.45),
        0 2px 8px rgba(236, 72, 153, 0.25);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.3s ease;
    animation: ai-fab-float 4s ease-in-out infinite;
}

.ai-fab-glow {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(236, 72, 153, 0.3));
    filter: blur(8px);
    opacity: 0.6;
    z-index: -1;
    animation: ai-glow-pulse 3s ease-in-out infinite;
}

.ai-fab-icon {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.ai-fab:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow:
        0 10px 32px rgba(99, 102, 241, 0.5),
        0 4px 12px rgba(236, 72, 153, 0.3);
}

.ai-fab:active {
    transform: scale(0.94);
    animation: none;
}

.ai-fab-hidden {
    opacity: 0;
    pointer-events: none;
    animation: none;
}

@keyframes ai-fab-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes ai-glow-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.75; transform: scale(1.05); }
}

@keyframes ai-bubble-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ai-panel {
    position: fixed;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    left: 5%;
    right: 5%;
    height: min(70vh, calc(100vh - 120px));
    max-height: min(70vh, calc(100vh - 120px));
    background: linear-gradient(165deg, rgba(11, 18, 32, 0.92), rgba(17, 24, 39, 0.88));
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px 20px 12px 12px;
    display: flex;
    flex-direction: column;
    z-index: 1101;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: hidden;
}
.ai-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.12), rgba(168, 85, 247, 0.08));
}
.ai-panel-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.ai-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse-dot 2s infinite; }
.ai-close-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-dim);
    transition: background 0.2s, color 0.2s;
}
.ai-close-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text);
}
.ai-limits { font-size: 10px; color: var(--text-sub); padding: 4px 16px; text-align: center; }
.ai-messages { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.ai-bubble { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 13px; line-height: 1.5; }
.ai-bubble-user {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(247, 147, 26, 0.2), rgba(247, 147, 26, 0.1));
    border: 1px solid rgba(247, 147, 26, 0.25);
    border-bottom-right-radius: 4px;
}
.ai-bubble-assistant {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom-left-radius: 4px;
    backdrop-filter: blur(8px);
}
.ai-msg-text { margin: 0; line-height: 1.5; }
.ai-bubble-img { max-width: 100%; border-radius: 8px; margin-bottom: 6px; max-height: 120px; object-fit: cover; }
.ai-input-area {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
}
.ai-input { flex: 1; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 10px 12px; color: var(--text); font-size: 13px; resize: none; max-height: 80px; font-family: inherit; }
.ai-attach-btn, .ai-send-btn { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-dim); flex-shrink: 0; }
.ai-send-btn { background: var(--accent); border-color: var(--accent); color: #fff; }

@media (max-width: 400px) {
    .ai-assistant-root {
        inset-inline-end: 8px;
        max-width: calc(100vw - 16px);
    }
    .ai-panel {
        left: 3%;
        right: 3%;
        height: min(65vh, calc(100vh - 100px));
    }
}

/* #endregion */
