/* AutoCaption Studio • Pure White Vercel Theme */

:root {
  /* Pure White Palette */
  --canvas: #ffffff;
  --canvas-elevated: #ffffff;
  --surface-secondary: #f9f9f9;
  --surface-hover: #f3f3f3;
  
  --hairline: #eaeaea;
  --hairline-hover: #d4d4d4;
  --hairline-active: #000000;

  --ink: #000000;
  --text-body: #444444;
  --text-muted: #666666;
  --text-dim: #888888;

  --vercel-blue: #0070f3;
  --accent-cyan: #008f88;
  --accent-purple: #7928ca;
  --accent-pink: #d9006c;
  --accent-green: #0a8f4c;

  /* Typography */
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Radius Scale */
  --rounded-sm: 6px;
  --rounded-md: 10px;
  --rounded-lg: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  height: 100vh;
  overflow: hidden;
  user-select: none;
}

/* APP SHELL */
.app-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  background-color: var(--canvas);
}

/* TOPBAR */
.topbar {
  height: 52px;
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.brand-logo {
  display: block;
  flex-shrink: 0;
  border-radius: 6px;
  transition: transform 0.15s ease;
}

.brand:hover .brand-logo {
  transform: scale(1.05);
}

.brand-name {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #09090b;
}

.brand-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #52525b;
  padding: 1px 6px;
  border: 1px solid #d4d4d8;
  border-radius: 4px;
  background: #f4f4f5;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border-radius: var(--rounded-sm);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--ink);
  color: var(--canvas);
}

.btn-primary:hover:not(:disabled) {
  background: #2b2b27;
  transform: translateY(-1px);
}

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

.btn-secondary {
  background: var(--canvas-elevated);
  color: var(--ink);
  border: 1px solid var(--hairline);
}

.btn-secondary:hover {
  background: var(--surface-secondary);
  border-color: var(--hairline-hover);
}

.btn-icon-only {
  width: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-full {
  width: 100%;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--ink);
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--rounded-sm);
  transition: background 0.15s;
}

.btn-icon:hover {
  background: var(--surface-secondary);
}

/* WORKSPACE */
.workspace {
  display: flex;
  flex: 1;
  height: calc(100vh - 52px);
  overflow: hidden;
  background-color: var(--canvas);
}

/* CENTER STAGE */
.stage-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  position: relative;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}

.ambient-mesh-glow {
  display: none;
}

.viewport-wrapper {
  position: relative;
  width: 100%;
  height: calc(100% - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

/* FLAT STAGE DROPZONE (No Card Container) */
.dropzone-frame {
  width: 100%;
  max-width: 440px;
  height: auto;
  border-radius: var(--rounded-md);
  background: transparent;
  border: 1px dashed transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 20px;
  text-align: center;
  transition: all 0.2s ease;
}

.dropzone-frame:hover {
  border-color: transparent;
  box-shadow: none;
}

.dropzone-frame.dragover {
  border-color: var(--hairline-hover);
  background: var(--surface-secondary);
}

.dropzone-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.dropzone-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.dropzone-icon-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface-secondary);
  border: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--ink);
}

.dropzone-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  color: var(--ink);
}

.dropzone-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 8px;
}

.dropzone-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.dropzone-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 280px;
}

/* PLAYER & CANVAS CONTAINER */
.player-container {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--rounded-md);
  overflow: hidden;
  box-shadow: 0 20px 48px -10px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--hairline);
  background: #000000;
}

#preview-canvas {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.hidden-source-video {
  display: none;
}

.canvas-loader {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  z-index: 20;
}

.spinner {
  width: 30px;
  height: 30px;
  border: 2px solid var(--hairline);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.progress-bar-container {
  width: 180px;
  height: 4px;
  background: var(--surface-secondary);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--ink);
  transition: width 0.2s ease;
}

/* PLAYBACK SCRUBBER BAR */
.playback-bar {
  width: 100%;
  max-width: 580px;
  height: 44px;
  background: var(--canvas-elevated);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-sm);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 12px;
  margin-top: 14px;
  z-index: 5;
}

.time-display {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  min-width: 85px;
}

.scrubber-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: #d4d4d8;
  outline: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

input[type="range"]:hover {
  background: #a1a1aa;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #09090b;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #09090b;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

/* RIGHT SIDEBAR */
.sidebar {
  width: 360px;
  background: var(--canvas);
  border-left: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
}

/* TABS */
.sidebar-tabs {
  display: flex;
  height: 44px;
  border-bottom: 1px solid var(--hairline);
  background: var(--canvas);
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}

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

.tab-btn.active {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--ink);
}

.tab-pane {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 18px;
}

.tab-pane.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* SMART JUMPCUT CARD */
.smart-jumpcut-card {
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid #d4d4d8;
  border-radius: var(--rounded-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

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

.jumpcut-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #09090b;
  background: #f4f4f5;
  border: 1px solid #d4d4d8;
  padding: 1px 6px;
  border-radius: 4px;
}

.jumpcut-stats {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #52525b;
  font-weight: 500;
}

.jumpcut-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #3f3f46;
  font-weight: 500;
}

.control-select-sm {
  background: #ffffff;
  color: #09090b;
  border: 1px solid #d4d4d8;
  padding: 3px 8px;
  border-radius: var(--rounded-sm);
  font-size: 11px;
  font-weight: 500;
  outline: none;
  font-family: inherit;
  cursor: pointer;
}

.control-select-sm:hover {
  border-color: #71717a;
}

/* PANEL SECTIONS */
.panel-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.mono-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #09090b;
  text-transform: uppercase;
}

.section-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #71717a;
  font-weight: 500;
}

/* PRESETS (Dark Cinema Preview Tiles for Subtitle Visibility) */
.presets-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.preset-card {
  background: #0f0f11;
  border: 1px solid #27272a;
  border-radius: var(--rounded-sm);
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 54px;
  justify-content: center;
  transition: all 0.15s ease;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.preset-card:hover {
  border-color: #52525b;
  background: #18181b;
}

.preset-card.active {
  border-color: #09090b;
  outline: 2px solid #09090b;
  outline-offset: 2px;
  background: #18181b;
}

.preset-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #a1a1aa;
  text-transform: uppercase;
}

.preset-sample {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.font-montserrat { font-family: 'Montserrat', sans-serif; }
.font-bangers { font-family: 'Bangers', cursive; }
.font-inter { font-family: 'Inter', sans-serif; }
.font-mono { font-family: var(--font-mono); }
.font-playfair { font-family: 'Playfair Display', serif; }

/* TYPOGRAPHY CONTROLS */
.dual-slider-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.compact-slider-item, .single-slider-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #18181b;
  font-weight: 500;
}

.slider-val {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #09090b;
  font-weight: 700;
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.control-label {
  color: #18181b;
  font-weight: 500;
  font-size: 12px;
}

.control-select {
  background: #ffffff;
  color: #09090b;
  border: 1px solid #d4d4d8;
  padding: 6px 10px;
  border-radius: var(--rounded-sm);
  font-size: 12px;
  font-weight: 500;
  outline: none;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease;
}

.control-select:hover {
  border-color: #71717a;
}

.control-select:focus {
  border-color: #09090b;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

/* COLOR CHIPS */
.color-chips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.color-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #d4d4d8;
  padding: 6px 10px;
  border-radius: var(--rounded-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.color-chip:hover {
  border-color: #71717a;
  background: #fafafa;
}

.color-chip input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  border: 1.5px solid #d4d4d8;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  background: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.color-chip input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
  border-radius: 50%;
}

.color-chip input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 50%;
}

.color-chip input[type="color"]::-moz-color-swatch {
  border: none;
  border-radius: 50%;
}

.color-chip-label {
  font-size: 11.5px;
  color: #18181b;
  font-weight: 500;
}

/* TOGGLES */
.toggles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #d4d4d8;
  padding: 6px 10px;
  border-radius: var(--rounded-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.toggle-card:hover {
  border-color: #71717a;
  background: #fafafa;
}

.toggle-text {
  font-size: 11.5px;
  color: #18181b;
  font-weight: 500;
}

.toggle-card input[type="checkbox"] {
  display: none;
}

.toggle-slider-sm {
  width: 28px;
  height: 16px;
  background-color: #d4d4d8;
  border: 1px solid #a1a1aa;
  border-radius: 16px;
  position: relative;
  transition: background-color 0.15s, border-color 0.15s;
}

.toggle-slider-sm:before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  left: 1px;
  bottom: 1px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: transform 0.15s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.toggle-card input:checked + .toggle-slider-sm {
  background-color: #09090b;
  border-color: #09090b;
}

.toggle-card input:checked + .toggle-slider-sm:before {
  transform: translateX(12px);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 30px;
  height: 16px;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #d4d4d8;
  border: 1px solid #a1a1aa;
  transition: .15s;
  border-radius: 16px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 10px;
  width: 10px;
  left: 2px;
  bottom: 2px;
  background-color: #ffffff;
  transition: .15s;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
  background-color: #09090b;
  border-color: #09090b;
}

input:checked + .toggle-slider:before {
  transform: translateX(14px);
}

.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 14px; }
.mb-2 { margin-bottom: 8px; }

/* TRANSCRIPT TAB */
.transcript-header-actions {
  margin-bottom: 14px;
}

.transcript-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.empty-transcript {
  text-align: center;
  padding: 40px 10px;
  color: #71717a;
  font-size: 12px;
}

.transcript-card {
  background: #ffffff;
  border: 1px solid #d4d4d8;
  border-radius: var(--rounded-sm);
  padding: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.transcript-card:hover {
  border-color: #71717a;
}

.transcript-card.active-segment {
  border-color: #09090b;
  background: #fafafa;
}

.transcript-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: #52525b;
  font-family: var(--font-mono);
  margin-bottom: 6px;
  font-weight: 600;
}

.transcript-words-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.word-chip {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  background: #f4f4f5;
  color: #09090b;
  border: 1px solid #d4d4d8;
  font-weight: 500;
  transition: all 0.1s;
}

.word-chip.active-word {
  background: #09090b;
  color: #ffffff;
  border-color: #09090b;
  font-weight: 600;
}

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 19, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-md);
  box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 420px;
  padding: 22px;
}

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

.modal-header h3 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.btn-close:hover {
  color: var(--ink);
}

.export-progress-bar {
  width: 100%;
  height: 4px;
  background: var(--hairline);
  border-radius: 2px;
  overflow: hidden;
  margin: 16px 0 8px;
}

.export-progress-fill {
  height: 100%;
  background: var(--ink);
  transition: width 0.15s ease;
}

.export-percent {
  display: block;
  text-align: right;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.export-download-area {
  margin-top: 16px;
}

/* SETTINGS GROUP */
.settings-group {
  background: var(--canvas-elevated);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-sm);
  padding: 12px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}

.settings-row + .settings-row {
  border-top: 1px solid var(--hairline);
}

.settings-row-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-row-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink);
}

.settings-row-desc {
  font-size: 11px;
  color: var(--text-dim);
}

.settings-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px dashed var(--hairline);
  margin-top: 6px;
  font-size: 11px;
}

.badge-beta {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(121, 40, 202, 0.1);
  color: var(--accent-purple);
  border: 1px solid rgba(121, 40, 202, 0.2);
}

.badge-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  background: var(--surface-secondary);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  color: var(--text-muted);
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE STYLES
   ========================================================================== */

@media (max-width: 860px) {
  /* Allow natural scrolling on mobile */
  body {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .app-layout {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  /* Stack Stage and Controls Vertically */
  .workspace {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  /* Stage (Top Section) */
  .stage-container {
    width: 100%;
    min-height: auto;
    padding: 20px 14px 16px;
    overflow: visible;
  }

  .viewport-wrapper {
    width: 100%;
    height: 420px;
    max-height: 52vh;
  }

  .player-container {
    max-height: 100%;
    aspect-ratio: 9 / 16;
  }

  .dropzone-frame {
    max-width: 100%;
    padding: 24px 16px;
  }

  .dropzone-title {
    font-size: 1.2rem;
  }

  .dropzone-subtitle {
    font-size: 12.5px;
    max-width: 320px;
  }

  .dropzone-actions {
    max-width: 100%;
    width: 100%;
  }

  /* Playback Bar */
  .playback-bar {
    max-width: 100%;
    height: 44px;
    padding: 0 10px;
    gap: 8px;
    margin-top: 10px;
  }

  .time-display {
    font-size: 10.5px;
    min-width: 78px;
  }

  /* Controls Sidebar (Bottom Section) */
  .sidebar {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--hairline);
    height: auto;
    overflow: visible;
  }

  .sidebar-tabs {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--canvas);
    height: 46px;
  }

  .tab-btn {
    font-size: 13px;
    padding: 0 12px;
  }

  .tab-pane {
    padding: 16px 14px 48px;
    overflow-y: visible;
  }

  /* Modals */
  .modal-card {
    width: calc(100vw - 28px);
    max-width: 440px;
    margin: 14px;
    padding: 20px 16px;
  }
}

@media (max-width: 480px) {
  /* Ultra-Compact Phone Header */
  .topbar {
    padding: 0 10px;
    height: 48px;
  }

  .brand {
    gap: 6px;
  }

  .brand-logo {
    width: 20px;
    height: 20px;
  }

  .brand-name {
    font-size: 0.88rem;
  }

  .topbar-actions {
    gap: 4px;
  }

  .btn {
    padding: 0 8px;
    height: 30px;
    font-size: 11px;
    gap: 4px;
  }

  .viewport-wrapper {
    height: 360px;
    max-height: 48vh;
  }

  .presets-grid {
    gap: 6px;
  }

  .preset-card {
    padding: 6px 8px;
    min-height: 48px;
  }

  .preset-sample {
    font-size: 12px;
  }

  .color-chips-grid,
  .toggles-grid {
    gap: 6px;
  }

  .color-chip,
  .toggle-card {
    padding: 6px 8px;
  }

  .color-chip-label,
  .toggle-text {
    font-size: 10.5px;
  }
}
