@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Padauk:wght@400;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-main: #090d16;
  --bg-card: #111827;
  --bg-card-hover: #1f293d;
  --border-color: #243046;
  --primary: #f59e0b;
  --primary-glow: rgba(245, 158, 11, 0.25);
  --primary-hover: #d97706;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --font-burmese: 'Padauk', sans-serif;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(245, 158, 11, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(6, 182, 212, 0.06) 0%, transparent 40%);
  background-attachment: fixed;
  min-height: 100vh;
}

.burmese-text {
  font-family: var(--font-burmese);
  letter-spacing: 0.02em;
}

/* Header */
header {
  border-bottom: 1px solid var(--border-color);
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0.85rem 1.5rem;
}

.header-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-badge {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #000;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  letter-spacing: 0.05em;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-sub {
  font-size: 0.8rem;
  color: var(--primary);
  font-family: var(--font-burmese);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-settings {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.btn-settings:hover {
  background: #334155;
  border-color: var(--primary);
  color: #fff;
}

.key-count-badge {
  background: var(--accent-emerald);
  color: #000;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
}

/* Layout */
.main-wrapper {
  max-width: 1440px;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.75rem;
}

@media (max-width: 1024px) {
  .main-wrapper {
    display: flex;
    flex-direction: column;
    padding: 0 1rem;
  }
  .preview-panel {
    order: -1;
    margin-bottom: 1rem;
  }
}

.sub-step-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Card Styling */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: #f1f5f9;
}

.card-title span.burmese-label {
  font-size: 0.85rem;
  font-weight: normal;
  color: var(--text-muted);
}

/* Inputs & Form Elements */
.input-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #cbd5e1;
}

.input-link-box {
  display: flex;
  gap: 0.5rem;
}

input[type="text"], input[type="url"], select, textarea {
  width: 100%;
  background: #0d131f;
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

input[type="text"]:focus, input[type="url"]:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.btn-secondary {
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid var(--border-color);
  padding: 0.7rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #334155;
  color: #fff;
}

/* Pill Grid Selectors */
.pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.5rem;
}

.pill-btn {
  background: #0d131f;
  border: 1px solid var(--border-color);
  color: #94a3b8;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  font-size: 0.825rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  user-select: none;
}

.pill-btn:hover {
  border-color: #475569;
  color: #e2e8f0;
}

.pill-btn.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--primary);
  color: #fbbf24;
  font-weight: 600;
}

/* Voice Card */
.voice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.voice-card {
  background: #0d131f;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.voice-card:hover {
  border-color: #475569;
}

.voice-card.active {
  border-color: var(--primary);
  background: rgba(245, 158, 11, 0.12);
}

.voice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.voice-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}

.voice-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.voice-controls {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.75rem;
  align-items: center;
  background: #0b101b;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.slider-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

input[type="range"] {
  accent-color: var(--primary);
  height: 5px;
  background: #1e293b;
  border-radius: 4px;
  cursor: pointer;
}

/* Accordion for advanced settings */
details.settings-accordion {
  background: #0d131f;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

details.settings-accordion summary {
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #e2e8f0;
}

.accordion-body {
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Big Action Button */
.btn-generate {
  width: 100%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  border: none;
  font-size: 1.1rem;
  font-weight: 800;
  padding: 1rem;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.btn-generate:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(245, 158, 11, 0.6);
}

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

/* Right Panel: Smartphone Mockup & Progress */
.preview-panel {
  position: sticky;
  top: 75px;
  align-self: start;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
  z-index: 20;
}

.preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.phone-mockup {
  width: 320px;
  height: 568px; /* Standard 9:16 aspect ratio */
  background: #000;
  border: 6px solid #273549;
  border-radius: 36px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.8), 0 0 25px rgba(245, 158, 11, 0.15);
}

.phone-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 14px;
  background: #273549;
  border-radius: 10px;
  z-index: 10;
}

.phone-screen {
  width: 100%;
  height: 100%;
  position: relative;
  background: #0a0e17;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.phone-bg-blur {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(14px) brightness(0.55);
  transform: scale(1.2);
}

.phone-center-clip {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  height: 180px; /* 16:9 box inside 320px width */
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Frame Scrubber Bar */
.frame-scrubber-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 320px;
  background: #0d131f;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.4rem 0.6rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.scrubber-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fbbf24;
  white-space: nowrap;
}

.scrubber-pills {
  display: flex;
  gap: 0.25rem;
}

.scrubber-pill {
  background: #1e293b;
  border: 1px solid var(--border-color);
  color: #cbd5e1;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.scrubber-pill:hover {
  background: #334155;
  color: #fff;
  border-color: #64748b;
}

.scrubber-pill.active {
  background: #f59e0b;
  color: #000;
  border-color: #f59e0b;
  font-weight: 800;
}

.btn-refresh-frame {
  background: #1e293b;
  border: 1px solid var(--border-color);
  color: #cbd5e1;
  font-size: 0.75rem;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-refresh-frame:hover {
  background: #334155;
  color: #fff;
  transform: rotate(45deg);
}

/* Font Chips */
.font-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.font-chip {
  background: #1e293b;
  border: 1px solid #334155;
  color: #94a3b8;
  font-size: 0.72rem;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.15s;
}

.font-chip:hover {
  border-color: #f59e0b;
  color: #f1f5f9;
}

.font-chip.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
  color: #fbbf24;
  font-weight: 700;
}

.font-chip-tag {
  font-size: 0.65rem;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
}

/* Blur Presets */
.blur-presets-row {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.blur-preset-btn {
  background: #1e293b;
  border: 1px solid var(--border-color);
  color: #94a3b8;
  font-size: 0.72rem;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.blur-preset-btn:hover {
  border-color: #f59e0b;
  color: #fff;
  background: #334155;
}

.phone-center-clip.full-vertical {
  top: 0;
  bottom: 0;
  height: 100%;
  transform: none;
  border-top: none;
  border-bottom: none;
  overflow: visible;
}


.phone-center-clip video, .phone-center-clip img.phone-snapshot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone-center-clip.full-vertical video,
.phone-center-clip.full-vertical img.phone-snapshot-img {
  object-fit: contain;
}


.phone-logo {
  position: absolute;
  z-index: 5;
  max-width: 60px;
  max-height: 25px;
  object-fit: contain;
}

.phone-logo.pos-top_right { top: 25px; right: 12px; }
.phone-logo.pos-top_left { top: 25px; left: 12px; }
.phone-logo.pos-top_center { top: 25px; left: 50%; transform: translateX(-50%); }
.phone-logo.pos-bottom_right { bottom: 60px; right: 12px; }
.phone-logo.pos-bottom_left { bottom: 60px; left: 12px; }

.phone-subtitle {
  position: absolute;
  left: 12px;
  right: 12px;
  text-align: center;
  font-family: var(--font-burmese);
  font-weight: 700;
  font-size: 11px;
  text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 3px #000;
  z-index: 12;
  pointer-events: none;
  line-height: 1.3;
}

.phone-subtitle.place-bottom_safe { top: 78%; }
.phone-subtitle.place-mid_lower { top: 68%; }
.phone-subtitle.place-center { top: 50%; transform: translateY(-50%); }
.phone-subtitle.place-top { top: 15%; }

/* Progress Card */
.progress-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.25rem;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: #0d131f;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  margin-bottom: 0.75rem;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f59e0b, #10b981);
  transition: width 0.3s ease;
}

.pipeline-steps {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.1rem;
}

.step-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(51, 65, 85, 0.45);
  border-radius: 9px;
  transition: all 0.25s ease;
  gap: 0.75rem;
}

.step-item-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.step-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: rgba(30, 41, 59, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  border: 1px solid rgba(71, 85, 105, 0.35);
  transition: all 0.2s ease;
}

.step-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.step-title {
  font-size: 0.825rem;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}

.step-sub {
  font-size: 0.71rem;
  color: #64748b;
  margin-top: 1px;
  line-height: 1.25;
}

.step-badge {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.35);
  color: #64748b;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

/* Active State */
.step-item.active {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.12);
  transform: translateX(2px);
}

.step-item.active .step-icon {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  animation: stepIconPulse 1.8s infinite alternate ease-in-out;
}

.step-item.active .step-title {
  color: #fbbf24;
}

.step-item.active .step-sub {
  color: #cbd5e1;
}

.step-item.active .step-badge {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
}

/* Done State */
.step-item.done {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.35);
}

.step-item.done .step-icon {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
}

.step-item.done .step-title {
  color: #e2e8f0;
}

.step-item.done .step-sub {
  color: #94a3b8;
}

.step-item.done .step-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

@keyframes stepIconPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

/* Ready to Upload Box */
.ready-box {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--accent-emerald);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.download-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.btn-download {
  background: #1e293b;
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-download.primary {
  grid-column: span 2;
  background: var(--accent-emerald);
  color: #000;
  font-weight: 700;
  border: none;
}

.btn-download:hover {
  filter: brightness(1.15);
}

/* Settings Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop.open {
  display: flex;
}

.modal-content {
  background: #111827;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

.modal-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.btn-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.key-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  background: #0d131f;
  border-radius: 8px;
  overflow: hidden;
}

.key-table th, .key-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.key-table th {
  background: #172033;
  color: #94a3b8;
}

.badge-active {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.badge-cooldown {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

/* Subtitle Cover Blur Box Mockup */
.phone-blur-box {
  position: absolute;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px dashed #f59e0b;
  border-radius: 4px;
  z-index: 8;
  cursor: move;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.7);
  touch-action: none;
}

.phone-blur-box:hover {
  border-color: #fbbf24;
  background: rgba(255, 255, 255, 0.26);
}

.phone-blur-box .blur-label {
  font-size: 8px;
  font-weight: 700;
  color: #fef08a;
  background: rgba(0, 0, 0, 0.75);
  padding: 1px 5px;
  border-radius: 3px;
  pointer-events: none;
  letter-spacing: 0.02em;
}

.phone-blur-box .blur-resize-handle {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 12px;
  height: 12px;
  background: #f59e0b;
  border: 1.5px solid #fff;
  border-radius: 3px;
  cursor: se-resize;
  box-shadow: 0 0 4px rgba(0,0,0,0.5);
  touch-action: none;
}

/* Switch Toggle Component */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
  margin: 0;
}

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

.slider.round {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #334155;
  transition: .25s ease;
  border-radius: 22px;
  border: 1px solid var(--border-color);
}

.slider.round:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .25s ease;
  border-radius: 50%;
}

input:checked + .slider.round {
  background-color: #f59e0b;
}

input:checked + .slider.round:before {
  transform: translateX(20px);
}

/* Audio Switch Row Card */
.audio-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.85rem;
  background: #0d131f;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 0.65rem;
}

.audio-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.audio-toggle-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f1f5f9;
}

.audio-toggle-desc {
  font-size: 0.72rem;
  color: #94a3b8;
}

/* History Modal & Cards */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.history-card {
  background: #0d131f;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: border-color 0.2s, transform 0.15s;
}

.history-card:hover {
  border-color: rgba(6, 182, 212, 0.45);
  transform: translateY(-1px);
}

.history-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.history-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  color: #94a3b8;
  flex-wrap: wrap;
}

.history-meta span.badge {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
}

.history-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.btn-history-action {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-history-action:hover {
  background: #334155;
  color: #fff;
  border-color: var(--primary);
}

.btn-history-action.btn-play {
  background: rgba(6, 182, 212, 0.15);
  color: #38bdf8;
  border-color: rgba(6, 182, 212, 0.4);
}

.btn-history-action.btn-play:hover {
  background: var(--accent-cyan);
  color: #000;
}

.btn-history-action.btn-delete {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-history-action.btn-delete:hover {
  background: #ef4444;
  color: #fff;
}

.btn-history-action.btn-select {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.45);
  font-weight: 600;
}

.btn-history-action.btn-select:hover {
  background: #10b981;
  color: #022c22;
  border-color: #10b981;
}

.btn-history-action.btn-reuse {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
}

.btn-history-action.btn-reuse:hover {
  background: #f59e0b;
  color: #000;
  border-color: #f59e0b;
}

