/* ================================================================
   LANGTRAINER — Professional Design System
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&family=Noto+Sans+Arabic:wght@300;400;500;600;700&display=swap');

/* ── Design tokens ─────────────────────────────────────────────── */
:root {
  /* Backgrounds — layered dark hierarchy */
  --bg-base:      #08080f;
  --bg-surface:   #0f0f18;
  --bg-card:      #16161f;
  --bg-card-alt:  #1c1c28;
  --bg-hover:     #1e1e2a;
  --bg-active:    #232333;

  /* Borders */
  --border:       rgba(255,255,255,0.06);
  --border-soft:  rgba(255,255,255,0.04);
  --border-glow:  rgba(99,102,241,0.35);
  --border-strong:rgba(255,255,255,0.12);

  /* Text — 4-level hierarchy */
  --text-primary:   #eeeef5;
  --text-secondary: #9898b0;
  --text-muted:     #5c5c72;
  --text-dim:       rgba(255,255,255,0.28);

  /* Accent — Indigo */
  --accent:         #6366f1;
  --accent-hover:   #7577f3;
  --accent-light:   #a5b4fc;
  --accent-subtle:  rgba(99,102,241,0.08);
  --accent-glow:    rgba(99,102,241,0.18);

  /* Status colors */
  --green:          #22c55e;
  --green-light:    #4ade80;
  --green-subtle:   rgba(34,197,94,0.10);
  --green-glow:     rgba(34,197,94,0.18);
  --red:            #f87171;
  --red-subtle:     rgba(248,113,113,0.10);
  --red-glow:       rgba(248,113,113,0.18);
  --yellow:         #fbbf24;
  --yellow-subtle:  rgba(251,191,36,0.10);
  --blue:           #60a5fa;

  /* Border-radius scale */
  --radius-xs:  4px;
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full:100px;

  /* Spacing scale (4px base) */
  --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;
  --space-16: 64px;

  /* Type scale */
  --text-xs:   0.6875rem;  /* 11px */
  --text-sm:   0.75rem;    /* 12px */
  --text-base: 0.875rem;   /* 14px */
  --text-md:   0.9375rem;  /* 15px */
  --text-lg:   1rem;       /* 16px */
  --text-xl:   1.125rem;   /* 18px */
  --text-2xl:  1.25rem;    /* 20px */
  --text-3xl:  1.5rem;     /* 24px */
  --text-4xl:  1.875rem;   /* 30px */
  --text-5xl:  2.25rem;    /* 36px */

  /* Shadows */
  --shadow-xs:  0 1px 2px rgba(0,0,0,0.4);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.5), 0 2px 4px rgba(0,0,0,0.3);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.6), 0 2px 8px rgba(0,0,0,0.3);
  --shadow-glow:0 0 0 1px var(--border-glow), 0 4px 20px rgba(99,102,241,0.15);

  /* Transitions */
  --transition-fast:   120ms cubic-bezier(0.4,0,0.2,1);
  --transition:        200ms cubic-bezier(0.4,0,0.2,1);
  --transition-slow:   350ms cubic-bezier(0.4,0,0.2,1);

  /* Fonts */
  --font-sans:    'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-arabic:  'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;

  /* Sidebar width */
  --sidebar-w: 252px;
}

/* ── Light theme ───────────────────────────────────────────────── */
html[data-theme="light"] {
  --bg-base:       #f4f4fb;
  --bg-surface:    #ffffff;
  --bg-card:       #ffffff;
  --bg-card-alt:   #f0f0f8;
  --bg-hover:      #ebebf5;
  --bg-active:     #e4e4ef;

  --border:        rgba(0,0,0,0.07);
  --border-soft:   rgba(0,0,0,0.04);
  --border-strong: rgba(0,0,0,0.12);

  --text-primary:   #111118;
  --text-secondary: #4b4b65;
  --text-muted:     #8888a0;
  --text-dim:       rgba(0,0,0,0.28);

  --shadow-xs:  0 1px 2px rgba(0,0,0,0.07);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.05);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.05);
  --shadow-glow: 0 0 0 1px var(--border-glow), 0 4px 20px rgba(99,102,241,0.12);
}

html[data-theme="light"] ::-webkit-scrollbar-thumb        { background: rgba(0,0,0,0.14); }
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover  { background: rgba(0,0,0,0.24); }
html[data-theme="light"] ::selection { background: rgba(99,102,241,0.15); color: var(--accent); }
html[data-theme="light"] .card-glass { background: rgba(255,255,255,0.92); }
html[data-theme="light"] .sidebar-overlay { background: rgba(0,0,0,0.32); }

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
}

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--text-primary); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* ── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.10);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }

/* ── Selection ─────────────────────────────────────────────────── */
::selection { background: var(--accent-glow); color: var(--accent-light); }

/* ── Layout ────────────────────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }

/* ── Sidebar ───────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: var(--space-5) var(--space-3);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--transition-slow);
}

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-6);
}

.sidebar-logo .logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(99,102,241,0.4);
  flex-shrink: 0;
}

.sidebar-logo .logo-text {
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

/* Navigation */
.nav-group { margin-bottom: var(--space-1); }

.nav-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: var(--space-3) var(--space-3) var(--space-2);
  display: block;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: var(--text-base);
  font-weight: 500;
  transition: all var(--transition-fast);
  cursor: pointer;
  position: relative;
  line-height: 1.4;
  min-height: 36px;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-subtle);
  color: var(--accent-light);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 2px;
  background: var(--accent);
  border-radius: var(--radius-full);
}

.nav-item .icon {
  font-size: var(--text-lg);
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.85;
}
.nav-item.active .icon { opacity: 1; }

/* Sidebar bottom */
.sidebar-bottom {
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.user-badge {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}
.user-badge:hover { background: var(--bg-hover); }

.user-avatar {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-sm);
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.user-info .name {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}
.user-info .level {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 1px;
}

/* ── Main content ──────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: var(--space-8) var(--space-8);
  min-height: 100vh;
}

/* ── Cards ─────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover { border-color: var(--border-strong); }

.card-glass {
  background: rgba(22,22,31,0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}

/* ── Stat cards ────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  transition: border-color var(--transition-fast), transform var(--transition-fast);
  cursor: default;
}

.stat-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  font-size: 1.25rem;
  margin-bottom: var(--space-3);
  display: block;
}

.stat-value {
  font-size: var(--text-4xl);
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-2);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
  line-height: 1.4;
  white-space: nowrap;
  user-select: none;
  letter-spacing: 0.01em;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 1px 3px rgba(99,102,241,0.4);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(99,102,241,0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-strong);
}
.btn-outline:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.btn-danger {
  background: transparent;
  color: var(--red);
  border-color: rgba(248,113,113,0.25);
}
.btn-danger:hover {
  background: var(--red-subtle);
  border-color: rgba(248,113,113,0.5);
}

.btn-lg {
  padding: 0.75rem 1.75rem;
  font-size: var(--text-lg);
  border-radius: var(--radius-md);
  letter-spacing: 0.01em;
}

.btn-sm {
  padding: 0.3rem 0.75rem;
  font-size: var(--text-sm);
  border-radius: var(--radius-xs);
}

/* ── Forms ─────────────────────────────────────────────────────── */
.form-group { margin-bottom: var(--space-5); }

label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

input, select, textarea {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.625rem var(--space-3);
  color: var(--text-primary);
  font-size: var(--text-base);
  font-family: var(--font-sans);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  line-height: 1.5;
}

input:hover, select:hover, textarea:hover {
  border-color: rgba(255,255,255,0.18);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--bg-card);
}

input::placeholder { color: var(--text-muted); }

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b6b80' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

select option { background: var(--bg-card-alt); }

/* ── Badges ────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-accent {
  background: var(--accent-subtle);
  color: var(--accent-light);
  border: 1px solid var(--border-glow);
}
.badge-green {
  background: var(--green-subtle);
  color: var(--green-light);
  border: 1px solid rgba(34,197,94,0.2);
}
.badge-red {
  background: var(--red-subtle);
  color: var(--red);
  border: 1px solid rgba(248,113,113,0.2);
}
.badge-yellow {
  background: var(--yellow-subtle);
  color: var(--yellow);
  border: 1px solid rgba(251,191,36,0.25);
}

/* ── Progress bar ──────────────────────────────────────────────── */
.progress-bar {
  background: var(--bg-active);
  border-radius: var(--radius-full);
  height: 5px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
  border-radius: var(--radius-full);
  transition: width 700ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.progress-fill::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 40px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2));
  border-radius: var(--radius-full);
}

/* ── Typography ────────────────────────────────────────────────── */
.section-title {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-primary);
}

.page-title {
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.page-sub {
  color: var(--text-secondary);
  font-size: var(--text-md);
  line-height: 1.6;
  margin-bottom: var(--space-8);
}

/* ── Messages ──────────────────────────────────────────────────── */
.messages { list-style: none; margin-bottom: var(--space-6); }

.message {
  padding: 0.75rem var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-weight: 500;
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.message.success {
  background: var(--green-subtle);
  color: var(--green-light);
  border: 1px solid rgba(34,197,94,0.2);
}
.message.error {
  background: var(--red-subtle);
  color: var(--red);
  border: 1px solid rgba(248,113,113,0.2);
}

/* ── Mobile menu toggle ────────────────────────────────────────── */
.menu-toggle {
  display: none;
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 200;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  width: 40px; height: 40px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.125rem;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
}
.menu-toggle:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  background: var(--bg-hover);
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}
.sidebar-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* ── Responsive utility ────────────────────────────────────────── */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  align-items: start;
}

/* ── Responsive breakpoints ────────────────────────────────────── */
@media (max-width: 768px) {
  .menu-toggle { display: flex; }

  .sidebar {
    transform: translateX(-100%);
    padding: var(--space-4) var(--space-3);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg), 4px 0 40px rgba(0,0,0,0.5);
  }

  .main-content {
    margin-left: 0;
    padding: var(--space-4);
    padding-top: calc(var(--space-10) + var(--space-4));
  }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
  .two-col-grid { grid-template-columns: 1fr; }

  /* Touch targets (Apple HIG: 44px min) */
  .nav-item { min-height: 44px; }
  .btn      { min-height: 44px; }
  .btn-sm   { min-height: 36px; }
  .btn-lg   { min-height: 52px; }
  input, select, textarea { min-height: 48px; font-size: var(--text-lg); }

  /* Typography */
  .page-title { font-size: var(--text-3xl); }
  .page-sub   { margin-bottom: var(--space-6); }
  .card       { padding: var(--space-5); }
  .card-glass { padding: var(--space-5); }
}

@media (max-width: 480px) {
  .main-content { padding: var(--space-3); padding-top: calc(var(--space-10) + var(--space-2)); }
  .stats-grid   { gap: var(--space-2); }
  .stat-card    { padding: var(--space-4); }
  .stat-value   { font-size: var(--text-3xl); }
  .stat-icon    { font-size: 1.1rem; margin-bottom: var(--space-2); }
  .page-title   { font-size: var(--text-2xl); }
  .page-sub     { font-size: var(--text-base); margin-bottom: var(--space-5); }
  .card         { padding: var(--space-4); }
  .card-glass   { padding: var(--space-4); }
  .section-title{ font-size: var(--text-lg); }
}

/* ── RTL support ───────────────────────────────────────────────── */
[dir="rtl"] .sidebar {
  left: auto;
  right: 0;
  border-right: none;
  border-left: 1px solid var(--border);
}

[dir="rtl"] .main-content {
  margin-left: 0;
  margin-right: var(--sidebar-w);
}

[dir="rtl"] .menu-toggle { left: auto; right: var(--space-3); }

[dir="rtl"] .sidebar-logo { flex-direction: row-reverse; }
[dir="rtl"] .nav-item {
  flex-direction: row-reverse;
  text-align: right;
}
[dir="rtl"] .nav-item.active::before {
  left: auto;
  right: 0;
}
[dir="rtl"] .user-badge { flex-direction: row-reverse; }
[dir="rtl"] .sidebar-bottom { text-align: right; }

[dir="rtl"] select {
  background-position: left 12px center;
  padding-right: var(--space-3);
  padding-left: 36px;
}

@media (max-width: 768px) {
  [dir="rtl"] .sidebar { transform: translateX(100%); }
  [dir="rtl"] .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg), -4px 0 40px rgba(0,0,0,0.5);
  }
  [dir="rtl"] .main-content { margin-right: 0; }
}

/* ── Theme toggle ──────────────────────────────────────────────── */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  width: 32px; height: 32px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--text-primary);
}

.theme-toggle-float {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  width: 40px; height: 40px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  z-index: 200;
}
.theme-toggle-float:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

/* ── Animations ────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInFast {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-5px); }
  40%,80% { transform: translateX(5px); }
}
@keyframes pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}
@keyframes pulse-glow {
  0%,100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50%     { box-shadow: 0 0 0 6px transparent; }
}

.fade-in      { animation: fadeIn 280ms cubic-bezier(0.4,0,0.2,1) forwards; }
.fade-in-fast { animation: fadeInFast 150ms ease forwards; }
.slide-up     { animation: slideUp 320ms cubic-bezier(0.4,0,0.2,1) forwards; }
.shake        { animation: shake 280ms cubic-bezier(0.4,0,0.2,1); }
.pop          { animation: pop 180ms cubic-bezier(0.4,0,0.2,1); }
