/* --- 1. Core Variables & Global Styles (Liquid Glass Unified) --- */
:root {
    /* DARK MODE (DEFAULT) */
    --bg-color: #050505;
    --primary-card-bg: rgba(17, 25, 40, 0.6); /* Glassmorphism Base */
    --secondary-card-bg: rgba(0, 0, 0, 0.3);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-light: rgba(255, 255, 255, 0.15);
    
    /* Typography */
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    
    /* Branding */
    --accent-color: #00f2ff; /* Cyan */
    --accent-hover: #3b82f6; /* Blue */
    --accent-purple: #bc13fe;
    --accent-subtle-bg: rgba(0, 242, 255, 0.1);
    
    /* Signals */
    --buy-color: #10b981;
    --sell-color: #ef4444;
    --hold-color: #f59e0b;
    --link-color: var(--accent-color);
    
    /* Components (Mapped to glass) */
    --key-drivers-bg: rgba(17, 25, 40, 0.5);
    --glance-bg: rgba(17, 25, 40, 0.5);
    --confidence-breakdown-bg: rgba(17, 25, 40, 0.5);
    --signal-card-bg: rgba(17, 25, 40, 0.7);
    --tooltip-bg: rgba(5, 5, 5, 0.95);

    /* Shadows & Glows */
    --neon-blue-glow: 0 0 20px rgba(0, 242, 255, 0.3);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    --card-hover-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(59, 130, 246, 0.2);
    --input-focus-shadow: 0 0 0 4px rgba(0, 242, 255, 0.15);

    /* Fonts & Sizes */
    --font-family-base: 'Plus Jakarta Sans', 'Inter', sans-serif;
    --font-family-monospace: 'JetBrains Mono', monospace;
    --base-font-size: 16px;
    --line-height-base: 1.6;
    --spacing-unit: 8px;
    --border-radius-medium: 12px;
    --border-radius-large: 20px;
    --transition-base: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-color: #f8fafc;
    --primary-card-bg: rgba(255, 255, 255, 0.7);
    --secondary-card-bg: rgba(255, 255, 255, 0.5);
    --border-color: rgba(0, 0, 0, 0.1);
    --border-color-light: rgba(0, 0, 0, 0.15);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    
    --accent-color: #0284c7;
    --accent-hover: #2563eb;
    --accent-purple: #9333ea;
    --accent-subtle-bg: rgba(2, 132, 199, 0.1);

    --key-drivers-bg: rgba(255, 255, 255, 0.6);
    --glance-bg: rgba(255, 255, 255, 0.6);
    --confidence-breakdown-bg: rgba(255, 255, 255, 0.6);
    --signal-card-bg: rgba(255, 255, 255, 0.8);
    --tooltip-bg: rgba(255, 255, 255, 0.95);

    --neon-blue-glow: 0 0 20px rgba(2, 132, 199, 0.2);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    --card-hover-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 0 20px rgba(37, 99, 235, 0.1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--base-font-size);
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-family-base);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: var(--line-height-base);
    padding: calc(var(--spacing-unit) * 12) calc(var(--spacing-unit) * 2.5) calc(var(--spacing-unit) * 5);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile (handles browser bars) */
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.5s ease, color 0.5s ease;
    overflow-x: hidden; /* Prevent horizontal scroll on mobile */
    width: 100%;
    max-width: 100vw;
}

/* --- Liquid Background Animations --- */
.liquid-bg {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: var(--bg-color);
    transition: background-color 0.5s ease;
}
.orb {
    position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.6;
    animation: float 20s infinite alternate ease-in-out;
}
.orb-1 { width: 50vw; height: 50vw; background: var(--accent-hover); top: -10%; left: -10%; animation-delay: 0s; }
.orb-2 { width: 40vw; height: 40vw; background: var(--accent-purple); bottom: -20%; right: -10%; animation-delay: -5s; animation-duration: 25s; }
.orb-3 { width: 30vw; height: 30vw; background: var(--accent-color); top: 40%; left: 50%; transform: translate(-50%, -50%); animation-delay: -10s; animation-duration: 18s; opacity: 0.4; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(5vw, 10vh) scale(1.1); }
    66% { transform: translate(-10vw, 5vh) scale(0.9); }
    100% { transform: translate(0, -10vh) scale(1.05); }
}

/* --- 2. Main Layout & Header --- */
.main-container {
    width: 100%;
    max-width: 900px; /* Wider layout */
    text-align: center;
    padding-bottom: calc(var(--spacing-unit) * 6); /* 48px */
}

.main-header {
    margin-bottom: calc(var(--spacing-unit) * 5); /* 40px */
}
.brand-header-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: var(--spacing-unit);
}

.app-main-logo {
    height: 55px; /* اندازه لوگو در حالت دسکتاپ */
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(0, 242, 255, 0.4)); /* سایه نئونی برای هماهنگی با تم سایبر */
}

.main-header h1 {
    font-size: clamp(2.2rem, 5vw, 3rem); /* Slightly larger */
    font-weight: 700;
    margin-bottom: 0; /* صفر شد چون gap در کانتینر والد تنظیم شده است */
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(88, 166, 255, 0.75); /* Enhanced glow */
}
.main-header p {
    font-size: clamp(1rem, 3vw, 1.2rem); /* Slightly larger */
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto;
}

/* --- Unified Top Navigation Bar (Admin, Lang, Logout) --- */
/* کانتینر اصلی که هر سه دکمه را نگه می‌دارد */
#top-nav-container {
    position: fixed !important;
    top: 25px !important;
    right: 25px !important; /* Default fallback for LTR */
    z-index: 100000 !important;
    display: flex !important;
    align-items: center;
    gap: 12px;
    background: var(--primary-card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    padding: 6px 8px;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#top-nav-container:hover {
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* جایگاه در انگلیسی (راست) */
html[dir="ltr"] #top-nav-container {
    right: 25px !important;
    left: auto !important;
}

/* جایگاه در فارسی (چپ) */
html[dir="rtl"] #top-nav-container {
    left: 25px !important;
    right: auto !important;
}

/* --- استایل دکمه‌های داخل نوار --- */

/* استایل مشترک برای دکمه‌های ادمین و خروج داخل این نوار */
#top-nav-container .btn,
#top-nav-container button,
#top-nav-container a {
    border-radius: 10px !important;
    font-size: 0.9rem !important;
    padding: 8px 16px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px; /* ارتفاع یکسان */
    white-space: nowrap;
}

/* استایل دکمه ادمین (تیره) */
#top-nav-container .admin-btn { 
    background-color: #1e293b;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(30, 41, 59, 0.3);
}

/* استایل دکمه پلن ها (تضمین نمایش 100 درصدی) */
#top-nav-container .plan-nav-btn {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.1), rgba(0, 242, 255, 0.1));
    color: var(--text-primary) !important;
    border: 1px solid rgba(0, 242, 255, 0.6);
    display: inline-flex !important;
    font-weight: 800 !important;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}
#top-nav-container .plan-nav-btn:hover {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.2), rgba(0, 242, 255, 0.2));
    border-color: rgba(0, 242, 255, 0.9);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
}
#top-nav-container .plan-nav-btn:hover {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.2), rgba(0, 242, 255, 0.2));
    border-color: rgba(0, 242, 255, 0.6);
}
#top-nav-container .admin-btn:hover,
#top-nav-container button:first-child:hover {
    background-color: #0f172a;
    transform: translateY(-1px);
}

/* استایل دکمه خروج (قرمز ملایم) */
#top-nav-container .logout-btn,
#top-nav-container a[href*="logout"] {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.2);
}
#top-nav-container .logout-btn:hover,
#top-nav-container a[href*="logout"]:hover {
    background-color: #ef4444;
    color: #fff !important;
}

/* --- Google Translate Hidden Enforcers --- */
body { top: 0 !important; position: static !important; }
.skiptranslate iframe,
.goog-te-banner-frame { display: none !important; visibility: hidden !important; }
#goog-gt-tt, .goog-te-balloon-frame { display: none !important; }
.goog-text-highlight { background-color: transparent !important; box-shadow: none !important; }
div.skiptranslate { display: none !important; }

/* --- Custom Language Selector UI --- */
.custom-lang-selector {
    position: relative;
    display: inline-block;
}

.lang-toggle-btn {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    transition: all 0.2s;
}

.lang-toggle-btn:hover {
    background-color: var(--secondary-card-bg);
}

.lang-toggle-btn:focus {
    background-color: var(--primary-card-bg);
    border-color: var(--accent-color);
    box-shadow: var(--input-focus-shadow);
}

.lang-dropdown {
    position: absolute;
    top: 120%;
    right: 0;
    width: min(240px, calc(100vw - 40px));
    background: var(--primary-card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    z-index: 1000000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.2s ease-out;
}

[dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0;
}

.lang-search-box {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color-light);
    background: var(--secondary-card-bg);
}

.lang-search-box i {
    color: var(--text-secondary);
    margin-right: 10px;
    font-size: 0.9rem;
}
[dir="rtl"] .lang-search-box i { margin-right: 0; margin-left: 10px; }

.lang-search-box input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    width: 100%;
    outline: none;
    box-shadow: none;
    padding: 0;
}
.lang-search-box input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.lang-list {
    max-height: 280px; /* محدودیت ارتفاع و ایجاد اسکرول */
    overflow-y: auto;
    padding: 5px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color-light) transparent;
}
.lang-list::-webkit-scrollbar { width: 6px; }
.lang-list::-webkit-scrollbar-track { background: transparent; }
.lang-list::-webkit-scrollbar-thumb { background-color: var(--border-color-light); border-radius: 10px; }
.lang-list::-webkit-scrollbar-thumb:hover { background-color: var(--text-secondary); }

.lang-item {
    padding: 12px 15px;
    font-size: 0.95rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lang-item:hover {
    background: var(--accent-subtle-bg);
    color: var(--accent-color);
}

.lang-item.active {
    font-weight: 700;
    color: var(--accent-color);
    background: var(--accent-subtle-bg);
    border-left: 3px solid var(--accent-color);
}
[dir="rtl"] .lang-item.active { border-left: none; border-right: 3px solid var(--accent-color); }

/* --- 3. Companion Selection Cards --- */
.companion-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); /* Wider cards */
    gap: calc(var(--spacing-unit) * 3.5); /* Increased gap */
    margin-bottom: calc(var(--spacing-unit) * 5);
}
.companion-card {
    background-color: var(--primary-card-bg);
    border: 1px solid var(--border-color-light);
    border-radius: var(--border-radius-large);
    padding: 35px 25px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    box-shadow: var(--card-shadow);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* افکت نوری پس‌زمینه هنگام هاور */
.companion-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 50% 0%, var(--accent-subtle-bg), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.companion-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-hover-shadow);
    border-color: rgba(59, 130, 246, 0.3);
}

.companion-card:hover::after {
    opacity: 1;
}

.companion-card.selected {
    background-color: var(--accent-subtle-bg);
    border: 2px solid var(--accent-color);
    box-shadow: var(--neon-blue-glow);
    transform: translateY(-5px);
}

/* آیکون‌ها و متن روی لایه افکت باشند */
.companion-card i, .companion-card h2, .companion-card p {
    position: relative;
    z-index: 1;
}

.card-icon {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    transition: transform 0.4s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.companion-card:hover .card-icon {
    transform: scale(1.1) rotate(-8deg);
}

/* --- 4. Controls & Forms --- */
#controls-container, #market-controls-container {
    background-color: var(--primary-card-bg);
    padding: calc(var(--spacing-unit) * 4); /* 32px */
    border-radius: var(--border-radius-large);
    border: 1px solid var(--border-color);
    margin-top: calc(var(--spacing-unit) * -2.5); /* Keep overlap */
    animation: fadeIn 0.5s ease-out forwards;
    box-shadow: var(--card-shadow);
    margin-bottom: calc(var(--spacing-unit) * 4); /* 32px */
    position: relative; /* Ensure it stays above results */
    z-index: 10;
}

.controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Flexible columns */
    gap: calc(var(--spacing-unit) * 3); /* 24px */
    margin-bottom: calc(var(--spacing-unit) * 4); /* 32px */
}

.control-group {
    text-align: left; /* Default left */
    position: relative; /* For potential icons/tooltips */
}

label {
    display: block;
    margin-bottom: calc(var(--spacing-unit) * 1.25); /* 10px */
    font-size: 0.95rem; /* Slightly larger label */
    color: var(--text-secondary);
    font-weight: 500;
}

select, input[type="text"], input[type="email"], input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    background-color: var(--secondary-card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-medium);
    color: var(--text-primary);
    font-size: 16px; /* CRITICAL: 16px to prevent iOS auto-zoom on focus */
    font-family: inherit;
    font-weight: 500;
    transition: all var(--transition-fast);
    box-shadow: inset 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    -webkit-appearance: none;
    appearance: none;
}
select:focus, input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px var(--accent-subtle-bg);
    background-color: var(--primary-card-bg);
}

/* Custom dropdown arrow for select */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%238b949e'%3E%3Cpath fill-rule='evenodd' d='M4.22 6.03a.75.75 0 0 1 1.06 0L8 8.75l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.09a.75.75 0 0 1 0-1.06Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: calc(var(--spacing-unit) * 4.5); /* 36px */
    cursor: pointer;
}
[dir="rtl"] select {
    background-position: left 12px center;
    padding-right: calc(var(--spacing-unit) * 1.75);
    padding-left: calc(var(--spacing-unit) * 4.5);
}

input[type="text"]::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

select:focus, input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: var(--input-focus-shadow);
    background-color: var(--primary-card-bg); /* Slightly lighter background on focus */
}
select:hover, input[type="text"]:hover {
    border-color: var(--border-color-light); /* Lighter border on hover */
}

/* Datalist styling */
datalist option {
    background-color: var(--primary-card-bg);
    color: var(--text-primary);
}
/* Style input when datalist option is selected (limited support) */
input:focus::-webkit-calendar-picker-indicator { display: none; }


#submit-btn, #load-market-btn {
    width: 100%;
    padding: calc(var(--spacing-unit) * 2); /* 16px */
    background: linear-gradient(145deg, var(--accent-color), var(--accent-hover));
    color: #ffffff;
    border: none;
    border-radius: var(--border-radius-medium);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: inline-flex; /* Align icon and text */
    align-items: center;
    justify-content: center;
    gap: var(--spacing-unit);
}
#submit-btn:hover, #load-market-btn:hover {
    background: linear-gradient(145deg, var(--accent-hover), var(--accent-color));
    box-shadow: 0 6px 15px rgba(88, 166, 255, 0.45);
    transform: translateY(-2px);
}
#submit-btn:active, #load-market-btn:active {
    transform: scale(0.98) translateY(0px); /* Adjusted active state */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}
#submit-btn:disabled, #load-market-btn:disabled {
    background: var(--border-color);
    color: var(--text-secondary);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}
/* Add loading spinner to button */
#submit-btn.loading::before, #load-market-btn.loading::before {
    content: '';
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: var(--spacing-unit); /* LTR */
}
[dir="rtl"] #submit-btn.loading::before, [dir="rtl"] #load-market-btn.loading::before {
    margin-right: 0;
    margin-left: var(--spacing-unit);
}

#market-type-group {
    display: none; /* Hidden by default, shown via JS */
}
/* --- 5. Result & Output Area --- */
#result-container {
    margin-top: calc(var(--spacing-unit) * 5); /* 40px */
    background-color: var(--primary-card-bg);
    padding: calc(var(--spacing-unit) * 3.5) calc(var(--spacing-unit) * 4); /* 28px 32px */
    border-radius: var(--border-radius-large);
    border: 1px solid var(--border-color);
    text-align: left;
    animation: fadeIn 0.6s ease-out forwards;
    box-shadow: var(--card-shadow);
    overflow: visible; /* Allow tooltips/dropdowns to escape; use overflow-x: hidden on children if needed */
}

#loader {
    width: 55px; /* Slightly smaller */
    height: 55px;
    border: 6px solid var(--border-color); /* Thinner border */
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite; /* Faster spin */
    margin: calc(var(--spacing-unit) * 6) auto;
}

/* General styles for output sections */
#analysis-output h2, #market-overview-output h2 { /* Analysis Title or Market Title */
    color: var(--accent-color);
    text-align: center;
    margin-top: 0;
    margin-bottom: calc(var(--spacing-unit) * 3.5);
    font-size: clamp(1.6rem, 4vw, 2rem); /* Larger title */
    border-bottom: 1px solid var(--border-color);
    padding-bottom: calc(var(--spacing-unit) * 2);
    font-weight: 600;
}
#analysis-output h3 { /* Section Titles */
    border-bottom: 1px solid var(--border-color);
    padding-bottom: calc(var(--spacing-unit) * 1.5);
    margin-top: calc(var(--spacing-unit) * 4.5);
    margin-bottom: calc(var(--spacing-unit) * 2.5);
    color: var(--text-primary);
    font-size: 1.4rem; /* Larger section titles */
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 1.25);
    font-weight: 600;
}
#analysis-output h3 i { /* Icons in Section Titles */
    color: var(--accent-color);
    font-size: 1.1em;
    width: 26px; /* Slightly larger icon space */
    text-align: center;
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}
#analysis-output h3:hover i {
    transform: scale(1.1); /* Subtle icon hover effect */
}
#analysis-output p, #analysis-output li, .signal-item {
    line-height: var(--line-height-base);
    color: var(--text-secondary);
    margin-bottom: calc(var(--spacing-unit) * 1.5);
    font-size: 1rem;
}
#analysis-output strong, .signal-item strong {
    color: var(--text-primary);
    font-weight: 500;
}
#analysis-output a {
    color: var(--link-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}
#analysis-output a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* List styling */
#analysis-output ul {
    padding-left: calc(var(--spacing-unit) * 3); /* LTR */
    list-style: none;
    margin-top: calc(var(--spacing-unit) * 0.5);
}
#analysis-output ul li {
    position: relative;
    padding-left: calc(var(--spacing-unit) * 2.5);
    margin-bottom: var(--spacing-unit);
}
#analysis-output ul li::before { /* Custom bullet */
    content: '◆';
    color: var(--accent-color);
    position: absolute;
    left: 0; /* LTR */
    top: 1px;
    font-size: 0.9em; /* Slightly smaller bullet */
    line-height: inherit;
}
[dir="rtl"] #analysis-output ul { padding-left: 0; padding-right: calc(var(--spacing-unit) * 3); }
[dir="rtl"] #analysis-output ul li { padding-left: 0; padding-right: calc(var(--spacing-unit) * 2.5); }
[dir="rtl"] #analysis-output ul li::before { left: auto; right: 0; }

.error-message {
    color: var(--sell-color) !important;
    background-color: rgba(248, 81, 73, 0.1); /* Use var(--sell-color) with alpha */
    border: 1px solid rgba(248, 81, 73, 0.3);
    padding: calc(var(--spacing-unit) * 2);
    border-radius: var(--border-radius-medium);
    text-align: center;
    margin: calc(var(--spacing-unit) * 2) 0;
    font-weight: 500; /* Make error text slightly bolder */
}

/* Interactive Chart Placeholder (TradingView) */
#chart-image-placeholder {
    margin: calc(var(--spacing-unit) * 3.5) auto; 
    border-radius: var(--border-radius-large);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    background-color: var(--secondary-card-bg); 
    overflow: hidden; /* Important to keep chart inside rounded corners */
    position: relative;
    width: 100%;
}

/* Placeholder divs styling */
#glance-dashboard-output,
#chart-image-placeholder,
#confidence-breakdown-placeholder,
#signal-card-placeholder,
#key-drivers-placeholder,
#general-rec-placeholder,
#radar-chart-wrapper,
#detailed-pillars-placeholder {
    margin-bottom: calc(var(--spacing-unit) * 4); /* Increased spacing between sections */
}

/* --- 6. Market Overview Styles --- */
#market-overview-output {
    width: 100%;
}
/* Sector Heatmap (Refined) */
.sector-heatmap {
    background-color: var(--secondary-card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-large);
    padding: calc(var(--spacing-unit) * 2.5);
    margin-bottom: calc(var(--spacing-unit) * 4); /* Increased margin */
    box-shadow: var(--card-shadow);
}
.sector-heatmap h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: calc(var(--spacing-unit) * 3); /* More space */
    font-size: 1.3rem; /* Adjusted size */
    color: var(--text-secondary);
    border-bottom: none;
    padding-bottom: 0;
    justify-content: center;
    font-weight: 500; /* Lighter weight for subtitle feel */
}
.heatmap-items {
    display: flex;
    justify-content: center; /* Center items */
    flex-wrap: wrap;
    gap: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 3); /* Increased gap */
}
.heatmap-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.95rem; /* Larger font */
    min-width: 80px; /* Wider */
    padding: var(--spacing-unit) 0; /* Add vertical padding */
    transition: transform var(--transition-fast);
}
.heatmap-item:hover {
    transform: scale(1.05); /* Slight scale on hover */
}
.heatmap-item span:first-child { /* Sector Name */
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: calc(var(--spacing-unit) * 0.75);
    text-transform: capitalize;
}
.heatmap-item span:last-child { /* Percentage */
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    padding: 2px 6px; /* Add padding for better visual */
    border-radius: var(--border-radius-small);
}
.heatmap-item .positive { background-color: rgba(47, 181, 116, 0.15); color: var(--buy-color); }
.heatmap-item .negative { background-color: rgba(248, 81, 73, 0.1); color: var(--sell-color); }
.heatmap-item .neutral { background-color: rgba(139, 148, 158, 0.1); color: var(--text-secondary); }
/* End Sector Heatmap */

.market-filters {
    margin-bottom: calc(var(--spacing-unit) * 3);
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--spacing-unit) * 1.5); /* Slightly larger gap */
    justify-content: center;
    padding-bottom: calc(var(--spacing-unit) * 2.5); /* More padding */
    border-bottom: 1px solid var(--border-color);
}
.filter-btn {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 2);
    border-radius: var(--border-radius-medium);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap; /* Prevent button text wrapping */
}
.filter-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background-color: var(--accent-subtle-bg);
    transform: translateY(-1px); /* Slight lift */
}
.filter-btn.active {
    background-color: var(--accent-color);
    color: var(--bg-color); /* Dark text on active button */
    border-color: var(--accent-color);
    font-weight: 600;
    box-shadow: 0 0 12px rgba(88, 166, 255, 0.5);
    transform: translateY(-1px);
}

.coin-list-wrapper { /* Add wrapper */
    margin-top: var(--spacing-unit); /* Space below filters */
}
.coin-list-header { /* Style header row */
    display: grid;
    grid-template-columns: minmax(130px, 2fr) minmax(100px, 1fr) minmax(100px, 1fr); /* Match coin row */
    gap: var(--spacing-unit);
    padding: calc(var(--spacing-unit)*0.75) calc(var(--spacing-unit) * 2);
    color: var(--text-secondary);
    font-size: 0.8rem; /* Smaller header text */
    font-weight: 600;
    border-bottom: 1px solid var(--border-color-light);
    margin-bottom: var(--spacing-unit);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.coin-list-header span:nth-child(n+2) { /* Align Price & Change Right (LTR) */
    text-align: right;
}
[dir="rtl"] .coin-list-header span:nth-child(n+2) { text-align: left; }


.coin-list {
    max-height: 650px; /* Increased height */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-unit); /* Keep gap between rows */
    padding-right: var(--spacing-unit); /* LTR scrollbar padding */
    /* Custom Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--border-color-light) var(--primary-card-bg);
}
.coin-list::-webkit-scrollbar { width: 8px; }
.coin-list::-webkit-scrollbar-track { background: var(--primary-card-bg); border-radius: var(--border-radius-small); }
.coin-list::-webkit-scrollbar-thumb { background-color: var(--border-color-light); border-radius: var(--border-radius-small); border: 2px solid var(--primary-card-bg); }
.coin-list::-webkit-scrollbar-thumb:hover { background-color: var(--text-secondary); }

.coin-row {
    display: grid;
    grid-template-columns: minmax(130px, 2fr) minmax(100px, 1fr) minmax(100px, 1fr); /* Wider price/change */
    align-items: center;
    padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 2);
    background-color: var(--secondary-card-bg);
    border-radius: var(--border-radius-medium);
    cursor: pointer;
    border: 1px solid transparent;
    transition: border-color var(--transition-fast), background-color var(--transition-fast), transform var(--transition-fast);
    gap: var(--spacing-unit);
}
.coin-row:hover {
    background-color: #2a3038;
    transform: translateX(4px); /* Shift right slightly */
    border-color: var(--accent-color); /* Highlight border */
}
[dir="rtl"] .coin-row:hover {
    transform: translateX(-4px); /* Shift left for RTL */
}

.coin-symbol {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-unit);
    font-size: 1rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.market-type-tag {
    font-size: 0.7rem;
    color: var(--text-secondary);
    padding: 2px 6px;
    border-radius: var(--border-radius-small);
    font-weight: 500;
    text-transform: uppercase;
    margin-left: var(--spacing-unit); /* LTR */
    border: 1px solid var(--border-color); /* Add border */
}
.market-type-tag.spot { border-color: var(--buy-color); color: var(--buy-color); }
.market-type-tag.futures { border-color: var(--accent-color); color: var(--accent-color); }
[dir="rtl"] .market-type-tag { margin-left: 0; margin-right: var(--spacing-unit); }

.coin-price {
    text-align: right; /* LTR */
    color: var(--text-primary); /* Use primary color for price */
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
}
.coin-change {
    text-align: right; /* LTR */
    font-size: 1rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.coin-change.positive { color: var(--buy-color); }
.coin-change.negative { color: var(--sell-color); }
[dir="rtl"] .coin-price, [dir="rtl"] .coin-change { text-align: left; }
/* End Market Overview */


/* --- 7. Professional Signal Card Styles (v9.1 Updates) --- */
.signal-card {
    background-color: var(--signal-card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-large); /* 12px */
    padding: calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 3.5); /* 24px 28px */
    margin-top: calc(var(--spacing-unit) * 3); /* 24px */
    font-size: 1rem;
    box-shadow: var(--card-shadow);
    position: relative; /* For potential badges */
    overflow: hidden; /* Ensure consistent styling */
}
/* Optional: Add a subtle top border highlight based on action */
.signal-card.long::before, .signal-card.short::before, .signal-card.hold::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px; /* Highlight height */
    border-top-left-radius: var(--border-radius-large);
    border-top-right-radius: var(--border-radius-large);
}
.signal-card.long::before { background-color: var(--buy-color); }
.signal-card.short::before { background-color: var(--sell-color); }
.signal-card.hold::before { background-color: var(--hold-color); }


.signal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: calc(var(--spacing-unit) * 2); /* 16px */
    margin-bottom: calc(var(--spacing-unit) * 3); /* 24px */
    flex-wrap: wrap; /* Allow wrapping */
    gap: calc(var(--spacing-unit) * 1.5); /* 12px */
}
.signal-header h2 { /* Pair + TF Info */
    margin: 0;
    font-size: 1.5rem; /* Slightly larger */
    color: var(--text-primary);
    text-align: left; /* Default LTR */
    border-bottom: none;
    padding-bottom: 0;
    line-height: 1.3;
    flex-grow: 1;
    font-weight: 600; /* Bolder title */
}
.signal-header .provider { /* Exchange Name */
    font-size: 0.9rem;
    color: var(--text-secondary);
    background-color: var(--primary-card-bg); /* Use primary card bg */
    padding: calc(var(--spacing-unit) * 0.75) calc(var(--spacing-unit) * 1.5); /* 6px 12px */
    border-radius: var(--border-radius-medium);
    display: inline-flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 0.75);
    border: 1px solid var(--border-color);
    white-space: nowrap;
}
.signal-header .provider i {
    color: var(--accent-color); /* Color the icon */
}

.signal-details {
    display: grid;
    gap: calc(var(--spacing-unit) * 1.75); /* Slightly adjusted gap */
}
.signal-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline; /* Align text baselines */
    line-height: var(--line-height-base);
    gap: calc(var(--spacing-unit) * 2); /* 16px */
    flex-wrap: wrap;
    padding: calc(var(--spacing-unit) * 0.5) 0; /* Add slight vertical padding */
}
.signal-item strong { /* Label */
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}
.signal-item span, .signal-item ul { /* Value or List */
    color: var(--text-primary);
    text-align: end; /* Logical property — works for both LTR and RTL */
    font-weight: 500;
    word-break: break-word; /* Allow long values to wrap */
}
.signal-item span.value-long, .signal-item span.value-short, .signal-item span.value-hold {
    font-weight: bold;
    padding: calc(var(--spacing-unit) * 0.6) calc(var(--spacing-unit) * 1.5); /* 5px 12px */
    border-radius: var(--border-radius-small);
    text-transform: uppercase;
    color: #fff; /* White text on colored backgrounds */
    font-size: 0.95rem; /* Slightly larger action */
    letter-spacing: 0.5px;
    min-width: 70px; /* Ensure minimum width */
    text-align: center; /* Center text within badge */
}
.signal-item span.value-long { background-color: var(--buy-color); box-shadow: 0 0 8px rgba(47, 181, 116, 0.5); }
.signal-item span.value-short { background-color: var(--sell-color); box-shadow: 0 0 8px rgba(248, 81, 73, 0.5); }
.signal-item span.value-hold { background-color: var(--hold-color); box-shadow: 0 0 8px rgba(247, 183, 49, 0.5); color: var(--bg-color); } /* Dark text on hold */

.signal-list { /* Entries and Targets */
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right; /* Default LTR */
}
.signal-list li {
    margin-bottom: calc(var(--spacing-unit) * 0.75); /* 6px */
    color: var(--text-primary);
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
}
.signal-list li:last-child { margin-bottom: 0; }

.target-profit {
    color: var(--buy-color);
    font-size: 0.85em;
    margin-left: var(--spacing-unit); /* LTR */
    font-weight: normal;
}
.stop-loss-value { font-weight: bold; font-variant-numeric: tabular-nums; }
.stop-loss-percent {
    color: var(--sell-color);
    font-size: 0.85em;
    margin-left: var(--spacing-unit); /* LTR */
    font-weight: normal;
}

/* --- Capital Allocation (Margin) Smart Bar Styles --- */
.capital-alloc-container {
    background: var(--secondary-card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-top: 15px;
    margin-bottom: 5px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.alloc-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.alloc-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.alloc-title i {
    color: var(--accent-color);
}

.alloc-percent-badge {
    font-size: 0.9rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid;
    background: rgba(255, 255, 255, 0.05);
    letter-spacing: 0.5px;
}

.alloc-progress-track {
    width: 100%;
    height: 10px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
}

.alloc-progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* افکت نور متحرک روی نوار پر شده */
.alloc-progress-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    animation: shimmer 2s infinite linear;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.alloc-footer-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[dir="rtl"] .capital-alloc-container { text-align: right; }
[dir="rtl"] .alloc-header-row { flex-direction: row-reverse; }
[dir="rtl"] .alloc-footer-row { flex-direction: row-reverse; }

/* Strategy Suggestion */
.strategy-suggestion {
    margin-top: calc(var(--spacing-unit) * 2.5); /* 20px */
    padding-top: calc(var(--spacing-unit) * 2); /* 16px */
    border-top: 1px dashed var(--border-color-light); /* Lighter dash */
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: left; /* LTR */
    white-space: pre-line;
}
.strategy-suggestion strong {
    color: var(--accent-color);
    font-weight: 600;
}
.strategy-suggestion i {
    margin-right: calc(var(--spacing-unit) * 0.75); /* LTR */
    color: var(--accent-color);
    vertical-align: middle;
}
[dir="rtl"] .strategy-suggestion { text-align: right; }
[dir="rtl"] .strategy-suggestion i { margin-right: 0; margin-left: calc(var(--spacing-unit) * 0.75); }

/* Rationale & Risk Scenarios */
.signal-rationale, .risk-scenario {
    margin-top: calc(var(--spacing-unit) * 2); /* Reduced margin */
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 2.5); /* Add padding */
    border: 1px solid var(--border-color); /* Use solid border */
    border-radius: var(--border-radius-medium);
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: left; /* LTR */
    white-space: pre-line;
    background-color: var(--primary-card-bg); /* Slightly different background */
}
.signal-rationale strong, .risk-scenario strong {
    color: var(--text-primary);
    font-weight: 600;
    display: block;
    margin-bottom: var(--spacing-unit);
    font-size: 1em; /* Relative to parent */
    border-bottom: 1px solid var(--border-color-light); /* Underline title */
    padding-bottom: calc(var(--spacing-unit) * 0.5);
}
.signal-rationale ul, .risk-scenario ul { /* Style lists if used */
    list-style: none;
    padding-left: 0;
    margin-top: var(--spacing-unit);
}
.signal-rationale li, .risk-scenario li {
    padding-left: calc(var(--spacing-unit) * 2);
    position: relative;
    margin-bottom: calc(var(--spacing-unit) * 0.5);
}
.signal-rationale li::before, .risk-scenario li::before {
    content: '-';
    position: absolute;
    left: 0; /* LTR */
    color: var(--accent-color);
    font-weight: bold;
}
[dir="rtl"] .signal-rationale, [dir="rtl"] .risk-scenario { text-align: right; }
[dir="rtl"] .signal-rationale li, [dir="rtl"] .risk-scenario li { padding-left: 0; padding-right: calc(var(--spacing-unit) * 2); }
[dir="rtl"] .signal-rationale li::before, [dir="rtl"] .risk-scenario li::before { left: auto; right: 0; }


/* --- 8. Key Drivers & Radar Chart Styles --- */
.key-drivers-card {
    background-color: var(--key-drivers-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-large);
    padding: calc(var(--spacing-unit) * 3);
    margin-top: calc(var(--spacing-unit) * 4);
    box-shadow: var(--card-shadow);
}
.key-drivers-card h3 { /* Main Title */
    color: var(--accent-color);
    text-align: center;
    margin-top: 0;
    margin-bottom: calc(var(--spacing-unit) * 3);
    font-size: 1.4rem; /* Consistent section title size */
    border-bottom: 1px solid var(--border-color);
    padding-bottom: calc(var(--spacing-unit) * 2);
    justify-content: center; /* Center icon+text */
}
.drivers-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--spacing-unit) * 3.5);
}
.drivers-column h4 { /* Bullish/Bearish Title */
    margin-top: 0;
    margin-bottom: calc(var(--spacing-unit) * 2);
    font-size: 1.15rem; /* Slightly larger */
    text-align: center;
    font-weight: 600;
}
.drivers-column ul { padding: 0; margin: 0; list-style: none; }
.drivers-column li {
    background-color: var(--secondary-card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-medium);
    padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 2);
    margin-bottom: var(--spacing-unit);
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    text-align: left; /* LTR */
    transition: background-color var(--transition-fast);
    position: relative;
    padding-left: calc(var(--spacing-unit) * 3.5); /* Space for icon */
}
.drivers-column li:hover {
    background-color: var(--border-color); /* Darken on hover */
}
.drivers-column li::before { /* Icons */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: calc(var(--spacing-unit) * 1.5); /* LTR */
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9em;
}
.drivers-column:first-child h4 { color: var(--buy-color); } /* Bullish Title */
.drivers-column:last-child h4 { color: var(--sell-color); } /* Bearish Title */
.drivers-column:first-child li::before { content: '\f067'; color: var(--buy-color); } /* Plus */
.drivers-column:last-child li::before { content: '\f068'; color: var(--sell-color); } /* Minus */
[dir="rtl"] .drivers-column li { text-align: right; padding-left: calc(var(--spacing-unit) * 2); padding-right: calc(var(--spacing-unit) * 3.5); }
[dir="rtl"] .drivers-column li::before { left: auto; right: calc(var(--spacing-unit) * 1.5); }

/* Radar Chart */
.radar-chart-container {
    margin-top: calc(var(--spacing-unit) * 4);
    padding: calc(var(--spacing-unit) * 3);
    background-color: var(--secondary-card-bg);
    border-radius: var(--border-radius-large);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}
.radar-chart-container h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: calc(var(--spacing-unit) * 3);
    font-size: 1.4rem; /* Consistent */
    color: var(--accent-color);
    border-bottom: none;
    padding-bottom: 0;
    justify-content: center; /* Center icon+text */
}
#aiRadarChart {
    max-width: 100%;
    height: auto;
    max-height: 450px; /* Allow slightly taller chart */
    display: block;
    margin: 0 auto;
}

/* --- 9. At-a-Glance Dashboard --- */
.glance-dashboard {
    background-color: var(--glance-bg);
    border: 1px solid var(--glance-border);
    border-radius: var(--border-radius-large);
    padding: calc(var(--spacing-unit) * 3);
    margin-bottom: calc(var(--spacing-unit) * 4); /* Consistent spacing */
    box-shadow: var(--card-shadow);
}
.glance-dashboard h3 {
    color: var(--accent-color);
    text-align: center;
    margin-top: 0;
    margin-bottom: calc(var(--spacing-unit) * 3);
    font-size: 1.4rem; /* Consistent */
    border-bottom: none;
    padding-bottom: 0;
    justify-content: center; /* Center icon+text */
}
.glance-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); /* Wider items */
    gap: calc(var(--spacing-unit) * 2.5) calc(var(--spacing-unit) * 3);
    text-align: center;
}
.glance-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-unit); /* Add padding */
    border-radius: var(--border-radius-medium);
    transition: background-color var(--transition-fast);
}
.glance-item:hover {
    background-color: var(--primary-card-bg); /* Hover effect */
}
.glance-item i { /* Icon */
    font-size: 2rem; /* Larger icon */
    margin-bottom: calc(var(--spacing-unit) * 1.25);
    /* Icon colors are applied via data-key in JS */
}
.glance-item strong { /* Label */
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: calc(var(--spacing-unit) * 0.5);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.glance-item span { /* Value */
    font-size: 1.05rem; /* Slightly larger value */
    font-weight: 600;
    color: var(--text-primary);
}
/* Apply Icon Colors (map key to CSS var) - Example for trend */
.glance-item[data-key*='up'] i { color: var(--glance-icon-trend-up); }
.glance-item[data-key*='down'] i { color: var(--glance-icon-trend-down); }
.glance-item[data-key*='chop'] i { color: var(--glance-icon-trend-chop); }
/* Add similar rules for sentiment, whales, risk keys */
.glance-item[data-key*='fear'] i { color: var(--glance-icon-senti-fear); }
.glance-item[data-key*='greed'] i { color: var(--glance-icon-senti-greed); }
.glance-item[data-key*='neutral'] i { color: var(--glance-icon-senti-neutral); } /* Default/Neutral */
.glance-item[data-key*='whale_buy'] i { color: var(--glance-icon-whale-buy); }
.glance-item[data-key*='whale_sell'] i { color: var(--glance-icon-whale-sell); }
.glance-item[data-key*='whale_neutral'] i { color: var(--glance-icon-whale-neutral); }
.glance-item[data-key*='risk_high'] i { color: var(--glance-icon-risk-high); }
.glance-item[data-key*='risk_med'] i { color: var(--glance-icon-risk-med); }
.glance-item[data-key*='risk_low'] i { color: var(--glance-icon-risk-low); }
.glance-item[data-key*='risk_none'] i { color: var(--glance-icon-risk-none); }


/* --- 10. Confidence Breakdown --- */
.confidence-breakdown-card {
    background-color: var(--confidence-breakdown-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-large);
    padding: calc(var(--spacing-unit) * 3);
    margin-bottom: calc(var(--spacing-unit) * 4); /* Consistent spacing */
    box-shadow: var(--card-shadow);
}
.confidence-breakdown-card h3 {
    color: var(--accent-color);
    text-align: center;
    margin-top: 0;
    margin-bottom: calc(var(--spacing-unit) * 3);
    font-size: 1.4rem; /* Consistent */
    border-bottom: 1px solid var(--border-color);
    padding-bottom: calc(var(--spacing-unit) * 2);
    justify-content: center; /* Center icon+text */
}
.confidence-items {
    display: grid;
    gap: calc(var(--spacing-unit) * 1.25); /* Adjusted gap */
}
.confidence-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    line-height: 1.5;
    font-size: 0.95rem;
    padding: calc(var(--spacing-unit) * 1) 0; /* Increased padding */
    border-bottom: 1px solid var(--border-color-light); /* Slightly more visible divider */
}
.confidence-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.confidence-item strong { /* Label */
    color: var(--text-secondary);
    font-weight: 500;
}
.confidence-item span { /* Value */
    color: var(--text-primary);
    font-weight: 500;
    text-align: right; /* LTR */
    white-space: nowrap;
    display: flex; /* Align value parts if needed */
    align-items: center;
}
/* Color coding for adjustment values */
.confidence-item span.positive-adjust { color: var(--confidence-positive-adjust); font-weight: bold; }
.confidence-item span.negative-adjust { color: var(--confidence-negative-adjust); font-weight: bold; }
.confidence-item span.neutral-adjust { color: var(--confidence-neutral-adjust); }

.confidence-item span.final-confidence { /* Style the final score */
    font-weight: bold;
    font-size: 1.15em; /* Larger final score */
    color: var(--accent-color);
    background-color: var(--accent-subtle-bg);
    padding: calc(var(--spacing-unit)*0.5) calc(var(--spacing-unit)*1.25); /* Adjust padding */
    border-radius: var(--border-radius-small);
}
[dir="rtl"] .confidence-item span { text-align: left; }

/* --- 11. Detailed Pillars (Data Analyst Mode) --- */
.detailed-pillars-section {
    margin-top: calc(var(--spacing-unit) * 4);
    background-color: var(--primary-card-bg); /* Use primary as base */
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-large);
    padding: calc(var(--spacing-unit) * 3);
    box-shadow: var(--card-shadow);
}
.detailed-pillars-section h3 { /* Main Title */
    color: var(--accent-color);
    text-align: center;
    margin-top: 0;
    margin-bottom: calc(var(--spacing-unit) * 3);
    font-size: 1.4rem; /* Consistent */
    border-bottom: 1px solid var(--border-color);
    padding-bottom: calc(var(--spacing-unit) * 2);
    justify-content: center; /* Center icon+text */
}
/* New v9.1: Collapsible Pillar Groups */
.pillar-group-details {
    margin-bottom: calc(var(--spacing-unit) * 1.5); /* Space between collapsed groups */
    border-radius: var(--border-radius-medium);
    border: 1px solid var(--border-color-light);
    background-color: var(--secondary-card-bg);
}
.pillar-group-summary { /* The <summary> tag */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: calc(var(--spacing-unit) * 2); /* 16px */
    cursor: pointer;
    background-color: var(--secondary-card-bg);
    transition: background-color var(--transition-fast);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    border-radius: calc(var(--border-radius-medium) - 1px) calc(var(--border-radius-medium) - 1px) 0 0;
}
.pillar-group-summary:hover {
    background-color: #2a3038;
}
.pillar-group-summary::marker { /* Hide default arrow */
    display: none;
    content: '';
}
.pillar-group-summary:after { /* Custom Arrow */
    content: '\f078'; /* Font Awesome chevron-down */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.8em;
    color: var(--text-secondary);
    transition: transform var(--transition-base);
    transform-origin: center;
}
[dir="rtl"] .pillar-group-summary:after {
    content: '\f077'; /* chevron-up, but we'll rotate it */
}
.pillar-group-details[open] > .pillar-group-summary:after {
    transform: rotate(180deg);
}

.pillar-group-content {
    padding: calc(var(--spacing-unit) * 2.5); /* 20px */
    padding-top: var(--spacing-unit); /* Less top padding */
    border-top: 1px solid var(--border-color); /* Separator */
    background-color: var(--primary-card-bg); /* Slightly different bg for content */
}

.pillar-item {
    display: grid;
    /* Updated grid layout for better spacing and wrapping */
    grid-template-columns: minmax(150px, auto) 1fr auto; /* Name | Note | Score */
    gap: var(--spacing-unit) calc(var(--spacing-unit) * 2);
    align-items: start; /* Align items to the start */
    margin-bottom: calc(var(--spacing-unit) * 1.5); /* More space between items */
    font-size: 0.9rem;
    padding-bottom: calc(var(--spacing-unit) * 1.5);
    border-bottom: 1px solid var(--border-color); /* Separator */
}
.pillar-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.pillar-name {
    font-weight: 500;
    color: var(--text-primary); /* Use primary color for name */
    white-space: nowrap;
    grid-row: 1 / 2; /* Ensure name stays on first row */
}
.pillar-note {
    color: var(--text-secondary);
    font-style: italic;
    grid-column: 1 / 3; /* Span note across name and middle column */
    grid-row: 2 / 3; /* Place note on the second row */
    margin-top: calc(var(--spacing-unit) * 0.5); /* Add space above note */
    text-align: left; /* LTR */
    line-height: 1.4; /* Improve note readability */
    word-break: break-word; /* Allow long notes to wrap */
}
.pillar-score {
    font-weight: bold;
    font-variant-numeric: tabular-nums;
    padding: calc(var(--spacing-unit)*0.5) calc(var(--spacing-unit)*1); /* Adjust padding */
    border-radius: var(--border-radius-small);
    min-width: 45px;
    text-align: center;
    grid-column: 3 / 4; /* Score in the last column */
    grid-row: 1 / 2; /* Score on the first row, aligned with name */
    justify-self: end; /* Align score to the right (LTR) */
    align-self: center; /* Center score vertically */
}
.pillar-score.positive { background-color: rgba(47, 181, 116, 0.15); color: var(--buy-color); }
.pillar-score.negative { background-color: rgba(248, 81, 73, 0.1); color: var(--sell-color); }
.pillar-score.neutral { background-color: rgba(139, 148, 158, 0.1); color: var(--text-secondary); }

[dir="rtl"] .pillar-item { grid-template-columns: auto 1fr minmax(150px, auto); } /* Score | Note | Name */
[dir="rtl"] .pillar-name { grid-column: 3 / 4; text-align: right; }
[dir="rtl"] .pillar-note { grid-column: 2 / 4; text-align: right; } /* Span middle and name columns */
[dir="rtl"] .pillar-score { grid-column: 1 / 2; justify-self: start; } /* Align score left */


/* --- 12. Utility & RTL Support & Responsive --- */
.hidden { display: none !important; }

/* Spin Animation (for loader/buttons) */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* FadeIn Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); } /* Subtle fade-in */
    to { opacity: 1; transform: translateY(0); }
}

/* RTL Styles Adjustments */
[dir="rtl"] { direction: rtl; }
[dir="ltr"] { direction: ltr; }
/* Apply RTL specific alignments where needed */
[dir="rtl"] .control-group { text-align: right; }
[dir="ltr"] .control-group { text-align: left; }
/* (.signal-item span / .signal-list already use `text-align: end` — logical, no override needed) */
[dir="rtl"] .target-profit, [dir="rtl"] .stop-loss-percent { margin-left: 0; margin-right: var(--spacing-unit); }
[dir="ltr"] .target-profit, [dir="ltr"] .stop-loss-percent { margin-right: 0; margin-left: var(--spacing-unit); }
/* Market Overview RTL already handled */
[dir="rtl"] .coin-list { padding-right: 0; padding-left: var(--spacing-unit); }
[dir="ltr"] .coin-list { padding-left: 0; padding-right: var(--spacing-unit); }

/* --- Responsive & Mobile App Feel adjustments --- */
/* ============================================ */
/* === MOBILE OPTIMIZED — TABLET (≤ 768px) === */
/* ============================================ */
@media (max-width: 768px) {
    body { 
        padding: 80px 12px 24px 12px;
    }
    .main-container { max-width: 100%; }
    
    /* Reduce blur intensity on tablets/mobiles for better performance */
    .orb { filter: blur(80px); opacity: 0.4; }
    .orb-1 { width: 80vw; height: 80vw; }
    .orb-2 { width: 70vw; height: 70vw; }
    .orb-3 { width: 50vw; height: 50vw; }
    
    .controls { grid-template-columns: 1fr 1fr; gap: 14px; }
    .drivers-columns { grid-template-columns: 1fr; gap: calc(var(--spacing-unit) * 2.5); }
    .glance-items { grid-template-columns: repeat(2, 1fr); }
    
    #analysis-output h2 { font-size: 1.5rem; }
    #analysis-output h3 { font-size: 1.15rem; }
    .signal-header h2 { font-size: 1.25rem; }
    
    .pillar-item { grid-template-columns: auto 1fr; grid-template-rows: auto auto; }
    .pillar-name { grid-column: 1 / 2; grid-row: 1 / 2; }
    .pillar-note { grid-column: 1 / 3; grid-row: 2 / 3; text-align: left; }
    .pillar-score { grid-column: 2 / 3; grid-row: 1 / 2; justify-self: end; }
    [dir="rtl"] .pillar-note { text-align: right; }
    [dir="rtl"] .pillar-score { justify-self: start; }
    
    /* Top nav: flexible wrap for tablet */
    #top-nav-container {
        flex-wrap: wrap;
        justify-content: center;
        width: auto;
        left: 15px !important;
        right: 15px !important;
        top: 12px !important;
        padding: 6px;
        gap: 6px;
        box-sizing: border-box;
    }
    #top-nav-container .btn,
    #top-nav-container button,
    #top-nav-container a {
        font-size: 0.8rem !important;
        padding: 6px 10px !important;
        height: 36px;
    }
}

/* ============================================ */
/* === MOBILE OPTIMIZED — PHONE (≤ 600px) === */
/* ============================================ */
@media (max-width: 600px) {
    :root { 
        --base-font-size: 15px;
        --border-radius-large: 18px;
        --border-radius-medium: 12px;
    }
    
    body { 
        padding: 70px 14px 28px 14px;
    }
    
    .main-container { 
        max-width: 100%; 
        padding-bottom: calc(var(--spacing-unit) * 4);
    }
    
    /* === Header (logo + title) === */
    .brand-header-wrapper {
        flex-direction: column;
        gap: 8px;
    }
    .app-main-logo {
        height: 42px;
    }
    .main-header { margin-bottom: calc(var(--spacing-unit) * 4); }
    .main-header h1 { 
        font-size: 1.65rem; 
        letter-spacing: -0.5px;
    }
    .main-header p { font-size: 0.95rem; padding: 0 8px; }
    
    /* === Companion Cards: native-app row style === */
    .companion-selection { 
        grid-template-columns: 1fr; 
        gap: 12px;
        margin-bottom: calc(var(--spacing-unit) * 3);
    }
    .companion-card { 
        min-height: 86px;
        padding: 18px 18px;
        flex-direction: row; 
        align-items: center; 
        justify-content: flex-start; 
        gap: 18px;
        text-align: left;
        border-radius: 16px;
    }
    [dir="rtl"] .companion-card { text-align: right; }
    .companion-card:hover {
        transform: translateY(-2px); /* subtler hover on mobile */
    }
    .companion-card .card-icon { 
        margin-bottom: 0; 
        font-size: 1.6rem;
        width: 48px; 
        height: 48px;
        display: flex; 
        align-items: center; 
        justify-content: center; 
        background: var(--accent-subtle-bg);
        border-radius: 12px;
        flex-shrink: 0;
    }
    .companion-card h2 { font-size: 1.05rem; margin: 0; }
    .companion-card p { font-size: 0.85rem; margin: 3px 0 0 0; }
    
    /* === Controls / Forms === */
    .controls { grid-template-columns: 1fr; gap: 14px; margin-bottom: calc(var(--spacing-unit) * 3); }
    #controls-container, #market-controls-container, #result-container { 
        padding: 18px 16px; 
        border-radius: 18px; 
        margin-top: 0;
    }
    select, input[type="text"], input[type="email"], input[type="password"] {
        padding: 13px 14px;
        font-size: 16px; /* prevent iOS zoom */
    }
    
    #submit-btn, #load-market-btn {
        font-size: 1rem;
        padding: 14px;
        letter-spacing: 0.5px;
    }
    
    /* === Glance / dashboard items === */
    .glance-items { grid-template-columns: 1fr 1fr; gap: 10px; }
    .glance-item { padding: 14px 10px; }
    .glance-item i { font-size: 1.4rem; }
    .glance-item span { font-size: 0.95rem; }
    
    /* === Coin rows / market lists === */
    .coin-row,
    .coin-list-header { 
        grid-template-columns: 1fr auto auto; 
        gap: 8px; 
        padding: 12px 10px; 
        font-size: 0.85rem; 
    }
    .coin-symbol { font-size: 0.9rem; flex-wrap: wrap; }
    .market-type-tag { font-size: 0.6rem; padding: 1px 4px; margin-left: 0; margin-top: 4px; display: inline-block; }
    
    /* === Signal cards === */
    .signal-item { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 6px; 
        margin-bottom: 14px; 
        padding-bottom: 12px;
        border-bottom: 1px solid var(--border-color);
    }
    .signal-item:last-child { border-bottom: none; }
    .signal-item span, .signal-item ul { text-align: left; width: 100%; font-size: 1rem; }
    [dir="rtl"] .signal-item span, [dir="rtl"] .signal-item ul { text-align: right; }
    
    /* === Filter buttons === */
    .filter-btn { 
        padding: 9px 12px; 
        font-size: 0.8rem; 
        flex: 1 1 calc(50% - 8px);
        text-align: center; 
        min-height: 38px;
    }
    .market-filters { justify-content: space-between; gap: 8px; }
    
    /* === Responsive tables === */
    .table-responsive { 
        overflow-x: auto; 
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px;
        padding: 0 16px;
    }
    .trade-table { min-width: 500px; font-size: 0.85rem; }
    .trade-table th, .trade-table td { padding: 8px 6px; }
    
    /* === Headings within result panel === */
    #analysis-output h2 { font-size: 1.35rem; }
    #analysis-output h3 { font-size: 1.05rem; }
    #analysis-output p, #analysis-output li { font-size: 0.95rem; }
    
    /* === Top nav for phone === */
    #top-nav-container {
        top: 10px !important;
        left: 10px !important;
        right: 10px !important;
        max-width: calc(100% - 20px);
        padding: 5px;
        gap: 5px;
        border-radius: 14px;
    }
    #top-nav-container .btn,
    #top-nav-container button,
    #top-nav-container a {
        font-size: 0.75rem !important;
        padding: 6px 9px !important;
        height: 34px;
        gap: 5px;
    }
    /* Hide button text labels on small screens, keep only icons where present */
    #top-nav-container .plan-nav-btn {
        font-size: 0.7rem !important;
        padding: 6px 8px !important;
    }
    
    /* === Touch targets minimum 44x44 (Apple HIG) === */
    button, .btn, a.btn, .icon-btn {
        min-height: 40px;
    }
    
    /* === Modals on mobile: full width with safe padding === */
    .modal-box, .plans-modal-box {
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
        margin: 10px !important;
        max-height: 92vh;
        overflow-y: auto;
        box-sizing: border-box;
    }
}

/* ============================================ */
/* === SMALL PHONE (≤ 380px) — fine tuning === */
/* ============================================ */
@media (max-width: 380px) {
    body { padding: 65px 10px 24px 10px; }
    
    .main-header h1 { font-size: 1.45rem; }
    .main-header p { font-size: 0.88rem; }
    .app-main-logo { height: 38px; }
    
    .companion-card { padding: 16px 14px; gap: 14px; }
    .companion-card h2 { font-size: 1rem; }
    .companion-card p { font-size: 0.78rem; }
    .companion-card .card-icon { width: 42px; height: 42px; font-size: 1.4rem; }
    
    #controls-container, #market-controls-container, #result-container {
        padding: 14px 12px;
    }
    
    #top-nav-container {
        top: 8px !important;
        padding: 4px;
        gap: 4px;
    }
    #top-nav-container .btn,
    #top-nav-container button,
    #top-nav-container a {
        font-size: 0.7rem !important;
        padding: 5px 7px !important;
        height: 32px;
    }
}

/* --- 13. Backtest Results Section (Clean & Corporate) --- */
.backtest-section {
    margin-top: calc(var(--spacing-unit) * 5);
    padding: calc(var(--spacing-unit) * 3.5);
    background: var(--primary-card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-large);
    animation: fadeIn 0.6s ease-out forwards;
    box-shadow: var(--card-shadow);
}

.backtest-header {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: calc(var(--spacing-unit) * 3);
    color: var(--text-primary); /* Fix: Dark text for light mode */
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 1.5);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: calc(var(--spacing-unit) * 1.5);
}
.backtest-header i {
    color: var(--accent-color);
    font-size: 1.1em;
}

.backtest-loader-msg {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: var(--spacing-unit);
    animation: pulse-text 1.5s infinite ease-in-out;
}

.backtest-success-msg {
    color: var(--buy-color); /* Green indicating success */
    font-size: 0.95rem;
    margin-bottom: calc(var(--spacing-unit) * 2.5);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--spacing-unit);
}

/* Metric Grid System */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: calc(var(--spacing-unit) * 2.5);
}

.metric-card {
    background-color: var(--secondary-card-bg);
    padding: calc(var(--spacing-unit) * 2);
    border-radius: var(--border-radius-medium);
    border-left: 3px solid var(--accent-color); /* Professional corporate accent */
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.metric-card:hover {
    transform: translateY(-3px);
    background-color: #2c313a; /* Slightly lighter hover */
    box-shadow: 0 5px 12px rgba(0,0,0,0.2);
}

.metric-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: calc(var(--spacing-unit) * 0.75);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

.metric-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums; /* Monospaced numbers for better alignment */
}

@keyframes pulse-text {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* RTL Support for Backtest */
[dir="rtl"] .metric-card {
    border-left: none;
    border-right: 3px solid var(--accent-color);
}
/* --- Price Hunter Specific Styles --- */
#price-hunter-output {
    margin-top: 30px;
    animation: fadeIn 0.5s ease-out;
    display: none; /* Controlled by JS */
}

.ph-title {
    text-align: center;
    color: var(--accent-color);
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    font-size: 1.8rem;
}

/* Cards Container */
.arb-cards-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.arb-card {
    background: var(--secondary-card-bg);
    padding: 25px;
    border-radius: 16px;
    flex: 1;
    min-width: 260px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: 1px solid transparent;
    transition: transform 0.3s;
}
.arb-card:hover { transform: translateY(-5px); }

.arb-card.buy { border-color: var(--buy-color); background: rgba(47, 181, 116, 0.05); }
.arb-card.sell { border-color: var(--sell-color); background: rgba(248, 81, 73, 0.05); }

.arb-card h4 { margin: 0 0 15px; font-size: 1.2rem; font-weight: 600; }
.arb-card.buy h4 { color: var(--buy-color); }
.arb-card.sell h4 { color: var(--sell-color); }

.arb-price { font-size: 2rem; font-weight: 800; color: var(--text-primary); margin-bottom: 5px; }
.arb-exchange { color: var(--text-secondary); margin-bottom: 20px; font-size: 0.95rem; }
.arb-exchange strong { color: var(--text-primary); text-transform: capitalize; }

.arb-btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    color: #fff;
    transition: opacity 0.2s;
}
.arb-btn:hover { opacity: 0.9; }
.buy-btn { background: var(--buy-color); box-shadow: 0 4px 10px rgba(47, 181, 116, 0.3); }
.sell-btn { background: var(--sell-color); box-shadow: 0 4px 10px rgba(248, 81, 73, 0.3); }

/* Gap Circle */
.arb-gap-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}
.arb-gap-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--primary-card-bg);
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}
.gap-label { font-size: 0.8rem; font-weight: 600; opacity: 0.8; }
.gap-value { font-size: 1.4rem; font-weight: 800; }

/* Status Card (Error State) */
.arb-status-card {
    text-align: center;
    padding: 30px;
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid var(--sell-color);
    border-radius: 12px;
    margin-bottom: 30px;
}
.arb-status-card h3 { color: var(--sell-color); margin-top: 0; }

/* List Styles */
.ph-list-container {
    background: var(--primary-card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}
.ph-list-title { margin-top: 0; color: var(--text-secondary); font-weight: 500; margin-bottom: 15px; }
.ph-list-header {
    display: flex;
    justify-content: space-between;
    padding: 0 15px 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
}
.ph-list-scroll {
    max-height: 600px;
    overflow-y: auto;
    padding-top: 10px;
}
.ph-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--secondary-card-bg);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid transparent;
    transition: background 0.2s;
}
.ph-row:hover { background: #2a3038; }
.ph-row.error { background: rgba(255, 0, 0, 0.05); opacity: 0.7; }

.ph-name { display: flex; align-items: center; gap: 10px; font-weight: 600; text-transform: capitalize; min-width: 120px; }
.ph-prices { display: flex; gap: 20px; justify-content: flex-end; flex-grow: 1; }
.ph-price-box { display: flex; flex-direction: column; align-items: flex-end; font-size: 0.95rem; }
.ph-price-box span { font-size: 0.75rem; color: var(--text-secondary); }
.ph-msg { color: var(--sell-color); font-size: 0.9rem; font-weight: 500; }

.best-buy-highlight strong { color: var(--buy-color); text-decoration: underline; }
.best-sell-highlight strong { color: var(--sell-color); text-decoration: underline; }

/* Responsive */
@media (max-width: 768px) {
    .arb-cards-container { flex-direction: column; }
    .arb-gap-wrapper { order: -1; margin-bottom: 20px; }
    .ph-prices { gap: 10px; }
    .ph-price-box { font-size: 0.85rem; }
}
/* Chart & Table Container Styles - Dynamic */
.chart-container-box {
    margin-top: 25px;
    margin-bottom: 25px;
    background: var(--primary-card-bg);
    border-radius: 16px;
    padding: 20px;
    height: 350px;
    border: 1px solid var(--border-color);
    position: relative;
    box-shadow: var(--card-shadow);
}

.pnl-pos { color: var(--buy-color); font-weight: bold; }
.pnl-neg { color: var(--sell-color); font-weight: bold; }

[dir="rtl"] .trade-table { text-align: right; }

.trade-tag {
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-block;
    min-width: 60px;
    text-align: center;
}
.trade-tag.long {
    background-color: rgba(47, 181, 116, 0.15); 
    color: #2fb574; 
    border: 1px solid rgba(47, 181, 116, 0.3);
    box-shadow: 0 0 5px rgba(47, 181, 116, 0.2);
}

.trade-tag.short {
    background-color: rgba(248, 81, 73, 0.15);
    color: #f85149;
    border: 1px solid rgba(248, 81, 73, 0.3);
    box-shadow: 0 0 5px rgba(248, 81, 73, 0.2);
}

.reason-text {
    font-weight: 500;
    font-size: 0.9rem;
}

.reason-stop { color: #f85149; }
.reason-trend { color: #f7b731; }
.reason-profit { color: #2fb574; }
.reason-neutral { color: #8b949e; }
/* --- Sentinel Security Shield Styles --- */
.security-shield-card {
    background: var(--primary-card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border-left: 5px solid; /* Color defined by modifiers */
}

/* Modifiers */
.security-shield-card.safe { border-left-color: #2fb574; background: linear-gradient(90deg, rgba(47, 181, 116, 0.1), transparent); }
.security-shield-card.caution { border-left-color: #f7b731; background: linear-gradient(90deg, rgba(247, 183, 49, 0.1), transparent); }
.security-shield-card.scam { border-left-color: #f85149; background: linear-gradient(90deg, rgba(248, 81, 73, 0.15), transparent); animation: pulse-red 2s infinite; }

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(248, 81, 73, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(248, 81, 73, 0); }
    100% { box-shadow: 0 0 0 0 rgba(248, 81, 73, 0); }
}

.shield-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.shield-icon-box {
    font-size: 2rem;
}
.safe .shield-icon-box i { color: #2fb574; }
.caution .shield-icon-box i { color: #f7b731; }
.scam .shield-icon-box i { color: #f85149; }

.shield-info h4 {
    margin: 0;
    font-size: 0.9rem;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.shield-score {
    font-size: 1.4rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.shield-badge {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.security-warnings {
    list-style: none;
    padding: 0;
    margin: 0;
}

.security-warnings li {
    color: #f85149;
    font-size: 0.9rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.security-clean {
    color: #2fb574;
    margin: 0;
    font-weight: 500;
}

/* --- Global Modal Styles (Admin & Plans) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 999999; /* عدد بسیار بالا برای قرار گرفتن روی نوار ناوبری */
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-box {
    position: relative;
    z-index: 1;
    background: var(--primary-card-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--card-shadow);
    box-sizing: border-box;
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}
.close-modal-btn:hover { color: #f85149; }

.modal-body {
    padding: 25px;
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* --- Admin Table Styles (Fixed Readability) --- */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    table-layout: auto;
    min-width: 600px;
}

.admin-table th, .admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    background-color: transparent;
}

.admin-table th {
    background: var(--secondary-card-bg);
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border-top: 1px solid var(--border-color);
}

.admin-table tr:hover td {
    background-color: var(--accent-subtle-bg);
}

#admin-users-table-body td {
    color: var(--text-primary) !important;
    font-weight: 500;
}

/* --- Admin Panel UI Fixes --- */
.plan-select {
    padding: 8px 12px;
    border-radius: 6px;
    background-color: var(--secondary-card-bg) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    outline: none;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.plan-select:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}

.update-plan-btn {
    background-color: #3b82f6 !important; /* آبی پررنگ */
    color: #ffffff !important; /* آیکون سفید */
    border: none !important;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    margin-inline-start: 8px;
}

.update-plan-btn:hover { 
    background-color: #2563eb !important; 
    transform: translateY(-1px);
}

.ban-user-btn {
    font-weight: 600 !important;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s;
}
.ban-user-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* --- Order Book & OBI Card Styles --- */
#order-book-card {
    padding: 16px;
    background: var(--secondary-card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-medium);
    margin-bottom: 24px;
    color: #fff;
    box-shadow: var(--card-shadow);
    animation: fadeIn 0.5s ease-out;
}

.obi-progress-wrapper {
    height: 20px;
    width: 100%;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
    display: flex;
    margin-bottom: 15px;
    position: relative;
}

/* خط جداکننده وسط */
.obi-progress-wrapper::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(0, 0, 0, 0.5);
    transform: translateX(-50%);
    z-index: 2;
}

.obi-progress-bar {
    height: 100%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(90deg, #2fb574, #4cd137); /* گرادینت سبز */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #000;
    font-weight: bold;
    overflow: hidden;
    white-space: nowrap;
}

.obi-progress-bar.sell {
    background: linear-gradient(90deg, #e84118, #f85149); /* گرادینت قرمز */
    margin-left: auto;
}

.walls-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.wall-info {
    flex: 1;
    text-align: center;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.2);
    font-weight: 500;
    border: 1px solid transparent;
}

.wall-info.buy-wall {
    border-color: rgba(47, 181, 116, 0.3);
    color: #2fb574;
}

.wall-info.sell-wall {
    border-color: rgba(248, 81, 73, 0.3);
    color: #f85149;
}
/* --- Elite Whale Radar UI --- */
.whale-radar-section {
    background: var(--primary-card-bg);
    background-image: radial-gradient(var(--border-color-light) 1px, transparent 1px);
    background-size: 20px 20px;
    padding: 20px;
    border-radius: var(--border-radius-large);
    margin-top: 18px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.whale-header {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.whale-badge {
    font-size: 1rem;
    padding: 8px 20px;
    border-radius: 30px;
    background: var(--secondary-card-bg);
    font-weight: 700;
    display: inline-block;
    color: var(--text-primary);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.whale-table {
    width: 100%;
    font-size: 0.95rem;
    border-collapse: collapse;
    margin-top: 6px;
}

.whale-table td, .whale-table th {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    text-align: left;
}
[dir="rtl"] .whale-table td, [dir="rtl"] .whale-table th { text-align: right; }

.whale-table th { 
    opacity: 0.6; 
    font-weight: 500;
    width: 40%;
}

.whale-table td {
    font-weight: 600;
    text-align: right;
    color: var(--text-primary);
}
[dir="rtl"] .whale-table td { text-align: left; }

.whale-table tr:last-child td, .whale-table tr:last-child th {
    border-bottom: none;
}

/* حالت‌های سود و زیان (Dynamic States) */
.whale-profit-true {
    border: 1px solid #ffd700 !important; /* طلایی */
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.15) !important;
}
.whale-profit-true .whale-badge {
    background: linear-gradient(135deg, #ffd700, #b8860b);
    color: #000;
    text-shadow: none;
}

.whale-profit-false {
    border: 1px solid var(--border-color);
    opacity: 0.9;
}
/* انیمیشن ملایم ورود */
.whale-radar-section:not(.hidden) {
    animation: fadeIn 0.5s ease-out;
}
/* --- Market Health Mini Widgets --- */
.market-health-row {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease-out;
}

.health-card {
    background: var(--secondary-card-bg);
    border: 1px solid var(--border-color);
    padding: 15px;
    width: 50%;
    border-radius: var(--border-radius-medium);
    text-align: center;
    color: var(--text-primary);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.health-card h4 {
    margin: 0 0 12px 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Velocity Meter Styles */
.velocity-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.velocity-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    position: relative;
}

#velocity-fill {
    height: 100%;
    width: 0%;
    /* گرادینت از آبی (کم) به قرمز (زیاد/انفجاری) */
    background: linear-gradient(90deg, #3498db, #2fb574, #f1c40f, #f85149);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

#velocity-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Liquidity Traffic Light Styles */
.liquidity-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.traffic-light {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #444;
    border: 2px solid #222;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}

.health-label {
    font-weight: 700;
    font-size: 0.95rem;
}

/* Responsive fixes */
@media (max-width: 600px) {
    .market-health-row {
        flex-direction: column;
        gap: 10px;
    }
    .health-card {
        width: 100%;
    }
}

.whale-table {
    width: 100%;
    font-size: 0.95rem;
    border-collapse: collapse;
    margin-top: 6px;
}

.whale-table td, .whale-table th {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    text-align: left;
}
[dir="rtl"] .whale-table td, [dir="rtl"] .whale-table th { text-align: right; }

.whale-table th { opacity: 0.6; font-weight: 500; width: 40%; }
.whale-table td { font-weight: 600; text-align: right; color: var(--text-primary); }
[dir="rtl"] .whale-table td { text-align: left; }

/* Dynamic States (Golden Glow Logic) */
.whale-profit-true {
    border: 1px solid #ffd700 !important; /* طلایی */
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.15), inset 0 0 30px rgba(255, 215, 0, 0.05) !important;
}
.whale-profit-true .whale-badge {
    background: linear-gradient(135deg, #ffd700, #b8860b);
    color: #000;
    text-shadow: none;
    box-shadow: 0 0 10px #ffd700;
}

.whale-profit-false {
    border: 1px solid var(--border-color);
    opacity: 0.9;
}

/* === Order Flow & OBI Card === */
#order-flow-obi-container {
    margin-top: 25px;
    animation: fadeIn 0.6s ease-out;
}

.obi-card {
    background: var(--primary-card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
    margin-top: 25px;
}

/* افکت نوری بالای کارت */
.obi-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--buy-color), var(--sell-color));
    opacity: 0.7;
}

.obi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.obi-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.obi-header h3 i { color: #f1c40f; }

.obi-score-badge {
    font-size: 0.9rem;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    font-weight: 600;
}


.pressure-fill {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    transition: width 1s ease-in-out;
}

.pressure-buy {
    background: linear-gradient(90deg, #2fb574, #269261);
    color: #fff;
    box-shadow: 0 0 10px rgba(47, 181, 116, 0.3);
}

.pressure-sell {
    background: linear-gradient(90deg, #c0392b, #f85149);
    color: #fff;
    box-shadow: 0 0 10px rgba(248, 81, 73, 0.3);
}

.pressure-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-weight: 500;
}

/* دیوارهای قیمتی */
.walls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.wall-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid transparent;
    transition: transform 0.2s;
}
.wall-card:hover { transform: translateY(-3px); }

.wall-card.buy-wall { border-color: rgba(47, 181, 116, 0.3); }
.wall-card.sell-wall { border-color: rgba(248, 81, 73, 0.3); }

.wall-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wall-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.wall-note {
    font-size: 0.75rem;
    color: #8b949e;
    margin-top: 5px;
}
/* --- AI Narrative Box (Glassmorphic) --- */
.ai-narrative-card {
    background: rgba(255, 255, 255, 0.03); /* شفافیت بسیار کم */
    backdrop-filter: blur(16px); /* مات کردن پس‌زمینه */
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(88, 166, 255, 0.2); /* حاشیه نازک و روشن */
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 35px;
    box-shadow: 0 0 20px rgba(88, 166, 255, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.05); /* Soft Glow */
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.ai-narrative-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(88, 166, 255, 0.05), transparent);
    pointer-events: none;
}

.narrative-icon {
    font-size: 2rem;
    color: var(--accent-color);
    background: rgba(88, 166, 255, 0.1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(88, 166, 255, 0.2);
    flex-shrink: 0;
}

.narrative-content {
    flex-grow: 1;
}

.narrative-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.narrative-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-primary); /* Fix: Dark text for light mode */
    font-weight: 600;
    text-shadow: none; /* Remove shadow for cleaner look on white */
    min-height: 1.6em;
}

/* افکت مکان‌نما (Cursor) هنگام تایپ */
.typing-cursor::after {
    content: '▋';
    display: inline-block;
    vertical-align: baseline;
    color: var(--accent-color);
    animation: blink-cursor 1s step-end infinite;
    margin-left: 2px;
}

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* هایلایت کلمات کلیدی در متن */
.highlight-cyan {
    color: var(--accent-color);
    font-weight: 700;
    text-shadow: 0 0 5px rgba(88, 166, 255, 0.4);
}

/* ریسپانسیو */
@media (max-width: 600px) {
    .ai-narrative-card {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    .narrative-icon {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
}
/* --- Institutional SMC Dashboard Styles --- */
.smc-card {
    background: var(--primary-card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 35px;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

/* نوار نئونی بالای کارت */
.smc-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, #ffd700, #58a6ff);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.smc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.smc-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--text-primary); /* استفاده از متغیر رنگ اصلی */
    display: flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.smc-structure-badge {
    font-size: 0.9rem;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}
.smc-structure-badge.bullish { color: #2fb574; border-color: rgba(47, 181, 116, 0.3); text-shadow: 0 0 5px rgba(47, 181, 116, 0.4); }
.smc-structure-badge.bearish { color: #f85149; border-color: rgba(248, 81, 73, 0.3); text-shadow: 0 0 5px rgba(248, 81, 73, 0.4); }

/* FVG & OB Sections */
.smc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.smc-column h4 {
    margin: 0 0 15px 0;
    font-size: 1rem;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px dashed rgba(255,255,255,0.1);
    padding-bottom: 8px;
}

/* FVG Items */
.fvg-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-size: 0.95rem;
    background: rgba(255,255,255,0.02);
    border-left: 4px solid transparent;
    transition: transform 0.2s;
}
.fvg-item:hover { transform: translateX(5px); background: rgba(255,255,255,0.04); }

.fvg-item.bullish {
    border-left-color: #00ff88; /* سبز روشن */
    background: linear-gradient(90deg, rgba(0, 255, 136, 0.05), transparent);
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.1); /* Glitter effect */
}
.fvg-item.bearish {
    border-left-color: #ff0044; /* قرمز غلیظ */
    background: linear-gradient(90deg, rgba(255, 0, 68, 0.05), transparent);
}

.fvg-range { font-family: monospace; color: #c9d1d9; font-weight: 600; }
.fvg-type { font-size: 0.8rem; font-weight: 700; }
.fvg-bull-text { color: #00ff88; }
.fvg-bear-text { color: #ff0044; }

/* OB Table (Compact) */
.ob-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.ob-table td {
    padding: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #c9d1d9;
}
.ob-table tr:last-child td { border-bottom: none; }
.ob-bull { color: #2fb574; font-weight: 600; }
.ob-bear { color: #f85149; font-weight: 600; }

.smc-insight {
    margin-top: 20px;
    padding: 12px;
    background: rgba(88, 166, 255, 0.1);
    border-left: 3px solid #58a6ff;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #e6edf3;
    font-style: italic;
}

@media (max-width: 700px) {
    .smc-grid { grid-template-columns: 1fr; }
}

/* --- AI Auto-Tuner Card (Cyber Pro Theme) --- */
/* (Note: .auto-tuner-card itself is defined later as the canonical, theme-aware version) */

/* Header & Badge */
.at-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

.at-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #c9d1d9;
    display: flex;
    align-items: center;
    gap: 8px;
}
.at-title i { color: #58a6ff; }

.at-badge {
    background: linear-gradient(90deg, #2fb574, #269261);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 800;
    box-shadow: 0 0 10px rgba(47, 181, 116, 0.4);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.at-badge.negative {
    background: #30363d;
    color: #8b949e;
    box-shadow: none;
}

/* Grid Layout */
.at-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 15px;
}

/* Columns */
.at-col {
    padding: 15px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.at-col.default {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #30363d;
}

.at-col.optimized {
    background: rgba(47, 181, 116, 0.05);
    border: 1px solid rgba(47, 181, 116, 0.3);
    position: relative;
}
/* Subtle Pulse for Optimized */
.at-col.optimized::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(47, 181, 116, 0.1);
    animation: pulse-border 2s infinite;
    pointer-events: none;
}

.at-col-header {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8b949e;
    margin-bottom: 5px;
    font-weight: 600;
}
.optimized .at-col-header { color: #2fb574; }

.at-stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
}
.at-stat-row span { color: #8b949e; }
.at-stat-row strong { color: #e6edf3; }

.neon-text {
    color: #2fb574 !important;
    text-shadow: 0 0 5px rgba(47, 181, 116, 0.3);
}

/* Divider & Arrow */
.at-divider {
    display: flex;
    justify-content: center;
}
.at-arrow {
    font-size: 1.5rem;
    color: #58a6ff;
    animation: slide-right 1.5s infinite ease-in-out;
}

@keyframes pulse-border {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}
@keyframes slide-right {
    0%, 100% { transform: translateX(0); opacity: 0.5; }
    50% { transform: translateX(5px); opacity: 1; }
}

/* Mobile */
@media (max-width: 600px) {
    .at-grid { grid-template-columns: 1fr; gap: 10px; }
    .at-divider { transform: rotate(90deg); margin: 5px 0; }
    .at-arrow { animation: none; }
}
/* --- AI Auto-Tuner Professional Styles (selective overrides only) --- */

/* "VS" divider connecting line — unique to this layout pass, not in earlier block */
.at-divider::before {
    content: '';
    position: absolute;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--border-color), transparent);
    z-index: 1;
}

#auto-tuner-container, 
#advanced-auto-tuner-container {
    transition: opacity 0.8s ease-in-out;
}
/* --- AI Auto-Tuner Fixed Styles --- */
.auto-tuner-card {
    background: var(--primary-card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px; /* فاصله از بالا */
    margin-bottom: 25px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.6s ease-out;
}

.at-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

.at-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #c9d1d9;
    display: flex;
    align-items: center;
    gap: 8px;
}
.at-title i { color: #58a6ff; }

.at-badge {
    background: linear-gradient(90deg, #2fb574, #269261);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 800;
    box-shadow: 0 0 10px rgba(47, 181, 116, 0.4);
}
.at-badge.negative {
    background: #30363d;
    color: #8b949e;
    box-shadow: none;
}

.at-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 15px;
}

.at-col {
    padding: 15px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.at-col.default {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed #444c56;
}

.at-col.optimized {
    background: rgba(47, 181, 116, 0.05);
    border: 1px solid rgba(47, 181, 116, 0.3);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.at-col-header {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8b949e;
    margin-bottom: 5px;
    font-weight: 600;
}

.at-stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
}
.at-stat-row span { color: #8b949e; }
.at-stat-row strong { color: #e6edf3; }

.neon-text {
    color: #2fb574 !important;
    text-shadow: 0 0 8px rgba(47, 181, 116, 0.4);
}

.at-arrow {
    font-size: 1.2rem;
    color: #58a6ff;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .at-grid { grid-template-columns: 1fr; gap: 15px; }
    .at-arrow { transform: rotate(90deg); margin: 5px auto; display: block; }
}
/* Force display for tuner when active */
.auto-tuner-card:not(.hidden), 
#auto-tuner-container:not(.hidden), 
#advanced-auto-tuner-container:not(.hidden) {
    display: block !important;
    animation: fadeIn 0.6s ease-out;
}

/* --- Chronos Fractal Engine (Ghost Line) Styles --- */
.fractal-card {
    background: var(--primary-card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 35px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.6s ease-out;
}

/* Neon Top Border (Purple/Cyan Gradient) */
.fractal-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, #bc13fe, #00f2ff); 
    box-shadow: 0 0 15px rgba(188, 19, 254, 0.5);
}

.fractal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

.fractal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}
.fractal-header h3 i { color: #00f2ff; /* Cyan Icon */ }

.fractal-accuracy {
    font-family: 'Courier New', monospace; /* Quant feel */
    color: #bc13fe; /* Neon Purple */
    font-weight: bold;
    font-size: 1rem;
    text-shadow: 0 0 8px rgba(188, 19, 254, 0.4);
    background: rgba(188, 19, 254, 0.05);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(188, 19, 254, 0.2);
}

.fractal-chart-container {
    position: relative;
    height: 320px; /* Fixed height for consistency */
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px;
}

.fractal-overlay-info {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(0,0,0,0.5);
    padding: 4px 8px;
    border-radius: 4px;
    pointer-events: none;
}

.fractal-insight {
    margin-top: 15px;
    text-align: center;
    color: #c9d1d9;
    font-size: 1rem;
    font-style: italic;
    background: rgba(255, 255, 255, 0.02);
    padding: 10px;
    border-radius: 8px;
}
.fractal-insight strong {
    color: #bc13fe; /* Purple highlight */
}
#fractalChartCanvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* --- Sniper Scope Logic Styles --- */

/* حالت فعال: قرمز و هشدار دهنده */
.sniper-status.locked {
    color: #ff4c4c;
    text-shadow: 0 0 10px rgba(255, 76, 76, 0.8);
    font-weight: 800;
    letter-spacing: 1px;
    animation: none;
}

/* حالت غیرفعال: خاکستری و ساده */
.sniper-status.neutral {
    color: #8b949e;
    text-shadow: none;
    font-weight: 500;
    font-size: 1rem !important; /* کمی کوچکتر برای پیام نبود دیتا */
    letter-spacing: 0;
    animation: none;
}

/* مخفی کردن رادار */
.hidden-canvas {
    display: none !important;
    visibility: hidden !important;
}

/* --- New Plan Badges for Admin and Sidebar --- */
.plan-explorer {
    background: var(--secondary-card-bg) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-color) !important;
}

.plan-trader {
    background: rgba(245, 158, 11, 0.1) !important;
    color: #f59e0b !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

.plan-pro-analyst {
    background: var(--accent-subtle-bg) !important;
    color: var(--accent-color) !important;
    border: 1px solid rgba(0, 242, 255, 0.3) !important;
}

.plan-whale-hunter {
    background: linear-gradient(135deg, #ffd700 0%, #b8860b 100%) !important;
    color: #000000 !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}
/* --- Authentication Pages (Login / Register) - Premium AI Style --- */

/* انیمیشن برای پس‌زمینه */
@keyframes meshFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.auth-wrapper {
    min-height: 100vh;
    min-height: 100dvh; /* dynamic viewport for mobile browsers */
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
}

/* === Auth responsive: phone === */
@media (max-width: 600px) {
    .auth-wrapper {
        padding: 16px 14px;
        align-items: flex-start;
        padding-top: 30px;
        padding-bottom: 30px;
    }
    .auth-card {
        padding: 32px 22px !important;
        border-radius: 22px !important;
        max-width: 100%;
    }
    .auth-logo {
        font-size: 1.7rem !important;
    }
    .auth-subtitle {
        font-size: 0.9rem !important;
        margin-bottom: 24px !important;
    }
    .auth-input {
        padding: 14px 14px !important;
        font-size: 16px !important; /* prevent iOS zoom */
        border-radius: 12px !important;
    }
    .auth-label {
        font-size: 0.82rem !important;
    }
    .auth-btn {
        padding: 15px !important;
        font-size: 1rem !important;
        border-radius: 14px !important;
    }
    .auth-checkbox-group {
        font-size: 0.85rem;
        gap: 10px;
        margin-bottom: 22px;
    }
    .auth-checkbox {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }
    .auth-footer {
        font-size: 0.9rem;
        margin-top: 22px;
    }
    
    /* Reduce blur intensity for performance on phones */
    .liquid-bg .orb {
        filter: blur(70px) !important;
        opacity: 0.45 !important;
    }
    .liquid-bg .orb-1 { width: 90vw !important; height: 90vw !important; }
    .liquid-bg .orb-2 { width: 80vw !important; height: 80vw !important; }
    .liquid-bg .orb-3 { width: 60vw !important; height: 60vw !important; }
    
    /* OTP section on small screens */
    .otp-section {
        padding: 20px 16px !important;
        border-radius: 14px !important;
    }
    .otp-input {
        font-size: 1.3rem !important;
        letter-spacing: 4px !important;
    }
    
    /* TOS modal in register */
    .tos-content {
        width: 95% !important;
        max-height: 88vh !important;
    }
    .tos-header { padding: 16px !important; }
    .tos-header h2 { font-size: 1rem !important; }
    .tos-body { padding: 16px !important; font-size: 0.85rem !important; }
    .tos-body h3 { font-size: 0.95rem !important; }
}

@media (max-width: 380px) {
    .auth-card {
        padding: 26px 18px !important;
    }
    .auth-logo {
        font-size: 1.5rem !important;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* کارت شیشه‌ای و مدرن */
.auth-card {
    background: var(--primary-card-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 45px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--card-shadow);
    text-align: center;
    animation: fadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    z-index: 10;
}

/* لوگو با افکت جذاب */
.auth-logo {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: -1px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.auth-logo i {
    background: linear-gradient(135deg, var(--accent-color), #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 6px rgba(59, 130, 246, 0.3));
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 40px;
    font-weight: 500;
    opacity: 0.9;
}

/* اینپوت‌ها با استایل فین‌تک */
.auth-input {
    width: 100%;
    padding: 16px 18px;
    background: var(--secondary-card-bg);
    border: 2px solid transparent; 
    background-clip: padding-box;
    border-radius: 16px;
    color: var(--text-primary);
    font-family: var(--font-family-base);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.auth-input:focus {
    outline: none;
    background: var(--primary-card-bg);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px var(--accent-subtle-bg);
    transform: translateY(-1px);
}

/* دکمه با گرادینت و سایه */
.auth-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--accent-color), #2563eb);
    border: none;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.05rem;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.4);
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.auth-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 15px 30px -5px rgba(37, 99, 235, 0.5);
}

/* گروه‌های فرم */
.auth-group {
    margin-bottom: 24px;
    text-align: start;
}

.auth-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
}

/* چک‌باکس */
.auth-checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: start;
}

.auth-checkbox {
    accent-color: var(--accent-color);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* لینک‌ها */
.auth-footer {
    margin-top: 30px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.auth-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* NOTE: Duplicate .auth-logo / .auth-subtitle / .auth-input / .auth-btn / .auth-group / .auth-label / .auth-checkbox-group / .auth-checkbox / .auth-footer blocks were removed — the premium versions defined earlier are the source of truth. */

/* Flash Messages */
.flash-container {
    margin-bottom: 20px;
}

.flash-msg {
    padding: 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.flash-msg.error {
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.4);
    color: #ff7b72;
}

.flash-msg.success {
    background: rgba(47, 181, 116, 0.1);
    border: 1px solid rgba(47, 181, 116, 0.4);
    color: #3fb950;
}
/* --- Pricing Plans Modal Styles --- */
.plans-modal-box {
    max-width: 1100px;
    background: var(--bg-color);
    color: var(--text-primary);
}

.plans-modal-box .modal-header {
    border-bottom: 1px solid var(--border-color);
}

.plans-modal-box .modal-header h2 {
    color: var(--text-primary);
}

.plans-body {
    padding: 30px;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
}

.pricing-card {
    background: var(--primary-card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: 15px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: #58a6ff;
    z-index: 5;
}

.plan-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}
.plan-price span {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: normal;
}

.plan-features li {
    margin-bottom: 15px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.plan-features li i.fa-check { color: #2fb574; }
.plan-features li i[style*="color: #58a6ff;"] { color: #3b82f6 !important; }
.plan-features li i[style*="color: #ffd700;"] { color: #d97706 !important; }

.plan-action-btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.plan-action-btn.current {
    background: var(--secondary-card-bg);
    color: var(--text-secondary);
    cursor: default;
    border: 1px solid var(--border-color);
}

.plan-action-btn.upgrade {
    background: #eff6ff;
    color: #3b82f6;
    border: 1px solid #bfdbfe;
}
.plan-action-btn.upgrade:hover {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

/* Pro Analyst (Silver) - The Popular Plan */
.silver-plan { 
    border: 2px solid #3b82f6; 
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15);
    transform: scale(1.05);
    z-index: 10;
}
.silver-plan .plan-name { color: #3b82f6; text-shadow: none; }
.silver-plan:hover { transform: scale(1.08) translateY(-5px); box-shadow: 0 15px 35px rgba(59, 130, 246, 0.2); }
.silver-plan .plan-action-btn.upgrade { background: #3b82f6; color: #fff; border: none; }

/* Whale Hunter (Gold) - Dark Mode Default */
.gold-plan { 
    background: #000000;
    border-color: #f59e0b; 
    color: #ffffff !important;
}
.gold-plan .plan-name { color: #d97706; text-shadow: none; }
.gold-plan .plan-price { border-bottom-color: #fde68a; color: #ffffff; }
.gold-plan .plan-features li { color: #ffffff !important; }
.gold-plan .plan-features li i { color: #f59e0b; }
.gold-plan .feature-locked { color: #6b7280 !important; }
.gold-plan .read-more-toggle { color: #d97706; }
.gold-plan .premium-btn {
    background: linear-gradient(90deg, #ffd700, #b8860b);
    color: #000;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}
.gold-plan .premium-btn:hover {
    background: linear-gradient(90deg, #ffe033, #daa520);
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

/* Whale Hunter (Gold) - Light Mode Override */
[data-theme="light"] .gold-plan {
    background: #ffffff;
    color: #000000 !important;
}
[data-theme="light"] .gold-plan .plan-price {
    color: #000000;
}
[data-theme="light"] .gold-plan .plan-features li {
    color: #000000 !important;
}
[data-theme="light"] .gold-plan .feature-locked {
    color: #9ca3af !important;
}

.popular-badge {
    position: absolute;
    top: -15px; /* کمی بالاتر بردیم تا خوانا شود */
    left: 50%;
    transform: translateX(-50%);
    background: #58a6ff;
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.5);
    white-space: nowrap; /* جلوگیری از شکستن خط متن */
    z-index: 15;
}

/* ریسپانسیو و بهینه‌سازی موبایل برای پلن‌ها */
@media (max-width: 900px) {
    .silver-plan { 
        transform: scale(1); /* غیرفعال کردن زوم در تبلت و موبایل */
    }
    .silver-plan:hover { transform: translateY(-5px); }
    .plans-grid { 
        gap: 35px; /* فاصله بیشتر بین کارت‌ها وقتی زیر هم قرار می‌گیرند */
    }
}

@media (max-width: 768px) {
    .plans-grid { grid-template-columns: 1fr; }
    .pricing-card { 
        padding: 20px; 
        margin-top: 20px; /* فضای کافی برای بج در موبایل */
    }
}
/* --- Crypto Checkout Styles --- */
.checkout-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 15px;
}
.checkout-header h3 { margin: 0; color: #0f172a; font-size: 1.3rem; }
.back-to-plans-btn {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #64748b;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.back-to-plans-btn:hover { background: #f1f5f9; color: #0f172a; }

.checkout-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #d97706;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.payment-details-box {
    display: flex;
    gap: 30px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    align-items: center;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.qr-code-container {
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    width: 150px;
    height: 150px;
    flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
}
.qr-code-container img { width: 100%; height: 100%; }

.payment-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 15px; width: 100%; box-sizing: border-box; overflow: hidden; }

.pay-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
    font-size: 1rem;
    flex-wrap: wrap; 
    gap: 5px;
}
.pay-row:last-child { border-bottom: none; padding-bottom: 0; }
.pay-row span { color: #64748b; font-weight: 500;}
.pay-row strong { color: #0f172a; word-break: break-word; } 

.pay-row.highlight { background: rgba(16, 185, 129, 0.05); padding: 10px; border-radius: 6px; border: 1px solid rgba(16, 185, 129, 0.2); }

.copy-btn {
    background: transparent; border: none; color: #3b82f6; cursor: pointer; margin-left: 10px; font-size: 1.1rem; transition: color 0.2s;
}
.copy-btn:hover { color: #2563eb; }

.address-row { flex-direction: column; align-items: flex-start; gap: 8px; }
.address-input-group {
    display: flex; width: 100%; gap: 10px; flex-wrap: wrap;
}
.address-input-group input {
    flex-grow: 1; 
    background: #ffffff; 
    border: 1px solid #cbd5e1; 
    color: #059669; 
    font-family: monospace; 
    font-size: 0.85rem; 
    font-weight: bold;
    padding: 10px; 
    border-radius: 6px; 
    text-align: center;
    width: 100%; 
    min-width: 0; 
}
.copy-btn.primary {
    background: #f1f5f9; border: 1px solid #cbd5e1; color: #334155; padding: 10px 15px; border-radius: 6px; font-size: 0.9rem; white-space: nowrap; font-weight: 600;
}
.copy-btn.primary:hover { background: #3b82f6; color: #fff; border-color: #3b82f6; }

.verification-box {
    background: #f8fafc;
    border: 1px solid #3b82f6;
    padding: 25px;
    border-radius: 12px;
    text-align: left;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
}
.verification-box h4 { margin-top: 0; color: #0f172a; margin-bottom: 10px; }
.verification-box p { color: #64748b; font-size: 0.9rem; margin-bottom: 15px; }

/* --- Success Animation Styles (Glassmorphic) --- */
.success-glass-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05), inset 0 0 0 2px rgba(255,255,255,1);
    animation: slideUpFadeIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.success-glass-container h2 {
    color: #0f172a;
    font-size: 1.8rem;
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 800;
}

.success-glass-container p {
    color: #64748b;
    font-size: 1.1rem;
    font-weight: 500;
}

/* SVG Checkmark Animation */
.success-checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 4;
    stroke: #2fb574;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px #2fb574;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.success-checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 4;
    stroke-miterlimit: 10;
    stroke: #2fb574;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}
@keyframes scale {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.1, 1.1, 1); }
}
@keyframes fill {
    100% { box-shadow: inset 0px 0px 0px 40px rgba(47, 181, 116, 0.1); }
}
@keyframes slideUpFadeIn {
    0% { opacity: 0; transform: translateY(30px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ریسپانسیو قدرتمند برای صفحه پرداخت در موبایل */
@media (max-width: 600px) {
    .payment-details-box { 
        flex-direction: column; 
        text-align: center;
        padding: 15px;
    }
    .qr-code-container { margin: 0 auto 10px auto; }
    .pay-row { 
        flex-direction: column; 
        align-items: center; 
        text-align: center; 
    }
    .pay-row.address-row { align-items: center; }
    .address-input-group { flex-direction: column; }
    .address-input-group .copy-btn.primary { width: 100%; } /* دکمه کپی کل عرض را بگیرد */
    #checkout-amount { font-size: 1.8rem; display: block; margin-top: 5px; }
}
/* --- Hamburger Menu & Sidebar Styles --- */
.icon-btn {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.icon-btn:hover {
    background: rgba(0,0,0,0.05);
}

/* --- Sidebar Menu Styles --- */
#sidebar-menu {
    position: fixed;
    top: 0;
    right: -350px;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: var(--primary-card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: -5px 0 25px rgba(0,0,0,0.5);
    z-index: 100001;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1), left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-color);
    box-sizing: border-box;
}
#sidebar-menu.active { right: 0; }
[dir="rtl"] #sidebar-menu { right: auto; left: -350px; border-left: none; border-right: 1px solid var(--border-color); }
[dir="rtl"] #sidebar-menu.active { left: 0; }

#sidebar-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
    z-index: 100000;
    animation: fadeIn 0.3s;
}

.sidebar-header {
    padding: 25px;
    background: var(--secondary-card-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.user-info { display: flex; align-items: center; gap: 15px; }
.user-avatar {
    width: 45px; height: 45px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
}
.user-details h4 { margin: 0; color: var(--text-primary); font-size: 1rem; }
.plan-badge-mini { font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; font-weight: 700; background: var(--accent-subtle-bg); color: var(--accent-color); border: 1px solid var(--accent-color); }

#close-sidebar-btn { background: transparent; border: none; font-size: 1.2rem; color: var(--text-secondary); cursor: pointer; transition: color 0.2s; }
#close-sidebar-btn:hover { color: var(--sell-color); }

.sidebar-content { flex: 1; overflow-y: auto; padding: 20px; }
.menu-section { margin-bottom: 30px; }
.menu-section h5 { margin: 0 0 15px 0; color: var(--text-secondary); text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; border-bottom: 1px solid var(--border-color); padding-bottom: 5px; }

.input-group { margin-bottom: 15px; }
.input-group label { display: block; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 5px; }
.input-group input { width: 100%; padding: 10px; background: var(--secondary-card-bg); border: 1px solid var(--border-color); border-radius: 8px; font-size: 0.9rem; color: var(--text-primary); transition: all 0.2s; }
.input-group input:focus { border-color: var(--accent-color); outline: none; box-shadow: var(--input-focus-shadow); }
.save-settings-btn { width: 100%; padding: 10px; background: var(--accent-color); color: #fff; border: none; border-radius: 8px; cursor: pointer; font-weight: 600; transition: background 0.2s; }
.save-settings-btn:hover { background: var(--accent-hover); }

.sidebar-footer { padding: 20px; border-top: 1px solid var(--border-color); }
.sidebar-logout { display: block; text-align: center; padding: 12px; background: rgba(248, 81, 73, 0.1); color: var(--sell-color); text-decoration: none; border-radius: 8px; font-weight: 600; border: 1px solid rgba(248, 81, 73, 0.2); transition: all 0.2s; }
.sidebar-logout:hover { background: var(--sell-color); color: #fff; }

/* --- Toast Notifications (Beautiful Alerts) --- */
.notification-container {
    position: fixed;
    top: 20px;
    inset-inline-end: 20px;
    z-index: 100002;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: calc(100vw - 40px);
}

.toast {
    background: #ffffff;
    color: var(--text-primary);
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 100%;
    box-sizing: border-box;
    border-inline-start: 5px solid;
    animation: slideInToast 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    font-weight: 600;
    font-size: 0.95rem;
}
.toast.success { border-left-color: #2fb574; }
.toast.success i { color: #2fb574; font-size: 1.2rem; }
.toast.error { border-left-color: #f85149; }
.toast.error i { color: #f85149; font-size: 1.2rem; }

@keyframes slideInToast {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOutToast {
    to { transform: translateX(100%); opacity: 0; }
}

/* ========================================= */
/* === SHEPHERD.JS CUSTOM GLASSMORPHISM  === */
/* ========================================= */
.shepherd-element {
    background: var(--primary-card-bg) !important;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-color) !important;
    border-radius: 20px !important;
    box-shadow: var(--card-shadow) !important;
    font-family: var(--font-family-base) !important;
    max-width: 400px !important;
    z-index: 100005 !important;
}

[dir="rtl"] .shepherd-element {
    text-align: right;
    direction: rtl;
}

.shepherd-header {
    background: transparent !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 1rem 1.5rem !important;
}

.shepherd-title {
    font-weight: 800 !important;
    color: var(--accent-color) !important;
    font-size: 1.15rem !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.shepherd-cancel-icon {
    color: var(--text-secondary) !important;
    transition: color 0.2s !important;
}
.shepherd-cancel-icon:hover { color: var(--sell-color) !important; }

.shepherd-text {
    color: var(--text-primary) !important;
    font-size: 0.95rem !important;
    line-height: 1.7 !important;
    padding: 1.5rem !important;
    font-weight: 500;
}

.shepherd-footer {
    padding: 0 1.5rem 1.5rem 1.5rem !important;
}

.shepherd-button {
    border-radius: 10px !important;
    font-weight: 700 !important;
    padding: 10px 20px !important;
    transition: all 0.3s ease !important;
    font-size: 0.9rem !important;
}

.shepherd-button-primary {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover)) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 10px rgba(0, 242, 255, 0.2) !important;
}

.shepherd-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 242, 255, 0.4) !important;
}

.shepherd-button-secondary {
    background: var(--secondary-card-bg) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-color) !important;
}

.shepherd-button-secondary:hover {
    background: var(--border-color-light) !important;
    color: var(--text-primary) !important;
}

/* پیکان (فلش) راهنما */
.shepherd-arrow::before {
    background: var(--primary-card-bg) !important;
    border: 1px solid var(--border-color) !important;
}

/* افکت درخشش ملایم برای المانی که در حال آموزش است */
.shepherd-target-animating {
    position: relative;
    z-index: 100004 !important; /* Bring to front */
    box-shadow: 0 0 0 4px var(--accent-subtle-bg) !important;
    border-radius: inherit;
    transition: box-shadow 0.3s ease;
}

/* --- Support System Styles --- */
.ticket-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.ticket-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
}
.ticket-subject { font-weight: 700; color: #0f172a; font-size: 1rem; }
.ticket-status { font-size: 0.8rem; padding: 3px 10px; border-radius: 20px; font-weight: 600; text-transform: uppercase; }
.status-waiting { background: #fff7ed; color: #f59e0b; border: 1px solid #f59e0b; }
.status-answered { background: #f0fdf4; color: #2fb574; border: 1px solid #2fb574; }

.ticket-msg-box {
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    color: #334155;
    font-size: 0.95rem;
    margin-bottom: 10px;
    line-height: 1.5;
}
.ticket-img-preview {
    max-width: 150px;
    max-height: 150px;
    border-radius: 8px;
    margin-top: 12px;
    cursor: pointer;
    border: 2px solid #e2e8f0;
    transition: transform 0.2s;
}
.ticket-img-preview:hover { transform: scale(1.05); }

.admin-reply-box {
    background: #f0f9ff;
    border-inline-start: 4px solid var(--accent-color);
    padding: 15px;
    border-start-start-radius: 0;
    border-start-end-radius: 12px;
    border-end-end-radius: 12px;
    border-end-start-radius: 0;
    color: #0c4a6e;
    font-size: 0.95rem;
    margin-top: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

/* File Upload Button Styling */
.hidden-file-input { display: none; }
.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    color: #64748b;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}
.file-upload-label:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: var(--accent-subtle-bg);
}
.file-upload-label i { font-size: 1.2rem; }

/* Admin Chat Styles - Enhanced & Full Width */
.chat-bubble {
    padding: 20px 25px;
    border-radius: 20px;
    /* Increased max-width and ensured minimum width for better look */
    max-width: 90%; 
    min-width: 300px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    line-height: 1.6;
    font-size: 1rem;
}

.chat-user {
    background: var(--secondary-card-bg);
    align-self: flex-start;
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
    color: var(--text-primary);
    margin-right: auto;
    backdrop-filter: blur(10px);
}

.chat-admin-reply {
    background: linear-gradient(135deg, var(--accent-subtle-bg), transparent);
    align-self: flex-end;
    border: 1px solid var(--accent-color);
    border-bottom-right-radius: 4px;
    margin-top: 15px;
    margin-left: auto;
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.chat-meta {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Reply Input Area */
.reply-input-area {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    background: #ffffff;
    padding: 15px;
    border-radius: 16px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    width: 100%; /* Ensure full width inside the bubble */
}

.reply-input-area input {
    border: none;
    background: transparent;
    font-size: 1rem;
    color: var(--text-primary);
    width: 100%; /* Take up available space */
}
.reply-input-area input:focus { box-shadow: none; }

.reply-btn-small {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.2s;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}
.reply-btn-small:hover { background: var(--accent-hover); transform: translateY(-1px); }
/* ========================================= */
/* === GLASSMORPHISM PREMIUM MODAL === */
/* ========================================= */
.glass-modal-box {
    background: rgba(13, 17, 23, 0.4);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(88, 166, 255, 0.3);
    border-radius: 24px;
    width: 90%;
    max-width: 480px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 0 50px rgba(59, 130, 246, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

/* افکت نور پس زمینه درون مودال */
.glass-modal-box::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.15) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.glass-modal-content {
    position: relative;
    z-index: 1;
}

.glass-icon-wrapper {
    width: 70px; height: 70px;
    margin: 0 auto 20px;
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid rgba(88, 166, 255, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(88, 166, 255, 0.3);
}

.glow-icon {
    font-size: 2rem;
    color: #58a6ff;
    text-shadow: 0 0 15px #58a6ff;
}

.glass-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.glass-desc {
    font-size: 1rem;
    color: #c9d1d9;
    line-height: 1.6;
    margin-bottom: 30px;
}

.glass-action-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.glass-upgrade-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
    transition: all 0.3s;
}
.glass-upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.6);
}

.glass-close-btn {
    background: transparent;
    color: #8b949e;
    border: none;
    padding: 10px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.2s;
}
.glass-close-btn:hover { color: #fff; text-decoration: underline; }

/* دکمه‌های قفل شده درون متن سیگنال */
.premium-lock-btn {
    background: rgba(248, 81, 73, 0.1);
    border: 1px dashed rgba(248, 81, 73, 0.5);
    color: #f85149;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
    font-weight: 600;
}
.premium-lock-btn:hover {
    background: rgba(248, 81, 73, 0.2);
    border-style: solid;
    transform: scale(1.02);
}

/* استایل دکمه Read More در پلن‌ها */
.read-more-toggle {
    display: block;
    text-align: center;
    color: #58a6ff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 5px;
    margin-bottom: 20px;
    transition: color 0.2s;
}
.read-more-toggle:hover { color: #fff; }
.feature-locked { opacity: 0.6; color: #8b949e; }
.feature-locked i { color: #f85149 !important; }