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

:root {
  --bg-base:       #0b0d14;
  --bg-surface:    #12151f;
  --bg-elevated:   #1a1e2e;
  --bg-card:       #1e2235;
  --bg-hover:      #252a3d;
  --border:        #2a2f45;
  --border-light:  #333852;

  --accent:        #7c6aff;
  --accent-dim:    #5a4dd4;
  --accent-glow:   rgba(124, 106, 255, 0.18);
  --teal:          #00cfa8;
  --teal-dim:      #009e82;
  --teal-glow:     rgba(0, 207, 168, 0.15);
  --red:           #ff5c7a;
  --amber:         #ffb547;
  --amber-glow:    rgba(255, 181, 71, 0.15);

  --text-primary:  #e8eaf6;
  --text-secondary:#9498b8;
  --text-muted:    #5a5f7d;
  --text-inverse:  #0b0d14;

  --sidebar-w:     260px;
  --header-h:      60px;
  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;

  --font:          'Inter', 'Segoe UI', system-ui, sans-serif;
  --mono:          'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  --shadow-sm:  0 1px 4px rgba(0,0,0,.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,.5);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.6);
  --transition: 160ms ease;
}

html { font-size: 14px; scroll-behavior: smooth; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--text-primary); }

button { cursor: pointer; font-family: var(--font); }

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

/* ── Layout ────────────────────────────────────────────────────────────────── */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ───────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10;
}

.sidebar-brand {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.3px;
  background: linear-gradient(90deg, var(--accent), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-section {
  padding: 14px 12px 6px;
}

.sidebar-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 6px;
  margin-bottom: 6px;
}

.category-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.category-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-list li:hover { background: var(--bg-hover); color: var(--text-primary); }
.category-list li.active {
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 600;
}

.category-list li .cat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-light);
  flex-shrink: 0;
  transition: background var(--transition);
}
.category-list li.active .cat-dot { background: var(--accent); }
.category-list li:hover .cat-dot  { background: var(--text-secondary); }

/* Sidebar saved-scripts section */
.sidebar-scripts {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.saved-script-item {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition);
}

.saved-script-item:hover {
  background: var(--bg-hover);
  border-color: var(--border);
}

.saved-script-item .ssi-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saved-script-item .ssi-meta {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.saved-script-item .ssi-style {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 1px 5px;
  border-radius: 4px;
  margin-top: 4px;
}

.style-hook         .ssi-style { background: rgba(255,92,122,.15); color: var(--red); }
.style-storytelling .ssi-style { background: rgba(124,106,255,.15); color: var(--accent); }
.style-educational  .ssi-style { background: rgba(0,207,168,.15); color: var(--teal); }
.style-controversial .ssi-style { background: rgba(255,181,71,.15); color: var(--amber); }

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 12px;
  flex-shrink: 0;
}

/* ── Main Content ──────────────────────────────────────────────────────────── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Top Bar ───────────────────────────────────────────────────────────────── */
.topbar {
  height: var(--header-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
  gap: 16px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.topbar-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--teal-glow);
  color: var(--teal);
  border: 1px solid rgba(0,207,168,.25);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.geo-select {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  font-family: var(--font);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
}
.geo-select:focus { border-color: var(--accent); }

/* ── Content Panels ────────────────────────────────────────────────────────── */
.content-panels {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* Trends Panel */
.trends-panel {
  width: 420px;
  min-width: 320px;
  max-width: 480px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-surface);
}

.panel-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.panel-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 7px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.75); }
}

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

.search-bar {
  position: relative;
}

.search-bar input {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 6px 10px 6px 30px;
  font-size: 12px;
  font-family: var(--font);
  width: 160px;
  outline: none;
  transition: border-color var(--transition), width var(--transition);
}

.search-bar input:focus {
  border-color: var(--accent);
  width: 200px;
}

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

.search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 12px;
  pointer-events: none;
}

.trends-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Trend Card */
.trend-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: card-in 250ms ease both;
}

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

.trend-card:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.trend-card.active {
  border-color: var(--accent);
  background: var(--accent-glow);
  box-shadow: 0 0 0 1px var(--accent);
}

.trend-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.trend-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  flex: 1;
}

.trend-volume {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--teal-glow);
  color: var(--teal);
  white-space: nowrap;
  flex-shrink: 0;
}

.trend-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.trend-source {
  font-size: 10px;
  color: var(--text-muted);
}

.trend-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.btn-use-trend {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: #fff;
  transition: background var(--transition), transform var(--transition);
}

.btn-use-trend:hover { background: var(--accent-dim); transform: translateY(-1px); }

.btn-save-trend {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-secondary);
  transition: border-color var(--transition), color var(--transition);
}

.btn-save-trend:hover { border-color: var(--teal); color: var(--teal); }

/* Loading / Empty states */
.state-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-muted);
  text-align: center;
  gap: 10px;
  font-size: 13px;
}

.state-empty .state-icon { font-size: 32px; }

.skeleton {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skel-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-hover) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skel-line.short { width: 40%; }
.skel-line.medium { width: 65%; }
.skel-line.long { width: 90%; }

@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ── Script Generator Panel ────────────────────────────────────────────────── */
.generator-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-base);
}

.generator-workspace {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Selected Trend Banner */
.selected-trend-banner {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.selected-trend-banner.has-trend {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.stb-icon { font-size: 20px; flex-shrink: 0; }

.stb-info { flex: 1; overflow: hidden; }

.stb-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.stb-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stb-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  line-height: 1;
}
.stb-clear:hover { color: var(--red); background: rgba(255,92,122,.1); }

/* Style Selector */
.style-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.style-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  cursor: pointer;
  text-align: center;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  user-select: none;
}

.style-card:hover { background: var(--bg-hover); transform: translateY(-2px); }

.style-card.active-hook         { border-color: var(--red);    background: rgba(255,92,122,.08); }
.style-card.active-storytelling { border-color: var(--accent); background: var(--accent-glow); }
.style-card.active-educational  { border-color: var(--teal);   background: var(--teal-glow); }
.style-card.active-controversial{ border-color: var(--amber);  background: var(--amber-glow); }

.style-card .sc-icon { font-size: 22px; margin-bottom: 6px; }
.style-card .sc-name { font-size: 12px; font-weight: 700; color: var(--text-primary); }
.style-card .sc-desc { font-size: 10px; color: var(--text-muted); margin-top: 4px; line-height: 1.4; }

/* Options Row */
.options-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 18px;
}

.option-label {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Toggle Switch */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.toggle-input { position: absolute; opacity: 0; width: 0; height: 0; }

.toggle-track {
  width: 36px;
  height: 20px;
  background: var(--border-light);
  border-radius: 99px;
  position: relative;
  transition: background var(--transition);
}

.toggle-input:checked + .toggle-track { background: var(--teal); }

.toggle-track::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,.4);
}

.toggle-input:checked + .toggle-track::after { transform: translateX(16px); }

.toggle-label { font-size: 12px; color: var(--text-secondary); }

/* Generate Button */
.btn-generate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(135deg, var(--accent), #5a4dd4);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font);
  letter-spacing: -.2px;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-generate:hover:not(:disabled) {
  opacity: .92;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px var(--accent-glow);
}

.btn-generate:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none;
}

.btn-generate .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

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

/* ── Output Area ───────────────────────────────────────────────────────────── */
.output-area {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.output-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.output-tab {
  padding: 11px 18px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.output-tab:hover { color: var(--text-secondary); }
.output-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.output-tab-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--accent-glow);
  color: var(--accent);
}

.output-body { padding: 20px; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Script display */
.script-display {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

.script-display .section-hook         { color: var(--red); font-weight: 700; }
.script-display .section-body         { color: var(--text-primary); }
.script-display .section-cta          { color: var(--teal); font-weight: 700; }
.script-display .section-broll        { color: var(--amber); font-style: italic; }

/* SEO Panel */
.seo-grid {
  display: grid;
  gap: 16px;
}

.seo-field { display: flex; flex-direction: column; gap: 6px; }

.seo-field-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.seo-field-value {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
}

.keywords-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.keyword-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(124,106,255,.2);
}

/* Output actions */
.output-actions {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
}

.btn-action {
  flex: 1;
  padding: 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.btn-action:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.btn-action.danger:hover { border-color: var(--red); color: var(--red); background: rgba(255,92,122,.1); }

/* ── Section Headings ──────────────────────────────────────────────────────── */
.section-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* ── Toast Notifications ───────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in 250ms ease;
  max-width: 340px;
}

.toast.toast-success { border-left: 3px solid var(--teal); }
.toast.toast-error   { border-left: 3px solid var(--red); }
.toast.toast-info    { border-left: 3px solid var(--accent); }

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

@keyframes toast-out {
  to { opacity: 0; transform: translateX(20px); }
}

/* ── Modal ─────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  animation: fade-in 200ms ease;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: modal-in 250ms ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(.96) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.modal-close:hover { color: var(--text-primary); background: var(--bg-hover); }

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .style-grid { grid-template-columns: repeat(2, 1fr); }
  .trends-panel { width: 320px; min-width: 260px; }
}

@media (max-width: 700px) {
  .sidebar { display: none; }
  .trends-panel { width: 100%; max-width: 100%; border-right: none; }
  .content-panels { flex-direction: column; }
  .generator-panel { min-height: 500px; }
}

/* ── Utility ───────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.text-accent { color: var(--accent); }
.text-teal   { color: var(--teal); }
.text-red    { color: var(--red); }
.text-muted  { color: var(--text-muted); }

.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }

/* ── Char Counter ──────────────────────────────────────────────────────────── */
.char-count {
  font-size: 10px;
  color: var(--text-muted);
  text-align: right;
  margin-top: 2px;
}

.char-count.warn { color: var(--amber); }
.char-count.over { color: var(--red); }

/* ── Empty generator placeholder ──────────────────────────────────────────── */
.generator-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  color: var(--text-muted);
  text-align: center;
  gap: 14px;
  padding: 40px 20px;
}

.generator-placeholder .gp-icon {
  font-size: 48px;
  opacity: .35;
}

.generator-placeholder .gp-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-secondary);
}

.generator-placeholder .gp-sub {
  font-size: 13px;
  max-width: 280px;
  line-height: 1.6;
}
