/* ═══════════════════════════════════════════════════════════
   AutoShorts — Premium Dark Design System
   ═══════════════════════════════════════════════════════════ */

/* ── CSS Variables / Design Tokens ────────────────────────── */
:root {
  /* Base palette */
  --bg-deep:       #06080f;
  --bg-surface:    #0c1017;
  --bg-card:       #111827;
  --bg-card-hover: #1a2332;
  --bg-input:      #0f1520;

  /* Accent palette */
  --accent:        #7c3aed;
  --accent-light:  #a78bfa;
  --accent-dark:   #5b21b6;
  --accent-glow:   rgba(124, 58, 237, 0.35);

  /* Secondary accents */
  --cyan:          #06b6d4;
  --emerald:       #10b981;
  --amber:         #f59e0b;
  --rose:          #f43f5e;
  --sky:           #0ea5e9;

  /* Text */
  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
  --text-inverse:   #0f172a;

  /* Borders */
  --border:        rgba(148, 163, 184, 0.08);
  --border-hover:  rgba(148, 163, 184, 0.15);
  --border-accent: rgba(124, 58, 237, 0.3);

  /* Glass */
  --glass-bg:      rgba(17, 24, 39, 0.75);
  --glass-border:  rgba(148, 163, 184, 0.1);
  --glass-blur:    16px;

  /* Shadows */
  --shadow-sm:     0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md:     0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg:     0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow:   0 0 20px var(--accent-glow);

  /* Sizing */
  --sidebar-width: 240px;
  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;
  --radius-xl:     20px;

  /* Transitions */
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --duration:      0.25s;

  /* Fonts */
  --font-body:     'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading:  'Space Grotesk', 'Inter', sans-serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Background gradient mesh */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(124, 58, 237, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 80% 90%, rgba(6, 182, 212, 0.06), transparent),
    radial-gradient(ellipse 50% 50% at 50% 50%, rgba(16, 185, 129, 0.03), transparent);
  pointer-events: none;
  z-index: 0;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 600; line-height: 1.2; }
h1 { font-size: 1.875rem; letter-spacing: -0.02em; }
h2 { font-size: 1.375rem; letter-spacing: -0.01em; }
h3 { font-size: 1.125rem; }
p  { color: var(--text-secondary); }

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  left: 0; top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  padding: 1.25rem 0.75rem;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem 1.5rem;
}

.brand-icon {
  font-size: 1.5rem;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glow);
}

.brand-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--duration) var(--ease-out);
  position: relative;
}

.nav-link:hover {
  background: rgba(124, 58, 237, 0.08);
  color: var(--text-primary);
}

.nav-link.active {
  background: rgba(124, 58, 237, 0.12);
  color: var(--accent-light);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: -0.75rem;
  top: 50%; transform: translateY(-50%);
  width: 3px; height: 24px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.nav-icon { width: 20px; height: 20px; flex-shrink: 0; }

.sidebar-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.status-indicator { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; }
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.online  { background: var(--emerald); box-shadow: 0 0 6px rgba(16, 185, 129, 0.5); }
.status-dot.offline { background: var(--rose); box-shadow: 0 0 6px rgba(244, 63, 94, 0.5); }
.status-text { font-size: 0.75rem; color: var(--text-muted); }

/* ── Main Content ─────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* ── Top Header ───────────────────────────────────────────── */
.top-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2.5rem;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  margin-bottom: 2rem;
}

.header-left .page-title {
  font-size: 1.25rem;
  margin: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.user-profile .avatar {
  width: 36px; height: 36px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.page { 
  padding: 0 2.5rem 2rem;
  animation: fadeIn 0.3s var(--ease-out); 
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.page-header { margin-bottom: 2rem; }
.page-header h1 { margin-bottom: 0.25rem; }
.page-subtitle { font-size: 0.9rem; }

/* ── Glass Card ───────────────────────────────────────────── */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: border-color var(--duration), box-shadow var(--duration);
}

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

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--duration) var(--ease-out);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.4;
}

.btn-icon { width: 16px; height: 16px; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  box-shadow: 0 2px 8px var(--accent-glow);
}
.btn-primary:hover {
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-glow {
  animation: pulseGlow 2s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 2px 8px var(--accent-glow); }
  50% { box-shadow: 0 4px 24px var(--accent-glow), 0 0 40px rgba(124, 58, 237, 0.15); }
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--border-hover); }

.btn-accent {
  background: linear-gradient(135deg, var(--cyan), #0891b2);
  color: white;
}
.btn-accent:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(6, 182, 212, 0.3); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { background: rgba(148, 163, 184, 0.08); color: var(--text-primary); }

.btn-danger {
  background: rgba(244, 63, 94, 0.12);
  color: var(--rose);
  border: 1px solid rgba(244, 63, 94, 0.2);
}
.btn-danger:hover { background: rgba(244, 63, 94, 0.2); }

.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8rem; }

.btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ── Inputs ───────────────────────────────────────────────── */
.text-input,
.select-input,
.prompt-textarea {
  width: 100%;
  padding: 0.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--duration);
}

select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.text-input:focus, .select-input:focus, .prompt-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.prompt-container { margin-bottom: 1.5rem; }

.prompt-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

.prompt-textarea::placeholder { color: var(--text-muted); }

.prompt-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* ── Progress Panel ───────────────────────────────────────── */
.progress-panel { margin-bottom: 1.5rem; }
.progress-panel h2 { margin-bottom: 1.25rem; }

.progress-steps {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  transition: all var(--duration);
}

.progress-step .step-icon {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.progress-step.pending  .step-icon { background: var(--bg-card); color: var(--text-muted); }
.progress-step.active   .step-icon { background: var(--accent); color: white; animation: spin 1s linear infinite; }
.progress-step.done     .step-icon { background: var(--emerald); color: white; }
.progress-step.error    .step-icon { background: var(--rose); color: white; }

.progress-step .step-label { flex: 1; color: var(--text-secondary); }
.progress-step.active .step-label { color: var(--text-primary); font-weight: 500; }
.progress-step.done   .step-label { color: var(--emerald); }

.progress-step .step-time { font-size: 0.75rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

@keyframes spin { to { transform: rotate(360deg); } }

.progress-bar-container {
  height: 4px;
  background: var(--bg-card);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  border-radius: 2px;
  transition: width 0.3s var(--ease-out);
}

.progress-text { font-size: 0.8rem; color: var(--text-muted); }

/* ── Preview Panel ────────────────────────────────────────── */
.preview-panel { margin-bottom: 1.5rem; }

.preview-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.preview-video-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  aspect-ratio: 9/16;
}

.preview-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.preview-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.category-badge, .duration-badge, .scenes-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.category-badge { background: rgba(124, 58, 237, 0.15); color: var(--accent-light); }
.duration-badge { background: rgba(6, 182, 212, 0.15); color: var(--cyan); }
.scenes-badge   { background: rgba(16, 185, 129, 0.15); color: var(--emerald); }

.preview-info { display: flex; flex-direction: column; gap: 0.75rem; }

.preview-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* ── Topics Panel ─────────────────────────────────────────── */
.topics-panel { margin-bottom: 1.5rem; }
.topics-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: 0.75rem; }
.topics-controls { display: flex; gap: 0.5rem; align-items: center; }
.topics-controls .select-input { width: auto; min-width: 150px; }

.topics-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.topic-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--duration);
}

.topic-card:hover { border-color: var(--border-accent); background: var(--bg-card-hover); }

.topic-rank {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--amber);
  width: 28px;
  flex-shrink: 0;
  text-align: center;
}

.topic-content { flex: 1; }
.topic-title { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.25rem; }
.topic-sources { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.topic-hook { font-size: 0.85rem; color: var(--cyan); font-style: italic; }

.topic-action { flex-shrink: 0; }

/* ── Category Tabs ────────────────────────────────────────── */
.category-tabs, .schedule-filters {
  display: flex;
  gap: 0.375rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar, .schedule-filters::-webkit-scrollbar { display: none; }

.tab-btn {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--duration);
}

.tab-btn:hover { background: rgba(148, 163, 184, 0.06); color: var(--text-primary); }
.tab-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ── Video Grid ───────────────────────────────────────────── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--duration);
  cursor: pointer;
}

.video-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.video-thumb {
  aspect-ratio: 9/16;
  background: var(--bg-deep);
  position: relative;
  overflow: hidden;
}

.video-thumb img { width: 100%; height: 100%; object-fit: cover; }

.video-thumb .thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--duration);
}

.video-card:hover .thumb-overlay { opacity: 1; }

.thumb-play {
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 1.25rem;
}

.video-card-info { padding: 0.75rem; }
.video-card-title {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.video-status {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
}

.video-status.ready    { background: rgba(14, 165, 233, 0.12); color: var(--sky); }
.video-status.scheduled { background: rgba(245, 158, 11, 0.12); color: var(--amber); }
.video-status.uploaded  { background: rgba(16, 185, 129, 0.12); color: var(--emerald); }
.video-status.failed    { background: rgba(244, 63, 94, 0.12); color: var(--rose); }

.video-card-actions {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--border);
}

.video-card-actions .btn { flex: 1; justify-content: center; font-size: 0.7rem; padding: 0.3rem 0.4rem; }

/* ── Channels & Categories Layout ─────────────────────────── */
.channels-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration);
}

.category-item:hover, .category-item.active {
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.05);
}

.category-item-name { font-weight: 500; font-size: 0.9rem; }
.category-item-status { font-size: 0.75rem; color: var(--text-muted); }
.category-item-status.connected { color: var(--emerald); }

.google-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: white;
  color: #3c4043;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  border: 1px solid #dadce0;
  transition: background 0.2s;
  text-decoration: none;
}
.google-btn:hover { background: #f8f9fa; }
.google-icon { width: 18px; height: 18px; }

.channel-connected-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
}

/* ── Schedule List ────────────────────────────────────────── */
.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.schedule-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--duration);
}

.schedule-item:hover { border-color: var(--border-hover); }

.schedule-thumb {
  width: 48px; height: 85px;
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  overflow: hidden;
  flex-shrink: 0;
}
.schedule-thumb img { width: 100%; height: 100%; object-fit: cover; }

.schedule-info { flex: 1; }
.schedule-title { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.125rem; }
.schedule-channel { font-size: 0.75rem; color: var(--text-muted); }
.schedule-time {
  font-size: 0.85rem;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}
.schedule-ai-badge {
  font-size: 0.65rem;
  background: rgba(124, 58, 237, 0.15);
  color: var(--accent-light);
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  margin-left: 0.5rem;
}

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
  grid-column: 1 / -1;
}

.empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.6; }
.empty-state h3 { margin-bottom: 0.375rem; color: var(--text-secondary); }
.empty-state p { font-size: 0.85rem; margin-bottom: 1.25rem; }

/* ── Modal ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s;
}

.modal {
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  animation: modalSlide 0.3s var(--ease-out);
}

@keyframes modalSlide { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: none; } }

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.modal-body { margin-bottom: 1.25rem; }
.modal-body label { display: block; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.375rem; font-weight: 500; }
.modal-body .text-input, .modal-body .select-input { margin-bottom: 0.875rem; }
.modal-footer { display: flex; gap: 0.5rem; justify-content: flex-end; }

/* ── Toasts ───────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  pointer-events: all;
  animation: toastIn 0.3s var(--ease-out);
  max-width: 360px;
}

.toast.success { border-color: rgba(16, 185, 129, 0.3); }
.toast.error   { border-color: rgba(244, 63, 94, 0.3); }
.toast.info    { border-color: rgba(6, 182, 212, 0.3); }

@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }

  .sidebar {
    width: 100%;
    height: auto;
    position: fixed;
    bottom: 0; top: auto; left: 0;
    flex-direction: row;
    padding: 0;
    border-right: none;
    border-top: 1px solid var(--border);
    z-index: 200;
  }

  .sidebar-brand, .sidebar-footer { display: none; }

  .sidebar-nav {
    flex-direction: row;
    width: 100%;
    justify-content: space-around;
    padding: 0.5rem 0;
    gap: 0;
  }

  .nav-link { flex-direction: column; gap: 0.25rem; padding: 0.5rem 0.75rem; font-size: 0.7rem; }
  .nav-link.active::before { display: none; }
  .nav-link span { font-size: 0.65rem; }
  .nav-icon { width: 18px; height: 18px; }

  .main-content { margin-left: 0; padding: 1rem 1rem 5rem; }

  .preview-layout { grid-template-columns: 1fr; }
  .preview-video-wrap { max-width: 200px; margin: 0 auto; }

  .video-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .channels-grid { grid-template-columns: 1fr; }
}

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

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

/* ── Loading spinner ──────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
