/* ============================================
   KURZ — Design System
   Germany's Gen Z News App
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Brand Colors - Premium 3D */
  --brand-primary: #6C5CE7;
  --brand-secondary: #00CEC9;
  --brand-accent: #FD79A8;
  --brand-gradient: linear-gradient(135deg, #6C5CE7 0%, #a29bfe 50%, #74b9ff 100%);
  --brand-gradient-alt: linear-gradient(135deg, #00CEC9, #81ECEC);
  --brand-gradient-glow: radial-gradient(circle at 50% -20%, rgba(108, 92, 231, 0.4), transparent 70%);

  /* Category Colors */
  --cat-foryou: #6C5CE7;
  --cat-germany: #E17055;
  --cat-world: #00B894;
  --cat-tech: #0984E3;
  --cat-business: #FDCB6E;
  --cat-sports: #E84393;
  --cat-entertainment: #A29BFE;
  --cat-science: #00CEC9;

  /* Dark Theme (default) */
  --bg-primary: #0A0A0F;
  --bg-secondary: #12121A;
  --bg-card: rgba(22, 22, 35, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --bg-glass-hover: rgba(255, 255, 255, 0.08);
  --bg-overlay: rgba(0, 0, 0, 0.6);

  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-tertiary: rgba(255, 255, 255, 0.45);
  --text-accent: #A29BFE;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(108, 92, 231, 0.5);

  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-elevated: 0 20px 60px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 50px rgba(108, 92, 231, 0.25);
  --shadow-3d: 0 10px 30px -10px rgba(0, 0, 0, 0.5);

  /* Typography - Editorial */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Outfit', var(--font-primary);

  --text-xs: 0.75rem;
  /* 12px */
  --text-sm: 0.875rem;
  /* 14px */
  --text-base: 1rem;
  /* 16px */
  --text-lg: 1.25rem;
  /* 20px - increased */
  --text-xl: 1.5rem;
  /* 24px - increased */
  --text-2xl: 2rem;
  /* 32px - increased */
  --text-3xl: 3rem;
  /* 48px - massive for titles */

  --leading-tight: 1.1;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;
  --tracking-tight: -0.03em;
  /* Editorial tracking */

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* Z-index scale */
  --z-card: 1;
  --z-navbar: 100;
  --z-overlay: 200;
  --z-modal: 300;
  --z-toast: 400;

  /* Accent Colors */
  --accent-primary: #6C5CE7;
  --accent-secondary: #A29BFE;
  --error-color: #FF6B6B;
  --success-color: #00B894;
  --warning-color: #FDCB6E;

  /* Safe areas for mobile */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---------- Light Theme Override ---------- */
[data-theme="light"] {
  --bg-primary: #F5F5FA;
  --bg-secondary: #FFFFFF;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-glass: rgba(0, 0, 0, 0.03);
  --bg-glass-hover: rgba(0, 0, 0, 0.06);
  --bg-overlay: rgba(255, 255, 255, 0.6);

  --text-primary: #1A1A2E;
  --text-secondary: rgba(26, 26, 46, 0.65);
  --text-tertiary: rgba(26, 26, 46, 0.4);
  --text-accent: #6C5CE7;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-active: rgba(108, 92, 231, 0.4);

  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-elevated: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(108, 92, 231, 0.1);
}

/* ---------- Global Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  height: 100dvh;
  width: 100vw;
  position: fixed;
  touch-action: none;
}

/* Prevent overscroll */
body {
  overscroll-behavior: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* ---------- Utility Classes ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.truncate-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}