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

:root, [data-theme="dark"] {
  --nb-black: var(--fg);
  --nb-bg: var(--bg);
  --nb-white: var(--surface);
  --nb-yellow: var(--yellow);
  --nb-red: var(--red);
  --nb-green: var(--green);
  --nb-blue: var(--blue);
  --nb-pink: var(--pink);
  --nb-purple: var(--purple);
  --nb-orange: var(--orange);
  --nb-border: var(--border);
  --nb-shadow: var(--shadow);
  --nb-shadow-sm: var(--shadow-sm);
  --nb-border-color: var(--fg);
  --nb-shadow-color: var(--fg);
  --nb-muted: var(--fg-muted);
  --nb-sidebar-bg: var(--surface);
  --nb-sidebar-text: var(--fg);
  --nb-sidebar-hover-bg: var(--fg);
  --nb-sidebar-hover-text: var(--bg);
}

:root {
  --bg: #f8f9fa;
  --surface: #ffffff;
  --fg: #1a1a2e;
  --fg-muted: #6b7280;
  --accent: #4f46e5;
  --accent-dark: #4338ca;
  --red: #ef4444;
  --green: #10b981;
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --pink: #ec4899;
  --yellow: #f59e0b;
  --orange: #f97316;
  --border-w: 1px;
  --border: var(--border-w) solid #e5e7eb;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-xs: 0 1px 1px 0 rgba(0, 0, 0, 0.04);
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Space Mono', monospace;
  --nav-hover: #f3f4f6;
  --nav-hover-text: var(--fg);
}

[data-theme="dark"] {
  --bg: #0f172a;
  --surface: #1e293b;
  --fg: #e2e8f0;
  --fg-muted: #94a3b8;
  --accent: #818cf8;
  --accent-dark: #6366f1;
  --red: #f87171;
  --green: #34d399;
  --blue: #60a5fa;
  --purple: #a78bfa;
  --pink: #f472b6;
  --yellow: #fbbf24;
  --orange: #fb923c;
  --border: var(--border-w) solid #334155;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  --shadow-xs: 0 1px 1px 0 rgba(0, 0, 0, 0.15);
  --nav-hover: #334155;
  --nav-hover-text: var(--fg);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  transition: background 0.2s, color 0.2s;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== LAYOUT ===== */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--surface);
  border-right: var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  transition: background 0.2s;
}

.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: var(--border);
}

.sidebar-brand h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--fg);
}

.sidebar-brand h1 i { color: var(--accent); }

.sidebar-brand p {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  margin: 6px 0 0;
  opacity: 0.5;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--fg-muted);
}

.sidebar-nav {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fg-muted);
  text-decoration: none;
  border: var(--border-w) solid transparent;
  margin-bottom: 2px;
  transition: all 0.15s ease;
  border-radius: var(--radius-sm);
}

.nav-link i {
  width: 20px;
  text-align: center;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

.nav-link:hover {
  background: var(--nav-hover);
  color: var(--nav-hover-text);
  border-color: transparent;
}

.nav-link:hover i { color: var(--accent); }

.nav-link.active {
  background: var(--fg);
  color: var(--bg);
  border-color: transparent;
}

.nav-link.active i { color: var(--bg); }

.sidebar-footer {
  padding: 16px 20px;
  border-top: var(--border);
}

.sidebar-footer .nav-link { font-size: 0.75rem; }

.sidebar-footer .powered {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  margin-top: 10px;
  opacity: 0.4;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--fg-muted);
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fg-muted);
  background: none;
  border: var(--border-w) solid transparent;
  cursor: pointer;
  width: 100%;
  font-family: var(--font);
  transition: all 0.15s ease;
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
}

.theme-toggle:hover {
  background: var(--nav-hover);
  color: var(--nav-hover-text);
  border-color: transparent;
}

.theme-toggle i {
  width: 20px;
  text-align: center;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

.theme-toggle:hover i { color: var(--accent); }

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: auto;
  min-width: 0;
}

.top-header {
  background: var(--surface);
  border-bottom: var(--border);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 10;
  transition: background 0.2s;
}

.top-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

.content-area {
  padding: 32px;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

/* ===== CARDS ===== */
.nb-card {
  background: var(--surface);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 20px;
  transition: background 0.2s, box-shadow 0.2s;
  border-radius: var(--radius);
}

.nb-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.nb-card-header h3 {
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== BUTTONS ===== */
.nb-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.01em;
  border: var(--border-w) solid transparent;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  line-height: 1.4;
  border-radius: var(--radius-sm);
}

.nb-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.nb-btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.nb-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: var(--shadow-sm) !important;
}

.nb-btn-red { background: var(--red); color: #fff; border-color: var(--red); }
.nb-btn-green { background: var(--green); color: #fff; border-color: var(--green); }
.nb-btn-blue { background: var(--blue); color: #fff; border-color: var(--blue); }
.nb-btn-purple { background: var(--purple); color: #fff; border-color: var(--purple); }
.nb-btn-pink { background: var(--pink); color: #fff; border-color: var(--pink); }
.nb-btn-orange { background: var(--orange); color: #fff; border-color: var(--orange); }
.nb-btn-yellow { background: var(--yellow); color: var(--fg); border-color: var(--yellow); }
.nb-btn-black { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.nb-btn-white { background: var(--surface); color: var(--fg); border-color: var(--border); }
.nb-btn-gray { background: #f3f4f6; color: var(--fg); border-color: #e5e7eb; }

.nb-btn-sm {
  padding: 6px 14px;
  font-size: 0.7rem;
}

/* ===== FORM ELEMENTS ===== */
.nb-input, .nb-select, .nb-textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--bg);
  border: var(--border);
  box-shadow: var(--shadow-xs);
  color: var(--fg);
  outline: none;
  transition: all 0.15s ease;
  border-radius: var(--radius-sm);
}

.nb-input:focus, .nb-select:focus, .nb-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.nb-input::placeholder, .nb-textarea::placeholder {
  color: var(--fg-muted);
  font-weight: 400;
}

.nb-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  color: var(--fg-muted);
}

.nb-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%236b7280' d='M7 10L1 3h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

/* ===== GRID ===== */
.nb-grid-4, .nb-grid-3, .nb-grid-2 {
  display: grid;
  gap: 16px;
}
.nb-grid-4 { grid-template-columns: repeat(4, 1fr); }
.nb-grid-3 { grid-template-columns: repeat(3, 1fr); }
.nb-grid-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 1024px) {
  .nb-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .nb-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .nb-grid-4, .nb-grid-3, .nb-grid-2 { grid-template-columns: 1fr; }
  .sidebar { width: 64px; }
  .sidebar-brand h1 span, .sidebar-brand p, .nav-link span, .sidebar-footer .powered { display: none; }
  .sidebar-brand h1 { justify-content: center; }
  .sidebar-nav { padding: 8px; }
  .nav-link { justify-content: center; padding: 10px; }
  .nav-link i { width: auto; font-size: 1.2rem; }
  .content-area { padding: 16px; }
}

/* ===== STAT CARDS ===== */
.stat-card {
  background: var(--surface);
  border: var(--border);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.15s ease;
  border-radius: var(--radius);
}

.stat-card:nth-child(1) { border-left: 3px solid var(--red); }
.stat-card:nth-child(2) { border-left: 3px solid var(--purple); }
.stat-card:nth-child(3) { border-left: 3px solid var(--green); }
.stat-card:nth-child(4) { border-left: 3px solid var(--orange); }

.stat-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
}

.stat-icon.red { background: rgba(239, 68, 68, 0.1); color: var(--red); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.1); color: var(--purple); }
.stat-icon.green { background: rgba(16, 185, 129, 0.1); color: var(--green); }
.stat-icon.orange { background: rgba(249, 115, 22, 0.1); color: var(--orange); }

.stat-info p:first-child {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 2px;
  opacity: 0.6;
  font-family: var(--font-mono);
}

.stat-info p:last-child {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0;
}

/* ===== HERO CARDS ===== */
.hero-card {
  display: block;
  padding: 24px;
  text-decoration: none;
  color: var(--fg);
  transition: all 0.15s ease;
  border-radius: var(--radius);
}

.hero-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.hero-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 12px 0 6px;
  text-transform: none;
  letter-spacing: -0.01em;
}

.hero-card p {
  font-size: 0.78rem;
  margin: 0;
  opacity: 0.7;
  font-weight: 500;
}

.hero-card i { font-size: 2rem; }

/* ===== STEP TABS ===== */
.step-tabs {
  display: flex;
  align-items: center;
  gap: 0;
}

.step-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.01em;
  background: var(--bg);
  border: var(--border);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font);
  color: var(--fg-muted);
  border-radius: var(--radius-sm);
}

.step-tab.active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.step-tab .step-num {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--fg-muted);
  color: var(--bg);
  flex-shrink: 0;
  border-radius: 50%;
}

.step-tab.active .step-num {
  background: var(--accent);
  color: #fff;
}

.step-check {
  font-size: 0.8rem;
  color: var(--green);
  font-weight: 700;
  line-height: 1;
}

.step-divider {
  width: 24px;
  height: 2px;
  background: var(--border);
  flex-shrink: 0;
}

/* ===== RESULT PANELS ===== */
.result-panel {
  background: var(--surface);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 20px;
  transition: background 0.2s;
  border-radius: var(--radius);
}

.result-panel .panel-actions {
  display: flex;
  gap: 8px;
}

.result-content {
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.7;
  max-height: 600px;
  overflow-y: auto;
}

.result-content h1 { font-size: 1.25rem; font-weight: 700; margin: 1em 0 0.5em; }
.result-content h2 { font-size: 1.1rem; font-weight: 700; margin: 1em 0 0.5em; border-bottom: var(--border); padding-bottom: 6px; }
.result-content h3 { font-size: 1rem; font-weight: 600; margin: 1em 0 0.5em; }
.result-content p { margin: 0.5em 0; }
.result-content strong { color: var(--fg); background: rgba(79, 70, 229, 0.1); color: var(--accent); padding: 0 6px; border-radius: 2px; }
.result-content ul, .result-content ol { padding-left: 1.5em; margin: 0.5em 0; }
.result-content li { margin: 0.25em 0; }
.result-content code { background: var(--bg); padding: 2px 6px; font-family: var(--font-mono); font-size: 0.85rem; border: var(--border); border-radius: var(--radius-sm); }
.result-content pre { background: var(--bg); border: var(--border); padding: 16px; overflow-x: auto; border-radius: var(--radius); }
.result-content pre code { border: none; background: none; }

/* ===== PROJECT CARD ===== */
.project-card {
  background: var(--surface);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  transition: all 0.15s ease;
  border-radius: var(--radius);
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.project-card .project-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 0 4px;
  text-transform: none;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card .project-idea {
  font-size: 0.72rem;
  opacity: 0.6;
  margin: 0 0 12px;
  font-weight: 500;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: var(--border-w) solid transparent;
  border-radius: 9999px;
}

.status-badge.completed { background: rgba(16, 185, 129, 0.1); color: var(--green); }
.status-badge.draft { background: rgba(245, 158, 11, 0.1); color: var(--yellow); }

.tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: var(--border-w) solid transparent;
  border-radius: 9999px;
  margin: 0 4px 4px 0;
  background: var(--bg);
}

/* ===== IDEA CARD ===== */
.idea-card {
  background: var(--surface);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 12px;
  border-radius: var(--radius);
}

.idea-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.idea-card .idea-title {
  font-size: 0.82rem;
  font-weight: 700;
  margin: 0;
  text-transform: none;
  letter-spacing: -0.01em;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal-box {
  background: var(--surface);
  border: var(--border);
  box-shadow: var(--shadow);
  max-width: 600px;
  width: calc(100% - 32px);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: var(--border);
}

.modal-header h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0;
  text-transform: none;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--fg);
  border: var(--border);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: var(--fg);
  color: var(--bg);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  font-size: 0.85rem;
  line-height: 1.7;
}

.modal-footer {
  display: flex;
  gap: 8px;
  padding: 16px 24px;
  border-top: var(--border);
}

.modal-tags {
  padding: 12px 24px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ===== LOADING ===== */
.loading-state {
  text-align: center;
  padding: 48px 24px;
}

.loading-state i {
  font-size: 2rem;
  color: var(--accent);
}

.loading-state p {
  font-weight: 600;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--fg-muted);
}

.empty-state {
  text-align: center;
  padding: 56px 24px;
}

.empty-state i {
  font-size: 2.5rem;
  color: var(--fg-muted);
  opacity: 0.3;
}

.empty-state p {
  font-weight: 600;
  margin-top: 12px;
  font-size: 0.9rem;
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}

.page-info {
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0 16px;
  font-family: var(--font-mono);
  color: var(--fg-muted);
}

/* ===== AI LOADING ===== */
.ai-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.ai-loading-box {
  background: var(--surface);
  border: var(--border);
  box-shadow: var(--shadow);
  padding: 40px;
  text-align: center;
  max-width: 320px;
  border-radius: var(--radius-lg);
}

.ai-loading-box i {
  font-size: 2.5rem;
  color: var(--accent);
}

.ai-loading-box p {
  font-weight: 600;
  margin-top: 12px;
  font-size: 0.85rem;
}

.ai-loading-box .note {
  font-size: 0.7rem;
  opacity: 0.5;
  font-weight: 400;
  color: var(--fg-muted);
}

/* ===== TABS ===== */
.tab-btn {
  flex: 1;
  padding: 12px 20px;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.01em;
  border: var(--border);
  cursor: pointer;
  transition: all 0.15s ease;
  background: var(--bg);
  color: var(--fg-muted);
  border-radius: var(--radius-sm);
}

.tab-btn.active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

/* ===== VIDEO CARD ===== */
.video-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: var(--border);
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
}

.video-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-xs);
}

.video-card.selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.video-card .video-info { flex: 1; min-width: 0; }

.video-card .video-info h4 {
  font-size: 0.78rem;
  font-weight: 600;
  margin: 0 0 4px;
  text-transform: none;
  letter-spacing: -0.01em;
}

.video-card .video-info p {
  font-size: 0.68rem;
  margin: 0;
  opacity: 0.6;
}

/* ===== QUICK STEP ===== */
.quick-step {
  background: var(--bg);
  border: var(--border);
  padding: 20px;
  border-radius: var(--radius);
}

.quick-step h4 {
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0 0 8px;
  text-transform: none;
}

.quick-step h4 i { margin-right: 8px; }

.quick-step ol {
  margin: 0;
  padding-left: 24px;
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.7;
}

.quick-step ol li { margin: 4px 0; }

/* ===== DRAMA CARD ===== */
.drama-card {
  background: var(--surface);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  transition: all 0.15s ease;
  border-radius: var(--radius);
}

.drama-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* ===== API STATUS ===== */
.api-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

.api-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--border);
}

.api-dot.online { background: var(--green); border-color: var(--green); }
.api-dot.offline { background: var(--red); border-color: var(--red); }
.api-dot.checking { background: var(--fg-muted); animation: pulse-dot 1s infinite; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ===== TYPE TABS ===== */
.type-tab { transition: all 0.15s ease; }
.type-tab.active {
  background: var(--fg) !important;
  color: var(--bg) !important;
  border-color: var(--fg) !important;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ===== DARK MODE OVERRIDES ===== */
[data-theme="dark"] .nb-input,
[data-theme="dark"] .nb-select,
[data-theme="dark"] .nb-textarea {
  background: #0f172a;
}

[data-theme="dark"] .nb-input::placeholder,
[data-theme="dark"] .nb-textarea::placeholder { color: #64748b; }

[data-theme="dark"] .result-content strong {
  background: rgba(129, 140, 248, 0.15);
  color: var(--accent);
}

[data-theme="dark"] .result-content code { background: #0f172a; }
[data-theme="dark"] .result-content pre { background: #0f172a; }
[data-theme="dark"] .top-header { background: #1e293b; }
[data-theme="dark"] .sidebar { background: #1e293b; }
[data-theme="dark"] .nb-btn-white { background: #334155; color: var(--fg); }
[data-theme="dark"] .nb-btn-gray { background: #1e293b; color: var(--fg); }
[data-theme="dark"] .tag { background: #0f172a; }
[data-theme="dark"] .empty-state i { color: #334155; }
[data-theme="dark"] .loading-state i { color: #334155; }
[data-theme="dark"] .page-info { color: var(--fg-muted); }
[data-theme="dark"] .step-tab { background: #0f172a; color: var(--fg-muted); }
[data-theme="dark"] .tab-btn { background: #0f172a; color: var(--fg-muted); }
[data-theme="dark"] .video-card { background: #1e293b; }
[data-theme="dark"] .video-card.selected { background: var(--accent); color: #fff; }
[data-theme="dark"] .stat-card { background: #1e293b; }
[data-theme="dark"] .project-card { background: #1e293b; }
[data-theme="dark"] .idea-card { background: #1e293b; }
[data-theme="dark"] .drama-card { background: #1e293b; }
[data-theme="dark"] .quick-step { background: #0f172a; }
[data-theme="dark"] .ai-loading-box { background: #1e293b; }
[data-theme="dark"] .modal-box { background: #1e293b; }
[data-theme="dark"] .modal-close { background: #0f172a; color: var(--fg); }
[data-theme="dark"] .modal-close:hover { background: var(--fg); color: var(--bg); }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #475569; }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* ===== UTILITY ===== */
.flex { display: flex; }
.flex-1 { flex: 1; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.text-center { text-align: center; }
.hidden { display: none; }
.w-full { width: 100%; }
.flex-shrink-0 { flex-shrink: 0; }
.min-w-0 { min-width: 0; }
.overflow-y-auto { overflow-y: auto; }
.space-y-3 > * + * { margin-top: 12px; }
.space-y-4 > * + * { margin-top: 16px; }
.space-y-6 > * + * { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mr-1 { margin-right: 4px; }
.mr-2 { margin-right: 8px; }
.ml-1 { margin-left: 4px; }
.ml-2 { margin-left: 8px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.pr-1 { padding-right: 4px; }
.flex-wrap { flex-wrap: wrap; }
.font-semibold { font-weight: 600; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.85rem; }
