/* ============================================================
   SHIMAX AI - MASTER SYSTEM STYLESHEET (PRODUCTION HIGH-END WEB)
   ============================================================ */
/* ─── FONTS DEFINITION (Dana Pro) ─────────────────────────── */
@font-face {
    font-family: 'Dana';
    src: url('../fonts/DanaPro(10Wt)/Dana-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Dana';
    src: url('../fonts/DanaPro(10Wt)/Dana-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Dana';
    src: url('../fonts/DanaPro(10Wt)/Dana-DemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Dana';
    src: url('../fonts/DanaPro(10Wt)/Dana-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
/* ─── 1. VARS & THEMING ────────────────────────────────────── */
:root {
    /* Fonts */
    --font-dana: 'Dana', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-yekan: 'IRANYekan', 'Yekan', sans-serif;
    --font-vazir: 'Vazirmatn', sans-serif;

    /* Brand Emerald Palette */
    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-200: #a7f3d0;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-700: #047857;
    --emerald-glow: rgba(16, 185, 129, 0.35);

    /* Text Tones */
    --text-menu-solid: #09090b;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --danger-bg: rgba(239, 68, 68, 0.08);
    --danger-text: #ef4444;

    /* Light Theme */
    --bg-page: #f8fafc;
    --surface-glass: rgba(255, 255, 255, 0.88);
    --surface-card: #ffffff;
    --border-color: rgba(226, 232, 240, 0.85);
    --border-hover: rgba(16, 185, 129, 0.4);

    /* Shadows & Effects */
    --shadow-subtle: 0 4px 20px -2px rgba(0, 0, 0, 0.04);
    --shadow-dropdown: 0 20px 40px -12px rgba(15, 23, 42, 0.12);
    --shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px var(--emerald-glow);
    --glass-blur: blur(16px);
}

[data-theme="dark"] {
    --text-menu-solid: #f8fafc;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --bg-page: #090d16;
    --surface-glass: rgba(15, 23, 42, 0.88);
    --surface-card: #131b2e;
    --border-color: rgba(51, 65, 85, 0.65);
    --border-hover: rgba(52, 211, 153, 0.5);

    --shadow-subtle: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
    --shadow-dropdown: 0 20px 45px -10px rgba(0, 0, 0, 0.7);
    --shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

/* ─── 2. BASE RESET & VIEWPORT ─────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-dana);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    padding-top: 78px;
}

.font-dana { font-family: var(--font-dana); }
.font-yekan { font-family: var(--font-yekan); }
.font-vazir { font-family: var(--font-vazir); }

/* ─── 3. DYNAMIC STICKY & FLOATING HEADER ─────────────────── */
.shimax-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 78px;
    z-index: 1000;
    display: flex;
    align-items: center;
    background: var(--surface-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    transform: translateY(0);
    will-change: transform;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                height 0.25s ease,
                background-color 0.25s ease,
                box-shadow 0.25s ease,
                border-color 0.25s ease;
}

/* اسکرول‌شده: کمی باریک‌تر با افکت شیشه‌ای متراکم */
.shimax-header.header--scrolled {
    height: 70px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
    border-bottom-color: rgba(16, 185, 129, 0.2);
}

[data-theme="dark"] .shimax-header.header--scrolled {
    background: rgba(15, 23, 42, 0.88);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    border-bottom-color: rgba(52, 211, 153, 0.2);
}

/* اسکرول به پایین: خروج کامل از دید به سمت بالا */
.shimax-header.header--hidden {
    transform: translateY(-110%) !important;
    box-shadow: none !important;
}

.header-container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ─── 3.1 BRAND IDENTITY (CIRCULAR BADGE LOGO) ────────────── */
.header-brand-side {
    display: flex;
    align-items: center;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    position: relative;
    padding: 0.2rem 0;
}

.brand-logo-wrapper {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50% !important;
    background: #090d16;
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), 0 0 12px rgba(16, 185, 129, 0.2);
    flex-shrink: 0;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
}

.brand-link:hover .brand-logo-wrapper {
    transform: scale(1.06) rotate(-3deg);
    border-color: var(--emerald-400);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 0 18px rgba(16, 185, 129, 0.5);
}

.brand-logo-img {
    width: 22px !important;
    height: 22px !important;
    object-fit: contain;
    display: block;
    filter: none !important;
}

.brand-logo-glow {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.25) 0%, transparent 75%);
}
/* تایپوگرافی مدرن برند شیماکس */
.brand-text-group {
    display: inline-flex;
    align-items: center;
    direction: ltr !important; /* چپ‌به‌راست بودن نام انگلیسی */
    gap: 6px;
    line-height: 1;
    user-select: none;
}

.brand-name {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-primary);
    text-transform: uppercase;
}

/* بج شیک و مدرن برای AI */
.brand-badge-ai {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--emerald-500);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 2px 7px;
    border-radius: 6px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

[data-theme="dark"] .brand-badge-ai {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(52, 211, 153, 0.4);
    color: var(--emerald-400);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.brand-dot {
    width: 7px;
    height: 7px;
    background-color: var(--emerald-500);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--emerald-500);
    animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

/* ─── 3.2 ENTERPRISE CLEAN TEXT MENUS ─────────────────────── */
/* ─── 3.2 ENTERPRISE CLEAN TEXT MENUS ─────────────────────── */
.header-central-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    position: relative;
}

/* لینک‌های اصلی نوبار */
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.85rem;
    color: var(--text-primary);
    text-decoration: none;
    font-family: 'Dana', sans-serif !important;
    font-size: 0.92rem;
    font-weight: 500; /* وزن مدیوم و نرم به جای بولد خشن */
    border-radius: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    letter-spacing: -0.2px;
}

.nav-link:hover {
    color: var(--emerald-500);
    background: rgba(16, 185, 129, 0.06);
    font-weight: 600; /* در حالت هاور یک لول نرم پررنگ‌تر شود */
}

[data-theme="dark"] .nav-link:hover {
    color: var(--emerald-400);
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(52, 211, 153, 0.2);
}

/* فلش دراپ‌داون */
/* ─── 3.2.1 DRK/LGT CHEVRON MICRO-INTERACTIONS ────────────── */

/* استایل پایه فلش رو به پایین */
.arrow-indicator {
    display: inline-block;
    font-size: 0.68rem !important; /* کمی ظریف‌تر و کوچک‌تر برای پرستیژ بیشتر */
    color: var(--text-muted);
    margin-right: 4px; /* ایجاد فاصله استاندارد از متن */
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                color 0.25s ease,
                filter 0.25s ease;
    transform-origin: center;
    will-change: transform;
}

/* ۱. افکت هاور روی خود دکمه مادر (قبل از کلیک یا باز شدن) */
.nav-link:hover .arrow-indicator {
    color: var(--emerald-500);
    /* یک حرکت رفت و برگشتی ریز رو به پایین برای ترغیب به کلیک (Hover bounce) */
    transform: translateY(2px);
    filter: drop-shadow(0 0 3px rgba(16, 185, 129, 0.4));
}

[data-theme="dark"] .nav-link:hover .arrow-indicator {
    color: var(--emerald-400);
    filter: drop-shadow(0 0 5px rgba(52, 211, 153, 0.6));
}

/* ۲. افکت نهایی هنگام باز شدن دراپ‌داون (is-open) یا هاور فعال */
.has-dropdown:hover .arrow-indicator,
.has-dropdown.is-open .arrow-indicator {
    color: var(--emerald-500) !important;
    /* چرخش ۱۸۰ درجه با انیمیشن کشسانی (elastic spring) و کمی جابجایی تراز */
    transform: rotate(-180deg) translateY(-1px) !important;
    filter: drop-shadow(0 0 6px var(--emerald-glow)) !important;
}

[data-theme="dark"] .has-dropdown:hover .arrow-indicator,
[data-theme="dark"] .has-dropdown.is-open .arrow-indicator {
    color: var(--emerald-400) !important;
    filter: drop-shadow(0 0 8px rgba(52, 211, 153, 0.5)) !important;
}

/* ۳. استایل هماهنگ برای منوی پروفایل کاربر */
.user-profile-trigger .arrow-indicator {
    margin-right: 0;
    margin-left: 2px; /* تراز با آواتار و نام چپ‌به‌راست */
}

.user-profile-menu:hover .arrow-indicator,
.user-profile-menu.is-open .arrow-indicator {
    color: var(--emerald-500) !important;
    transform: rotate(-180deg) translateY(-1px) !important;
}

/* پنل بازشو گلس‌مورفیک */
.dropdown-panel {
    position: absolute;
    top: 100%;
    right: 0;
    width: 340px;
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 0.6rem;
    margin-top: 10px;
    box-shadow: var(--shadow-dropdown);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.22s;
    z-index: 1050;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

[data-theme="dark"] .dropdown-panel {
    background: rgba(19, 27, 46, 0.95);
    border-color: rgba(51, 65, 85, 0.7);
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.75), 0 0 1px 1px rgba(255, 255, 255, 0.05);
}

/* پل نامرئی هاور برای قطع نشدن موس */
.dropdown-panel::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    right: 0;
    height: 15px;
    background: transparent;
}

.has-dropdown:hover .dropdown-panel,
.has-dropdown.is-open .dropdown-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* آیتم‌های داخل دراپ‌داون */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 0.85rem;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
}

.dropdown-item:hover {
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.15);
    transform: translateX(-3px);
}

[data-theme="dark"] .dropdown-item:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(52, 211, 153, 0.2);
}

/* باکس آیکون کنار هر آیتم */
.item-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.08);
    color: var(--emerald-600);
    border: 1px solid rgba(16, 185, 129, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

[data-theme="dark"] .item-icon-box {
    background: rgba(16, 185, 129, 0.12);
    color: var(--emerald-400);
    border-color: rgba(52, 211, 153, 0.25);
}

.dropdown-item:hover .item-icon-box {
    background: var(--emerald-500);
    color: #ffffff;
    border-color: var(--emerald-500);
    box-shadow: 0 4px 12px var(--emerald-glow);
}

/* متن‌های آیتم منو */
.item-meta {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.item-title {
    font-family: var(--font-dana);
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-primary);
    transition: color 0.2s ease;
    line-height: 1.3;
}

.dropdown-item:hover .item-title {
    color: var(--emerald-500);
}

[data-theme="dark"] .dropdown-item:hover .item-title {
    color: var(--emerald-400);
}

.item-desc {
    font-family: var(--font-yekan);
    font-size: 0.77rem;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.5;
}

/* بج ورژن */
.badge-version {
    font-family: var(--font-dana);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--emerald-600);
    border: 1px solid rgba(16, 185, 129, 0.2);
    align-self: center;
}

[data-theme="dark"] .badge-version {
    background: rgba(16, 185, 129, 0.15);
    color: var(--emerald-400);
    border-color: rgba(52, 211, 153, 0.3);
}
/* ─── 3.3.1 GUEST LOGIN/SIGNUP BUTTON (HIGH-END MODERN) ────── */
.auth-guest-box {
    display: flex;
    align-items: center;
}

.btn-auth-entry {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 1.15rem 0.45rem 0.55rem;
    border-radius: 40px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.16) 100%);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-dana);
    font-size: 0.88rem;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.12);
    overflow: hidden;
}

.btn-auth-entry .auth-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--emerald-500);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 2px 8px var(--emerald-glow);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease;
}

.btn-auth-entry:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.25) 100%);
    border-color: var(--emerald-400);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.25);
    color: var(--emerald-600);
}

[data-theme="dark"] .btn-auth-entry:hover {
    color: var(--emerald-300);
    box-shadow: 0 6px 22px rgba(16, 185, 129, 0.35);
}

.btn-auth-entry:hover .auth-icon-wrap {
    transform: scale(1.08) rotate(-6deg);
    background: var(--emerald-400);
}

/* ─── 3.3.2 LOGGED-IN PROFILE WIDGET & UNVERIFIED STATUS ───── */
.user-profile-trigger {
    display: inline-flex;
    align-items: center;
    flex-direction: row-reverse;
    gap: 0.65rem;
    padding: 4px 8px 4px 14px;
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.user-profile-trigger:hover {
    border-color: var(--emerald-500);
    background: rgba(16, 185, 129, 0.04);
}

.user-avatar-ring {
    position: relative;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--emerald-400), var(--emerald-600));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    overflow: visible;
}

.user-avatar-pic {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* نقطه اخطار وریفای نبودن روی عکس */
.avatar-unverified-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f59e0b;
    border: 2px solid var(--surface-card);
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.8);
    animation: pulseWarning 1.8s infinite;
}

@keyframes pulseWarning {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.85); opacity: 0.6; }
}

.user-meta-text {
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-menu-solid);
    letter-spacing: -0.2px;
}

.badge-pending-verify {
    font-size: 0.68rem;
    font-weight: 700;
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 1px 6px;
    border-radius: 12px;
}

[data-theme="dark"] .badge-pending-verify {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.4);
}

/* ─── 3.3.3 USER DROPDOWN ARCHITECTURE ─────────────────────── */
.user-profile-menu .user-dropdown {
    width: 300px;
    padding: 0;
    overflow: hidden;
}

.user-dropdown-header {
    padding: 1rem 1.15rem;
    background: rgba(148, 163, 184, 0.05);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-header-info {
    display: flex;
    flex-direction: column;
    text-align: right;
    overflow: hidden;
}

.user-full-identity {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-primary);
}

.user-email-text {
    font-size: 0.77rem;
    color: var(--text-muted);
    direction: ltr;
    text-align: right;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.verified-status-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--emerald-500);
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 7px;
    border-radius: 8px;
}

.unverified-action-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #d97706;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 3px 8px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.unverified-action-tag:hover {
    background: #f59e0b;
    color: #ffffff;
}

.user-menu-links {
    padding: 0.5rem;
}

.user-dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.2rem 0;
}

.item-icon-box.highlight-emerald {
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald-400), var(--emerald-600));
    border: none;
}

.item-icon-box.logout-icon {
    color: var(--danger-text);
    background: var(--danger-bg);
    border-color: rgba(239, 68, 68, 0.2);
}

.logout-link:hover .item-icon-box.logout-icon {
    background: var(--danger-text);
    color: #ffffff;
}
/* کپسول نمایش موجودی اعتبار در هدر */
.user-credit-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 30px;
    text-decoration: none;
    color: var(--emerald-600);
    transition: all 0.25s ease;
}

[data-theme="dark"] .user-credit-pill {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(52, 211, 153, 0.35);
    color: var(--emerald-400);
}

.user-credit-pill:hover {
    background: var(--emerald-500);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--emerald-glow);
    transform: translateY(-1px);
}

.user-credit-pill .credit-count {
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1;
}

.user-credit-pill .credit-label {
    font-size: 0.72rem;
    opacity: 0.9;
}

.user-credit-pill .credit-add-icon {
    font-size: 0.85rem;
}
/* ─── 3.3 CONTROLS & USER PROFILE ──────────────────────────── */
.header-control-side {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.theme-toggle-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--surface-card);
    color: var(--text-menu-solid);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.15rem;
    transition: all 0.2s ease;
    min-width: 42px;
}

.theme-toggle-btn:hover {
    border-color: var(--emerald-500);
    color: var(--emerald-500);
    transform: rotate(15deg);
}

.theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: inline-block; color: #fbbf24; }

.user-profile-menu {
    position: relative;
}

.user-profile-trigger {
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    gap: 0.65rem;
    padding: 4px 6px 4px 12px;
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.25s ease;
    outline: none;
}

.user-profile-trigger:hover {
    border-color: var(--emerald-500);
    background: rgba(16, 185, 129, 0.04);
}

.user-avatar-ring {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--emerald-400), var(--emerald-600));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.user-name {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-menu-solid);
}

.user-profile-menu .user-dropdown {
    position: absolute;
    top: 100%;
    right: auto;
    left: 0;
    width: 280px;
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0.65rem;
    margin-top: 12px;
    box-shadow: var(--shadow-dropdown);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1050;
}

.user-profile-menu:hover .user-dropdown,
.user-profile-menu.is-open .user-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.user-dropdown::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: var(--surface-card);
    transform: rotate(45deg);
    border-left: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    z-index: -1;
}

.dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(148, 163, 184, 0.03);
    border-radius: 16px 16px 0 0;
    margin-bottom: 0.4rem;
}

.user-email {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    display: block;
    text-align: left;
    direction: ltr;
    word-break: break-all;
}

.logout-link {
    margin-top: 5px;
    color: var(--danger-text) !important;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logout-link i {
    font-size: 1.2rem;
    color: var(--danger-text);
    order: 2;
}

.logout-link:hover {
    background: var(--danger-bg);
}

.logout-link:hover .item-title {
    color: var(--danger-text);
}

/* ─── 4. FULL-WIDTH CINEMATIC HERO & VIDEO ─────────────────── */
body,
.main-viewport,
.content-wrapper {
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow-x: hidden !important;
}

.main-viewport {
    flex: 1 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
}

.shimax-hero-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 2.5rem 0 3.5rem 0 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: heroFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-header-text {
    width: 100%;
    max-width: 900px;
    text-align: center;
    margin: 0 auto 2.5rem auto;
    padding: 0 1.5rem;
}

.shimax-brand-title {
    font-size: 4.2rem;
    font-weight: 900;
    letter-spacing: -1.5px;
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--emerald-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.shimax-brand-slogan {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto;
    font-weight: 500;
    line-height: 1.8;
}

.shimax-hero-video-wrapper {
    position: relative;
    width: 100% !important;
    max-width: 100% !important;
    height: 720px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    background: #000;
    border-top: 1px solid rgba(16, 185, 129, 0.2);
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

.hero-video-element {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}

.hero-video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        var(--bg-page) 0%,
        transparent 10%,
        transparent 90%,
        var(--bg-page) 100%
    );
    pointer-events: none;
    z-index: 2;
}

@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(25px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── 5. HERO DOWNLOAD ACTIONS ─────────────────────────────── */
.shimax-download-section {
    width: 100%;
    margin-top: 3.5rem !important;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 1.5rem;
    z-index: 10;
}

.download-bar-container {
    width: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.download-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    flex-direction: row-reverse;
}

.dl-card {
    position: relative;
    text-decoration: none;
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0.7rem 1.5rem;
    height: 48px;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.dl-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.dl-brand-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.dl-brand-icon {
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    line-height: 1;
}

.dl-brand-icon-svg {
    width: 20px;
    height: 20px;
    color: #10b981;
}

.play-color { color: #34d399; }
.apple-color { color: var(--text-primary); }

.simple-card .dl-brand-name {
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.2px;
}

.bazaar-card {
    border-color: var(--emerald-400);
    background: rgba(16, 185, 129, 0.03);
}

.dl-badge-verified {
    position: absolute;
    top: -11px;
    right: 50%;
    transform: translateX(50%);
    background: var(--emerald-500);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 2px 10px;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    z-index: 2;
}

.dl-card:hover {
    transform: translateY(-4px);
    border-color: var(--emerald-500);
    background: var(--surface-card);
    box-shadow: 0 12px 25px -8px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .dl-card:hover {
    box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.6);
}

/* ─── 6. RESPONSIVE BREAKPOINTS ────────────────────────────── */
@media (max-width: 1440px) {
    .shimax-hero-video-wrapper {
        height: 580px !important;
    }
}

@media (min-width: 1025px) and (max-width: 1280px) {
    .header-container {
        padding: 0 1.25rem;
    }
    .nav-link {
        padding: 0.5rem 0.65rem;
        font-size: 0.88rem;
    }
    .brand-name {
        font-size: 1.3rem;
    }
}

@media (max-width: 1200px) {
    .shimax-hero-video-wrapper {
        height: 480px !important;
    }
}

/* ─── 7. MOBILE & TABLET GATEWAY (MAX-WIDTH 1024PX) ────────── */
.mobile-app-gateway {
    display: none;
}

@media (max-width: 1024px) {
    .shimax-header,
    main,
    footer,
    .shimax-footer,
    .main-viewport,
    .content-wrapper,
    .shimax-download-section {
        display: none !important;
    }

    body {
        padding-top: 0 !important;
        overflow: hidden !important;
        height: 100vh !important;
        background: radial-gradient(circle at 50% 20%, rgba(16, 185, 129, 0.15), transparent 70%), var(--bg-page);
    }

    .mobile-app-gateway {
        display: flex !important;
        position: fixed;
        inset: 0;
        z-index: 999999;
        align-items: center;
        justify-content: center;
        padding: 1.5rem;
    }

    .gateway-card {
        background: var(--surface-card);
        border: 1px solid var(--border-color);
        border-radius: 28px;
        padding: 2.75rem 2rem;
        text-align: center;
        max-width: 440px;
        width: 100%;
        box-shadow: var(--shadow-card);
        backdrop-filter: blur(20px);
        animation: gatewayCardPop 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .gateway-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.85rem;
        margin-bottom: 1.5rem;
    }

    .gateway-logo {
        width: 56px;
        height: 56px;
        object-fit: contain;
        filter: drop-shadow(0 0 16px rgba(16, 185, 129, 0.5));
    }

    .gateway-badge {
        background: var(--emerald-50);
        color: var(--emerald-700);
        font-size: 0.78rem;
        font-weight: 800;
        padding: 0.3rem 0.85rem;
        border-radius: 20px;
        border: 1px solid var(--emerald-200);
    }

    [data-theme="dark"] .gateway-badge {
        background: rgba(16, 185, 129, 0.15);
        color: var(--emerald-400);
        border-color: rgba(16, 185, 129, 0.3);
    }

    .gateway-title {
        font-size: 1.35rem;
        font-weight: 900;
        color: var(--text-primary);
        line-height: 1.4;
        margin-bottom: 0.85rem;
    }

    .gateway-desc {
        font-size: 0.92rem;
        color: var(--text-secondary);
        line-height: 1.8;
        margin-bottom: 2rem;
    }

    .btn-download-bazaar {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.85rem;
        background: linear-gradient(135deg, var(--emerald-500), var(--emerald-700));
        color: #ffffff !important;
        text-decoration: none;
        padding: 0.9rem 1.75rem;
        border-radius: 18px;
        box-shadow: 0 10px 25px var(--emerald-glow);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .btn-download-bazaar i {
        font-size: 1.6rem;
    }

    .btn-text-group {
        display: flex;
        flex-direction: column;
        text-align: right;
    }

    .btn-subtext {
        font-size: 0.72rem;
        opacity: 0.85;
        font-weight: 500;
    }

    .btn-maintext {
        font-size: 1.05rem;
        font-weight: 900;
    }

    .btn-download-bazaar:active {
        transform: scale(0.97);
    }
}

@keyframes gatewayCardPop {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}