:root,
[data-theme="dark"] {
    color-scheme: dark;

    --primary: #7c3aed;
    --primary-light: #a855f7;
    --primary-dark: #5b21b6;
    --secondary: #0ea5e9;
    --accent: #f472b6;

    --bg-primary: #070417;
    --bg-secondary: #0d0a1f;
    --bg-tertiary: #14112b;
    --body-background: linear-gradient(135deg, #070417 0%, #0d0a1f 45%, #14112b 100%);

    --surface-card: rgba(15, 23, 42, 0.85);
    --surface-card-hover: rgba(30, 41, 59, 0.9);
    --surface-border: rgba(148, 163, 255, 0.2);
    --surface-muted: rgba(79, 70, 229, 0.18);
    --surface-elevated: rgba(30, 27, 75, 0.8);
    --surface-hero-overlay: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(17, 24, 39, 0.55) 100%);
    --surface-cta: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(168, 85, 247, 0.18));

    --glass-bg: rgba(39, 17, 89, 0.55);
    --glass-border: rgba(168, 85, 247, 0.35);
    --glass-shadow: rgba(76, 29, 149, 0.25);

    --text-primary: #ffffff;
    --text-secondary: #d6d4f1;
    --text-tertiary: #9da0c6;
    --text-inverse: #0f172a;

    --header-bg: rgba(18, 7, 40, 0.85);
    --header-border: rgba(148, 77, 255, 0.25);
    --header-glow-primary: rgba(168, 85, 247, 0.45);
    --header-glow-secondary: rgba(20, 184, 166, 0.15);
    --nav-link-color: rgba(255, 255, 255, 0.8);
    --nav-link-active: #ffffff;
    --badge-bg: rgba(76, 29, 149, 0.35);
    --badge-text: rgba(255, 255, 255, 0.85);
    --badge-icon: #facc15;

    --toggle-bg: rgba(76, 29, 149, 0.45);
    --toggle-border: rgba(167, 139, 250, 0.6);
    --toggle-icon: #f8fafc;
    --toggle-icon-muted: rgba(226, 232, 255, 0.65);
    --toggle-icon-active: #facc15;
    --toggle-thumb: rgba(15, 23, 42, 0.92);
    --toggle-thumb-border: rgba(148, 163, 255, 0.45);

    --input-bg: rgba(15, 23, 42, 0.65);
    --input-border: rgba(148, 163, 184, 0.35);
    --input-border-focus: rgba(129, 140, 248, 0.6);
    --input-placeholder: rgba(148, 163, 184, 0.6);

    --state-error-bg: rgba(248, 113, 113, 0.18);
    --state-error-border: rgba(248, 113, 113, 0.35);
    --state-error-color: #fca5a5;
    --state-success-bg: rgba(74, 222, 128, 0.18);
    --state-success-border: rgba(74, 222, 128, 0.35);
    --state-success-color: #86efac;
    --state-warning-bg: rgba(253, 224, 71, 0.2);
    --state-warning-border: rgba(250, 204, 21, 0.35);
    --state-warning-color: #fde68a;
    --state-info-bg: rgba(96, 165, 250, 0.22);
    --state-info-border: rgba(96, 165, 250, 0.35);
    --state-info-color: #bfdbfe;

    --shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.25);
    --shadow-md: 0 12px 35px rgba(17, 24, 39, 0.35);
    --shadow-lg: 0 35px 80px rgba(15, 23, 42, 0.55);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.18s ease;

    --container-max: 1280px;
    --header-height: 78px;
    --mobile-nav-height: 68px;

    --spacing-xs: 0.55rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.35rem;
    --spacing-xl: 3.5rem;
}

[data-theme="light"] {
    color-scheme: light;

    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #0ea5e9;
    --accent: #f43f5e;

    --bg-primary: #f8fafc;
    --bg-secondary: #eef2ff;
    --bg-tertiary: #e2e8f0;
    --body-background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #e0e7ff 100%);

    --surface-card: #ffffff;
    --surface-card-hover: #f8fafc;
    --surface-border: rgba(148, 163, 184, 0.35);
    --surface-muted: rgba(99, 102, 241, 0.12);
    --surface-elevated: rgba(255, 255, 255, 0.85);
    --surface-hero-overlay: linear-gradient(180deg, rgba(248, 250, 252, 0) 0%, rgba(226, 232, 240, 0.7) 100%);
    --surface-cta: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(14, 165, 233, 0.12));

    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(148, 163, 184, 0.35);
    --glass-shadow: rgba(148, 163, 184, 0.35);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    --text-inverse: #ffffff;

    --header-bg: rgba(255, 255, 255, 0.9);
    --header-border: rgba(203, 213, 225, 0.85);
    --header-glow-primary: rgba(99, 102, 241, 0.12);
    --header-glow-secondary: rgba(14, 165, 233, 0.12);
    --nav-link-color: #475569;
    --nav-link-active: #1e293b;
    --badge-bg: rgba(99, 102, 241, 0.12);
    --badge-text: #475569;
    --badge-icon: #f59e0b;

    --toggle-bg: rgba(226, 232, 240, 0.9);
    --toggle-border: rgba(148, 163, 184, 0.5);
    --toggle-icon: #0f172a;
    --toggle-icon-muted: rgba(100, 116, 139, 0.7);
    --toggle-icon-active: #f59e0b;
    --toggle-thumb: #ffffff;
    --toggle-thumb-border: rgba(148, 163, 184, 0.35);

    --input-bg: rgba(255, 255, 255, 0.9);
    --input-border: rgba(148, 163, 184, 0.4);
    --input-border-focus: rgba(99, 102, 241, 0.55);
    --input-placeholder: rgba(148, 163, 184, 0.65);

    --state-error-bg: rgba(248, 113, 113, 0.12);
    --state-error-border: rgba(239, 68, 68, 0.2);
    --state-error-color: #dc2626;
    --state-success-bg: rgba(34, 197, 94, 0.12);
    --state-success-border: rgba(34, 197, 94, 0.2);
    --state-success-color: #15803d;
    --state-warning-bg: rgba(251, 191, 36, 0.16);
    --state-warning-border: rgba(234, 179, 8, 0.25);
    --state-warning-color: #b45309;
    --state-info-bg: rgba(59, 130, 246, 0.12);
    --state-info-border: rgba(59, 130, 246, 0.2);
    --state-info-color: #1d4ed8;

    --shadow-sm: 0 2px 12px rgba(148, 163, 184, 0.18);
    --shadow-md: 0 18px 45px rgba(148, 163, 184, 0.28);
    --shadow-lg: 0 45px 90px rgba(148, 163, 184, 0.32);
}
