@font-face {
  font-family: 'Exo 2';
  src: url('/fonts/Exo2-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Exo 2';
  src: url('/fonts/Exo2-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Exo 2';
  src: url('/fonts/Exo2-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/JetBrainsMono-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ==================== THEME 1: CYBERPUNK DARK (DEFAULT) ==================== */
:root,
html[data-theme="cyberpunk-dark"] {
  --bg-void: #050507;
  --bg-pure: #020203;
  --bg-rail: #08090D;
  --bg-surface: #0C0D12;
  --bg-card: #12141C;
  --bg-elevated: #181B26;
  --bg-hover: #1D2130;

  --border-hairline: rgba(255, 255, 255, 0.06);
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --accent-neon: #00FF87;
  --accent-lime: #65FA03;
  --accent-dim: rgba(0, 255, 135, 0.12);
  --accent-glow: rgba(0, 255, 135, 0.24);

  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #5C677D;

  --prio-high: #FF4757;
  --prio-med: #FFB800;
  --prio-low: #00D2FF;
  --prio-none: #4B5563;

  --font-ui: 'Exo 2', 'Vazirmatn', system-ui, -apple-system, sans-serif;
  --font-rtl: 'Vazirmatn', 'Exo 2', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
}

/* ==================== THEME 2: OBSIDIAN MINIMAL (TICKTICK PURE AMOLED) ==================== */
html[data-theme="obsidian-minimal"] {
  --bg-void: #000000;
  --bg-pure: #000000;
  --bg-rail: #0A0A0C;
  --bg-surface: #111114;
  --bg-card: #17171B;
  --bg-elevated: #202026;
  --bg-hover: #26262E;
  --accent-neon: #4B7BFF;
  --accent-lime: #6C93FF;
  --accent-dim: rgba(75, 123, 255, 0.16);
  --accent-glow: rgba(75, 123, 255, 0.3);
  --text-primary: #F5F5F7;
  --text-secondary: #9E9EA8;
  --text-muted: #666672;
}

/* ==================== THEME 3: MIDNIGHT OCEAN ==================== */
html[data-theme="midnight-ocean"] {
  --bg-void: #060E1A;
  --bg-pure: #040912;
  --bg-rail: #081324;
  --bg-surface: #0C1A2E;
  --bg-card: #11223B;
  --bg-elevated: #172C4A;
  --bg-hover: #1D3558;
  --accent-neon: #38BDF8;
  --accent-lime: #00E5FF;
  --accent-dim: rgba(56, 189, 248, 0.14);
  --accent-glow: rgba(56, 189, 248, 0.28);
  --text-primary: #F0F9FF;
  --text-secondary: #94B3D1;
  --text-muted: #5A7999;
}

/* ==================== THEME 4: EMERALD MATRIX ==================== */
html[data-theme="emerald-matrix"] {
  --bg-void: #030A07;
  --bg-pure: #020705;
  --bg-rail: #06120D;
  --bg-surface: #091913;
  --bg-card: #0E231B;
  --bg-elevated: #143025;
  --bg-hover: #193B2E;
  --accent-neon: #10B981;
  --accent-lime: #34D399;
  --accent-dim: rgba(16, 185, 129, 0.16);
  --accent-glow: rgba(16, 185, 129, 0.3);
  --text-primary: #ECFDF5;
  --text-secondary: #86B5A3;
  --text-muted: #4D7A69;
}

/* ==================== THEME 5: VELVET ROSE ==================== */
html[data-theme="velvet-rose"] {
  --bg-void: #0B060F;
  --bg-pure: #07040A;
  --bg-rail: #110A17;
  --bg-surface: #170E20;
  --bg-card: #1F142B;
  --bg-elevated: #281B38;
  --bg-hover: #322245;
  --accent-neon: #F472B6;
  --accent-lime: #C084FC;
  --accent-dim: rgba(244, 114, 182, 0.15);
  --accent-glow: rgba(244, 114, 182, 0.3);
  --text-primary: #FDF2F8;
  --text-secondary: #C4A7C7;
  --text-muted: #80638A;
}

/* ==================== THEME 6: CLEAN DAYLIGHT ==================== */
html[data-theme="clean-daylight"] {
  --bg-void: #F3F5F9;
  --bg-pure: #FFFFFF;
  --bg-rail: #E8ECF4;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-elevated: #EEF2F8;
  --bg-hover: #E9EEF6;
  --border-hairline: rgba(15, 23, 42, 0.08);
  --border-subtle: rgba(15, 23, 42, 0.12);
  --border-strong: rgba(15, 23, 42, 0.2);
  --accent-neon: #2563EB;
  --accent-lime: #3B82F6;
  --accent-dim: rgba(37, 99, 235, 0.1);
  --accent-glow: rgba(37, 99, 235, 0.22);
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
}

/* Font Size Scaling */
html[data-font-size="small"] { font-size: 13.5px; }
html[data-font-size="default"] { font-size: 15px; }
html[data-font-size="large"] { font-size: 16.5px; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-ui);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .22s ease, color .22s ease;
}

html[dir="rtl"] body { font-family: var(--font-rtl); }

/* ==================== GPU-ACCELERATED PAGE & MICRO ANIMATIONS ==================== */
@keyframes ktPageEnter {
  from { opacity: 0; transform: translateY(10px) scale(0.992); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ktModalPop {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes ktCheckPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.24); }
  100% { transform: scale(1); }
}

.kt-view-animate {
  animation: ktPageEnter .26s cubic-bezier(.22, 1, .36, 1) both;
}

.modal-card, .settings-modal-card {
  animation: ktModalPop .22s cubic-bezier(.22, 1, .36, 1) both;
}

.prio-check.checked {
  animation: ktCheckPop .24s cubic-bezier(.22, 1, .36, 1);
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.22); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-neon); }
