/* ============================================================
   ClipCaption – Stylesheet
   Modern, professional dark UI in the style of Linear/Notion
   ============================================================ */

/* ============================================================
   THEME TOKENS
   Default = DARK (warm stone grays + teal accent)
   Toggle with <html data-theme="light"> for LIGHT mode
   ============================================================ */
:root,
:root[data-theme="dark"] {
  /* Backgrounds — warm graphite, slightly desaturated */
  --bg-primary: #0e0f10;
  --bg-secondary: #16181a;
  --bg-card: #1c1f22;
  --bg-card-hover: #23272b;
  --border: #2a2e33;
  --border-light: #3a3f45;

  /* Text */
  --text-primary: #f5f5f4;
  --text-secondary: #c4c4c0;
  --text-muted: #8a8a86;

  /* Accent — modern teal (calm, premium, not the typical SaaS purple/blue) */
  --accent: #14b8a6;
  --accent-hover: #2dd4bf;
  --accent-soft: rgba(20, 184, 166, 0.12);
  --accent-rgb: 20, 184, 166;

  /* Gradient — two-tone teal with a hint of amber warmth */
  --gradient: linear-gradient(135deg, #0d9488 0%, #14b8a6 60%, #f5b454 100%);
  --gradient-soft: linear-gradient(135deg, rgba(20, 184, 166, 0.14), rgba(245, 180, 84, 0.10));

  /* Status colors */
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f5b454;

  /* Surface helpers */
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --overlay-bg: rgba(14, 15, 16, 0.92);
  --header-bg: rgba(22, 24, 26, 0.85);
  --hero-glow: radial-gradient(ellipse at top, rgba(20, 184, 166, 0.12) 0%, transparent 60%);

  --radius: 12px;
  --radius-lg: 16px;
}

/* ============ LIGHT MODE ============ */
:root[data-theme="light"] {
  /* Backgrounds — warm off-white & stone tones (no pure white) */
  --bg-primary: #f6f5f1;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1efea;
  --border: #e5e3dd;
  --border-light: #d6d3cc;

  /* Text — warm near-black */
  --text-primary: #1a1a17;
  --text-secondary: #4a4a45;
  --text-muted: #84847d;

  /* Accent — slightly darker teal for contrast on light bg */
  --accent: #0d9488;
  --accent-hover: #0f766e;
  --accent-soft: rgba(13, 148, 136, 0.10);
  --accent-rgb: 13, 148, 136;

  --gradient: linear-gradient(135deg, #0f766e 0%, #14b8a6 60%, #e8a13b 100%);
  --gradient-soft: linear-gradient(135deg, rgba(13, 148, 136, 0.10), rgba(232, 161, 59, 0.08));

  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;

  --shadow: 0 4px 24px rgba(40, 40, 35, 0.08);
  --overlay-bg: rgba(246, 245, 241, 0.92);
  --header-bg: rgba(255, 255, 255, 0.85);
  --hero-glow: radial-gradient(ellipse at top, rgba(13, 148, 136, 0.10) 0%, transparent 60%);
}

/* Smooth theme transitions */
html, body, .header, .upload-card, .dropzone, .file-info,
.progress-content, .result-card, .modal-content, .pricing-card,
.plan-info-bar, .extraction-progress, select, button {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

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

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ HEADER ============ */
.header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: var(--header-bg);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo i {
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
  font-size: 24px;
}

.tagline {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

/* ============ HERO ============ */
.hero {
  padding: 80px 0 40px;
  text-align: center;
  background: var(--hero-glow);
}

.hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero .subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 40px;
}

.features-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
}

.features-strip div {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.features-strip i {
  color: var(--accent);
  margin-right: 6px;
}

/* ============ UPLOAD ============ */
.upload-section {
  padding: 20px 0 80px;
}

.upload-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 760px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

.dropzone {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg-secondary);
  margin-bottom: 24px;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone.has-file {
  border-style: solid;
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.08);
}

.dropzone-icon {
  font-size: 48px;
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
}

.dropzone.has-file .dropzone-icon {
  color: var(--success);
}

.dropzone-text strong {
  font-size: 18px;
  display: block;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.dropzone-text p {
  color: var(--text-muted);
  font-size: 13px;
}

.file-info {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  display: none;
}

.file-info.visible {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.file-info .file-name {
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-info .file-size {
  color: var(--text-muted);
  font-size: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-group label i {
  color: var(--accent);
  margin-right: 4px;
}

.form-group select {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: border 0.2s;
}

.form-group select:focus {
  outline: none;
  border-color: var(--accent);
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.checkbox i {
  color: var(--accent);
  margin-right: 4px;
}

.btn-primary {
  width: 100%;
  background: var(--gradient);
  color: white;
  border: none;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(var(--accent-rgb), 0.35);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

/* ============ PROGRESS OVERLAY ============ */
.progress-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-bg);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.progress-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 460px;
  width: 100%;
  text-align: center;
}

.spinner {
  width: 56px;
  height: 56px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 24px;
}

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

.progress-content h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.progress-content p {
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-size: 14px;
}

.progress-steps {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
  padding: 10px 14px;
  background: var(--bg-secondary);
  border-radius: 8px;
  transition: all 0.3s;
}

.step.active {
  color: var(--text-primary);
  background: var(--accent-soft);
}

.step.done {
  color: var(--success);
}

.step.done i::before {
  content: "\f058"; /* check-circle */
}

/* ============ RESULTS ============ */
.results-section {
  padding: 40px 0 80px;
}

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

.results-header h2 {
  font-size: 28px;
  font-weight: 800;
}

.results-header h2 i {
  color: var(--success);
  margin-right: 8px;
}

.results-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
}

@media (max-width: 1024px) {
  .results-grid {
    grid-template-columns: 1fr;
  }
}

.results-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card h3 i {
  color: var(--accent);
}

.card-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  margin-top: -6px;
}

/* Products list */
.product-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 10px;
}

.product-item:last-child { margin-bottom: 0; }

.product-name {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--text-primary);
}

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

.product-meta span {
  background: var(--accent-soft);
  color: var(--accent-hover);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  margin-right: 6px;
}

.product-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.5;
}

.product-facts {
  list-style: none;
  margin: 0;
  padding: 0;
}

.product-facts li {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 4px 0 4px 18px;
  position: relative;
  line-height: 1.5;
}

.product-facts li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

.empty-state {
  color: var(--text-muted);
  font-size: 13px;
  font-style: italic;
  text-align: center;
  padding: 16px 0;
}

/* Clip items */
.clip-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.clip-item:last-child { margin-bottom: 0; }

.clip-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}

.clip-time {
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 12px;
  color: var(--accent-hover);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 6px;
}

.clip-reason {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Download buttons */
.download-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-download {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.btn-download:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text-primary);
}

.btn-download i {
  color: var(--accent);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.tab.active {
  background: var(--accent);
  color: white;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.caption-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.caption-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.caption-header i {
  color: var(--accent);
  margin-right: 6px;
}

.caption-text {
  padding: 18px 20px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 400px;
  overflow-y: auto;
}

.caption-text.transcript-text {
  max-height: 600px;
  font-size: 13px;
  color: var(--text-secondary);
}

.caption-full {
  background: var(--bg-secondary);
}

.btn-copy {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-copy:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-hover);
}

.btn-copy.copied {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.btn-copy-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.btn-copy-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: white;
}

.char-count {
  padding: 8px 20px 14px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
}

.char-count.over-limit {
  color: var(--danger);
  font-weight: 600;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 14px 24px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: all 0.3s;
  z-index: 2000;
}

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

.toast.success {
  border-color: var(--success);
}

.toast.error {
  border-color: var(--danger);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 30px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 60px;
}

.footer i {
  color: var(--accent);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ============================================================
   NEW STYLES – Plans, Modals, Locked Platforms, Audio Extraction
   ============================================================ */

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

.plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.plan-badge:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.plan-badge i {
  font-size: 12px;
}

.plan-badge.plan-free i { color: var(--text-muted); }
.plan-badge.plan-pro {
  background: var(--gradient-soft);
  border-color: var(--accent);
}
.plan-badge.plan-pro i { color: var(--accent); }
.plan-badge.plan-business {
  background: linear-gradient(135deg, rgba(245, 180, 84, 0.18), rgba(var(--accent-rgb), 0.18));
  border-color: var(--warning);
}
.plan-badge.plan-business i { color: var(--warning); }

.btn-link {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.15s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

/* Plan info bar */
.plan-info-bar {
  max-width: 760px;
  margin: 0 auto 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 18px;
}

.plan-info-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.plan-info-content i {
  color: var(--accent);
  margin-right: 4px;
}

.plan-info-content strong {
  color: var(--text-primary);
  font-weight: 700;
}

.quota-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  background: var(--bg-secondary);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.quota-info #quotaText.low {
  color: var(--warning);
}

.quota-info #quotaText.empty {
  color: var(--danger);
}

/* Audio extraction progress */
.extraction-progress {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
}

.extraction-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.extraction-header i {
  color: var(--accent);
}

.extraction-bar {
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}

.extraction-bar-fill {
  height: 100%;
  background: var(--gradient);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 999px;
}

.extraction-hint {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.extraction-hint i {
  color: var(--success);
}

/* Pro badge */
.badge-pro {
  display: inline-block;
  background: var(--gradient);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 4px;
}

.tab .tab-badge {
  font-size: 9px;
  padding: 1px 6px;
}

/* Disabled toggles */
.checkbox.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.checkbox.disabled input {
  cursor: not-allowed;
}

/* ============ MODALS ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-bg);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 480px;
  width: 100%;
  position: relative;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-content.modal-large {
  max-width: 980px;
  text-align: left;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.modal-close:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--accent);
}

.modal-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.modal-large .modal-title {
  justify-content: flex-start;
}

.modal-title i {
  color: var(--accent);
}

.modal-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 28px;
}

.modal-footer-hint {
  margin-top: 24px;
  padding: 14px 18px;
  background: var(--bg-secondary);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-footer-hint i {
  color: var(--accent);
}

/* Upgrade modal */
.upgrade-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
}

.upgrade-message {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.upgrade-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upgrade-actions .btn-secondary {
  width: 100%;
  justify-content: center;
}

/* ============ PRICING GRID ============ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

@media (max-width: 768px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

.pricing-card {
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
}

.pricing-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.pricing-card.popular {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--bg-secondary) 100%);
}

.pricing-card.active {
  border-color: var(--success);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.12);
}

.popular-badge, .active-badge {
  position: absolute;
  top: -10px;
  right: 16px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.popular-badge {
  background: var(--gradient);
  color: white;
}

.active-badge {
  background: var(--success);
  color: white;
}

.pricing-card.active .popular-badge {
  display: none;
}

.pricing-name {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
}

.pricing-price {
  margin-bottom: 20px;
}

.pricing-price .amount {
  font-size: 36px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pricing-price .note {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 6px;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  flex: 1;
}

.pricing-features li {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 6px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}

.pricing-features li i {
  color: var(--success);
  flex-shrink: 0;
  margin-top: 4px;
  font-size: 11px;
}

.btn-plan-select {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.btn-plan-select:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.pricing-card.popular .btn-plan-select {
  background: var(--gradient);
  border: none;
  color: white;
}

.pricing-card.popular .btn-plan-select:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.35);
}

.btn-plan-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--success);
  border-color: var(--success);
  color: white;
}

/* Locked platform */
.locked-platform {
  background: var(--bg-card);
  border: 2px dashed var(--border-light);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
}

.locked-icon {
  font-size: 40px;
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
}

.locked-platform h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.locked-platform p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 14px;
}

.locked-platform .btn-primary {
  width: auto;
  display: inline-flex;
}

/* Empty state with pro upgrade */
.empty-state-pro {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-muted);
}

.empty-state-pro i {
  font-size: 28px;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}

.empty-state-pro p {
  font-size: 13px;
  margin-bottom: 14px;
}

.empty-state-pro .btn-secondary {
  width: auto;
  display: inline-flex;
}


/* ============================================================
   THEME TOGGLE BUTTON
   Sun/Moon switch in the header
   ============================================================ */
.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s ease;
  position: relative;
}

.theme-toggle:hover {
  background: var(--bg-card-hover);
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  transition: opacity 0.25s ease, transform 0.35s ease;
}

/* Default = dark theme → show MOON */
:root[data-theme="dark"] .theme-toggle .icon-sun,
:root:not([data-theme="light"]) .theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}
:root[data-theme="dark"] .theme-toggle .icon-moon,
:root:not([data-theme="light"]) .theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

/* Light theme → show SUN */
:root[data-theme="light"] .theme-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0) scale(1);
}
:root[data-theme="light"] .theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

/* Header right cluster – ensure theme toggle sits nicely beside other buttons */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ============================================================
   LIGHT MODE — FINE-TUNES
   A few small visual adjustments that work better on a light bg
   ============================================================ */
:root[data-theme="light"] .logo {
  /* On light bg, the gradient text needs a bit more punch */
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

:root[data-theme="light"] .progress-overlay,
:root[data-theme="light"] .modal-overlay {
  /* Soften the overlay so it doesn't look harsh on light bg */
  background: rgba(40, 40, 35, 0.45);
}

:root[data-theme="light"] .spinner {
  border-color: var(--border-light);
  border-top-color: var(--accent);
}

:root[data-theme="light"] .btn-primary {
  color: #ffffff;
}

:root[data-theme="light"] .upload-card,
:root[data-theme="light"] .result-card,
:root[data-theme="light"] .pricing-card,
:root[data-theme="light"] .modal-content,
:root[data-theme="light"] .progress-content {
  box-shadow: 0 2px 8px rgba(40, 40, 35, 0.04), 0 8px 24px rgba(40, 40, 35, 0.06);
}
