/* Snap2MP4 - Premium Stylesheet */

:root {
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Light Theme Variables */
  --bg-canvas: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-surface-subtle: #f1f5f9;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --accent-primary: #2563eb;
  --accent-primary-hover: #1d4ed8;
  --accent-primary-glow: rgba(37, 99, 235, 0.15);
  
  --accent-emerald: #059669;
  --accent-violet: #7c3aed;
  
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 24px -4px rgba(37, 99, 235, 0.2);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
}

[data-theme="dark"] {
  --bg-canvas: #090d16;
  --bg-surface: #111827;
  --bg-surface-elevated: #1a2234;
  --bg-surface-subtle: #172033;
  --border-subtle: #1f293d;
  --border-strong: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-primary: #3b82f6;
  --accent-primary-hover: #60a5fa;
  --accent-primary-glow: rgba(59, 130, 246, 0.25);
  
  --accent-emerald: #10b981;
  --accent-violet: #8b5cf6;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px -4px rgba(59, 130, 246, 0.3);
}

/* Base resets & typography */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.5;
  transition: background-color 0.2s ease, color 0.2s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}

/* Navbar */
.snap-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(var(--bg-surface), 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.brand-icon-box {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.nav-link-custom {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.925rem;
  text-decoration: none;
  transition: color 0.15s ease;
  padding: 0.5rem 0.25rem;
  white-space: nowrap;
}

.nav-link-custom:hover {
  color: var(--text-primary);
}

/* Buttons */
.btn-snap-primary {
  background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  font-size: 0.925rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 8px var(--accent-primary-glow);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  white-space: nowrap;
}

.btn-snap-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--accent-primary-hover), #4338ca);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-primary-glow);
  color: #ffffff;
}

.btn-snap-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-snap-outline {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.55rem 1rem;
  font-weight: 500;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.btn-snap-outline:hover {
  background-color: var(--bg-surface-subtle);
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.btn-snap-subtle {
  background-color: var(--bg-surface-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.875rem;
  font-weight: 500;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.btn-snap-subtle:hover {
  background-color: var(--border-subtle);
  color: var(--text-primary);
}

/* Theme Toggle Button */
.btn-theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-theme-toggle:hover {
  color: var(--text-primary);
  background-color: var(--border-subtle);
}

/* Hero Section */
.hero-section {
  padding: 4.5rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

.hero-glow-bg {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(124, 58, 237, 0.08) 45%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  max-width: 840px;
  margin: 0 auto 1.25rem;
  text-wrap: balance;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 2.25rem;
  line-height: 1.6;
}

/* Dropzone */
.upload-dropzone {
  background-color: var(--bg-surface);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
  box-shadow: var(--shadow-sm);
  max-width: 760px;
  margin: 0 auto;
}

.upload-dropzone:hover, .upload-dropzone.drag-active {
  border-color: var(--accent-primary);
  background-color: rgba(37, 99, 235, 0.02);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.upload-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: var(--accent-primary);
  transition: transform 0.2s ease;
}

.upload-dropzone:hover .upload-icon-circle {
  transform: scale(1.08);
}

.sample-pills-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 1.25rem;
}

.btn-sample {
  background-color: var(--bg-surface-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-sample:hover {
  background-color: var(--border-subtle);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* Feature Trust Badges */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Workspace Layout */
.workspace-section {
  padding: 1.5rem 0 4rem;
}

.workspace-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.workspace-topbar {
  padding: 1rem 1.5rem;
  background-color: var(--bg-surface-subtle);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.image-file-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-thumb-preview {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-strong);
  background-color: #000;
}

.file-title-wrap {
  line-height: 1.3;
}

.file-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Control Panel */
.controls-container {
  padding: 1.5rem;
}

.control-group {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.control-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

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

.control-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.control-value-badge {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-primary);
  font-family: var(--font-mono);
}

/* Segmented Buttons */
.segmented-control {
  display: flex;
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 3px;
  width: 100%;
}

.segmented-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.5rem;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-align: center;
}

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

.segmented-btn.active {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .segmented-btn.active {
  background-color: var(--bg-surface-elevated);
}

/* Custom Range Sliders */
.snap-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border-strong);
  outline: none;
  transition: background 0.2s;
  cursor: pointer;
}

.snap-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transition: transform 0.1s ease;
}

.snap-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.snap-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

/* Color Presets */
.color-presets-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-dot-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.color-dot-btn:hover {
  transform: scale(1.1);
}

.color-dot-btn.active {
  border-color: var(--accent-primary);
  transform: scale(1.1);
}

.color-picker-input {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}

/* Preview Area */
.preview-column {
  background-color: var(--bg-surface-subtle);
  border-left: 1px solid var(--border-subtle);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 520px;
}

@media (max-width: 991.98px) {
  .preview-column {
    border-left: none;
    border-top: 1px solid var(--border-subtle);
  }
}

.preview-stage-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 9/16;
  background-color: #000000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-strong);
  transition: aspect-ratio 0.25s ease, max-width 0.25s ease;
}

.preview-stage-wrapper.ratio-16-9 {
  aspect-ratio: 16/9;
  max-width: 580px;
}

.preview-stage-wrapper.ratio-1-1 {
  aspect-ratio: 1/1;
  max-width: 420px;
}

.preview-stage-wrapper.ratio-original {
  max-width: 440px;
  max-height: 600px;
}

#previewCanvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Player Bar */
.player-controls-bar {
  width: 100%;
  margin-top: 1.25rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.player-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.btn-player-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-player-circle:hover {
  background: var(--accent-primary-hover);
  transform: scale(1.05);
}

.time-readout {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Export Progress / Modal */
.export-card {
  width: 100%;
  margin-top: 1.25rem;
}

.progress-snap-track {
  width: 100%;
  height: 8px;
  background-color: var(--bg-surface-subtle);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.progress-snap-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-violet));
  border-radius: 4px;
  width: 0%;
  transition: width 0.15s ease;
}

/* FAQ & Content Sections */
.content-section {
  padding: 4.5rem 0;
  border-top: 1px solid var(--border-subtle);
}

.section-kicker {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.step-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  height: 100%;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.step-number {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-subtle);
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.accordion-snap {
  --bs-accordion-bg: var(--bg-surface);
  --bs-accordion-color: var(--text-primary);
  --bs-accordion-border-color: var(--border-subtle);
  --bs-accordion-btn-color: var(--text-primary);
  --bs-accordion-btn-bg: var(--bg-surface);
  --bs-accordion-active-color: var(--accent-primary);
  --bs-accordion-active-bg: var(--bg-surface-subtle);
}

.accordion-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md) !important;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.accordion-button {
  font-weight: 600;
  font-size: 1rem;
}

.accordion-button:focus {
  box-shadow: none;
  border-color: var(--border-subtle);
}

/* Footer */
.snap-footer {
  margin-top: auto;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0 2rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

/* Ad Slot Styles */
.ad-container-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.5rem auto;
  width: 100%;
  max-width: 980px;
  min-height: 90px;
  overflow: hidden;
}

.ad-slot-box {
  width: 100%;
  background-color: var(--bg-surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
  position: relative;
  transition: all 0.2s ease;
}

.ad-leaderboard {
  max-width: 728px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

@media (max-width: 768px) {
  .ad-leaderboard {
    max-width: 320px;
    min-height: 50px;
    padding: 8px;
  }
}

.ad-responsive {
  max-width: 728px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.ad-slot-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.ad-slot-mock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Upload Mode Tabs (File vs URL) */
.upload-mode-switcher {
  display: inline-flex;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 4px;
  gap: 4px;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.upload-mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.upload-mode-tab.active {
  background: var(--bg-surface-subtle);
  color: var(--accent-primary);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .upload-mode-tab.active {
  background: var(--bg-surface-elevated);
}

/* URL Capture Panel */
.url-capture-panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-sm);
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
}

.url-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  background-color: var(--bg-canvas);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.url-input-wrap:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

.url-icon-prefix {
  padding: 0 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.url-main-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.85rem 0.5rem;
  font-size: 1rem;
  color: var(--text-primary);
  outline: none;
}

.url-main-input::placeholder {
  color: var(--text-muted);
}

.btn-capture-url {
  margin: 4px;
  border-radius: var(--radius-sm);
}

.url-presets-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 1rem;
}

/* Utilities */
.text-balance {
  text-wrap: balance;
}

.cursor-pointer {
  cursor: pointer;
}

