/* ========================================================
   CAI ZHU STUDIO PRO - DESIGN SYSTEM (GLASSMORPHIC NEO-DARK)
   ======================================================== */

:root {
  /* Typography */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;

  /* Layout & Corners */
  --radius: 18px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --glass-blur: 14px;
  
  /* Core Palette (Light Theme Default) */
  --bg: #f2f5fa;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --surface-hover: rgba(255, 255, 255, 0.9);
  --surface-2: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: rgba(226, 232, 240, 0.8);
  --line-strong: rgba(203, 213, 225, 0.9);
  --line-strong: rgba(203, 213, 225, 0.9);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 12px 32px rgba(99, 91, 255, 0.08), 0 4px 8px rgba(0, 0, 0, 0.03);
  --border-glow: rgba(99, 91, 255, 0.05);

  /* Accents */
  --brand: #635bff;
  --brand-dark: #4b43df;
  --brand-soft: rgba(99, 91, 255, 0.08);
  --brand-glow: rgba(99, 91, 255, 0.2);
  --cyan: #0ea5e9;
  --cyan-soft: rgba(14, 165, 233, 0.08);
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.08);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.08);
  
  --bg-gradient: radial-gradient(at 0% 0%, rgba(99, 91, 255, 0.03) 0px, transparent 50%),
                 radial-gradient(at 100% 100%, rgba(14, 165, 233, 0.03) 0px, transparent 50%);
}

/* Dark Mode Overrides */
body.dark {
  --bg: #080a13;
  --surface: rgba(13, 19, 33, 0.65);
  --surface-solid: #0d1321;
  --surface-hover: rgba(23, 33, 56, 0.75);
  --surface-2: rgba(18, 26, 46, 0.45);
  --ink: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.12);
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --border-glow: rgba(99, 91, 255, 0.16);
  
  --brand: #7c75ff;
  --brand-dark: #635bff;
  --brand-soft: rgba(124, 117, 255, 0.12);
  --brand-glow: rgba(124, 117, 255, 0.35);
  --cyan: #06b6d4;
  --cyan-soft: rgba(6, 182, 212, 0.1);
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.1);
  
  --bg-gradient: radial-gradient(at 0% 0%, rgba(99, 91, 255, 0.07) 0px, transparent 40%),
                 radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.04) 0px, transparent 45%),
                 radial-gradient(at 50% 100%, rgba(13, 19, 33, 0.8) 0px, transparent 50%);
}

/* ========================================================
   BASE RULES & CORE ELEMENTS
   ======================================================== */

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 900px;
  background: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, textarea, select {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
}

/* Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

/* ========================================================
   LAYOUT: SHELL, TOPBAR & ASIDE
   ======================================================== */

.topbar {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: var(--glass-blur);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 8px 24px rgba(99, 91, 255, 0.3);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -0.5px;
}

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

.brand-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand h1 {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.brand p {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
  margin: 0;
  margin-top: 2px;
}

.pro-badge {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
  background: var(--ink);
  color: var(--bg);
  border-radius: 6px;
  padding: 2px 6px;
  font-family: var(--font-display);
}

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

.format-pill, .privacy-pill, .status-chip, .voice-mini {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  border-radius: 99px;
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.privacy-pill i, .summary-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px var(--success-soft);
  display: inline-block;
  animation: pulse-green 2s infinite;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}

.theme-toggle:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
  transform: translateY(-1px);
}

/* Button Base */
.btn-primary, .btn-outline, .btn-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: white;
  box-shadow: 0 4px 12px var(--brand-glow);
}
.btn-primary:hover {
  box-shadow: 0 6px 16px var(--brand-glow);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-outline:hover {
  background: var(--surface-2);
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-2px);
}
.btn-success {
  background: var(--success);
  color: white;
  box-shadow: 0 4px 12px var(--success-soft);
}
.btn-success:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - 74px);
}

/* Sidebar Workflow Navigation */
.workflow {
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 74px;
  height: calc(100vh - 74px);
  backdrop-filter: var(--glass-blur);
  z-index: 90;
}

.workflow-title {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--muted);
  font-weight: 800;
  padding: 0 12px 14px;
  text-transform: uppercase;
}

.workflow nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tab {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 14px;
  padding: 14px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab:hover {
  background: var(--surface-2);
  color: var(--ink);
  transform: translateX(3px);
}

.tab.active {
  background: var(--brand-soft);
  border-color: var(--border-glow);
  color: var(--brand);
  box-shadow: 0 4px 20px rgba(99, 91, 255, 0.05);
}

.tab > span:last-child {
  display: flex;
  flex-direction: column;
}

.tab b {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.tab.active b {
  color: var(--brand);
}

.tab small {
  font-size: 10px;
  color: var(--muted);
  margin-top: 1px;
}

.step-number {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  border: 1px solid var(--line);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-solid);
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.tab.active .step-number {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--brand-glow);
}

.copyright-card {
  margin-top: auto;
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 12px 14px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.copyright-symbol {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}

.copyright-card div:last-child {
  display: flex;
  flex-direction: column;
}

.copyright-card b {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
}

.copyright-card small {
  font-size: 9px;
  color: var(--muted);
}

/* ========================================================
   MAIN WORKSPACE & PAGES
   ======================================================== */

main {
  padding: 40px clamp(24px, 5vw, 64px) 80px;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  animation: fade-in 0.4s ease;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.2em;
  font-weight: 900;
  color: var(--brand);
  text-transform: uppercase;
}

h2 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 6px 0 8px;
  color: var(--ink);
}

.page-heading p {
  margin: 0;
  color: var(--muted);
  max-width: 720px;
  font-size: 14px;
}

.status-chip {
  color: var(--brand);
  border-color: var(--brand-glow);
  background: var(--brand-soft);
  align-self: center;
  padding: 6px 12px;
}

.status-chip.green {
  color: var(--success);
  background: var(--success-soft);
  border-color: rgba(16, 185, 129, 0.2);
}

/* Layout Grids */
.layout-grid, .merge-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}
@media (max-width: 1200px) {
  .layout-grid, .merge-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================================
   PANELS & CONTAINERS (GLASSMORPHIC)
   ======================================================== */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--border-glow) 0%, transparent 100%);
  pointer-events: none;
}

.panel:hover {
  border-color: var(--line-strong);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.03);
  transform: translateY(-2px);
}

body.dark .panel:hover {
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  border-color: var(--line-strong);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.premium-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.premium-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-soft);
  transform: translateY(-3px);
}
.premium-card h3, .premium-card h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px 0;
}
.premium-card p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 16px; }
.mb-4 { margin-bottom: 24px; }
.ml-2 { margin-left: 8px; }
.text-center { text-align: center; }

.panel-head > div:nth-child(2) {
  flex: 1;
}

.panel-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.panel h3, .empty h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.panel-head p {
  font-size: 11.5px;
  color: var(--muted);
  margin: 2px 0 0;
}

.locked-badge {
  font-size: 9px;
  letter-spacing: 0.1em;
  font-weight: 900;
  color: var(--success);
  background: var(--success-soft);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 6px 10px;
  border-radius: 8px;
  font-family: var(--font-display);
  text-transform: uppercase;
}

/* ========================================================
   UPLOADS & REFERENCE DRAG/DROP
   ======================================================== */

.uploads {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.drop {
  position: relative;
  min-height: 180px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 14px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  overflow: hidden;
}

.drop:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  transform: translateY(-2px);
}

.drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.drop border {
  display: none;
}

.drop b {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  margin-top: 10px;
  color: var(--ink);
}

.drop small {
  font-size: 10.5px;
  color: var(--muted);
  max-width: 220px;
  margin-top: 4px;
  line-height: 1.4;
}

.drop em {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  color: var(--brand);
  margin-top: 10px;
  background: var(--surface-solid);
  padding: 4px 10px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  border: 1px solid var(--line);
}

.upload-icon {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.15em;
  font-weight: 900;
  border-radius: 8px;
  padding: 8px 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  box-shadow: 0 4px 12px var(--brand-glow);
}

.drop img {
  display: none;
  width: 100%;
  height: 110px;
  object-fit: contain;
  margin-top: 10px;
  border-radius: 10px;
  position: relative;
  z-index: 3;
  border: 1px solid var(--line);
  background: #000;
}

/* ========================================================
   FORM FIELDS & INPUTS
   ======================================================== */

.field {
  display: flex;
  flex-direction: column;
}

.field + .field {
  margin-top: 16px;
}

.field label, .subtitle-panel > label, .export-panel > label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink);
  padding: 11px 14px;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.01);
}

textarea {
  resize: vertical;
  line-height: 1.6;
}

input:focus, textarea:focus, select:focus {
  background: var(--surface-solid);
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.field-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}

/* Accordion configurations */
.collapsible-wrapper {
  margin-bottom: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
}

.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: var(--surface-2);
  border: none;
  outline: none;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.accordion-header:hover {
  background: var(--brand-soft);
}

.accordion-header .header-title {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.accordion-header .accordion-icon {
  font-size: 11px;
  color: var(--muted);
  transition: transform 0.3s ease;
}

.collapsible-wrapper.open .accordion-header .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  display: none;
  padding: 24px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.collapsible-wrapper.open .accordion-content {
  display: block;
}

/* ========================================================
   CONTROLS: SWITCHES, BUTTONS & SEGMENTED CONTROLS
   ======================================================== */

.switch-row, .switch-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  position: relative;
}

.switch-row {
  padding: 10px 0;
}

.switch-row input, .switch-card input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-ui {
  width: 40px;
  height: 22px;
  border-radius: 20px;
  background: #cbd5e1;
  position: relative;
  flex: 0 0 auto;
  transition: background-color 0.2s ease;
  margin-top: 2px;
}

body.dark .switch-ui {
  background: #334155;
}

.switch-ui::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.switch-row input:checked + .switch-ui,
.switch-card input:checked + .switch-ui {
  background: var(--brand);
}

.switch-row input:checked + .switch-ui::after,
.switch-card input:checked + .switch-ui::after {
  transform: translateX(18px);
}

.switch-row > span:last-child,
.switch-card > span:last-child {
  display: flex;
  flex-direction: column;
}

.switch-row b, .switch-card b {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.switch-row small, .switch-card small {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 1px;
}

/* Info Strip & Safe Note */
.info-strip, .safe-note {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  background: var(--surface-2);
  padding: 12px 14px;
  color: var(--muted);
  font-size: 11px;
  margin-top: 18px;
}

.info-strip span {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 5px 8px;
  border-radius: 6px;
}

.info-strip p {
  margin: 0;
}

/* Settings Grids */
.settings-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.settings-grid.two {
  grid-template-columns: repeat(2, 1fr);
}

@media(max-width: 900px) {
  .settings-grid.three {
    grid-template-columns: repeat(2, 1fr);
  }
}

.switch-card {
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 12px;
  border-radius: 12px;
  align-items: center;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

/* ========================================================
   SPECIAL COMPONENTS: VOICE ID WAVEFORM & SUBTITLES
   ======================================================== */

.voice-id {
  margin-top: 18px;
  border: 1px solid rgba(99, 91, 255, 0.25);
  background: linear-gradient(100deg, var(--brand-soft), var(--cyan-soft));
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.voice-id::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.05) 50%, transparent 100%);
  animation: shine 4s infinite linear;
}

.voice-wave {
  font-size: 24px;
  color: var(--brand);
  animation: pulse-green 1.5s infinite;
  display: inline-block;
}

.voice-id > div {
  display: flex;
  flex-direction: column;
}

.voice-id small {
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 0.15em;
  color: var(--brand);
  font-weight: 900;
  text-transform: uppercase;
}

.voice-id b {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
  margin-top: 1px;
}

.voice-id p {
  margin: 0 0 0 auto;
  font-size: 11px;
  color: var(--muted);
  z-index: 2;
}

/* Subtitle Preview layout */
.subtitle-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 24px;
}

.switch-row.featured {
  border: 1px solid rgba(16, 185, 129, 0.25);
  background: var(--success-soft);
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.subtitle-preview {
  border-left: 1px solid var(--line);
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.preview-label {
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 0.15em;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
  display: block;
}

.phone-frame {
  height: 260px;
  width: 146px;
  margin: 12px auto 0;
  border: 8px solid #10141d;
  border-radius: 26px;
  background: linear-gradient(155deg, #1e293b, #0f172a);
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(0,0,0,0.3);
}

.phone-frame::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 12px;
  background: #10141d;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  z-index: 10;
}

.fake-person {
  position: absolute;
  width: 70px;
  height: 135px;
  border-radius: 36px 36px 12px 12px;
  background: linear-gradient(#f1c40f 0%, #3498db 60%);
  opacity: 0.65;
  left: 30px;
  top: 40px;
  filter: blur(8px);
}

.sample-caption {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 35px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  border-radius: 8px;
  padding: 6px 8px;
  color: #ffffff;
  font-size: 8.5px;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  line-height: 1.3;
}

.sample-caption mark {
  color: #ffd84d;
  background: transparent;
  text-shadow: 0 0 10px rgba(255, 216, 77, 0.5);
}

/* ========================================================
   ACTION BARS & PRIMARY BUTTONS
   ======================================================== */

.action-bar {
  border: 1px solid rgba(255,255,255,0.05);
  background: linear-gradient(135deg, #0d1321 0%, #151d30 100%);
  color: #ffffff;
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

body.dark .action-bar {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #0d1220 0%, #172033 100%);
}

.action-bar > div {
  display: flex;
  flex-direction: column;
}

.action-bar b {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
}

.action-bar small {
  color: #94a3b8;
  font-size: 11px;
  margin-top: 2px;
}

.primary, .secondary {
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-family: var(--font-display);
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 4px 14px var(--brand-glow);
  position: relative;
  overflow: hidden;
}

.primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 20%;
  height: 100%;
  background: rgba(255, 255, 255, 0.15);
  transform: skewX(-25deg);
  transition: 0.75s ease;
}

.primary:hover::after {
  left: 120%;
}

.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--brand-glow);
  filter: brightness(1.05);
}

.action-bar .primary {
  margin: 0;
}

.secondary {
  background: var(--surface-solid);
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.secondary:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
  transform: translateY(-1px);
}

.secondary.full {
  width: 100%;
}

/* ========================================================
   STEPS SCENE MODULE
   ======================================================== */

.summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 20px;
  backdrop-filter: var(--glass-blur);
}

.summary-bar > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.summary-bar > div > div {
  display: flex;
  flex-direction: column;
}

.summary-bar b {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.summary-bar small {
  font-size: 10.5px;
  color: var(--muted);
}

.scene-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.scene {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
  transition: all 0.25s ease;
}

.scene:hover {
  border-color: var(--brand-glow);
  transform: translateY(-1px);
}

.scene-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.badge {
  background: var(--brand-soft);
  color: var(--brand);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 8px;
}

.duration {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.scene-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.scene-actions button {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.scene-actions button:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}

.dialogue {
  padding: 12px 16px;
  background: var(--surface-2);
  border-left: 3px solid var(--brand);
  border-radius: 8px;
  margin: 12px 0;
  font-size: 13px;
  color: var(--ink);
}

.prompt {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  height: 240px;
  min-height: 140px;
  max-height: 400px;
  resize: vertical;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 80px 20px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
}

.empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
}

.empty p {
  margin: 6px 0 18px;
  font-size: 12px;
}

/* ========================================================
   MERGE STAGE & EXPORT PANEL
   ======================================================== */

.video-drop {
  min-height: 150px;
}

.clip-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.clip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.clip:hover {
  border-color: var(--line-strong);
}

.clip b {
  flex: 1;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clip small {
  font-size: 10px;
  color: var(--muted);
}

.clip button, .clip select {
  width: auto;
  padding: 6px 10px;
  font-size: 10.5px;
  height: 28px;
}

.clip[draggable=true] {
  cursor: grab;
}

.clip.dragging {
  opacity: 0.4;
  border: 1px dashed var(--brand);
  background: var(--brand-soft);
}

.drag-handle {
  font-size: 18px;
  color: var(--muted);
  user-select: none;
  cursor: grab;
}

.preview-stage {
  height: 380px;
  border-radius: 16px;
  background: #090c13;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
  border: 1px solid var(--line);
}

.preview-placeholder {
  text-align: center;
  color: #64748b;
  z-index: 1;
}

.preview-placeholder span {
  display: inline-block;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  background: #0f172a;
}

.preview-placeholder p {
  font-size: 11px;
  margin-top: 6px;
}

#playlistPreview {
  display: block;
  width: 210px;
  height: 373px;
  object-fit: contain;
  background: #000000;
  z-index: 2;
  position: relative;
}

#playlistPreview:not([hidden]) + .preview-placeholder {
  display: none;
}

.preview-status {
  text-align: center;
  color: var(--muted);
  margin: 10px 0;
  font-size: 11px;
}

.export-panel {
  margin-top: 24px;
}

.export-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.7fr) auto;
  gap: 16px;
  align-items: flex-end;
}

.export-spec {
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.export-spec span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
}

.export-spec small {
  font-size: 10px;
  color: var(--muted);
  margin-top: 1px;
}

.export-row .primary {
  height: 44px;
}

.progress {
  height: 8px;
  background: var(--line);
  border-radius: 20px;
  overflow: hidden;
  margin-top: 18px;
}

.progress i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--cyan));
  transition: width 0.2s ease;
}

#progressText {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  margin: 8px 0;
}

.result-area {
  text-align: center;
}

#result {
  width: 230px;
  max-height: 410px;
  display: block;
  margin: 20px auto;
  border-radius: 14px;
  background: #000000;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  border: 4px solid #10141d;
}

.download {
  display: inline-flex;
  text-decoration: none;
  margin: 0 auto;
}

/* ========================================================
   FOOTER
   ======================================================== */

footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 20px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.05em;
  backdrop-filter: var(--glass-blur);
}

footer span {
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--ink);
}

footer p {
  margin: 0;
}

.tab-jump {
  font-size: 11px;
}

/* Hard Lock grids */
.hard-lock-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 12px 0 16px;
}

.hard-lock {
  border-color: rgba(16, 185, 129, 0.3) !important;
  background: rgba(16, 185, 129, 0.05) !important;
}

.hard-lock input {
  cursor: not-allowed;
}

.hard-lock small {
  color: #10b981 !important;
  font-weight: 600;
}

/* ========================================================
   KEYFRAME ANIMATIONS
   ======================================================== */

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes glow-green {
  0% { box-shadow: 0 0 0 0 rgba(105, 240, 174, 0.7); border-color: var(--success); }
  70% { box-shadow: 0 0 0 10px rgba(105, 240, 174, 0); border-color: var(--success); }
  100% { box-shadow: 0 0 0 0 rgba(105, 240, 174, 0); }
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

@keyframes shine {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ========================================================
   ACCORDION CONFIGURATION TABS (UX SIMPLIFICATION)
   ======================================================== */

.config-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 22px;
  padding-bottom: 4px;
}

.config-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13.5px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: -6px;
}

.config-tab-btn:hover {
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 8px 8px 0 0;
}

.config-tab-btn.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.config-tab-content {
  display: none;
  animation: fade-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ========================================================
   SEGMENTED CONTROL MODE TABS & GRID LAYOUTS
   ======================================================== */

.mode-selector-wrapper {
  display: flex;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 22px;
  gap: 4px;
}

.mode-tab {
  flex: 1;
  text-align: center;
  cursor: pointer;
  display: block;
  margin: 0;
}

.mode-tab input {
  display: none;
}

.mode-tab span {
  display: block;
  padding: 10px 16px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.mode-tab input:checked + span {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--brand-glow);
}

.photo-to-video-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.config-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.config-card h4 {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 800;
  margin: 0 0 4px;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

.config-card-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.config-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.2s ease;
}

.config-item:hover {
  color: var(--brand);
}

.config-item input {
  width: 14px;
  height: 14px;
  accent-color: var(--brand);
  cursor: pointer;
  margin: 0;
}

.script-options-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px dashed var(--line);
}

.phrase-field {
  margin-top: 0 !important;
}

.script-panel-main {
  margin-bottom: 20px;
}

@media(max-width: 1200px) {
  .photo-to-video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
}
@media(max-width: 820px) {
  .script-options-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ========================================================
   MIMIN AI NEW DESIGN
   ======================================================== */
:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: #e2e8f0;
  --brand: #2563eb;
  --success: #10b981;
  --danger: #ef4444;
  --radius: 20px;
  --radius-sm: 12px;
}

body {
  background-image: none;
  background: var(--bg);
}

.no-sidebar {
  display: block;
}

.topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  padding: 0 40px;
}

.mimin-mark {
  background: var(--brand);
  border-radius: 8px;
  box-shadow: none;
}

.director {
  background: #f1f5f9;
  color: #f97316;
  border-radius: 4px;
}

.btn-top {
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-gray { background: #f1f5f9; color: var(--ink); }
.btn-light-yellow { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,0.2); }

.card-container {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
  margin-bottom: 32px;
}

.page-header-mimin {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.title-with-badge {
  display: flex;
  align-items: center;
  gap: 16px;
}

.step-badge {
  background: var(--brand);
  color: white;
  padding: 6px 16px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 14px;
}

.mimin-top-inputs {
  display: flex;
  gap: 20px;
  background: var(--surface-2);
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 32px;
}
.mimin-top-inputs .field { margin-top: 0; flex: 1; }
.input-suffix {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding-right: 12px;
}
.input-suffix input { border: none; box-shadow: none; background: transparent; }
.input-suffix span { color: var(--muted); font-size: 13px; }

.btn-gradient-blue {
  background: linear-gradient(to right, #2563eb, #4f46e5);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.btn-outline-blue {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--brand);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.action-bar-bottom {
  position: fixed;
  bottom: 30px;
  left: 60px;
  z-index: 100;
}

.scene-segment-control {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.segments {
  display: flex;
  background: #f1f5f9;
  border-radius: 99px;
  padding: 4px;
}

.segment {
  background: transparent;
  border: none;
  padding: 6px 16px;
  border-radius: 99px;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
}
.segment.active {
  background: var(--brand);
  color: white;
}

.mimin-scene-list {
  background: #f8fafc;
  padding: 20px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ai-video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 32px; }
.ai-video-card { background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ai-video-card .header { background: #f1f5f9; padding: 12px; font-weight: 600; border-bottom: 1px solid var(--line); }
.ai-video-card .upload-area { height: 120px; display: grid; place-items: center; color: var(--muted); }
.ai-video-card .status-select { padding: 12px; border-top: 1px solid var(--line); background: white; display: flex; align-items: center; justify-content: space-between;}
.ai-video-card select { width: auto; padding: 4px 8px; }

.ai-adjust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 32px; }
.adjust-card { background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.adjust-card .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.adjust-card .row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.adjust-card select { width: 140px; }

.prompt-eval-list { display: flex; flex-direction: column; gap: 12px; }
.eval-row { display: flex; align-items: center; justify-content: space-between; background: #f8fafc; padding: 12px 20px; border-radius: 12px; border: 1px solid var(--line); }
.eval-row b { background: #f1f5f9; padding: 4px 8px; border-radius: 4px; margin-right: 12px;}
.eval-row .actions { display: flex; gap: 8px; }
.btn-green { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; padding: 6px 12px; border-radius: 8px; font-weight: 600; cursor: pointer;}
.btn-red { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; padding: 6px 12px; border-radius: 8px; font-weight: 600; cursor: pointer;}

.platform-tabs { display: flex; gap: 8px; }
.platform-tabs button { background: white; border: 1px solid var(--line); padding: 8px 16px; border-radius: 8px; font-weight: 600; cursor: pointer; color: var(--muted); }
.platform-tabs button.active { background: var(--brand); color: white; border-color: var(--brand); }

.action-buttons-group { display: flex; gap: 12px; justify-content: center; margin-top: 24px; }
.btn-outline { background: white; border: 1px solid var(--ink); padding: 12px 24px; border-radius: 12px; font-weight: 600; cursor: pointer; }
.btn-blue-solid { background: #3b82f6; color: white; border: none; padding: 12px 24px; border-radius: 12px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 12px rgba(59,130,246,0.3); }
.btn-green-solid { background: var(--success); color: white; border: none; padding: 12px 24px; border-radius: 12px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 12px rgba(16,185,129,0.3); }

/* Switch Style Mimin */
.switch-ui-mimin { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch-ui-mimin input { opacity: 0; width: 0; height: 0; }
.switch-ui-mimin span { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .4s; border-radius: 34px; }
.switch-ui-mimin span:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
.switch-ui-mimin input:checked + span { background-color: var(--success); }
.switch-ui-mimin input:checked + span:before { transform: translateX(20px); }

/* Override scene element styles generated by app.js */
.mimin-scene-list .scene-item {
  background: white;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  margin-bottom: 16px;
}
.mimin-scene-list .scene-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.mimin-scene-list .scene-number {
  background: var(--brand);
  color: white;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 700;
}
.mimin-scene-list textarea.prompt-box {
  background: #f1f5f9;
  border: none;
  font-family: var(--font-mono);
  font-size: 13px;
  border-radius: 8px;
  color: var(--ink);
  width: 100%;
  padding: 12px;
  margin-top: 12px;
}

/* ========================================================
   FORMAT SELECTOR (PREMIUM)
   ======================================================== */
.format-selector-box {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-radius: 16px;
    padding: 24px 32px;
    margin-bottom: 32px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 242, 254, 0.1), inset 0 0 20px rgba(0, 242, 254, 0.05);
    backdrop-filter: blur(12px);
    overflow: hidden;
    animation: glow-pulse 3s infinite alternate;
}

.format-selector-box::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: conic-gradient(from 0deg, transparent 0%, rgba(0, 242, 254, 0.1) 25%, transparent 50%);
    animation: spin-vinyl 10s linear infinite;
    pointer-events: none;
    z-index: 0;
}

.format-selector-header {
    position: relative;
    z-index: 1;
    font-size: 20px;
    font-weight: 800;
    color: #00F2FE;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 242, 254, 0.5);
}

.premium-select-wrapper {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
}

.format-picker-row { display:flex; align-items:stretch; gap:10px; }
.format-manager-btn { min-width:170px; border:1px solid rgba(0,242,254,.55); border-radius:12px; padding:0 16px; background:rgba(0,242,254,.08); color:#67e8f9; font-weight:800; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:8px; transition:.2s ease; }
.format-manager-btn:hover { background:rgba(0,242,254,.16); border-color:#00f2fe; transform:translateY(-1px); }

.lookbook-preset-modal { position:fixed; inset:0; z-index:2147483646; display:grid; place-items:center; padding:22px; background:rgba(1,7,16,.84); backdrop-filter:blur(12px); }
.lookbook-preset-modal[hidden] { display:none!important; }
.lookbook-preset-dialog { width:min(1120px,96vw); max-height:94vh; overflow:hidden; display:flex; flex-direction:column; border:1px solid rgba(0,242,254,.38); border-radius:18px; background:linear-gradient(155deg,#071827,#06111f); box-shadow:0 30px 90px rgba(0,0,0,.65); color:#eaf8ff; }
.lookbook-preset-dialog>header { display:flex; justify-content:space-between; gap:20px; padding:20px 24px; border-bottom:1px solid rgba(148,163,184,.16); background:rgba(8,28,44,.92); }
.lookbook-preset-dialog>header span { color:#22d3ee; font-size:11px; font-weight:900; letter-spacing:1.6px; }
.lookbook-preset-dialog>header h2 { margin:5px 0 4px; font-size:22px; }
.lookbook-preset-dialog>header p,.lookbook-preset-dialog aside>small { margin:0; color:#8fa3b8; font-size:12px; }
.lookbook-preset-dialog>header button { width:38px; height:38px; border:1px solid rgba(248,113,113,.35); border-radius:10px; background:rgba(127,29,29,.18); color:#fca5a5; cursor:pointer; }
.lookbook-preset-body { min-height:0; overflow:auto; display:grid; grid-template-columns:260px minmax(0,1fr); }
.lookbook-preset-body>aside { padding:18px; border-right:1px solid rgba(148,163,184,.14); background:rgba(3,13,24,.5); }
.lookbook-preset-body>main { padding:20px; }
.lookbook-preset-list-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:12px; }
.lookbook-preset-list-head button,.lookbook-split-toolbar button { border:1px solid rgba(0,242,254,.35); border-radius:9px; background:rgba(0,242,254,.08); color:#67e8f9; padding:8px 10px; font-weight:750; cursor:pointer; }
.lookbook-preset-list { display:grid; gap:8px; margin-bottom:12px; }
.lookbook-drive-sync-btn { width:100%; margin:2px 0 8px; border:1px solid rgba(0,242,254,.35); border-radius:9px; background:rgba(0,242,254,.08); color:#67e8f9; padding:9px 10px; font-weight:750; cursor:pointer; }
.lookbook-drive-sync-btn:hover { background:rgba(0,242,254,.15); }
.lookbook-drive-status { margin:0 0 10px; border-radius:8px; background:rgba(15,23,42,.48); color:#94a3b8; padding:8px 9px; font-size:11px; line-height:1.45; }
.lookbook-drive-status[data-state="syncing"] { color:#67e8f9; }
.lookbook-drive-status[data-state="success"] { color:#6ee7b7; }
.lookbook-drive-status[data-state="error"] { color:#fda4af; }
.lookbook-preset-row { position:relative; display:grid; grid-template-columns:minmax(0,1fr) 34px; align-items:stretch; gap:6px; }
.lookbook-preset-item { min-width:0; width:100%; text-align:left; border:1px solid rgba(148,163,184,.16); border-radius:10px; padding:10px; background:rgba(15,23,42,.65); color:#dbeafe; cursor:pointer; }
.lookbook-preset-trash { display:grid; place-items:center; width:34px; min-width:34px; border:1px solid rgba(248,113,113,.25); border-radius:10px; background:rgba(127,29,29,.12); color:#fb7185; cursor:pointer; transition:background .18s,border-color .18s,color .18s,transform .18s; }
.lookbook-preset-trash:hover { border-color:rgba(251,113,133,.75); background:rgba(190,24,93,.24); color:#fecdd3; transform:translateY(-1px); }
.lookbook-preset-trash:disabled { cursor:wait; opacity:.7; }
.lookbook-preset-trash.is-deleting i { animation:spin 1s linear infinite; }
.lookbook-preset-row.active .lookbook-preset-trash { border-color:rgba(34,211,238,.32); }
.lookbook-preset-item.active { border-color:#22d3ee; background:rgba(8,145,178,.16); }
.lookbook-preset-item b,.lookbook-preset-item small { display:block; }
.lookbook-preset-item small { color:#7f95aa; margin-top:4px; }
.lookbook-preset-grid { display:grid; grid-template-columns:minmax(0,1fr) 110px 170px; gap:14px; }
.lookbook-preset-grid label>span,.lookbook-scene-editor label>span { display:block; margin-bottom:7px; color:#a8bacb; font-size:12px; font-weight:750; }
.lookbook-preset-grid input,.lookbook-preset-grid select,.lookbook-preset-grid textarea,.lookbook-scene-editor input,.lookbook-scene-editor textarea { width:100%; box-sizing:border-box; border:1px solid rgba(148,163,184,.22); border-radius:9px; padding:11px 12px; background:#06111f; color:#f8fafc; outline:none; }
.lookbook-preset-grid input:focus,.lookbook-preset-grid select:focus,.lookbook-preset-grid textarea:focus,.lookbook-scene-editor input:focus,.lookbook-scene-editor textarea:focus { border-color:#22d3ee; box-shadow:0 0 0 3px rgba(34,211,238,.09); }
.lookbook-preset-wide { grid-column:1/-1; }
.lookbook-split-toolbar { display:flex; align-items:center; justify-content:space-between; gap:15px; margin:18px 0 12px; }
.lookbook-split-toolbar small { display:block; margin-top:3px; color:#7f95aa; }
.lookbook-scene-editors { display:grid; gap:12px; }
.lookbook-scene-editor { border:1px solid rgba(148,163,184,.16); border-radius:12px; padding:14px; background:rgba(15,23,42,.42); }
.lookbook-scene-editor header { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.lookbook-scene-editor header b { color:#67e8f9; }
.lookbook-scene-editor header span { color:#86efac; font-size:11px; font-weight:800; }
.lookbook-scene-editor-grid { display:grid; grid-template-columns:260px minmax(0,1fr); gap:12px; }
.lookbook-preset-validation { min-height:20px; margin-top:12px; color:#fbbf24; font-size:12px; }
.lookbook-preset-dialog>footer { display:flex; align-items:center; gap:10px; padding:14px 20px; border-top:1px solid rgba(148,163,184,.16); background:#071522; }
.lookbook-preset-dialog>footer>span { flex:1; }
.lookbook-preset-dialog>footer button { border:1px solid rgba(148,163,184,.26); border-radius:9px; padding:10px 15px; background:rgba(15,23,42,.7); color:#e2e8f0; font-weight:800; cursor:pointer; }
.lookbook-preset-dialog>footer .btn-primary { background:linear-gradient(90deg,#12dce8,#3b9df8); color:#03111b; border:0; }
.lookbook-preset-dialog>footer .lookbook-danger-btn { color:#fda4af; border-color:rgba(244,63,94,.35); }
.lookbook-preset-modal { padding:18px; background:radial-gradient(circle at 50% 12%,rgba(8,145,178,.16),transparent 38%),rgba(1,7,16,.9); }
.lookbook-preset-dialog { width:min(1240px,97vw); max-height:95vh; border-radius:22px; animation:lookbookDialogIn .24s ease-out; }
@keyframes lookbookDialogIn { from{opacity:0;transform:translateY(12px) scale(.985)} to{opacity:1;transform:none} }
.lookbook-preset-dialog>header { align-items:flex-start; padding:18px 24px 16px; background:linear-gradient(100deg,rgba(8,28,44,.98),rgba(4,18,31,.96)); }
.lookbook-dialog-heading { min-width:0; }
.lookbook-policy-badges { display:flex; flex-wrap:wrap; gap:7px; margin-top:11px; }
.lookbook-policy-badges b { border:1px solid rgba(45,212,191,.22); border-radius:999px; padding:5px 9px; background:rgba(13,148,136,.09); color:#99f6e4; font-size:10px; letter-spacing:.25px; }
.lookbook-preset-dialog>header button { flex:0 0 auto; transition:background .18s,transform .18s; }
.lookbook-preset-dialog>header button:hover { background:rgba(190,24,93,.28); transform:rotate(4deg); }
.lookbook-preset-body { grid-template-columns:275px minmax(0,1fr); overflow:hidden; }
.lookbook-preset-body>aside,.lookbook-preset-body>main { min-height:0; overflow:auto; }
.lookbook-preset-body>aside { padding:18px 16px; }
.lookbook-preset-body>main { padding:18px; background:linear-gradient(145deg,rgba(8,24,40,.2),rgba(2,12,23,.38)); }
.lookbook-preset-list-head { align-items:flex-start; }
.lookbook-preset-list-head>div>span { display:block; margin-bottom:3px; color:#22d3ee; font-size:9px; font-weight:900; letter-spacing:1.35px; }
.lookbook-preset-list-head>div>b { font-size:14px; }
.lookbook-preset-list-head button,.lookbook-editor-section-head button { transition:background .18s,border-color .18s,transform .18s; }
.lookbook-preset-list-head button:hover,.lookbook-editor-section-head button:hover { border-color:#22d3ee; background:rgba(8,145,178,.18); transform:translateY(-1px); }
.lookbook-preset-item { position:relative; padding:12px; border-radius:12px; transition:border-color .18s,background .18s,transform .18s; }
.lookbook-preset-item:hover { border-color:rgba(34,211,238,.48); background:rgba(15,48,67,.7); transform:translateX(2px); }
.lookbook-preset-item.active { box-shadow:inset 3px 0 #22d3ee,0 8px 28px rgba(2,132,199,.08); }
.lookbook-drive-folder-link { display:flex; align-items:center; justify-content:center; gap:7px; margin:0 0 10px; color:#93c5fd; font-size:11px; font-weight:750; text-decoration:none; }
.lookbook-drive-folder-link:hover { color:#e0f2fe; }
.lookbook-drive-note { display:flex; gap:8px; margin-top:12px; border:1px solid rgba(59,130,246,.14); border-radius:10px; padding:10px; background:rgba(30,64,175,.08); color:#8fa3b8; }
.lookbook-drive-note i { margin-top:2px; color:#60a5fa; }
.lookbook-drive-note p { margin:0; font-size:11px; line-height:1.55; }
.lookbook-editor-section { margin-bottom:14px; border:1px solid rgba(148,163,184,.15); border-radius:15px; padding:15px; background:rgba(5,18,31,.58); box-shadow:0 10px 32px rgba(0,0,0,.12); }
.lookbook-editor-section-head { display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.lookbook-editor-section-head>span { display:grid; place-items:center; flex:0 0 30px; width:30px; height:30px; border:1px solid rgba(34,211,238,.3); border-radius:9px; background:rgba(8,145,178,.14); color:#67e8f9; font-size:11px; font-weight:900; }
.lookbook-editor-section-head>div { min-width:0; flex:1; }
.lookbook-editor-section-head b,.lookbook-editor-section-head small { display:block; }
.lookbook-editor-section-head b { font-size:14px; color:#eaf8ff; }
.lookbook-editor-section-head small { margin-top:3px; color:#7f95aa; font-size:11px; }
.lookbook-editor-section-head button { flex:0 0 auto; border:1px solid rgba(0,242,254,.35); border-radius:9px; padding:8px 10px; background:rgba(0,242,254,.08); color:#67e8f9; font-weight:750; cursor:pointer; }
.lookbook-master-prompt>span { display:block; margin-bottom:7px; color:#a8bacb; font-size:12px; font-weight:750; }
.lookbook-master-prompt textarea { width:100%; box-sizing:border-box; resize:vertical; min-height:105px; border:1px solid rgba(148,163,184,.22); border-radius:10px; padding:12px; background:#06111f; color:#f8fafc; outline:none; }
.lookbook-master-prompt textarea:focus { border-color:#22d3ee; box-shadow:0 0 0 3px rgba(34,211,238,.09); }
.lookbook-scenes-section { margin-bottom:0; }
.lookbook-scene-editor { position:relative; overflow:hidden; border-radius:13px; background:linear-gradient(135deg,rgba(15,32,51,.78),rgba(7,20,35,.72)); transition:border-color .18s,transform .18s,box-shadow .18s; }
.lookbook-scene-editor:before { content:""; position:absolute; inset:0 auto 0 0; width:3px; background:linear-gradient(#22d3ee,#3b82f6); opacity:.8; }
.lookbook-scene-editor:hover { border-color:rgba(34,211,238,.32); transform:translateY(-1px); box-shadow:0 14px 34px rgba(0,0,0,.16); }
.lookbook-scene-editor.invalid { border-color:#fb7185; box-shadow:0 0 0 3px rgba(251,113,133,.1),0 14px 34px rgba(0,0,0,.16); }
.lookbook-scene-editor.invalid:before { background:linear-gradient(#fb7185,#ef4444); opacity:1; }
.lookbook-scene-editor.invalid .lookbook-scene-prompt,
.lookbook-scene-editor.invalid .lookbook-scene-title { border-color:rgba(251,113,133,.75); }
.lookbook-scene-editor header b { font-size:13px; }
.lookbook-scene-editor header span { border-radius:999px; padding:4px 8px; background:rgba(22,163,74,.09); }
.lookbook-scene-editor textarea { resize:vertical; min-height:112px; }
.lookbook-save-hint { display:flex; align-items:center; gap:7px; color:#8298aa; font-size:11px; }
.lookbook-save-hint i { color:#5eead4; font-size:16px; }
.lookbook-preset-dialog>footer { padding:13px 18px; box-shadow:0 -12px 28px rgba(0,0,0,.18); }
.lookbook-preset-dialog>footer button { transition:transform .18s,filter .18s,background .18s; }
.lookbook-preset-dialog>footer button:hover { transform:translateY(-1px); filter:brightness(1.08); }
.lookbook-preset-dialog>footer .btn-primary { min-width:175px; box-shadow:0 8px 25px rgba(14,165,233,.16); }
@media(max-width:800px){.format-picker-row{flex-direction:column}.format-manager-btn{min-height:44px}.lookbook-preset-modal{padding:0}.lookbook-preset-dialog{width:100vw;max-height:100vh;border-radius:0}.lookbook-preset-body{grid-template-columns:1fr;overflow:auto}.lookbook-preset-body>aside,.lookbook-preset-body>main{overflow:visible}.lookbook-preset-body>aside{border-right:0;border-bottom:1px solid rgba(148,163,184,.14)}.lookbook-preset-grid,.lookbook-scene-editor-grid{grid-template-columns:1fr}.lookbook-preset-wide{grid-column:auto}.lookbook-policy-badges,.lookbook-save-hint{display:none}.lookbook-editor-section-head{align-items:flex-start;flex-wrap:wrap}.lookbook-editor-section-head button{width:100%}}

.premium-select {
    width: 100%;
    appearance: none;
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
    border: 2px solid rgba(0, 242, 254, 0.5);
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.premium-select:hover, .premium-select:focus {
    border-color: #00F2FE;
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.3), inset 0 0 10px rgba(0, 242, 254, 0.1);
    outline: none;
    background: rgba(0, 242, 254, 0.05);
}

.premium-select option {
    background: #0f172a;
    color: #fff;
    font-size: 16px;
    padding: 12px;
}

.premium-select-wrapper .select-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #00F2FE;
    font-size: 24px;
    pointer-events: none;
}

@keyframes glow-pulse {
    0% { box-shadow: 0 10px 40px rgba(0, 242, 254, 0.1), inset 0 0 20px rgba(0, 242, 254, 0.05); border-color: rgba(0, 242, 254, 0.3); }
    100% { box-shadow: 0 10px 50px rgba(0, 242, 254, 0.25), inset 0 0 30px rgba(0, 242, 254, 0.15); border-color: rgba(0, 242, 254, 0.7); }
}

/* ========================================================
   TOAST NOTIFICATION (SYNC DRIVE)
   ======================================================== */
.sync-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 242, 254, 0.4);
    border-radius: 12px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 242, 254, 0.2);
    z-index: 9999;
    color: #fff;
    font-size: 15px;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
    opacity: 0;
}

.sync-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.sync-toast .toast-icon {
    font-size: 28px;
    color: #00F2FE;
}

.sync-toast.loading .toast-icon {
    animation: spin 1s linear infinite;
}

.sync-toast.success .toast-icon {
    color: #10B981; /* Emerald Green for success */
    animation: pop-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pop-in {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.sync-toast-content strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
    color: #00F2FE;
}
.sync-toast.success .sync-toast-content strong {
    color: #10B981;
}

.drive-library-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(0, 242, 254, .28);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 242, 254, .09), rgba(18, 30, 54, .72));
}

.drive-library-info,
.drive-library-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drive-library-info strong,
.drive-library-info small { display: block; }
.drive-library-info small { margin-top: 4px; color: var(--muted); }
.drive-library-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: #65f0a5;
  background: rgba(101, 240, 165, .12);
  font-size: 21px;
}
.drive-library-panel.is-connected { border-color: rgba(101, 240, 165, .45); }
.drive-library-panel.is-error { border-color: rgba(248, 113, 113, .55); }

.drive-folder-browser {
  margin: -8px 0 18px;
  padding: 14px;
  border: 1px solid rgba(0, 242, 254, .18);
  border-radius: 12px;
  background: rgba(4, 16, 30, .68);
}
.drive-folder-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.drive-folder-breadcrumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.drive-folder-crumb {
  border: 0;
  padding: 5px 7px;
  border-radius: 6px;
  background: transparent;
  color: #8defff;
  cursor: pointer;
}
.drive-folder-crumb:hover { background: rgba(0, 242, 254, .1); color: #fff; }
.drive-folder-separator { color: rgba(255, 255, 255, .3); }
.drive-folder-target { display: flex; align-items: center; gap: 10px; color: #65f0a5; font-size: 11px; }
.drive-folder-target .btn-outline { padding: 7px 9px; font-size: 11px; }
.drive-folder-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 9px; }
.drive-folder-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 9px;
  background: rgba(255, 255, 255, .035);
  color: #fff;
  cursor: pointer;
  text-align: left;
}
.drive-folder-item:hover { border-color: rgba(0, 242, 254, .52); background: rgba(0, 242, 254, .08); }
.drive-folder-item i { color: #facc15; font-size: 21px; flex: 0 0 auto; }
.drive-folder-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drive-folder-empty { color: var(--muted); font-size: 12px; padding: 7px 2px; }

@media (max-width: 760px) {
  .drive-library-panel { align-items: stretch; flex-direction: column; }
  .drive-library-actions > button { flex: 1; }
  .drive-folder-toolbar, .drive-folder-target { align-items: stretch; flex-direction: column; }
}

.hf-modal { position: fixed; inset: 0; z-index: 2147483646; display: grid; place-items: center; padding: 22px; background: rgba(2, 7, 15, .82); backdrop-filter: blur(10px); }
.hf-modal[hidden] { display: none !important; }
.hf-dialog { width: min(900px, 96vw); max-height: 92vh; overflow: hidden; display:flex; flex-direction:column; border: 1px solid rgba(0, 242, 254, .38); border-radius: 20px; background: linear-gradient(145deg, rgba(7, 22, 39, .99), rgba(8, 12, 25, .99)); box-shadow: 0 28px 90px rgba(0,0,0,.62), 0 0 50px rgba(0,242,254,.1); }
.hf-header { position:relative; display: flex; align-items: center; gap: 14px; flex:0 0 auto; padding:19px 22px; border-bottom:1px solid rgba(255,255,255,.08); background:linear-gradient(90deg,rgba(0,242,254,.07),transparent 55%); }
.hf-heading-icon { width:44px; height:44px; display:grid; place-items:center; flex:0 0 auto; border:1px solid rgba(0,242,254,.3); border-radius:13px; color:#07131f; background:linear-gradient(135deg,#67f2ff,#60a5fa); box-shadow:0 8px 24px rgba(0,242,254,.18); font-size:22px; }
.hf-heading-copy { min-width:0; flex:1; }
.hf-header small { color: #66efff; font-weight: 800; letter-spacing: 1.2px; }
.hf-header h3 { margin: 3px 0 0; font-size: 22px; color: #fff; }
.hf-header p { margin:4px 0 0; color:#8296aa; font-size:11px; }
.hf-close { width: 38px; height: 38px; display: grid; place-items: center; flex:0 0 auto; border: 1px solid rgba(255,255,255,.16); border-radius: 11px; color: #cbd5e1; background: rgba(255,255,255,.05); cursor: pointer; transition:.2s ease; }
.hf-close:hover { color:#fff; border-color:rgba(248,113,113,.5); background:rgba(239,68,68,.14); transform:rotate(4deg); }
.hf-body { min-height:0; overflow:auto; padding:18px 22px 22px; scrollbar-width:thin; scrollbar-color:rgba(0,242,254,.35) transparent; }
.hf-body::-webkit-scrollbar { width:7px; }
.hf-body::-webkit-scrollbar-track { background:transparent; }
.hf-body::-webkit-scrollbar-thumb { border:2px solid transparent; border-radius:99px; background:rgba(0,242,254,.32); background-clip:padding-box; }
.hf-body::-webkit-scrollbar-thumb:hover { background:rgba(0,242,254,.55); background-clip:padding-box; }
.hf-source { display: flex; gap: 11px; align-items: center; margin-bottom:14px; padding:11px 13px; border:1px solid rgba(0,242,254,.18); border-radius: 12px; color: #9eefff; background: linear-gradient(90deg,rgba(0,242,254,.08),rgba(0,242,254,.025)); }
.hf-source-icon { width:34px; height:34px; display:grid; place-items:center; flex:0 0 auto; border-radius:9px; color:#67e8f9; background:rgba(0,242,254,.1); font-size:18px; }
.hf-source > div { display:grid; min-width:0; flex:1; }
.hf-source small { color:#668196; font-size:9px; font-weight:800; letter-spacing:.9px; }
.hf-source strong { overflow:hidden; color:#dffbff; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.hf-ready { display:flex; align-items:center; gap:5px; flex:0 0 auto; padding:5px 8px; border-radius:99px; color:#65f0a5; background:rgba(34,197,94,.09); font-size:10px; }
.hf-section { margin-top:11px; padding:14px; border:1px solid rgba(255,255,255,.085); border-radius:14px; background:rgba(255,255,255,.025); }
.hf-section-title { display:flex; align-items:center; gap:9px; margin-bottom:12px; }
.hf-section-title > i { width:30px; height:30px; display:grid; place-items:center; flex:0 0 auto; border-radius:8px; color:#66efff; background:rgba(0,242,254,.08); font-size:16px; }
.hf-section-title > div { display:grid; min-width:0; flex:1; }
.hf-section-title strong { color:#eef8ff; font-size:12px; }
.hf-section-title small { margin-top:2px; color:#71869b; font-size:10px; font-weight:500; }
.hf-auto-badge { padding:4px 7px; border:1px solid rgba(101,240,165,.25); border-radius:99px; color:#65f0a5; background:rgba(34,197,94,.07); font-size:9px; font-weight:900; letter-spacing:.8px; }
.hf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hf-grid label { display: grid; gap: 6px; color: #aebfd0; font-size: 11px; font-weight: 700; }
.hf-grid .hf-wide { grid-column: 1 / -1; }
.hf-grid input, .hf-grid select { width: 100%; padding: 10px 11px; border: 1px solid rgba(255,255,255,.12); border-radius: 9px; color: #fff; background: rgba(2,9,18,.55); outline: none; transition:.2s ease; }
.hf-grid input:focus, .hf-grid select:focus { border-color: rgba(0,242,254,.65); box-shadow:0 0 0 3px rgba(0,242,254,.07); }
.hf-copy-grid { grid-template-columns:1fr 1fr; }
.hf-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.hf-options label { display: flex; gap: 9px; align-items: center; min-height:52px; padding: 8px 10px; border:1px solid transparent; border-radius: 10px; color: #d8e3ef; background: rgba(255,255,255,.032); cursor:pointer; transition:.18s ease; }
.hf-options label:hover { border-color:rgba(0,242,254,.18); background:rgba(0,242,254,.045); }
.hf-option-icon { width:30px; height:30px; display:grid; place-items:center; flex:0 0 auto; border-radius:8px; color:#8bdcf5; background:rgba(125,211,252,.08); font-size:16px; }
.hf-options label > span:nth-child(2) { display:grid; min-width:0; flex:1; color:#dce8f2; font-size:11px; font-weight:700; }
.hf-options label > span:nth-child(2) small { margin-top:2px; color:#6f8498; font-size:9px; font-weight:500; }
.hf-options input[type="checkbox"] { position:relative; width:34px; height:19px; flex:0 0 auto; margin:0; appearance:none; border:1px solid rgba(255,255,255,.18); border-radius:99px; background:rgba(255,255,255,.08); cursor:pointer; transition:.2s ease; }
.hf-options input[type="checkbox"]::after { content:""; position:absolute; top:2px; left:2px; width:13px; height:13px; border-radius:50%; background:#718096; transition:.2s ease; }
.hf-options input[type="checkbox"]:checked { border-color:rgba(0,242,254,.55); background:linear-gradient(90deg,#06b6d4,#3b82f6); box-shadow:0 0 12px rgba(0,242,254,.13); }
.hf-options input[type="checkbox"]:checked::after { left:17px; background:#fff; }
.hf-section-split { display:grid; grid-template-columns:1fr 1fr; gap:12px; padding:0; border:0; background:transparent; }
.hf-subsection { padding:14px; border:1px solid rgba(255,255,255,.085); border-radius:14px; background:rgba(255,255,255,.025); }
.hf-options-single { grid-template-columns:1fr; }
.hf-progress { margin-top: 14px; padding: 13px; border-radius: 10px; background: rgba(0,0,0,.22); }
.hf-progress > div:first-child { display: flex; justify-content: space-between; gap: 12px; color: #fff; }
.hf-progress-track { height: 8px; margin: 10px 0 7px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.1); }
.hf-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#00f2fe,#65f0a5); transition: width .25s ease; }
.hf-progress small { color: var(--muted); }
.hf-success { position:relative; display:flex; align-items:center; gap:11px; margin-top:13px; padding:13px 14px; overflow:hidden; border:1px solid rgba(74,222,128,.42); border-radius:13px; color:#dcfce7; background:linear-gradient(90deg,rgba(22,163,74,.16),rgba(16,185,129,.055)); box-shadow:0 0 24px rgba(34,197,94,.08); animation:hfSuccessIn .38s ease-out both; }
.hf-success[hidden] { display:none !important; }
.hf-success::before { content:""; position:absolute; inset:0 auto 0 0; width:3px; background:#4ade80; box-shadow:0 0 14px #4ade80; }
.hf-success-icon { width:38px; height:38px; display:grid; place-items:center; flex:0 0 auto; border-radius:50%; color:#052e16; background:linear-gradient(135deg,#86efac,#34d399); box-shadow:0 6px 20px rgba(52,211,153,.22); font-size:20px; }
.hf-success > div { display:grid; min-width:0; flex:1; }
.hf-success strong { color:#dcfce7; font-size:13px; }
.hf-success small { margin-top:3px; color:#86cfa4; font-size:10px; line-height:1.4; }
.hf-success-badge { flex:0 0 auto; padding:5px 8px; border:1px solid rgba(74,222,128,.28); border-radius:99px; color:#86efac; background:rgba(34,197,94,.09); font-size:8px; font-weight:900; letter-spacing:.8px; }
.hf-success.drive-pending { border-color:rgba(250,204,21,.36); background:linear-gradient(90deg,rgba(202,138,4,.13),rgba(234,179,8,.035)); }
.hf-success.drive-pending::before { background:#facc15; box-shadow:0 0 14px #facc15; }
.hf-success.drive-pending .hf-success-badge { border-color:rgba(250,204,21,.28); color:#fde68a; background:rgba(234,179,8,.08); }
@keyframes hfSuccessIn { from { opacity:0; transform:translateY(8px) scale(.99); } to { opacity:1; transform:none; } }
.hf-note { display: flex; gap: 10px; align-items:center; margin-top: 13px; padding:11px 12px; border:1px solid rgba(101,240,165,.14); border-radius:11px; color: #8fa5bc; background:rgba(34,197,94,.035); font-size: 10px; line-height: 1.45; }
.hf-note i { color: #65f0a5; font-size: 20px; }
.hf-note div { display:grid; }
.hf-note strong { color:#baf7d0; font-size:11px; }
.hf-note span { color:#71869a; }
.hf-actions { display: flex; align-items:center; justify-content: flex-end; gap: 10px; flex:0 0 auto; padding:14px 22px; border-top:1px solid rgba(255,255,255,.08); background:rgba(3,10,20,.94); box-shadow:0 -12px 30px rgba(0,0,0,.18); }
.hf-actions button { min-width: 145px; }
.hf-actions .btn-primary { min-width:235px; box-shadow:0 8px 24px rgba(0,202,232,.18); }
.hf-action-hint { display:flex; align-items:center; gap:7px; margin-right:auto; color:#6f879b; font-size:10px; }
.hf-action-hint i { color:#65f0a5; font-size:14px; }
.hf-post-btn { position: relative; z-index: 4; width: 100%; margin-bottom: 8px; padding: 11px 10px; border-color: rgba(168,85,247,.75) !important; color: #d8b4fe !important; background: linear-gradient(135deg,rgba(126,34,206,.18),rgba(0,242,254,.08)) !important; cursor: pointer; pointer-events: auto; }
.hf-post-btn:hover { border-color: #c084fc !important; color: #fff !important; box-shadow: 0 0 18px rgba(168,85,247,.28); transform: translateY(-1px); }
.hf-card-report { display:flex; gap:7px; align-items:flex-start; margin:-3px 0 11px; padding:8px 9px; border:1px solid rgba(168,85,247,.3); border-radius:8px; color:#d8b4fe; background:rgba(126,34,206,.09); font-size:10px; line-height:1.45; }
.hf-card-report i { flex:0 0 auto; margin-top:1px; color:#65f0a5; font-size:14px; }
@media(max-width:700px){.hf-modal{padding:8px}.hf-dialog{max-height:96vh}.hf-header{padding:15px}.hf-header p{display:none}.hf-body{padding:12px 14px 16px}.hf-grid,.hf-options,.hf-section-split{grid-template-columns:1fr}.hf-grid .hf-wide{grid-column:auto}.hf-actions{padding:12px 14px;flex-wrap:wrap}.hf-action-hint{width:100%;justify-content:center}.hf-actions button{flex:1}.hf-actions .btn-primary{min-width:190px}.hf-ready{display:none}}
