/* ==========================================================================
   Lumynce — Modern Liquid Glass & Light UI Design System
   Pure Modern CSS3 | Backdrop Blur | Specular Borders | Ambient Mesh Glow
   ========================================================================== */

:root {
  /* Core Palette — Crisp Daylight & WhatsApp Emerald / Lime Accents */
  --bg-canvas: #f4f8f6;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --accent-emerald: #10b981;
  --accent-emerald-dark: #059669;
  --accent-lime: #84cc16;
  --accent-lime-bright: #a3e635;
  --accent-whatsapp: #25d366;
  --accent-teal: #14b8a6;

  /* Liquid Glass Surface Tokens */
  --glass-fill-strong: rgba(255, 255, 255, 0.72);
  --glass-fill-medium: rgba(255, 255, 255, 0.54);
  --glass-fill-soft: rgba(255, 255, 255, 0.36);
  --glass-border: rgba(255, 255, 255, 0.68);
  --glass-border-subtle: rgba(255, 255, 255, 0.45);
  --glass-highlight: inset 0 1px 1px rgba(255, 255, 255, 0.92), inset 0 -1px 1px rgba(255, 255, 255, 0.35);

  /* Elevations & Refractions */
  --shadow-glass:
    0 24px 48px -12px rgba(15, 23, 42, 0.07),
    0 8px 20px -6px rgba(16, 185, 129, 0.08),
    var(--glass-highlight);
  --shadow-glass-hover:
    0 28px 60px -12px rgba(16, 185, 129, 0.16),
    0 12px 24px -6px rgba(15, 23, 42, 0.08),
    var(--glass-highlight);
  --shadow-button:
    0 12px 28px -6px rgba(16, 185, 129, 0.42),
    inset 0 1px 1px rgba(255, 255, 255, 0.45);

  /* Radii & Spacing */
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-pill: 9999px;

  /* Blur Filter */
  --blur-glass: blur(18px) saturate(180%);
  --transition-fluid: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   1. Ambient Backdrop Mesh Glow
   ========================================================================== */
.ambient-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 16%, rgba(163, 230, 53, 0.28) 0%, transparent 45%),
    radial-gradient(circle at 86% 18%, rgba(16, 185, 129, 0.24) 0%, transparent 48%),
    radial-gradient(circle at 75% 84%, rgba(37, 211, 102, 0.20) 0%, transparent 50%),
    radial-gradient(circle at 22% 80%, rgba(20, 184, 166, 0.16) 0%, transparent 45%),
    linear-gradient(160deg, #f8fafc 0%, #f0fdf4 52%, #ecfdf5 100%);
}

.mesh-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.65;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.mesh-orb--lime {
  width: 460px;
  height: 460px;
  top: -110px;
  left: -80px;
  background: radial-gradient(circle, rgba(163, 230, 53, 0.55) 0%, rgba(132, 204, 22, 0) 70%);
}

.mesh-orb--emerald {
  width: 520px;
  height: 520px;
  top: 12%;
  right: -140px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.45) 0%, rgba(16, 185, 129, 0) 70%);
  animation-delay: -6s;
}

.mesh-orb--mint {
  width: 420px;
  height: 420px;
  bottom: -100px;
  left: 28%;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.4) 0%, rgba(20, 184, 166, 0) 70%);
  animation-delay: -11s;
}

@keyframes floatOrb {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(28px, -24px, 0) scale(1.06);
  }
  100% {
    transform: translate3d(-22px, 30px, 0) scale(0.96);
  }
}

/* ==========================================================================
   2. Liquid Glass Primitives
   ========================================================================== */
.glass-card {
  background: linear-gradient(145deg, var(--glass-fill-strong) 0%, var(--glass-fill-soft) 100%);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-glass);
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--transition-fluid), box-shadow 0.35s var(--transition-fluid), border-color 0.35s ease;
}

/* Subtle top specular light refraction bar */
.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent);
  pointer-events: none;
}

.glass-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.95rem;
  background: var(--glass-fill-medium);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   3. Layout Container & Top Navigation Bar
   ========================================================================== */
.app-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 4rem;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.35rem;
  margin-bottom: 2rem;
  border-radius: var(--radius-pill);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent-emerald) 0%, var(--accent-lime) 100%);
  display: grid;
  place-items: center;
  color: #ffffff;
  box-shadow: 0 8px 18px -4px rgba(16, 185, 129, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.brand-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-emerald-dark);
  letter-spacing: 0.02em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.btn-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--transition-fluid);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.88);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.12);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(135deg, var(--accent-emerald) 0%, #16a34a 55%, var(--accent-lime) 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: var(--shadow-button);
  transition: all 0.28s var(--transition-fluid);
  text-decoration: none;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -6px rgba(16, 185, 129, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

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

/* ==========================================================================
   4. Hero Header Section
   ========================================================================== */
.hero-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 2.4rem;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.hero-title {
  font-size: clamp(2rem, 4.2vw, 3.35rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin: 0.95rem 0 0.85rem;
  color: var(--text-primary);
}

.hero-title-gradient {
  background: linear-gradient(135deg, #059669 0%, #10b981 48%, #65a30d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: clamp(0.98rem, 1.6vw, 1.125rem);
  color: var(--text-secondary);
  max-width: 660px;
  margin: 0 auto;
}

/* ==========================================================================
   5. Studio Workspace Grid (Left: Controls & Dropzone | Right: Status Viewer)
   ========================================================================== */
.studio-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.75rem;
  align-items: start;
}

.studio-panel {
  padding: 1.85rem;
}

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

.panel-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.panel-title svg {
  color: var(--accent-emerald-dark);
}

/* ==========================================================================
   6. Liquid Glass Drag-and-Drop Upload Zone
   ========================================================================== */
.dropzone {
  position: relative;
  border: 2px dashed rgba(16, 185, 129, 0.42);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62) 0%, rgba(240, 253, 244, 0.42) 100%);
  padding: 2.35rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s var(--transition-fluid);
  margin-bottom: 1.5rem;
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--accent-emerald);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(220, 252, 231, 0.58) 100%);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -12px rgba(16, 185, 129, 0.2);
}

.dropzone-icon-wrap {
  width: 68px;
  height: 68px;
  margin: 0 auto 1rem;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16) 0%, rgba(163, 230, 53, 0.22) 100%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  display: grid;
  place-items: center;
  color: var(--accent-emerald-dark);
  box-shadow: 0 10px 24px -6px rgba(16, 185, 129, 0.22), inset 0 1px 1px rgba(255, 255, 255, 0.9);
  transition: transform 0.3s var(--transition-fluid);
}

.dropzone:hover .dropzone-icon-wrap,
.dropzone.is-dragover .dropzone-icon-wrap {
  transform: scale(1.07) translateY(-2px);
}

.dropzone-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.dropzone-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.spec-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
}

.spec-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(16, 185, 129, 0.22);
  color: #065f46;
}

.selected-file-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(16, 185, 129, 0.3);
  margin-bottom: 1.35rem;
}

.selected-file-info {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.selected-file-name {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* ==========================================================================
   7. Optimization Presets & 30s Story Splitter Controls
   ========================================================================== */
.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
  display: block;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.preset-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.55);
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: all 0.25s var(--transition-fluid);
}

.preset-card:hover {
  background: rgba(255, 255, 255, 0.78);
}

.preset-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.preset-card.is-active {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92) 0%, rgba(236, 253, 245, 0.78) 100%);
  border-color: var(--accent-emerald);
  box-shadow: 0 10px 24px -8px rgba(16, 185, 129, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.preset-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.preset-name {
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--text-primary);
}

.preset-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.16rem 0.5rem;
  border-radius: var(--radius-pill);
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald-dark);
}

.preset-desc {
  font-size: 0.79rem;
  color: var(--text-secondary);
}

.preset-tech {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* 30-Second Splitter Toggle Row */
.splitter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--glass-border);
  margin-bottom: 1.4rem;
}

.splitter-info {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.splitter-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald-dark);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.splitter-title {
  font-weight: 700;
  font-size: 0.92rem;
}

.splitter-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* Liquid Toggle Switch */
.toggle-switch {
  position: relative;
  width: 50px;
  height: 28px;
  flex-shrink: 0;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(148, 163, 184, 0.38);
  border-radius: var(--radius-pill);
  transition: 0.28s var(--transition-fluid);
  box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.15);
}

.toggle-slider::before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: 0.28s var(--transition-fluid);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-lime));
}

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

/* ==========================================================================
   8. Real-Time Encoding Progress Card
   ========================================================================== */
.progress-box {
  padding: 1.15rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(16, 185, 129, 0.3);
  margin-top: 1.2rem;
}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  font-size: 0.86rem;
  font-weight: 700;
}

.progress-track {
  width: 100%;
  height: 12px;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--accent-emerald) 0%, var(--accent-lime-bright) 50%, var(--accent-emerald) 100%);
  background-size: 200% 100%;
  animation: liquidShimmer 2.2s linear infinite;
  transition: width 0.35s ease;
}

@keyframes liquidShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: 0 0;
  }
}

.progress-step-hint {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Cancel Button & Action Row */
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.68rem 1.2rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px -6px rgba(239, 68, 68, 0.42), inset 0 1px 1px rgba(255, 255, 255, 0.35);
  transition: all 0.25s var(--transition-fluid);
}

.btn-danger:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -6px rgba(239, 68, 68, 0.55);
}

.btn-danger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.controls-action-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Live FFmpeg Terminal Console */
.terminal-window {
  margin-top: 1.15rem;
  border-radius: var(--radius-md);
  background: rgba(11, 20, 26, 0.94);
  border: 1px solid rgba(16, 185, 129, 0.32);
  box-shadow: 0 18px 36px -10px rgba(15, 23, 42, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.9rem;
  background: rgba(30, 41, 59, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.terminal-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot--red {
  background: #ef4444;
}

.terminal-dot--amber {
  background: #f59e0b;
}

.terminal-dot--green {
  background: #10b981;
}

.terminal-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
}

.terminal-body {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  line-height: 1.55;
  color: #a7f3d0;
  padding: 0.9rem 1rem;
  max-height: 230px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ==========================================================================
   9. Right Column: Liquid Glass WhatsApp Status 9:16 Phone Viewer
   ========================================================================== */
.viewer-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.phone-mockup {
  width: 100%;
  max-width: 330px;
  aspect-ratio: 9 / 16;
  border-radius: 36px;
  padding: 10px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.42) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 28px 60px -15px rgba(15, 23, 42, 0.16),
    0 12px 28px -8px rgba(16, 185, 129, 0.14),
    inset 0 1px 2px rgba(255, 255, 255, 0.95);
  position: relative;
  margin-bottom: 1.35rem;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 27px;
  background: #0b141a;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* WhatsApp Status Top Progress Bars & Header Overlay */
.wa-status-top {
  position: relative;
  z-index: 3;
  padding: 12px 14px 10px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.68) 0%, transparent 100%);
  color: #ffffff;
}

.wa-segment-bars {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
}

.wa-segment-bar {
  flex: 1;
  height: 2.5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
}

.wa-segment-bar.is-active {
  background: #ffffff;
}

.wa-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wa-user-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wa-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366, #128c7e);
  border: 1.5px solid #ffffff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.75rem;
  color: #ffffff;
}

.wa-username {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.15;
}

.wa-timestamp {
  font-size: 0.68rem;
  opacity: 0.8;
}

.wa-quality-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(37, 211, 102, 0.25);
  border: 1px solid rgba(37, 211, 102, 0.6);
  color: #86efac;
}

/* Video Player Element inside Phone Frame */
.phone-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0b141a;
  z-index: 1;
}

.phone-placeholder {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.75rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.82);
  background:
    radial-gradient(circle at 50% 35%, rgba(16, 185, 129, 0.22) 0%, transparent 65%),
    #0b141a;
}

.phone-placeholder-icon {
  width: 60px;
  height: 60px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  margin-bottom: 0.9rem;
  color: #34d399;
}

.wa-status-bottom {
  position: relative;
  z-index: 3;
  padding: 10px 14px 14px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68) 0%, transparent 100%);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.72rem;
  text-align: center;
}

/* ==========================================================================
   10. Metrics Strip, Split Clips List & Share Actions
   ========================================================================== */
.metrics-strip {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}

.metric-tile {
  padding: 0.75rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--glass-border);
  text-align: center;
}

.metric-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.metric-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.15rem;
}

.action-buttons-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.action-buttons-grid .btn-primary {
  grid-column: span 2;
}

/* 30-Second Split Segments List */
.parts-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.5rem;
}

.part-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--glass-border);
  font-size: 0.84rem;
}

.part-item.is-playing {
  border-color: var(--accent-emerald);
  background: rgba(236, 253, 245, 0.85);
}

.part-item-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-mini {
  padding: 0.32rem 0.68rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, 0.3);
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-primary);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-mini:hover {
  background: var(--accent-emerald);
  color: #ffffff;
  border-color: var(--accent-emerald);
}

/* ==========================================================================
   11. Recent Jobs History & Mobile REST API Section
   ========================================================================== */
.lower-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  margin-top: 2rem;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--glass-border);
}

.code-block {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  line-height: 1.55;
  background: rgba(15, 23, 42, 0.92);
  color: #e2e8f0;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   12. Liquid Glass Modals (Auth / API Key & QR Phone Transfer)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  place-items: center;
  padding: 1.25rem;
}

.modal-backdrop.is-open {
  display: grid;
}

.modal-card {
  width: 100%;
  max-width: 460px;
  padding: 1.85rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.85);
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.toast-alert {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 120;
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.25);
  transform: translateY(140%);
  transition: transform 0.3s var(--transition-fluid);
}

.toast-alert.is-visible {
  transform: translateY(0);
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   13. Responsive Breakpoints (360px Mobile -> Ultra-Wide)
   ========================================================================== */
@media (max-width: 980px) {
  .studio-grid,
  .lower-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .app-shell {
    padding: 0.85rem 0.9rem 3rem;
  }

  .top-nav {
    border-radius: var(--radius-lg);
    padding: 0.75rem 1rem;
  }

  .studio-panel {
    padding: 1.25rem;
  }

  .preset-grid {
    grid-template-columns: 1fr;
  }

  .action-buttons-grid {
    grid-template-columns: 1fr;
  }

  .action-buttons-grid .btn-primary {
    grid-column: span 1;
  }
}

