/* ═══ NEXUS — Global Design System ═══════════════════════════════════════ */

:root {
  --primary: #7c3aed;
  --primary-light: #9d5cf0;
  --primary-dark: #5b21b6;
  --accent: #06b6d4;
  --accent-light: #22d3ee;
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;

  --bg: #05070f;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --bg-input: rgba(255,255,255,0.06);
  --bg-sidebar: rgba(0,0,0,0.5);

  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.16);
  --border-focus: var(--primary);

  --text: #e2e8f0;
  --text-muted: rgba(226,232,240,0.5);
  --text-dim: rgba(226,232,240,0.3);

  --font: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 24px rgba(124,58,237,0.3);
  --shadow-glow-accent: 0 0 24px rgba(6,182,212,0.25);

  --sidebar-width: 220px;
  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}

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

html, body {
  width: 100%; height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── Particle Canvas ─────────────────────────────────────────────────── */

#particles-bg {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
}

/* ─── App Layout ──────────────────────────────────────────────────────── */

#app {
  display: flex;
  width: 100vw; height: 100vh;
  position: relative; z-index: 1;
}

/* ─── Sidebar ─────────────────────────────────────────────────────────── */

#sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--bg-sidebar);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  z-index: 100;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 24px;
  border-bottom: 1px solid var(--border);
}

.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-glow);
}

.logo-text {
  font-size: 15px; font-weight: 700;
  letter-spacing: 0.15em;
  background: linear-gradient(90deg, var(--text), var(--text-muted));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

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

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px; font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
}

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

.nav-item.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(124,58,237,0.2), rgba(6,182,212,0.1));
  border: 1px solid rgba(124,58,237,0.3);
}

.nav-icon { font-size: 16px; width: 20px; text-align: center; }

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

.api-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-muted);
}

.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-dim);
  transition: background 0.3s;
}
.status-dot.online { background: var(--success); box-shadow: 0 0 8px var(--success); }
.status-dot.error { background: var(--danger); }

/* ─── Main Content ────────────────────────────────────────────────────── */

#main-content {
  flex: 1; overflow: hidden;
  display: flex; flex-direction: column;
}

#view-container {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 32px;
}

/* ─── Loading Screen ─────────────────────────────────────────────────── */

.loading-screen {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 60vh; gap: 24px; color: var(--text-muted);
}

.loading-orb {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  animation: pulse-orb 1.5s ease-in-out infinite;
  box-shadow: var(--shadow-glow);
}

@keyframes pulse-orb {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

/* ─── View Headers ────────────────────────────────────────────────────── */

.view-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px;
}

.view-title {
  font-size: 24px; font-weight: 700;
}

.view-subtitle {
  font-size: 14px; color: var(--text-muted); margin-top: 4px;
}

/* ─── Buttons ─────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  cursor: pointer; border: none;
  transition: all var(--transition);
  text-decoration: none; font-family: var(--font);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 4px 16px rgba(124,58,237,0.4);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(124,58,237,0.5);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #0a0a0f;
  font-weight: 600;
}
.btn-accent:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(6,182,212,0.4); }

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

.btn-danger {
  background: rgba(239,68,68,0.15);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ─── Cards ───────────────────────────────────────────────────────────── */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all var(--transition);
}

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

.card-glow:hover {
  box-shadow: var(--shadow-glow);
  border-color: rgba(124,58,237,0.4);
}

/* ─── Form Elements ───────────────────────────────────────────────────── */

.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 12px; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 14px;
  transition: border-color var(--transition);
  outline: none;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}

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

.form-select option { background: #1a1a2e; }

/* ─── Dashboard Grid ─────────────────────────────────────────────────── */

.presentations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.presentation-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  display: flex; flex-direction: column;
}

.presentation-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124,58,237,0.4);
  box-shadow: var(--shadow-glow), var(--shadow-lg);
}

.presentation-card-preview {
  height: 160px;
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(6,182,212,0.1));
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}

.presentation-card-preview iframe {
  width: 300%; height: 300%;
  transform: scale(0.333);
  transform-origin: top left;
  border: none;
  pointer-events: none;
}

.presentation-card-preview-placeholder {
  font-size: 48px; opacity: 0.3;
}

.slide-count-badge {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
  color: var(--text-muted); font-size: 11px;
  padding: 3px 8px; border-radius: 4px;
  border: 1px solid var(--border);
}

.presentation-card-body {
  padding: 16px;
  flex: 1; display: flex; flex-direction: column;
}

.presentation-card-title {
  font-size: 15px; font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.presentation-card-meta {
  font-size: 12px; color: var(--text-muted);
  margin-bottom: 12px;
}

.presentation-card-actions {
  display: flex; gap: 8px; margin-top: auto;
}

.new-presentation-card {
  border: 2px dashed var(--border);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; color: var(--text-muted);
  min-height: 220px; cursor: pointer;
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.new-presentation-card:hover {
  border-color: var(--primary);
  color: var(--text);
  background: rgba(124,58,237,0.05);
}

.new-card-icon { font-size: 32px; opacity: 0.5; }

/* ─── Studio Layout ──────────────────────────────────────────────────── */

.studio-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 20px;
  height: calc(100vh - 64px);
}

.studio-sidebar {
  display: flex; flex-direction: column;
  gap: 16px; overflow-y: auto;
}

.studio-preview {
  display: flex; flex-direction: column;
  gap: 12px; min-height: 0;
}

.preview-frame-container {
  flex: 1;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
  min-height: 400px;
}

.preview-frame-container iframe {
  width: 100%; height: 100%;
  border: none;
}

.preview-placeholder {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  height: 100%; gap: 16px;
  color: var(--text-dim);
}

.preview-placeholder-icon { font-size: 48px; opacity: 0.3; }

/* ─── Chat Interface ─────────────────────────────────────────────────── */

.chat-container {
  display: flex; flex-direction: column;
  gap: 12px; flex: 1;
}

.chat-messages {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
  max-height: 300px;
  padding: 4px;
}

.chat-message {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px; line-height: 1.5;
  animation: msg-in 0.2s ease;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-message.user {
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.2);
  color: var(--text); align-self: flex-end;
  max-width: 90%;
}

.chat-message.assistant {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted); align-self: flex-start;
  max-width: 95%;
}

.chat-input-area {
  display: flex; flex-direction: column; gap: 8px;
}

.chat-input-wrapper {
  display: flex; gap: 8px; align-items: flex-end;
}

.chat-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 14px;
  resize: none; outline: none;
  min-height: 44px; max-height: 120px;
  line-height: 1.5;
  transition: border-color var(--transition);
}

.chat-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,58,237,0.15); }

.send-btn {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none; border-radius: var(--radius-sm);
  color: white; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}
.send-btn:hover { transform: scale(1.05); box-shadow: var(--shadow-glow); }
.send-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* Generation indicator */
.generating-indicator {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--accent);
  padding: 8px 12px;
  background: rgba(6,182,212,0.1);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(6,182,212,0.2);
}

.gen-dots span {
  display: inline-block; width: 4px; height: 4px;
  border-radius: 50%; background: var(--accent);
  animation: dot-bounce 1.2s ease-in-out infinite;
  margin: 0 1px;
}
.gen-dots span:nth-child(2) { animation-delay: 0.2s; }
.gen-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-bounce {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* ─── Template Gallery ────────────────────────────────────────────────── */

.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.template-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-card);
}

.template-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.template-card.selected {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow-accent);
}

.template-preview {
  height: 120px;
  display: flex; align-items: center; justify-content: center;
  position: relative; font-size: 13px; font-weight: 500;
}

.template-info {
  padding: 12px;
}

.template-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.template-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

/* ─── Modal ───────────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fade-in 0.2s ease;
}

.modal-overlay.hidden { display: none; }

.modal-container {
  background: #0d0f1a;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 560px; width: 100%;
  position: relative;
  animation: modal-in 0.3s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-muted); width: 32px; height: 32px;
  border-radius: 50%; cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--bg-card-hover); color: var(--text); }

.modal-title {
  font-size: 20px; font-weight: 700; margin-bottom: 8px;
}
.modal-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }

/* ─── Toast ───────────────────────────────────────────────────────────── */

#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 2000;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
}

.toast {
  background: #0d0f1a;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  display: flex; align-items: center; gap: 10px;
  min-width: 200px; max-width: 380px;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

.toast.success { border-color: rgba(16,185,129,0.4); }
.toast.error { border-color: rgba(239,68,68,0.4); }
.toast.info { border-color: rgba(6,182,212,0.4); }
.toast-icon { font-size: 16px; }

/* ─── Version History ─────────────────────────────────────────────────── */

.versions-list {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 400px; overflow-y: auto;
}

.version-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.version-label { flex: 1; color: var(--text-muted); }
.version-date { font-size: 11px; color: var(--text-dim); }

/* ─── Analysis Panel ─────────────────────────────────────────────────── */

.analysis-score {
  display: flex; align-items: center; gap: 16px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(124,58,237,0.1), rgba(6,182,212,0.05));
  border-radius: var(--radius);
  border: 1px solid rgba(124,58,237,0.2);
  margin-bottom: 16px;
}

.score-circle {
  width: 60px; height: 60px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
  background: conic-gradient(var(--primary) calc(var(--score) * 36deg), rgba(255,255,255,0.1) 0);
  position: relative;
  flex-shrink: 0;
}

.score-circle::before {
  content: '';
  position: absolute; inset: 6px;
  background: #0d0f1a; border-radius: 50%;
}

.score-circle span { position: relative; z-index: 1; }

/* ─── Presenter Panel ─────────────────────────────────────────────────── */

.presenter-panel {
  position: fixed; inset: 0; z-index: 900;
  background: #050507;
  display: grid;
  grid-template-rows: 52px 1fr;
  flex-direction: column;
}

.presenter-panel.hidden { display: none; }

.presenter-header {
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
  background: rgba(0,0,0,0.8); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.presenter-close {
  background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.3);
  color: var(--danger); padding: 6px 12px;
  border-radius: var(--radius-sm); cursor: pointer; font-size: 13px;
  font-family: var(--font); transition: all var(--transition);
}
.presenter-close:hover { background: rgba(239,68,68,0.25); }

.presenter-timer {
  font-family: var(--font-mono); font-size: 20px; font-weight: 500;
  color: var(--accent); margin-left: auto;
  min-width: 80px; text-align: center;
}

.presenter-btn {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-muted); padding: 6px 10px;
  border-radius: var(--radius-sm); cursor: pointer; font-size: 13px;
  font-family: var(--font); transition: all var(--transition);
}
.presenter-btn:hover { color: var(--text); background: var(--bg-card-hover); }

.presenter-body {
  display: grid; grid-template-columns: 1fr 320px;
  gap: 16px; padding: 16px; overflow: hidden;
}

.presenter-current {
  display: flex; flex-direction: column; gap: 8px;
}

.presenter-current h4, .presenter-sidebar h4 {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-dim); font-weight: 600;
}

#presenter-iframe {
  flex: 1; border: 1px solid var(--border); border-radius: var(--radius);
  background: #000; min-height: 0;
}

.presenter-sidebar {
  display: flex; flex-direction: column; gap: 16px;
  overflow-y: auto;
}

.presenter-notes {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  flex: 1;
}

#presenter-notes-content {
  margin-top: 10px; font-size: 14px;
  line-height: 1.6; color: var(--text-muted);
}

.presenter-next {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}

.next-preview {
  margin-top: 10px; font-size: 13px;
  color: var(--text-dim); min-height: 60px;
}

.presenter-controls {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px;
}

.pres-ctrl-btn {
  background: rgba(124,58,237,0.2); border: 1px solid rgba(124,58,237,0.3);
  color: var(--text); padding: 8px 14px; border-radius: var(--radius-sm);
  cursor: pointer; font-family: var(--font); font-size: 13px;
  transition: all var(--transition);
}
.pres-ctrl-btn:hover { background: rgba(124,58,237,0.35); }

.pres-counter {
  font-family: var(--font-mono); font-size: 13px; color: var(--text-muted);
}

/* ─── Settings ────────────────────────────────────────────────────────── */

.settings-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px; max-width: 800px;
}

.settings-section {
  grid-column: span 2;
}

.settings-section-title {
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--primary); margin-bottom: 16px;
  padding-bottom: 8px; border-bottom: 1px solid rgba(124,58,237,0.2);
}

.color-preview {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--border); display: inline-block;
  vertical-align: middle; margin-left: 8px;
}

/* ─── Tags ────────────────────────────────────────────────────────────── */

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 20px;
  font-size: 11px; font-weight: 500;
  color: var(--primary-light);
}

/* ─── Divider ─────────────────────────────────────────────────────────── */

.divider {
  height: 1px; background: var(--border);
  margin: 16px 0;
}

/* ─── Gradient text ───────────────────────────────────────────────────── */

.gradient-text {
  background: linear-gradient(90deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Empty State ─────────────────────────────────────────────────────── */

.empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 80px 20px; gap: 16px;
  color: var(--text-muted); text-align: center;
}

.empty-state-icon { font-size: 48px; opacity: 0.3; }
.empty-state-title { font-size: 18px; font-weight: 600; color: var(--text); }
.empty-state-desc { font-size: 14px; max-width: 340px; line-height: 1.6; }

/* ─── Scrollbar ───────────────────────────────────────────────────────── */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ─── Utilities ───────────────────────────────────────────────────────── */

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.font-mono { font-family: var(--font-mono); }
.hidden { display: none !important; }
.full-width { width: 100%; }
.text-center { text-align: center; }

/* ─── QR Code Modal ───────────────────────────────────────────────────── */

.qr-container {
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; padding: 16px;
}

.qr-container img {
  width: 200px; height: 200px;
  border-radius: var(--radius);
  border: 4px solid white;
}

.share-url {
  font-family: var(--font-mono); font-size: 12px;
  background: var(--bg-input); padding: 10px 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  word-break: break-all; text-align: center; color: var(--accent);
}

/* ─── Studio preview actions bar ─────────────────────────────────────── */

.preview-actions {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}

/* ─── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  #view-container { padding: 16px; }
  .studio-layout { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-section { grid-column: span 1; }
  #sidebar { width: 64px; }
  .nav-label, .logo-text { display: none; }
  .nav-item { justify-content: center; }
  .sidebar-footer { padding: 12px 0; display: flex; justify-content: center; }
}
