/* ═══════════════════════════════════════════════════════
   VideoGrafis.com — Professional Stylesheet
   Video Quote Editor for Social Media Creators
   ═══════════════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  /* Brand */
  --brand: #6366f1;
  --brand-light: #818cf8;
  --brand-dark: #4f46e5;
  --brand-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  --brand-glow: 0 0 20px rgba(99,102,241,0.3);

  /* Surfaces */
  --surface-0: #ffffff;
  --surface-50: #f8fafc;
  --surface-100: #f1f5f9;
  --surface-200: #e2e8f0;
  --surface-800: #1e293b;
  --surface-900: #0f172a;
  --surface-950: #020617;

  /* Text */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #f8fafc;

  /* Borders */
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  /* Feedback */
  --success: #10b981;
  --success-bg: #ecfdf5;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.07), 0 4px 10px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.1);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --duration: 200ms;
  --duration-slow: 350ms;
}

/* ═══════════════════════════════════════════════════════
   Reset & Base
   ═══════════════════════════════════════════════════════ */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--surface-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video, canvas { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover { color: var(--brand-dark); }
::selection { background: var(--brand); color: #fff; }

/* ═══════════════════════════════════════════════════════
   Container
   ═══════════════════════════════════════════════════════ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ═══════════════════════════════════════════════════════
   Navigation
   ═══════════════════════════════════════════════════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  transition: opacity var(--duration) var(--ease);
  white-space: nowrap;
}
.logo:hover { opacity: 0.85; }
.logo-icon {
  width: 36px; height: 36px;
  background: var(--brand-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  box-shadow: var(--brand-glow);
}
.logo-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-dot { color: var(--brand); -webkit-text-fill-color: var(--brand); }

.nav-links { display: flex; align-items: center; gap: var(--space-2); }
.nav-link {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--duration) var(--ease);
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: var(--surface-100);
}
.nav-user { display: flex; align-items: center; gap: var(--space-3); }
.nav-user-avatar {
  width: 32px; height: 32px;
  background: var(--brand-gradient);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 700;
}
.nav-user-name { font-size: var(--text-sm); font-weight: 500; color: var(--text-primary); }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--surface-100);
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════
   Buttons
   ═══════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 20px;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  font-family: inherit;
  white-space: nowrap;
  line-height: 1;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99,102,241,0.3);
}
.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(99,102,241,0.45);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--surface-0);
  border-color: var(--border);
  color: var(--text-primary);
}
.btn-secondary:hover { background: var(--surface-100); border-color: var(--brand); color: var(--brand); }
.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--brand); color: var(--brand); background: rgba(99,102,241,0.04); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--surface-100); color: var(--text-primary); }

.btn-sm { padding: 6px 14px; font-size: var(--text-xs); }
.btn-lg { padding: 14px 28px; font-size: var(--text-base); }
.btn-xl { padding: 16px 32px; font-size: var(--text-lg); border-radius: var(--radius-lg); }
.btn-block { width: 100%; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-md); }

/* ═══════════════════════════════════════════════════════
   Forms
   ═══════════════════════════════════════════════════════ */
.form-group { margin-bottom: var(--space-4); }
.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}
.form-hint { font-size: var(--text-xs); color: var(--text-muted); margin-top: var(--space-1); }
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: var(--text-sm);
  font-family: inherit;
  color: var(--text-primary);
  background: var(--surface-0);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--duration) var(--ease);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.form-input::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-checkbox { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); cursor: pointer; }
.form-checkbox input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
.form-color {
  width: 40px; height: 36px;
  padding: 3px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--surface-0);
}
.form-row { display: flex; gap: var(--space-3); }
.form-row > * { flex: 1; }
.form-file {
  width: 100%;
  padding: 8px 12px;
  font-size: var(--text-sm);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--duration) var(--ease);
  background: var(--surface-50);
}
.form-file:hover { border-color: var(--brand); }
.form-file::file-selector-button {
  padding: 6px 14px;
  margin-right: 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: var(--text-xs);
  font-family: inherit;
}

/* ═══════════════════════════════════════════════════════
   Alerts & Badges
   ═══════════════════════════════════════════════════════ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid #fecaca; }
.alert-success { background: var(--success-bg); color: #059669; border: 1px solid #a7f3d0; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
}
.badge-success { background: var(--success-bg); color: #059669; }
.badge-warning { background: var(--warning-bg); color: #b45309; }
.badge-error { background: var(--danger-bg); color: var(--danger); }
.badge-neutral { background: var(--surface-100); color: var(--text-secondary); }

/* ═══════════════════════════════════════════════════════
   Hero (Landing)
   ═══════════════════════════════════════════════════════ */
.hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-20) 0;
  text-align: center;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at 50% 0%, rgba(99,102,241,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 16px;
  background: rgba(99,102,241,0.06);
  border: 1px solid rgba(99,102,241,0.15);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--brand);
  margin-bottom: var(--space-6);
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 700px;
  margin: 0 auto var(--space-4);
}
.hero-title-gradient {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto var(--space-8);
  line-height: 1.7;
}
.hero-actions { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }
.hero-features {
  display: flex;
  justify-content: center;
  gap: var(--space-10);
  margin-top: var(--space-12);
  flex-wrap: wrap;
}
.hero-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}
.hero-feature-icon {
  width: 48px; height: 48px;
  background: rgba(99,102,241,0.08);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--brand);
}

/* ═══════════════════════════════════════════════════════
   Sections
   ═══════════════════════════════════════════════════════ */
.section { padding: var(--space-16) 0; }
.section-alt { background: var(--surface-0); }
.section-header { text-align: center; margin-bottom: var(--space-10); }
.section-title { font-size: var(--text-3xl); font-weight: 700; letter-spacing: -0.02em; margin-bottom: var(--space-3); }
.section-subtitle { font-size: var(--text-lg); color: var(--text-secondary); max-width: 500px; margin: 0 auto; }

/* ═══════════════════════════════════════════════════════
   Platform Cards
   ═══════════════════════════════════════════════════════ */
.platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-4);
  max-width: 1000px;
  margin: 0 auto;
}
.platform-card {
  background: var(--surface-0);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
  transition: all var(--duration) var(--ease);
  cursor: default;
}
.platform-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand);
}
.platform-card-icon { font-size: 1.5rem; color: var(--brand); margin-bottom: var(--space-2); }
.platform-card-name { font-size: var(--text-sm); font-weight: 600; margin-bottom: var(--space-1); }
.platform-card-size { font-size: var(--text-xs); color: var(--text-muted); font-family: var(--font-mono); }

/* ═══════════════════════════════════════════════════════
   Feature Cards
   ═══════════════════════════════════════════════════════ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-5);
  max-width: 1100px;
  margin: 0 auto;
}
.feature-card {
  background: var(--surface-0);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: all var(--duration) var(--ease);
}
.feature-card:hover { box-shadow: var(--shadow-md); border-color: var(--brand); }
.feature-card-icon {
  width: 44px; height: 44px;
  background: rgba(99,102,241,0.08);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--brand);
  margin-bottom: var(--space-4);
}
.feature-card h3 { font-size: var(--text-base); font-weight: 700; margin-bottom: var(--space-2); }
.feature-card p { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.7; }

/* ═══════════════════════════════════════════════════════
   Auth Pages
   ═══════════════════════════════════════════════════════ */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 140px);
  padding: var(--space-6);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface-0);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
}
.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-6);
}
.auth-title { font-size: var(--text-2xl); font-weight: 700; text-align: center; margin-bottom: var(--space-2); }
.auth-desc { font-size: var(--text-sm); color: var(--text-secondary); text-align: center; margin-bottom: var(--space-6); }
.auth-footer { text-align: center; margin-top: var(--space-6); font-size: var(--text-sm); color: var(--text-secondary); }

/* ═══════════════════════════════════════════════════════
   Dashboard
   ═══════════════════════════════════════════════════════ */
.dashboard { padding: var(--space-8) var(--space-6); max-width: 1100px; margin: 0 auto; }
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-8);
  gap: var(--space-4);
}
.dashboard-title { font-size: var(--text-2xl); font-weight: 700; letter-spacing: -0.02em; }
.dashboard-subtitle { font-size: var(--text-sm); color: var(--text-secondary); margin-top: var(--space-1); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}
.stat-card {
  background: var(--surface-0);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  transition: box-shadow var(--duration) var(--ease);
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.stat-icon-purple { background: rgba(99,102,241,0.1); color: var(--brand); }
.stat-icon-green { background: rgba(16,185,129,0.1); color: var(--success); }
.stat-icon-blue { background: rgba(59,130,246,0.1); color: #3b82f6; }
.stat-icon-orange { background: rgba(245,158,11,0.1); color: var(--warning); }
.stat-value { font-size: var(--text-2xl); font-weight: 700; display: block; line-height: 1; }
.stat-label { font-size: var(--text-xs); color: var(--text-muted); margin-top: var(--space-1); font-weight: 500; }

/* Project Cards */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-5);
}
.project-card {
  background: var(--surface-0);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--duration) var(--ease);
}
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.project-thumb {
  height: 170px;
  background: var(--surface-900);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.project-thumb img { width: 100%; height: 100%; object-fit: cover; }
.project-thumb-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: rgba(255,255,255,0.2);
}
.project-thumb-placeholder i { font-size: 2.5rem; }
.project-body { padding: var(--space-5); }
.project-name { font-size: var(--text-base); font-weight: 700; margin-bottom: var(--space-3); }
.project-meta {
  display: flex; gap: var(--space-4); flex-wrap: wrap;
  font-size: var(--text-xs); color: var(--text-muted); margin-bottom: var(--space-4);
}
.project-meta span { display: flex; align-items: center; gap: var(--space-1); }
.project-actions { display: flex; gap: var(--space-2); }

/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.data-table th {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid var(--border);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border-light); }
.data-table tr:hover td { background: var(--surface-50); }

/* Empty State */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-6);
}
.empty-state-icon {
  width: 64px; height: 64px;
  background: var(--surface-100);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--text-muted);
  margin: 0 auto var(--space-4);
}
.empty-state h3 { font-weight: 600; margin-bottom: var(--space-2); }
.empty-state p { color: var(--text-secondary); font-size: var(--text-sm); margin-bottom: var(--space-6); }

/* ═══════════════════════════════════════════════════════
   Editor
   ═══════════════════════════════════════════════════════ */
.editor-layout { display: flex; height: calc(100vh - 64px); overflow: hidden; }
.editor-sidebar {
  width: 380px; min-width: 380px;
  background: var(--surface-0);
  border-right: 1.5px solid var(--border);
  overflow-y: auto;
  padding: var(--space-5);
}
.editor-sidebar-title { font-size: var(--text-lg); font-weight: 700; margin-bottom: var(--space-5); }
.editor-section { margin-bottom: var(--space-6); padding-bottom: var(--space-6); border-bottom: 1px solid var(--border-light); }
.editor-section:last-child { border-bottom: none; }
.editor-section-title { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: var(--space-3); }

.editor-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.editor-preview {
  flex: 1;
  background: var(--surface-950);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.editor-preview video { max-width: 100%; max-height: 100%; }
.editor-preview-empty { text-align: center; color: rgba(255,255,255,0.25); }
.editor-preview-empty i { font-size: 3rem; margin-bottom: var(--space-3); display: block; }

.editor-timeline {
  height: 120px;
  background: var(--surface-0);
  border-top: 1.5px solid var(--border);
  padding: var(--space-3) var(--space-5);
  flex-shrink: 0;
}
.timeline-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-2); }
.timeline-label { font-size: var(--text-xs); font-weight: 600; color: var(--text-secondary); }
.timeline-time { font-size: var(--text-xs); color: var(--text-muted); font-family: var(--font-mono); }
.timeline-tracks {
  position: relative;
  height: 80px;
  background: var(--surface-50);
  border-radius: var(--radius-md);
  overflow-x: auto;
  overflow-y: hidden;
}
.timeline-bar {
  position: absolute;
  background: var(--brand-gradient);
  border-radius: 4px;
  height: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0 8px;
  transition: opacity var(--duration) var(--ease);
}
.timeline-bar:hover { opacity: 0.85; }
.timeline-bar-label { font-size: 10px; font-weight: 700; color: #fff; white-space: nowrap; }

/* Layer Card */
.layer-card {
  background: var(--surface-50);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  transition: border-color var(--duration) var(--ease);
}
.layer-card:hover { border-color: var(--brand); }
.layer-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}
.layer-card-title {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}
.layer-card-actions { display: flex; gap: 4px; }

/* ═══════════════════════════════════════════════════════
   Template Gallery
   ═══════════════════════════════════════════════════════ */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: var(--space-2);
}
.template-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  text-align: center;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  background: var(--surface-0);
}
.template-card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.template-card.active { border-color: var(--brand); background: rgba(99,102,241,0.04); }
.template-preview {
  height: 60px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}
.template-name { font-size: var(--text-xs); font-weight: 500; color: var(--text-secondary); }

/* ═══════════════════════════════════════════════════════
   Export Panel
   ═══════════════════════════════════════════════════════ */
.export-panel {
  background: var(--surface-50);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.export-options { display: flex; gap: var(--space-2); margin-bottom: var(--space-3); flex-wrap: wrap; }
.export-chip {
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  background: var(--surface-0);
  color: var(--text-secondary);
}
.export-chip:hover { border-color: var(--brand); color: var(--brand); }
.export-chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Progress */
.progress-bar { background: var(--surface-200); border-radius: var(--radius-full); height: 6px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--brand-gradient); border-radius: var(--radius-full); transition: width 0.3s var(--ease); width: 0%; }
.progress-fill.error { background: var(--danger); }

/* Toast */
.toast {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  background: var(--surface-900);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 9999;
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all 0.3s var(--ease);
  opacity: 0;
  transform: translateY(10px);
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ═══════════════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════════════ */
.footer {
  background: var(--surface-900);
  color: rgba(255,255,255,0.6);
  padding: var(--space-4) 0;
  text-align: center;
  font-size: var(--text-sm);
}
.footer a { color: rgba(255,255,255,0.8); }
.footer a:hover { color: #fff; }

/* ═══════════════════════════════════════════════════════
   Responsive — Tablet
   ═══════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .editor-layout { flex-direction: column; }
  .editor-sidebar { width: 100%; min-width: unset; max-height: 50vh; border-right: none; border-bottom: 1.5px solid var(--border); }
  .editor-main { height: 50vh; }
  .editor-timeline { height: 100px; }
  .timeline-tracks { height: 60px; }
  .timeline-bar { height: 22px; }
  .project-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

/* ═══════════════════════════════════════════════════════
   Responsive — Mobile
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .navbar-inner { height: 56px; padding: 0 var(--space-4); }
  .logo { font-size: var(--text-base); }
  .logo-icon { width: 30px; height: 30px; font-size: 0.9rem; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0; right: 0;
    background: var(--surface-0);
    border-bottom: 1px solid var(--border);
    padding: var(--space-4);
    gap: var(--space-1);
    box-shadow: var(--shadow-lg);
    z-index: 99;
  }
  .nav-links.open .nav-link { width: 100%; padding: var(--space-3); }
  .nav-user { display: none; }
  .nav-links.open .nav-user { display: flex; padding-top: var(--space-3); border-top: 1px solid var(--border); margin-top: var(--space-2); width: 100%; }

  .menu-toggle { display: flex; }

  .hero { padding: var(--space-10) 0; }
  .hero-title { font-size: 1.75rem; }
  .hero-subtitle { font-size: var(--text-base); }
  .hero-features { gap: var(--space-5); }
  .hero-feature-icon { width: 40px; height: 40px; font-size: 1rem; }

  .section { padding: var(--space-10) 0; }
  .section-title { font-size: var(--text-2xl); }
  
  .platforms-grid { grid-template-columns: repeat(3, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .project-grid { grid-template-columns: 1fr; }
  .template-grid { grid-template-columns: repeat(3, 1fr); }

  .dashboard { padding: var(--space-5) var(--space-4); }
  .dashboard-header { flex-direction: column; }
  .auth-card { padding: var(--space-6); margin: var(--space-4); }

  .editor-sidebar { padding: var(--space-4); max-height: 45vh; }
  .editor-timeline { padding: var(--space-2) var(--space-3); }
  .editor-section { margin-bottom: var(--space-4); padding-bottom: var(--space-4); }

  .form-row { flex-direction: column; gap: var(--space-2); }
}

/* ═══════════════════════════════════════════════════════
   Responsive — Small Mobile
   ═══════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .container { padding: 0 var(--space-4); }
  .hero { padding: var(--space-8) 0; }
  .hero-title { font-size: 1.5rem; }
  .hero-subtitle { font-size: var(--text-sm); }
  .platforms-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: var(--space-2); }
  .stat-card { padding: var(--space-3); gap: var(--space-3); }
  .stat-icon { width: 36px; height: 36px; }
  .stat-value { font-size: var(--text-lg); }
  .template-grid { grid-template-columns: repeat(2, 1fr); }
  .export-options { gap: 4px; }
  .export-chip { padding: 5px 10px; font-size: 11px; }
}

/* ═══════════════════════════════════════════════════════
   Animations
   ═══════════════════════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.animate-in { animation: fadeInUp 0.4s var(--ease-out) forwards; }
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }

/* ═══════════════════════════════════════════════════════
   Scrollbar
   ═══════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ═══════════════════════════════════════════════════════
   Utilities
   ═══════════════════════════════════════════════════════ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.font-mono { font-family: var(--font-mono); }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
