/* ============================
   AIVault — CSS
   Dark Futuristic + Arabic RTL
   ============================ */

:root {
  --accent: #00d4ff;
  --accent-dim: rgba(0,212,255,0.15);
  --accent-glow: rgba(0,212,255,0.3);
  --bg: #0a0c10;
  --bg2: #111318;
  --bg3: #181c24;
  --border: rgba(255,255,255,0.07);
  --border-accent: rgba(0,212,255,0.25);
  --text: #e8eaf0;
  --text-dim: #7a8099;
  --text-muted: #4a5068;
  --danger: #ff4444;
  --success: #22c55e;
  --warning: #eab308;
  --sidebar-w: 240px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --font: 'IBM Plex Sans Arabic', sans-serif;
  --font-mono: 'Space Mono', monospace;
}

.light-mode {
  --bg: #f0f2f5;
  --bg2: #ffffff;
  --bg3: #e8eaf0;
  --border: rgba(0,0,0,0.08);
  --border-accent: rgba(0,150,200,0.3);
  --text: #1a1d2e;
  --text-dim: #556070;
  --text-muted: #99a0b0;
  --shadow: 0 4px 24px rgba(0,0,0,0.1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  direction: rtl;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---- LOADER ---- */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s;
}
#loader.hidden { opacity: 0; pointer-events: none; }
.loader-content { text-align: center; }
.loader-logo {
  font-family: var(--font-mono);
  font-size: 36px; font-weight: 700;
  color: var(--accent);
  letter-spacing: 4px;
  margin-bottom: 24px;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.5;} }
.loader-bar {
  width: 220px; height: 3px;
  background: var(--border);
  border-radius: 4px; overflow: hidden;
  margin: 0 auto 12px;
}
.loader-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  animation: load 1.8s ease-in-out forwards;
}
@keyframes load { 0%{width:0%} 100%{width:100%} }
.loader-text { color: var(--text-dim); font-size: 13px; }

/* ---- SIDEBAR ---- */
#sidebar {
  position: fixed; top: 0; right: 0;
  width: var(--sidebar-w); height: 100vh;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 100;
  transition: transform 0.3s ease;
}
.sidebar-logo {
  padding: 20px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--border);
}
.logo-icon { font-size: 22px; color: var(--accent); }
.logo-text {
  font-family: var(--font-mono);
  font-size: 18px; font-weight: 700;
  color: var(--text);
  letter-spacing: 2px;
}
.sidebar-nav { flex: 1; padding: 16px 0; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 20px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  border-right: 3px solid transparent;
  transition: all 0.2s;
  cursor: pointer;
}
.nav-item:hover { color: var(--text); background: var(--bg3); }
.nav-item.active {
  color: var(--accent);
  border-right-color: var(--accent);
  background: var(--accent-dim);
}
.nav-icon { font-size: 13px; width: 18px; }
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 10px;
}
.api-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-dim);
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-muted);
  transition: background 0.3s;
}
.status-dot.connected { background: var(--success); box-shadow: 0 0 6px var(--success); }
.status-dot.error { background: var(--danger); }
.theme-toggle {
  font-size: 13px; color: var(--text-dim);
  cursor: pointer; padding: 6px 0;
  transition: color 0.2s;
}
.theme-toggle:hover { color: var(--accent); }

/* ---- HAMBURGER ---- */
.hamburger {
  display: none;
  position: fixed; top: 14px; right: 14px; z-index: 200;
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text); font-size: 20px;
  width: 42px; height: 42px;
  border-radius: 8px; cursor: pointer;
}

/* ---- MAIN ---- */
#main {
  margin-right: var(--sidebar-w);
  padding: 32px;
  min-height: 100vh;
}

/* ---- SECTION ---- */
.section { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }
.section-header { margin-bottom: 28px; }
.section-header h1 { font-size: 26px; font-weight: 600; margin-bottom: 6px; }
.accent { color: var(--accent); }
.section-desc { color: var(--text-dim); font-size: 14px; }

/* ---- GENERATOR GRID ---- */
.gen-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
  align-items: start;
}

/* ---- CARD ---- */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--border-accent); }
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.card-icon { font-size: 16px; }
.card-head h3 { flex: 1; font-size: 14px; font-weight: 500; }
.card-toggle {
  background: none; border: none; color: var(--text-dim);
  cursor: pointer; font-size: 11px; padding: 2px 6px;
  transition: transform 0.2s;
}
.card-body { padding: 18px; }
.card-body.collapsed { display: none; }

/* ---- FIELDS ---- */
.field { margin-bottom: 16px; }
.field label {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 7px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
input[type="text"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  direction: ltr;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
textarea { resize: vertical; min-height: 80px; }
select option { background: var(--bg2); }

.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; }

.icon-btn {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  padding: 8px 12px; cursor: pointer; font-size: 14px;
  transition: all 0.2s;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }

.field-hint { font-size: 11px; color: var(--text-dim); margin-top: 5px; }
.char-count { font-size: 11px; color: var(--text-muted); font-weight: 400; text-transform: none; }

/* ---- PROMPT ACTIONS ---- */
.prompt-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pill-btn {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 20px; color: var(--text-dim);
  padding: 5px 12px; font-size: 12px; cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
}
.pill-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---- STYLE TAGS ---- */
.style-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.style-tag {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text-dim);
  padding: 5px 10px; font-size: 12px; cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
}
.style-tag:hover, .style-tag.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

/* ---- PARAMS GRID ---- */
.params-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.param-item { }
.param-item.full-width { grid-column: 1/-1; }
.param-item label {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--text-dim); margin-bottom: 6px;
}
.param-val { color: var(--accent); font-family: var(--font-mono); font-size: 12px; }
input[type="range"] {
  width: 100%; height: 4px;
  -webkit-appearance: none;
  background: var(--border);
  border-radius: 4px; outline: none;
  padding: 0; border: none; box-shadow: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 8px var(--accent-glow);
}
.param-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ---- TOGGLES ---- */
.toggles-row { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.toggle-label {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; font-size: 13px; color: var(--text-dim);
}
.toggle-label input[type="checkbox"] { display: none; }
.toggle-switch {
  width: 36px; height: 20px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  position: relative; flex-shrink: 0;
  transition: background 0.2s;
}
.toggle-switch::after {
  content: ''; position: absolute;
  width: 14px; height: 14px;
  background: var(--text-muted);
  border-radius: 50%;
  top: 2px; right: 2px;
  transition: all 0.2s;
}
input[type="checkbox"]:checked + .toggle-switch { background: var(--accent-dim); border-color: var(--accent); }
input[type="checkbox"]:checked + .toggle-switch::after {
  background: var(--accent);
  right: auto; left: 2px;
  box-shadow: 0 0 6px var(--accent);
}

/* ---- GENERATE BUTTON ---- */
.generate-wrap { position: sticky; bottom: 20px; padding: 16px 0; }
.cost-estimate { font-size: 12px; color: var(--text-muted); text-align: center; margin-bottom: 8px; }
.gen-btn {
  width: 100%;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: var(--radius);
  padding: 14px 24px;
  font-size: 15px; font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: all 0.2s;
  box-shadow: 0 0 20px var(--accent-glow);
}
.gen-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 30px var(--accent-glow); }
.gen-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.cancel-btn {
  width: 100%; margin-top: 8px;
  background: transparent; border: 1px solid var(--danger);
  color: var(--danger); border-radius: var(--radius);
  padding: 10px; font-size: 14px; cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
}
.cancel-btn:hover { background: rgba(255,68,68,0.1); }

/* ---- MODEL INFO ---- */
.model-info { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.info-badge {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 4px; padding: 3px 8px; font-size: 11px; color: var(--text-dim);
}

/* ---- PROGRESS ---- */
.progress-card {
  background: var(--bg2); border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg); padding: 20px;
  margin-bottom: 16px;
}
.progress-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; font-size: 14px;
}
#progress-pct { font-family: var(--font-mono); color: var(--accent); }
.progress-bar-outer {
  width: 100%; height: 6px; background: var(--bg3);
  border-radius: 4px; overflow: hidden; margin-bottom: 12px;
}
.progress-bar-inner {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), #0080ff);
  border-radius: 4px;
  transition: width 0.5s ease;
  box-shadow: 0 0 10px var(--accent);
}
.progress-log {
  font-size: 12px; color: var(--text-dim); font-family: var(--font-mono);
  max-height: 80px; overflow-y: auto;
  background: var(--bg3); border-radius: 6px; padding: 8px;
}
.progress-timer { font-size: 12px; color: var(--text-muted); margin-top: 10px; text-align: left; }

/* ---- STATUS MSG ---- */
.status-msg {
  border-radius: var(--radius); padding: 12px 16px;
  font-size: 13px; margin-bottom: 16px;
}
.status-msg.success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: #4ade80; }
.status-msg.error { background: rgba(255,68,68,0.1); border: 1px solid rgba(255,68,68,0.3); color: #f87171; }
.status-msg.info { background: rgba(0,212,255,0.08); border: 1px solid var(--border-accent); color: var(--accent); }

/* ---- OUTPUT ---- */
.output-card {
  background: var(--bg2); border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg); overflow: hidden;
}
.output-header {
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.output-header h3 { flex: 1; font-size: 14px; }
.output-meta { font-size: 12px; color: var(--text-dim); }
.video-wrap { background: #000; }
.video-wrap video { width: 100%; display: block; max-height: 400px; object-fit: contain; }
.output-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 14px 18px; border-top: 1px solid var(--border);
}
.action-btn {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text);
  padding: 7px 14px; font-size: 13px; cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
}
.action-btn:hover { border-color: var(--accent); color: var(--accent); }
.action-btn.primary { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.action-btn.danger { border-color: rgba(255,68,68,0.4); color: var(--danger); }
.action-btn.danger:hover { background: rgba(255,68,68,0.1); }

.feedback-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-dim);
}
.stars span { font-size: 20px; color: var(--text-muted); cursor: pointer; transition: color 0.15s; }
.stars span:hover, .stars span.active { color: var(--warning); }

/* ---- PLACEHOLDER ---- */
.output-placeholder {
  background: var(--bg2); border: 1px dashed var(--border);
  border-radius: var(--radius-lg); padding: 60px 20px;
  text-align: center; color: var(--text-dim);
}
.placeholder-icon {
  font-size: 40px; margin-bottom: 16px;
  color: var(--text-muted); opacity: 0.5;
}
.placeholder-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* ---- TIPS ---- */
.tips-box {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; margin-top: 16px;
}
.tips-title { font-size: 13px; font-weight: 600; margin-bottom: 10px; color: var(--accent); }
.tips-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.tips-list li { font-size: 12px; color: var(--text-dim); padding-right: 12px; position: relative; }
.tips-list li::before { content: '›'; position: absolute; right: 0; color: var(--accent); }
code { font-family: var(--font-mono); font-size: 11px; background: var(--bg3); padding: 1px 5px; border-radius: 3px; color: var(--accent); }

/* ---- BATCH ---- */
.batch-title { font-size: 15px; font-weight: 600; margin: 16px 0 12px; }
.batch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.batch-item { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.batch-item video { width: 100%; display: block; }
.frames-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-bottom: 12px; }
.frame-img { width: 100%; border-radius: 6px; }

/* =============================
   TOOLS SECTION
   ============================= */
.tools-filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-bottom: 24px;
}
.filter-btn {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 20px; color: var(--text-dim);
  padding: 7px 16px; font-size: 13px; cursor: pointer;
  font-family: var(--font); transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.tools-search-wrap { margin-right: auto; }
.tools-search-wrap input { width: 220px; }

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

.tool-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px;
  transition: all 0.2s; cursor: pointer;
  position: relative; overflow: hidden;
  text-decoration: none; display: block; color: inherit;
}
.tool-card::before {
  content: ''; position: absolute; top: 0; right: 0; left: 0; height: 2px;
  background: var(--accent); opacity: 0; transition: opacity 0.2s;
}
.tool-card:hover { border-color: var(--border-accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.tool-card:hover::before { opacity: 1; }

.tool-card-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.tool-emoji { font-size: 24px; flex-shrink: 0; }
.tool-name { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.tool-category-tag {
  display: inline-block; font-size: 10px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 4px; padding: 2px 6px; color: var(--text-muted);
}
.tool-desc { font-size: 13px; color: var(--text-dim); line-height: 1.5; margin-bottom: 12px; }
.tool-footer { display: flex; align-items: center; gap: 8px; }
.tool-badge {
  font-size: 11px; padding: 3px 8px; border-radius: 4px;
  font-weight: 500;
}
.badge-free { background: rgba(34,197,94,0.15); color: #4ade80; }
.badge-freemium { background: rgba(234,179,8,0.15); color: #facc15; }
.badge-limited { background: rgba(249,115,22,0.15); color: #fb923c; }
.tool-rank {
  margin-right: auto; font-family: var(--font-mono);
  font-size: 11px; color: var(--text-muted);
}
.tool-stars { font-size: 11px; color: var(--warning); }

/* =============================
   HISTORY SECTION
   ============================= */
.history-toolbar { display: flex; gap: 10px; margin-bottom: 20px; }
.history-list { display: flex; flex-direction: column; gap: 12px; }
.history-item {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
  display: flex; gap: 16px; align-items: flex-start;
}
.history-thumb { width: 100px; height: 60px; object-fit: cover; border-radius: 6px; flex-shrink: 0; background: var(--bg3); }
.history-info { flex: 1; }
.history-prompt { font-size: 13px; margin-bottom: 6px; }
.history-meta { font-size: 12px; color: var(--text-dim); }
.history-actions { display: flex; gap: 6px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }

/* =============================
   PRESETS SECTION
   ============================= */
.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.preset-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px;
  cursor: pointer; transition: all 0.2s;
}
.preset-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.preset-emoji { font-size: 28px; margin-bottom: 10px; }
.preset-title { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.preset-preview { font-size: 12px; color: var(--text-dim); font-style: italic; line-height: 1.5; }
.preset-tag { font-size: 11px; color: var(--text-muted); margin-top: 10px; }

/* =============================
   COMPARE SECTION
   ============================= */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.compare-col { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; }
.compare-col h3 { font-size: 14px; margin-bottom: 12px; }
.compare-col select { margin-bottom: 12px; }
.compare-video-wrap { background: var(--bg3); border-radius: var(--radius); min-height: 180px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.compare-video-wrap video { width: 100%; border-radius: var(--radius); }
.compare-placeholder { color: var(--text-muted); font-size: 13px; }
.compare-prompt { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; }
.compare-prompt label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 8px; }
.compare-prompt textarea { margin-bottom: 12px; }

/* =============================
   SETTINGS SECTION
   ============================= */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.stats-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.stats-row:last-child { border: none; }
.stats-row strong { color: var(--accent); font-family: var(--font-mono); }
.color-swatches { display: flex; gap: 8px; margin-top: 4px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: all 0.2s; }
.swatch.active { border-color: var(--text); transform: scale(1.15); }

/* =============================
   MODALS
   ============================= */
.modal {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.modal-box {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  width: 90%; max-width: 480px; max-height: 80vh; overflow-y: auto;
}
.modal-box.wide { max-width: 640px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-head h3 { font-size: 16px; }
.modal-head button { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 18px; }
.modal-desc { font-size: 13px; color: var(--text-dim); margin-bottom: 16px; }
.share-btns { display: flex; flex-direction: column; gap: 10px; }
.shortcuts-list { display: flex; flex-direction: column; gap: 10px; }
.shortcut-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.shortcut-item:last-child { border: none; }
kbd { background: var(--bg3); border: 1px solid var(--border); border-radius: 4px; padding: 3px 8px; font-family: var(--font-mono); font-size: 12px; }
.editor-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.editor-preview { text-align: center; padding: 20px; }

/* =============================
   TOAST
   ============================= */
#toast-container {
  position: fixed; bottom: 24px; left: 24px; z-index: 1000;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 18px;
  font-size: 13px; min-width: 240px;
  animation: slideIn 0.3s ease, fadeOut 0.4s ease 2.8s forwards;
  display: flex; align-items: center; gap: 10px;
}
.toast.success { border-color: rgba(34,197,94,0.5); }
.toast.error { border-color: rgba(255,68,68,0.5); }
@keyframes slideIn { from{transform:translateY(20px);opacity:0} to{transform:none;opacity:1} }
@keyframes fadeOut { to{opacity:0;transform:translateY(10px)} }

/* =============================
   FAB
   ============================= */
.fab {
  position: fixed; bottom: 24px; right: calc(var(--sidebar-w) + 24px); z-index: 90;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 50%; width: 44px; height: 44px;
  color: var(--text-dim); font-size: 16px; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.fab:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }

.tip-text { font-size: 12px; color: var(--text-muted); font-style: italic; }

/* =============================
   RESPONSIVE
   ============================= */
@media (max-width: 900px) {
  #sidebar { transform: translateX(100%); }
  #sidebar.open { transform: none; }
  #main { margin-right: 0; padding: 20px 16px; padding-top: 60px; }
  .hamburger { display: flex; align-items: center; justify-content: center; }
  .gen-grid { grid-template-columns: 1fr; }
  .compare-grid { grid-template-columns: 1fr; }
  .fab { right: 24px; bottom: 80px; }
}

@media (max-width: 600px) {
  .params-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .presets-grid { grid-template-columns: 1fr; }
  .output-actions { flex-direction: column; }
}

/* =============================
   SCROLLBAR
   ============================= */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }

/* =============================
   SELECTION
   ============================= */
::selection { background: var(--accent-dim); color: var(--accent); }
