/* ── Parviu Design System ───────────────────── */

/* Dark theme (default) */
:root {
  /* Backgrounds */
  --bg-primary: #0a0a0f;
  --bg-surface: #12121c;
  --bg-elevated: #1a1a2e;
  --bg-card: #1e1e32;
  --bg-overlay: rgba(0, 0, 0, 0.6);

  /* Text */
  --text-primary: #f1f1f6;
  --text-secondary: #a0a0b8;
  --text-muted: #6b6b80;
  --text-xs: 0.7rem;
  --text-sm: 0.8rem;
  --text-base: 0.95rem;
  --text-lg: 1.15rem;
  --text-xl: 1.4rem;
  --text-2xl: 1.8rem;

  /* Brand */
  --accent: #ff6b6b;
  --accent-soft: rgba(255, 107, 107, 0.15);
  --accent-gradient: linear-gradient(135deg, #ff6b6b, #ff9a56);

  /* Category colors */
  --category-series: #60a5fa;
  --category-anime: #ff6b6b;
  --category-variety: #fbbf24;
  --category-movie: #a78bfa;
  --category-all: #6b7280;

  /* Status colors */
  --status-current: #2dd4a0;
  --status-paused: #fbbf24;
  --status-done: #60a5fa;
  --status-nextup: #a78bfa;
  --status-casual: #6b6b80;

  /* Semantic colors */
  --green: #2dd4a0;
  --green-soft: rgba(45, 212, 160, 0.15);
  --blue: #60a5fa;
  --blue-soft: rgba(96, 165, 250, 0.15);
  --yellow: #fbbf24;
  --yellow-soft: rgba(251, 191, 36, 0.15);
  --purple: #a78bfa;
  --purple-soft: rgba(167, 139, 250, 0.15);

  /* Typography */
  --font-display: "Oswald", sans-serif;
  --font-brand: "Fredoka", sans-serif;

  /* Logo */
  --logo-text: #f1f1f6;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-2xl: 24px;
  --space-3xl: 32px;
  --space-4xl: 48px;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 50%;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.6);

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);

  /* Backward compat for old components (AddEditForm, SearchSortBar, ExportBar) */
  --spacing-xs: 4px;  --spacing-sm: 8px;  --spacing-md: 12px;
  --spacing-lg: 16px;  --spacing-xl: 20px;  --spacing-2xl: 24px;
  --color-white: #ffffff;
  --color-gray50: #f8fafc;  --color-gray100: #f1f5f9;
  --color-gray200: #e2e8f0;  --color-gray400: #9ca3af;
  --color-gray500: #6b7280;  --color-gray800: #2d3748;
  --color-gray900: #1a202c;  --color-error: #c53030;
  --color-primary: #3b82f6;
  --font-base: 0.95rem;  --fw-semibold: 600;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-quick: all 0.2s ease;
  --gradient-primary: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-export: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%);
  --gradient-import: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
  --gradient-third: var(--gradient-primary);
  --shadow-colored-export: 0 8px 20px rgba(255, 107, 107, 0.3);
  --shadow-colored-import: 0 8px 20px rgba(78, 205, 196, 0.3);
}

/* Light theme */
.light {
  --bg-primary: #f5f5f0;
  --bg-surface: #ffffff;
  --bg-elevated: #f0f0eb;
  --bg-card: #ffffff;
  --bg-overlay: rgba(0, 0, 0, 0.3);

  --text-primary: #1a1a1a;
  --text-secondary: #6b6b6b;
  --text-muted: #a0a0a0;

  --accent: #ff6b6b;
  --accent-soft: rgba(255, 107, 107, 0.1);
  --accent-gradient: linear-gradient(135deg, #ff6b6b, #ff9a56);

  --border-subtle: rgba(0, 0, 0, 0.08);

  --logo-text: #ff5f4a;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.12);

  --color-white: #ffffff;
  --color-gray50: #f8fafc;
  --color-gray100: #f1f5f9;
  --color-gray200: #e2e8f0;
  --color-gray400: #9ca3af;
  --color-gray500: #6b7280;
  --color-gray800: #2d3748;
  --color-gray900: #1a202c;
  --color-primary: #3b82f6;
}

/* Base */
html, body {
  font-family: "IBM Plex Sans", -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

body {
  padding-bottom: env(safe-area-inset-bottom);
}

a { color: var(--accent); }

input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Dark scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Firefox */
html {
  scrollbar-color: #333 var(--bg-primary);
  scrollbar-width: thin;
}

.light ::-webkit-scrollbar-thumb {
  background: #ccc;
}

.light ::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

.light {
  scrollbar-color: #ccc #f5f5f0;
}
