/**
 * Sigma — ثيمات الواجهة (متعددة)
 * يُطبَّق عبر class على body: sigma-theme-{id} + dark-mode للثيمات الداكنة
 */

/* ——— فاتح (افتراضي من :root في home.css) ——— */
body.sigma-theme-light {
    --bg-body: #f5f7fa;
    --sidebar-bg-start: #2c3e50;
    --sidebar-bg-end: #34495e;
    --sidebar-text: #ffffff;
    --sidebar-hover: rgba(255, 255, 255, 0.1);
    --sidebar-active: rgba(255, 255, 255, 0.15);
    --card-bg: #ffffff;
    --header-bg: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-light: #95a5a6;
    --border-color: rgba(0, 0, 0, 0.08);
    --shadow: rgba(0, 0, 0, 0.08);
    --shadow-hover: rgba(0, 0, 0, 0.12);
    --input-bg: #f8f9fa;
    --accent-color: #3498db;
    --accent-hover: #2ecc71;
    --accent-glow: transparent;
}

/* ——— داكن ——— */
body.sigma-theme-dark {
    --bg-body: #0f1419;
    --sidebar-bg-start: #1a1d29;
    --sidebar-bg-end: #15171f;
    --sidebar-text: #e8e8e8;
    --sidebar-hover: rgba(255, 255, 255, 0.05);
    --sidebar-active: rgba(255, 255, 255, 0.1);
    --card-bg: #1a1f2e;
    --header-bg: #1a1f2e;
    --text-primary: #e8e8e8;
    --text-secondary: #a8b2c0;
    --text-light: #6b7280;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.5);
    --input-bg: #252a38;
    --accent-color: #3b82f6;
    --accent-hover: #10b981;
    --accent-glow: transparent;
}

/* ——— جارفيس (HUD تكنولوجي — Iron Man style) ——— */
body.sigma-theme-jarvis {
    --bg-body: #050a12;
    --sidebar-bg-start: #061018;
    --sidebar-bg-end: #0a1624;
    --sidebar-text: #b8e8ff;
    --sidebar-hover: rgba(0, 212, 255, 0.12);
    --sidebar-active: rgba(0, 212, 255, 0.22);
    --card-bg: rgba(8, 24, 40, 0.92);
    --header-bg: rgba(6, 18, 32, 0.95);
    --text-primary: #d4f1ff;
    --text-secondary: #6eb8d9;
    --text-light: #4a8fad;
    --border-color: rgba(0, 212, 255, 0.28);
    --shadow: rgba(0, 180, 255, 0.15);
    --shadow-hover: rgba(0, 212, 255, 0.35);
    --input-bg: rgba(4, 20, 36, 0.9);
    --accent-color: #00d4ff;
    --accent-hover: #00ffcc;
    --accent-glow: rgba(0, 212, 255, 0.55);
}

body.sigma-theme-jarvis {
    background-color: var(--bg-body);
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        radial-gradient(ellipse 120% 80% at 50% -20%, rgba(0, 100, 180, 0.35) 0%, transparent 55%),
        radial-gradient(ellipse 80% 50% at 100% 100%, rgba(0, 212, 255, 0.08) 0%, transparent 45%);
    background-size: 24px 24px, 24px 24px, 100% 100%, 100% 100%;
}

body.sigma-theme-jarvis .sidebar {
    border-left: 1px solid rgba(0, 212, 255, 0.35);
    box-shadow: -4px 0 24px rgba(0, 180, 255, 0.12), inset 0 0 40px rgba(0, 100, 160, 0.08);
}

body.sigma-theme-jarvis .header {
    border-bottom: 1px solid rgba(0, 212, 255, 0.35);
    box-shadow: 0 2px 20px rgba(0, 180, 255, 0.1);
}

body.sigma-theme-jarvis .brand {
    text-shadow: 0 0 12px var(--accent-glow);
    color: #00e5ff;
}

body.sigma-theme-jarvis .stat-card,
body.sigma-theme-jarvis .theme-screen-card {
    border-color: rgba(0, 212, 255, 0.35);
    box-shadow: 0 0 20px rgba(0, 180, 255, 0.08), inset 0 0 1px rgba(0, 212, 255, 0.2);
}

body.sigma-theme-jarvis .theme-toggle,
body.sigma-theme-jarvis .theme-picker-open-btn {
    border-color: rgba(0, 212, 255, 0.45);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.15);
}

body.sigma-theme-jarvis .section-toggle:hover,
body.sigma-theme-jarvis .menu a:hover {
    box-shadow: inset 0 0 12px rgba(0, 212, 255, 0.08);
}

/* ——— محيط (أزرق هادئ) ——— */
body.sigma-theme-ocean {
    --bg-body: #0c1929;
    --sidebar-bg-start: #0d2137;
    --sidebar-bg-end: #0a1a2e;
    --sidebar-text: #e0f2fe;
    --sidebar-hover: rgba(56, 189, 248, 0.12);
    --sidebar-active: rgba(56, 189, 248, 0.2);
    --card-bg: #132f4c;
    --header-bg: #132f4c;
    --text-primary: #e0f2fe;
    --text-secondary: #7dd3fc;
    --text-light: #38bdf8;
    --border-color: rgba(56, 189, 248, 0.2);
    --shadow: rgba(0, 0, 0, 0.35);
    --shadow-hover: rgba(14, 165, 233, 0.25);
    --input-bg: #1e3a5f;
    --accent-color: #38bdf8;
    --accent-hover: #22d3ee;
    --accent-glow: rgba(56, 189, 248, 0.4);
}

/* ——— زمردي (أخضر تقني) ——— */
body.sigma-theme-emerald {
    --bg-body: #0a1410;
    --sidebar-bg-start: #0d1f17;
    --sidebar-bg-end: #081510;
    --sidebar-text: #d1fae5;
    --sidebar-hover: rgba(52, 211, 153, 0.12);
    --sidebar-active: rgba(52, 211, 153, 0.22);
    --card-bg: #134032;
    --header-bg: #134032;
    --text-primary: #ecfdf5;
    --text-secondary: #6ee7b7;
    --text-light: #34d399;
    --border-color: rgba(52, 211, 153, 0.22);
    --shadow: rgba(0, 0, 0, 0.35);
    --shadow-hover: rgba(16, 185, 129, 0.2);
    --input-bg: #1a3d32;
    --accent-color: #10b981;
    --accent-hover: #34d399;
    --accent-glow: rgba(52, 211, 153, 0.35);
}

/* ——— عنبري (دافئ تقني) ——— */
body.sigma-theme-amber {
    --bg-body: #1a1208;
    --sidebar-bg-start: #2a1a0a;
    --sidebar-bg-end: #1f1408;
    --sidebar-text: #fef3c7;
    --sidebar-hover: rgba(251, 191, 36, 0.12);
    --sidebar-active: rgba(251, 191, 36, 0.2);
    --card-bg: #2d2218;
    --header-bg: #2d2218;
    --text-primary: #fef3c7;
    --text-secondary: #fcd34d;
    --text-light: #d97706;
    --border-color: rgba(251, 191, 36, 0.22);
    --shadow: rgba(0, 0, 0, 0.4);
    --shadow-hover: rgba(245, 158, 11, 0.2);
    --input-bg: #3d2e1a;
    --accent-color: #f59e0b;
    --accent-hover: #fbbf24;
    --accent-glow: rgba(251, 191, 36, 0.35);
}

/* ——— Opera GX (داكن + أحمر gaming) ——— */
body.sigma-theme-opera-gx {
    --bg-body: #100e14;
    --sidebar-bg-start: #0d0b12;
    --sidebar-bg-end: #16141f;
    --sidebar-text: #ececf1;
    --sidebar-hover: rgba(255, 27, 45, 0.14);
    --sidebar-active: rgba(255, 27, 45, 0.26);
    --card-bg: #1c1a24;
    --header-bg: #18161f;
    --text-primary: #f2f2f7;
    --text-secondary: #a8a8b8;
    --text-light: #6e6e7e;
    --border-color: rgba(255, 41, 72, 0.22);
    --shadow: rgba(0, 0, 0, 0.45);
    --shadow-hover: rgba(255, 27, 45, 0.28);
    --input-bg: #22202c;
    --accent-color: #ff2948;
    --accent-hover: #ff5c72;
    --accent-glow: rgba(255, 41, 72, 0.55);
    --gx-accent-secondary: #c71f4a;
}

body.sigma-theme-opera-gx {
    background-color: var(--bg-body);
    background-image:
        radial-gradient(ellipse 90% 60% at 0% 0%, rgba(255, 27, 45, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 70% 50% at 100% 100%, rgba(199, 31, 74, 0.1) 0%, transparent 45%),
        linear-gradient(180deg, #100e14 0%, #14121a 100%);
}

body.sigma-theme-opera-gx .sidebar {
    border-left: 2px solid rgba(255, 41, 72, 0.45);
    box-shadow: -6px 0 28px rgba(255, 27, 45, 0.12), inset 3px 0 0 rgba(255, 41, 72, 0.35);
}

body.sigma-theme-opera-gx .header {
    border-bottom: 1px solid rgba(255, 41, 72, 0.28);
    box-shadow: 0 2px 16px rgba(255, 27, 45, 0.08);
}

body.sigma-theme-opera-gx .brand {
    color: #ff3d5a;
    text-shadow: 0 0 14px rgba(255, 41, 72, 0.45);
    font-weight: 800;
    letter-spacing: 0.04em;
}

body.sigma-theme-opera-gx .stat-card,
body.sigma-theme-opera-gx .theme-screen-card {
    border-color: rgba(255, 41, 72, 0.2);
    background: linear-gradient(145deg, #1e1c28 0%, #1a1822 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

body.sigma-theme-opera-gx .stat-card:hover {
    border-color: rgba(255, 41, 72, 0.4);
    box-shadow: 0 6px 24px rgba(255, 27, 45, 0.15);
}

body.sigma-theme-opera-gx .theme-toggle,
body.sigma-theme-opera-gx .theme-picker-open-btn {
    border-color: rgba(255, 41, 72, 0.4);
    box-shadow: 0 0 14px rgba(255, 27, 45, 0.2);
}

body.sigma-theme-opera-gx .theme-toggle:hover,
body.sigma-theme-opera-gx .theme-picker-open-btn:hover {
    border-color: #ff2948;
    box-shadow: 0 0 18px rgba(255, 41, 72, 0.4);
}

body.sigma-theme-opera-gx .section-toggle:hover,
body.sigma-theme-opera-gx .menu a:hover {
    background: rgba(255, 27, 45, 0.1);
    border-right: 3px solid #ff2948;
}

body.sigma-theme-opera-gx .menu a.active-link {
    background: rgba(255, 27, 45, 0.18);
    border-right: 3px solid #ff2948;
}

body.sigma-theme-opera-gx .theme-picker-option.is-active {
    border-color: #ff2948;
    background: linear-gradient(135deg, rgba(255, 41, 72, 0.2) 0%, rgba(199, 31, 74, 0.1) 100%);
    box-shadow: 0 0 14px rgba(255, 27, 45, 0.2);
}

/* Opera GX — Neon (توهج أقوى) */
body.sigma-theme-opera-gx-neon {
    --bg-body: #0a0610;
    --sidebar-bg-start: #0e0814;
    --sidebar-bg-end: #1a0e22;
    --sidebar-text: #f5f0ff;
    --sidebar-hover: rgba(255, 27, 45, 0.22);
    --sidebar-active: rgba(255, 27, 45, 0.32);
    --card-bg: #1e1228;
    --header-bg: #1a0e22;
    --text-primary: #f5f0ff;
    --text-secondary: #c8b8e0;
    --text-light: #8a7aa8;
    --border-color: rgba(255, 41, 72, 0.35);
    --shadow: rgba(255, 27, 45, 0.25);
    --shadow-hover: rgba(255, 27, 45, 0.4);
    --input-bg: #160e1e;
    --accent-color: #ff1b2d;
    --accent-hover: #ff4d6a;
    --accent-glow: rgba(255, 27, 45, 0.6);
}

body.sigma-theme-opera-gx-neon {
    background-color: var(--bg-body);
    background-image:
        radial-gradient(ellipse 100% 70% at 50% -10%, rgba(255, 27, 45, 0.22) 0%, transparent 55%),
        linear-gradient(180deg, #0a0610 0%, #120a18 100%);
}

body.sigma-theme-opera-gx-neon .sidebar,
body.sigma-theme-opera-gx-neon .header {
    box-shadow: 0 0 24px rgba(255, 27, 45, 0.15);
}

/* Opera GX — Void (أغمق، أحمر خافت) */
body.sigma-theme-opera-gx-void {
    --bg-body: #050508;
    --sidebar-bg-start: #08080c;
    --sidebar-bg-end: #0e0e14;
    --sidebar-text: #e8e6ec;
    --sidebar-hover: rgba(196, 31, 58, 0.12);
    --sidebar-active: rgba(196, 31, 58, 0.2);
    --card-bg: #121218;
    --header-bg: #0e0e14;
    --text-primary: #e8e6ec;
    --text-secondary: #9890a8;
    --text-light: #686078;
    --border-color: rgba(180, 40, 60, 0.2);
    --shadow: rgba(0, 0, 0, 0.55);
    --shadow-hover: rgba(196, 31, 58, 0.2);
    --input-bg: #0c0c12;
    --accent-color: #c41f3a;
    --accent-hover: #e02848;
    --accent-glow: rgba(196, 31, 58, 0.35);
}

body.sigma-theme-opera-gx-void {
    background: var(--bg-body);
}

body.sigma-theme-opera-gx-void .sidebar,
body.sigma-theme-opera-gx-void .header {
    box-shadow: none;
    border-color: rgba(180, 40, 60, 0.12);
}

/* Opera GX — Purple (بنفسجي + أحمر) */
body.sigma-theme-opera-gx-purple {
    --bg-body: #0c0814;
    --sidebar-bg-start: #100a18;
    --sidebar-bg-end: #1a1228;
    --sidebar-text: #f0ecff;
    --sidebar-hover: rgba(180, 80, 255, 0.15);
    --sidebar-active: rgba(255, 41, 72, 0.2);
    --card-bg: #1e1630;
    --header-bg: #1a1228;
    --text-primary: #f0ecff;
    --text-secondary: #b8a8d8;
    --text-light: #8878a8;
    --border-color: rgba(160, 80, 255, 0.28);
    --shadow: rgba(0, 0, 0, 0.45);
    --shadow-hover: rgba(180, 80, 255, 0.25);
    --input-bg: #161022;
    --accent-color: #b450ff;
    --accent-hover: #ff2948;
    --accent-glow: rgba(180, 80, 255, 0.45);
}

body.sigma-theme-opera-gx-purple {
    background-color: var(--bg-body);
    background-image:
        radial-gradient(ellipse 80% 50% at 0% 100%, rgba(180, 80, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(255, 41, 72, 0.1) 0%, transparent 45%);
}

body.sigma-theme-opera-gx-purple .sidebar {
    border-left: 2px solid rgba(180, 80, 255, 0.35);
}

body.sigma-theme-opera-gx-neon .brand,
body.sigma-theme-opera-gx-void .brand,
body.sigma-theme-opera-gx-purple .brand {
    color: var(--accent-color);
    text-shadow: 0 0 12px var(--accent-glow);
    font-weight: 800;
}

body.sigma-theme-opera-gx-neon .menu a:hover,
body.sigma-theme-opera-gx-neon .menu a.active-link {
    background: rgba(255, 27, 45, 0.22);
    border-right: 3px solid #ff2948;
    box-shadow: inset 0 0 12px rgba(255, 41, 72, 0.12);
}

body.sigma-theme-opera-gx-void .menu a:hover,
body.sigma-theme-opera-gx-void .menu a.active-link {
    background: rgba(196, 31, 58, 0.12);
    border-right: 3px solid #c41f3a;
}

body.sigma-theme-opera-gx-purple .menu a:hover,
body.sigma-theme-opera-gx-purple .menu a.active-link {
    background: linear-gradient(90deg, rgba(180, 80, 255, 0.15) 0%, rgba(255, 41, 72, 0.1) 100%);
    border-right: 3px solid #b450ff;
}

body.sigma-theme-opera-gx-neon .theme-picker-option.is-active,
body.sigma-theme-opera-gx-void .theme-picker-option.is-active,
body.sigma-theme-opera-gx-purple .theme-picker-option.is-active {
    border-color: var(--accent-color);
    box-shadow: 0 0 12px var(--accent-glow);
}
