/* ═══════════════════════════════════════════════════════════════════
   PromptScope — Style
   Dark premium theme · Ambient Mesh & Grid · Impeccable Micro-animations
   ═══════════════════════════════════════════════════════════════════ */

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

:root {
  /* surfaces */
  --bg-base:       #07070b;
  --bg-raised:     #0f0f1a;
  --bg-surface:    #151524;
  --bg-card:       rgba(21, 21, 36, 0.65);
  --bg-card-hover: rgba(30, 30, 50, 0.75);
  --border:        rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --border-glow:   rgba(139, 92, 246, 0.25);

  /* text */
  --text-primary:   #f1f1f6;
  --text-secondary: #9da0b5;
  --text-muted:     #65677d;

  /* accent — violet/indigo */
  --accent:        #7c3aed;
  --accent-mid:    #8b5cf6;
  --accent-light:  #a78bfa;
  --accent-dim:    rgba(124, 58, 237, 0.14);
  --accent-glow:   rgba(124, 58, 237, 0.32);
  --accent-glow2:  rgba(167, 139, 250, 0.16);

  /* reader native accent — emerald / cyan */
  --emerald:       #10b981;
  --emerald-dim:   rgba(16, 185, 129, 0.14);
  --emerald-light: #34d399;

  /* feedback */
  --success:  #34d399;
  --warning:  #fbbf24;
  --error:    #f87171;

  /* radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  /* fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* transitions */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

@property --beam-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--bg-base);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;

  /* OriginKit: Kinetic Grid & Ambient Depth Gradients (All Pages) */
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.05) 1px, transparent 0),
    radial-gradient(ellipse 70% 50% at 50% -8%, rgba(124, 58, 237, 0.22) 0%, transparent 70%),
    radial-gradient(ellipse 45% 35% at 5% 25%, rgba(16, 185, 129, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 55% 45% at 92% 85%, rgba(99, 102, 241, 0.11) 0%, transparent 65%);
  background-size: 28px 28px, 100% 100%, 100% 100%, 100% 100%;
  background-attachment: fixed;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-mid);
}

/* ── Header ─────────────────────────────────────────────────────── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 7, 11, 0.82);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo as clickable button */
.logo-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  text-decoration: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.logo-btn:hover {
  opacity: 0.85;
  transform: scale(0.99);
}

.logo-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.logo-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: block;
}

.logo-text {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.supported-formats {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

@media (max-width: 680px) {
  .supported-formats {
    display: none;
  }
}

.header-engine-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.header-engine-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--accent-mid);
  box-shadow: 0 0 14px var(--accent-dim);
}

.engine-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-mid);
  box-shadow: 0 0 8px var(--accent-mid);
}

.btn-icon {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* ── Main Layout ─────────────────────────────────────────────────── */
.main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* ── Glass Card Utility ──────────────────────────────────────────── */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 28px -2px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.25s var(--ease-out), border-color 0.25s ease, box-shadow 0.25s ease;
}

.glass-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 8px 32px -2px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* OriginKit: Animated Border Beam */
.border-beam {
  position: relative;
}

.border-beam::before {
  content: '';
  position: absolute;
  inset: -1.5px;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(
    from var(--beam-angle),
    transparent 0%,
    transparent 72%,
    rgba(167, 139, 250, 0.85) 86%,
    rgba(52, 211, 153, 0.95) 94%,
    transparent 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: rotateBeam 5s linear infinite;
  opacity: 0.65;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.border-beam:hover::before {
  opacity: 1;
  animation-duration: 3s;
}

@keyframes rotateBeam {
  to {
    --beam-angle: 360deg;
  }
}

/* ── Buttons (OriginKit Inspired) ────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
}

.btn:active {
  transform: scale(0.96);
}

/* OriginKit: Shimmer Sweep Button */
.btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.3), 0 4px 20px -2px rgba(124, 58, 237, 0.45);
  overflow: hidden;
  z-index: 1;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent 30%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 70%
  );
  transform: translateX(-100%) rotate(25deg);
  animation: shimmerSweep 4.5s ease-in-out infinite;
  pointer-events: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d70f7 100%);
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.5), 0 8px 30px rgba(124, 58, 237, 0.65);
  transform: translateY(-2px);
}

@keyframes shimmerSweep {
  0%   { transform: translateX(-100%) rotate(25deg); }
  25%  { transform: translateX(100%) rotate(25deg); }
  100% { transform: translateX(100%) rotate(25deg); }
}

.btn-accent {
  background: rgba(139, 92, 246, 0.14);
  color: var(--accent-light);
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow: 0 0 0 1px transparent;
}

.btn-accent:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: var(--accent-mid);
  box-shadow: 0 0 16px var(--accent-glow);
  color: #fff;
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 6px;
}

/* ── Hero Section ─────────────────────────────────────────────────── */
.hero-section {
  text-align: center;
  padding: 24px 16px 36px;
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-light);
  margin-bottom: 20px;
  box-shadow: 0 0 20px -4px rgba(139, 92, 246, 0.3);
  backdrop-filter: blur(8px);
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: #ffffff;
  margin-bottom: 16px;
  text-wrap: balance;
}

.text-gradient {
  background: linear-gradient(135deg, #a78bfa 0%, #818cf8 45%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(0.96rem, 2vw, 1.1rem);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto;
  text-wrap: balance;
}

/* ── Dropzone ────────────────────────────────────────────────────── */
.dropzone {
  width: 100%;
  max-width: 820px;
  margin: 0 auto 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: rgba(21, 21, 36, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  min-height: 320px;
  outline: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}

.dropzone:hover,
.dropzone.drag-over {
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(124, 58, 237, 0.08);
  box-shadow: 0 0 50px -10px var(--accent-glow), inset 0 0 30px rgba(124, 58, 237, 0.08);
  transform: translateY(-2px);
}

.dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 24px;
}

.dropzone-icon-wrap {
  position: relative;
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.dropzone-icon {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  transition: transform 0.3s var(--ease-spring), color 0.3s ease;
  z-index: 2;
}

.icon-glow-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, rgba(52, 211, 153, 0.15) 50%, transparent 70%);
  filter: blur(10px);
  opacity: 0.6;
  transition: all 0.3s ease;
}

.dropzone:hover .dropzone-icon,
.dropzone.drag-over .dropzone-icon {
  color: var(--accent-light);
  transform: translateY(-4px) scale(1.05);
}

.dropzone:hover .icon-glow-ring,
.dropzone.drag-over .icon-glow-ring {
  opacity: 1;
  transform: scale(1.3);
  background: radial-gradient(circle, rgba(139, 92, 246, 0.65) 0%, rgba(52, 211, 153, 0.35) 50%, transparent 70%);
}

.dropzone-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.dropzone-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  max-width: 520px;
}

.dropzone-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.mode-pill.pill-reader {
  background: var(--emerald-dim);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--emerald-light);
}

.mode-pill.pill-ai {
  background: var(--accent-dim);
  border-color: rgba(139, 92, 246, 0.3);
  color: var(--accent-light);
}

.paste-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.paste-badge kbd {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  color: var(--text-primary);
}

/* ── Quick Examples ──────────────────────────────────────────────── */
.quick-examples {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.quick-examples-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.example-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
}

.example-chip:hover {
  background: rgba(139, 92, 246, 0.18);
  border-color: var(--accent-mid);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px -2px rgba(139, 92, 246, 0.4);
}

.example-chip:active {
  transform: scale(0.96);
}

.dropzone-features {
  display: flex;
  gap: 20px;
  margin-top: 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Features Bento Grid ─────────────────────────────────────────── */
.features-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1040px;
  width: 100%;
  margin: 8px auto 48px;
}

.feature-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--ease-out), border-color 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.5), 0 0 20px -6px rgba(139, 92, 246, 0.25);
}

.feature-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 14px;
}

.feature-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.feature-desc {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

@media (max-width: 860px) {
  .features-bento {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ── Result Area ─────────────────────────────────────────────────── */
.result-area {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 860px) {
  .result-area {
    grid-template-columns: 1fr;
  }
}

/* ── Preview Column ──────────────────────────────────────────────── */
.preview-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 86px;
}

.preview-card {
  padding: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.preview-card img,
.preview-card video {
  width: 100%;
  max-height: 380px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #000;
}

.preview-meta {
  width: 100%;
  padding-top: 10px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  margin-top: 10px;
}

.preview-controls {
  display: flex;
  gap: 8px;
}

.preview-controls .btn {
  flex: 1;
  justify-content: center;
}

/* ── Style Picker (Chips) ────────────────────────────────────────── */
.style-picker {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.style-picker-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.style-picker-label {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.style-picker-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.style-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-light);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ── Data Column ─────────────────────────────────────────────────── */
.data-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Loading Card */
.ai-loading-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fadeIn 0.3s ease;
}

.ai-loading-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ai-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(139, 92, 246, 0.2);
  border-top-color: var(--accent-mid);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.ai-status-text {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-primary);
}

.ai-status-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 100%;
  transform-origin: left;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 999px;
  transition: transform 0.25s ease-out;
}

/* No Data State */
.no-data {
  padding: 40px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.no-data-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(251, 191, 36, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--warning);
}

.no-data-icon {
  width: 24px;
  height: 24px;
}

.no-data-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

.no-data-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  max-width: 500px;
  line-height: 1.5;
}

.no-data-callout {
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 10px;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.callout-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.callout-badge {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--accent-dim);
  color: var(--accent-light);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.callout-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Origin Banner */
.origin-banner {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.origin-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.origin-description {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.source-tag {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.source-tag.reader {
  background: var(--emerald-dim);
  border-color: rgba(16, 185, 129, 0.35);
  color: var(--emerald-light);
}

.source-tag.ai {
  background: var(--accent-dim);
  border-color: rgba(139, 92, 246, 0.35);
  color: var(--accent-light);
}

/* Data Cards Container */
.data-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Top Bar: Tabs & Copy All */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.format-tabs {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.3);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 6px var(--accent-glow);
}

/* Cards (Prompt / Negative / Params) */
.card {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.card-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-header h2 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.btn-copy {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.card-body {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(10, 10, 18, 0.6);
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

/* Params Grid */
.params-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.param-item, .param-cell {
  background: rgba(10, 10, 18, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s var(--ease-out);
  cursor: pointer;
  position: relative;
}

.param-cell:hover {
  background: rgba(30, 30, 50, 0.7);
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.param-cell:active {
  transform: scale(0.98);
}

.param-cell.copied-pulse {
  border-color: var(--success) !important;
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.35) !important;
}

.param-label, .param-key {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.param-value {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--text-primary);
  word-break: break-all;
}

/* ── Settings Modal ──────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  max-width: 520px;
  width: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: modalPop 0.25s var(--ease-spring);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.settings-guide {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guide-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.8rem;
}

.guide-item strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 2px;
}

.guide-item p {
  color: var(--text-secondary);
  line-height: 1.4;
}

.guide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
}

.guide-dot.reader {
  background: var(--emerald-light);
  box-shadow: 0 0 6px var(--emerald-light);
}

.guide-dot.ai {
  background: var(--accent-mid);
  box-shadow: 0 0 6px var(--accent-mid);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ── Form Controls & Dark Select Fix ─────────────────────────────── */
.form-select, .form-input {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.86rem;
  color: var(--text-primary);
  outline: none;
  font-family: var(--font-sans);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%239da0b5' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 14px center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
  padding-right: 38px;
  cursor: pointer;
}

/* Explicit dark options for browser select dropdowns */
.form-select option {
  background-color: #121220;
  color: #ededf5;
  padding: 10px 12px;
  font-size: 0.86rem;
}

.form-select option:checked,
.form-select option:hover {
  background-color: #7c3aed;
  color: #ffffff;
}

.form-select:focus, .form-input:focus {
  border-color: var(--accent-mid);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.form-hint a {
  color: var(--accent-light);
  text-decoration: underline;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
}

/* ── Footer ──────────────────────────────────────────────────────── */
.app-footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.footer-credits {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-credits strong {
  color: var(--text-primary);
}

.footer-socials {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.social-link {
  color: var(--text-muted);
  transition: color 0.15s ease, transform 0.15s ease;
  display: flex;
  align-items: center;
}

.social-link:hover {
  color: var(--accent-light);
  transform: translateY(-1px);
}

/* ── Utility Classes & Animations ────────────────────────────────── */
.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  color: var(--text-primary);
  font-size: 0.84rem;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 999px;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s var(--ease-spring);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
