/* =============================================
   SlideForge AI — main.css
   Variables, Reset, Typography, Utilities
   ============================================= */

:root {
  /* App UI — Dark (default) */
  --bg-base:        #080c14;
  --bg-surface:     #0e1726;
  --bg-elevated:    #131f32;
  --bg-card:        #172236;
  --bg-card-hover:  #1c2a42;
  --border:         #1e3040;
  --border-subtle:  #152338;

  --text-primary:   #edf2ff;
  --text-secondary: #7898b8;
  --text-muted:     #4a6585;

  --accent:         #5b8ff9;
  --accent-hover:   #4a7ee8;
  --accent-dim:     #0d2454;
  --accent-grad:    linear-gradient(135deg, #5b8ff9 0%, #a78bfa 100%);

  --success:        #22d3a0;
  --success-bg:     #052e20;
  --error:          #ff5c5c;
  --error-bg:       #2d0a0a;
  --warning:        #ffb347;
  --warning-bg:     #2d1a00;

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  --shadow-sm:  0 1px 4px rgba(0,0,0,.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,.5);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.6);
  --shadow-accent: 0 4px 24px rgba(91,143,249,.25);

  --transition: 150ms ease;
  --transition-md: 220ms ease;

  --nav-h: 60px;
  --sidebar-w: 260px;
}

[data-theme="light"] {
  --bg-base:        #f0f4f8;
  --bg-surface:     #ffffff;
  --bg-elevated:    #f8fafc;
  --bg-card:        #ffffff;
  --bg-card-hover:  #f1f5f9;
  --border:         #dde3ed;
  --border-subtle:  #e8edf5;
  --text-primary:   #0d1b2e;
  --text-secondary: #4a6585;
  --text-muted:     #8ba0b8;
  --accent-dim:     #dbeafe;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 12px rgba(0,0,0,.12);
  --shadow-lg:  0 12px 36px rgba(0,0,0,.15);
  --shadow-accent: 0 4px 20px rgba(91,143,249,.2);
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button { cursor: pointer; font: inherit; }
input, textarea, select { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Typography ────────────────────────────── */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.15; letter-spacing: -.03em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
h4 { font-size: 1rem; font-weight: 600; line-height: 1.4; }
p  { color: var(--text-secondary); line-height: 1.7; }
small { font-size: .8125rem; }
code { font-family: 'Cascadia Code', 'Fira Code', monospace; font-size: .875em; background: var(--bg-elevated); padding: 2px 6px; border-radius: 4px; }

/* ── Gradient text ─────────────────────────── */
.grad-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Scrollbar ─────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Utilities ─────────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.mt-auto { margin-top: auto; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* ── Section heading ───────────────────────── */
.section-label {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ── Divider ───────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* ── Page wrapper ──────────────────────────── */
.page { min-height: 100vh; }
