/* VideoForge - CSS Design System (High-End Premium SaaS Style) */

/* 1. Theme Configuration & Tokens */
:root {
  /* Fonts */
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Geist Mono', monospace;

  /* Border Radius Lock */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Animations */
  --transition-physics: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.15s ease;

  /* Common Brand Colors */
  --primary: #0066cc; /* Apple Ocean Blue */
  --primary-hover: #0055aa;
  --primary-glow: rgba(0, 102, 204, 0.1);
  --accent-color: #3b82f6; /* Vibrant blue accent */
  --green: #24b263;
  --red: #ff3b30;
  --yellow: #ff9500;

  /* Theme Dependent Colors (Light Theme Fallback) */
  --bg-primary: #fafafb;
  --bg-secondary: #f3f3f6;
  --bg-card: #ffffff;
  --border-color: rgba(0, 0, 0, 0.05);
  --border-focus: rgba(0, 102, 204, 0.3);
  --text-main: #1d1d1f;
  --text-dark: #424245;
  --text-muted: #86868b;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.015);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.025);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.05);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --timeline-track: rgba(0, 0, 0, 0.05);
}

/* Default Dark Mode (Strict Dark Tech Aesthetic) */
body:not([data-theme="light"]) {
  --bg-primary: #09090b; /* Pitch Black */
  --bg-secondary: #121215; /* Charcoal */
  --bg-card: #18181b; /* Zinc 900 Card */
  --border-color: rgba(255, 255, 255, 0.07);
  --border-focus: rgba(0, 102, 204, 0.5);
  --text-main: #f4f4f5; /* Light grey text */
  --text-dark: #d4d4d8; /* Muted grey */
  --text-muted: #a1a1aa; /* Deep muted grey */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
  --glass-bg: rgba(24, 24, 27, 0.85);
  --timeline-track: rgba(255, 255, 255, 0.06);
}

/* Explicit Dark Theme Selector (If requested via class/attr) */
[data-theme="dark"] {
  --bg-primary: #09090b;
  --bg-secondary: #121215;
  --bg-card: #18181b;
  --border-color: rgba(255, 255, 255, 0.07);
  --border-focus: rgba(0, 102, 204, 0.5);
  --text-main: #f4f4f5;
  --text-dark: #d4d4d8;
  --text-muted: #a1a1aa;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
  --glass-bg: rgba(24, 24, 27, 0.85);
  --timeline-track: rgba(255, 255, 255, 0.06);
}

/* 2. Base resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow: hidden;
  height: 100dvh;
  position: relative;
  transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Ambient Subtle Tint Glows (Restrained, No AI Purple Slop) */
.ambient-glow {
  position: absolute;
  border-radius: var(--radius-full);
  filter: blur(140px);
  z-index: -1;
  opacity: 0.08;
  pointer-events: none;
}

.glow-1 {
  top: -10%;
  left: 20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

.glow-3 {
  bottom: -10%;
  right: 15%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

/* 3. Layout */
.app-container {
  display: grid;
  grid-template-columns: 240px 1fr;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
}

/* Sidebar Menu */
.sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
  z-index: 10;
  transition: background-color 0.3s var(--transition-physics), border-color 0.3s var(--transition-physics);
}

.sidebar-brand {
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.brand-logo {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo i {
  color: #ffffff;
  font-size: 16px;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-sm);
  object-fit: cover;
  display: block;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

.sidebar-nav {
  flex-grow: 1;
  overflow-y: auto;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

.nav-section-title {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 18px 12px 6px 12px;
  opacity: 0.7;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px;
  border-radius: var(--radius-md);
  color: var(--text-dark);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition-physics);
  white-space: nowrap;
  overflow: hidden;
}

.nav-item i {
  font-size: 18px;
  color: var(--text-muted);
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.nav-item:hover {
  background: var(--border-color);
  color: var(--text-main);
  transform: translateX(2px);
}

.nav-item:hover i {
  color: var(--text-main);
}

.nav-item.active {
  background: var(--primary-glow);
  color: var(--primary);
  font-weight: 600;
  border: 1px solid rgba(0, 102, 204, 0.08);
}

.nav-item.active i {
  color: var(--primary);
}

.nav-badge {
  font-size: 8.5px;
  font-weight: 600;
  background: rgba(0, 102, 204, 0.08);
  color: var(--primary);
  padding: 1px 4px;
  border-radius: var(--radius-sm);
  margin-left: auto;
  border: 1px solid rgba(0, 102, 204, 0.15);
  flex-shrink: 0;
}

.sidebar-footer-wrapper {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-user {
  padding: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

.sidebar-user:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.user-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.user-plan {
  font-size: 9px;
  color: var(--primary);
  background: var(--primary-glow);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  width: fit-content;
  border: 1px solid rgba(0, 102, 204, 0.05);
}

.btn-sidebar-user-recharge {
  width: 100%;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.1);
}

.btn-sidebar-user-recharge:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
}

.btn-sidebar-user-recharge i {
  font-size: 14px;
}


/* Theme Toggle Slider */
.theme-switch-container {
  padding: 10px 14px;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dark);
}

.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  width: 44px;
  height: 24px;
  display: flex;
  align-items: center;
  padding: 2px;
  cursor: pointer;
  position: relative;
  transition: var(--transition-physics);
}

.theme-toggle-btn::after {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background: var(--primary);
  position: absolute;
  left: 2px;
  transition: var(--transition-physics);
}

body:not([data-theme="light"]) .theme-toggle-btn::after {
  left: 22px;
}

/* Main Viewport */
.viewport {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--bg-primary);
}

.app-header {
  height: 64px;
  min-height: 64px;
  border-bottom: 1px solid var(--border-color);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  z-index: 5;
  transition: background-color 0.3s var(--transition-physics), border-color 0.3s var(--transition-physics);
}

.header-welcome h1 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.2px;
}

.header-subtitle {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 1px;
}

.header-widgets {
  display: flex;
  align-items: center;
  gap: 20px;
}

.widget-credits-capsule {
  display: flex;
  align-items: center;
  border-radius: var(--radius-full);
  overflow: hidden;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  height: 28px;
}

.credits-balance-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px 0 12px;
}

.credits-balance-pill i {
  color: var(--yellow);
  font-size: 13px;
}

.credit-val {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--text-main);
}

.credit-lbl {
  font-size: 10px;
  color: var(--text-muted);
}

.btn-header-recharge {
  border: none;
  background: var(--primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 0 14px;
  height: 100%;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--border-color);
}

.btn-header-recharge:hover {
  background: var(--primary-hover);
}

.widget-status {
  display: flex;
  gap: 12px;
  align-items: center;
}

.status-node {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.dot-green {
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--green);
  border-radius: var(--radius-full);
}

/* 4. Canvas Workspaces & Tabs */
.view-section {
  display: none;
  flex-direction: column;
  height: calc(100% - 64px);
  width: 100%;
  overflow: hidden;
}

.view-section.active {
  display: flex;
}

.workspace-tabs-container {
  padding: 12px 32px 0 32px;
  background: var(--bg-card);
}

.workspace-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  scrollbar-width: none;
}

.workspace-tabs::-webkit-scrollbar {
  display: none;
}

.tab-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-dark);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-physics);
}

.tab-item:hover {
  background: var(--bg-secondary);
  border-color: rgba(0, 102, 204, 0.2);
  color: var(--primary);
}

.tab-item.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
}

.tab-item.active i {
  color: #ffffff;
}

.tab-item i {
  font-size: 13px;
  color: var(--text-muted);
}

/* Workspace main grid */
.workspace-canvas {
  display: grid;
  grid-template-columns: 380px 1fr;
  flex-grow: 1;
  overflow: hidden;
  height: 100%;
}

.workspace-canvas.hide-left-panel {
  grid-template-columns: 1fr;
}

.workspace-canvas.hide-left-panel .card-left {
  display: none;
}

.canvas-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.card-left {
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  transition: background-color 0.3s var(--transition-physics);
}

.card-right {
  background: var(--bg-primary);
  position: relative;
  transition: background-color 0.3s var(--transition-physics);
}

/* Config panes scroll contents */
.config-pane {
  display: none;
  flex-grow: 1;
  overflow-y: auto;
  padding: 24px 24px 100px 24px;
}

.config-pane::-webkit-scrollbar {
  width: 4px;
}
.config-pane::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

.config-pane.active {
  display: block;
}

.pane-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.pane-title i {
  font-size: 14px;
  color: var(--primary);
}

/* Non-symmetric 2+1 layout for Templates (Replacing AI-slop 3x equal cards) */
.templates-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.template-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: var(--transition-physics);
  box-shadow: var(--shadow-sm);
}

.template-card:hover {
  border-color: rgba(0, 102, 204, 0.2);
  transform: translateY(-2px);
  background: var(--bg-secondary);
}

.template-card.active {
  border-color: var(--primary);
  background: var(--primary-glow);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.05);
}

/* Inject asymmetry to template selection */
.template-card[data-template="ugc"] {
  border-left: 4px solid var(--primary); /* Highlight the most popular template */
}

.temp-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.temp-icon i {
  font-size: 16px;
  color: var(--text-muted);
}

.template-card.active .temp-icon {
  background: rgba(0, 102, 204, 0.08);
}

.template-card.active .temp-icon i {
  color: var(--primary);
}

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

.temp-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
}

.temp-desc {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Material Drag Upload Zone */
.upload-zone {
  border: 1.5px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  position: relative;
  background: var(--bg-primary);
  transition: var(--transition-physics);
  cursor: pointer;
}

.upload-zone:hover {
  border-color: var(--primary);
  background: var(--bg-secondary);
}

.file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
}

.upload-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.upload-inner i {
  font-size: 24px;
  color: var(--text-muted);
}

.upload-txt {
  font-size: 11.5px;
  color: var(--text-dark);
}

.upload-txt span {
  color: var(--primary);
  font-weight: 700;
}

.upload-sub {
  font-size: 9.5px;
  color: var(--text-muted);
}

.preview-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  position: relative;
  z-index: 6;
}

.preview-thumbs.filled {
  position: relative;
  width: 100%;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 0 !important;
  z-index: 6;
}

.preview-thumbs.filled .thumb-wrapper {
  width: 100%;
  max-width: 320px;
  height: 180px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: #000;
}

.preview-thumbs.filled .thumb-remove {
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  font-size: 14px;
  line-height: 18px;
}

.thumb-name-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 4px;
  z-index: 10;
}

.thumb-wrapper {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  font-size: 10px;
  line-height: 12px;
  text-align: center;
  cursor: pointer;
  z-index: 10;
}

/* Premium Buttons & Form Fields */
.btn-premium-action {
  width: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, #0044bb 100%);
  color: #ffffff;
  border: none;
  padding: 11px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
  transition: var(--transition-physics);
}

.btn-premium-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 102, 204, 0.25);
}

.btn-premium-action:active {
  transform: translateY(1px);
}

.input-double-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.input-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dark);
}

.input-field input,
.input-field select,
.settings-input,
.settings-select {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-main);
  background: var(--bg-primary);
  outline: none;
  transition: var(--transition-fast);
}

/* Styled custom select globally to replace native browser arrows */
.input-field select,
.settings-select,
.param-item select,
.library-filters select,
.customize-panel select,
.customize-field select,
#target-market,
#target-lang,
#video-ratio,
#filter-region,
#filter-gender,
#filter-style,
#voice-pack-select,
#voice-emotion,
#rep-target-market-select,
#rep-resolution-select,
#rep-aspect-ratio-select,
select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 16px !important;
  padding-right: 36px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

[data-theme="light"] select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
}

.input-field input:focus,
.input-field select:focus,
.settings-input:focus,
.settings-select:focus {
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.textarea-container {
  position: relative;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.textarea-container textarea {
  width: 100%;
  border: none;
  padding: 8px 12px 42px 12px;
  font-size: 12px;
  resize: none;
  outline: none;
  background: transparent;
  color: var(--text-main);
  line-height: 1.5;
}

.btn-inner-write {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-physics);
}

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

/* Replicate Mode Fields */
.url-import-group {
  display: grid;
  grid-template-columns: 1fr 64px;
  gap: 8px;
}

.url-import-group input {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  background: var(--bg-primary);
  color: var(--text-main);
  outline: none;
}

.url-import-group input:focus {
  border-color: var(--primary);
  background: var(--bg-card);
}

.btn-import {
  background: var(--text-main);
  color: var(--bg-card);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-import:hover {
  opacity: 0.9;
}

.pane-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 10px;
  margin: 16px 0;
}

.pane-divider::before,
.pane-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.pane-divider span {
  padding: 0 10px;
}

/* Avatar Trigger in form */
.avatar-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  background: var(--bg-primary);
  cursor: pointer;
  transition: var(--transition-physics);
}

.avatar-trigger:hover {
  border-color: var(--primary);
  background: var(--bg-secondary);
}

.avatar-trigger img {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.trigger-lbl {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.trigger-lbl span:first-child {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-main);
}

.trigger-desc {
  font-size: 8px;
  color: var(--text-muted);
}

.avatar-trigger i {
  margin-left: auto;
  font-size: 14px;
  color: var(--text-muted);
}

/* Absolute Floating Bottom Action Panel */
.panel-action-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 380px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  z-index: 8;
  transition: background-color 0.3s var(--transition-physics), border-color 0.3s var(--transition-physics);
}

.btn-forge {
  width: 100%;
  background: var(--text-main);
  color: var(--bg-card);
  border: none;
  padding: 12px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-md);
  transition: var(--transition-physics);
  margin-top: 12px;
}

.btn-forge:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.btn-forge:active {
  transform: translateY(1px);
}

.btn-forge:disabled,
.btn-forge.btn-loading {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  background: var(--text-dark);
}

.btn-forge.btn-loading:hover {
  transform: none;
}

/* 旋转图标动画 */
.spin-icon {
  animation: spin 1s linear infinite;
}

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

/* 右侧区域 mini 进度条 */
.analysis-progress-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 0 40px;
}

.progress-bar-mini {
  flex: 1;
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill-mini {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 3px;
  transition: width 0.3s ease;
}

#rep-progress-text-mini {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  min-width: 36px;
}

/* 活跃状态的 halo 动画加速 */
.spinning-halo-wrapper.active .halo-circle {
  animation-duration: 2s;
}

/* 5. Right panel States */
.panel-state {
  display: none;
  width: 100%;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

#rep-state-confirm .dec-scroller {
  padding-bottom: 80px;
}

.panel-state.active {
  display: flex;
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.panel-state-header {
  height: 52px;
  min-height: 52px;
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  transition: background-color 0.3s var(--transition-physics), border-color 0.3s var(--transition-physics);
}

.state-title {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-back, .btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-dark);
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: var(--transition-physics);
  box-shadow: var(--shadow-sm);
}

.btn-back:hover, .btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: rgba(0, 102, 204, 0.2);
  color: var(--primary);
}

/* Skeletons for Loading State (Anti-Slop UX) */
.skeleton-loader {
  background: linear-gradient(90deg, var(--border-color) 25%, var(--bg-primary) 37%, var(--border-color) 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Empty onboarding state */
.state-empty-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  padding: 48px;
}

.spinning-halo-wrapper {
  position: relative;
  width: 72px;
  height: 72px;
  margin-bottom: 24px;
}

.halo-circle {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 1.5px solid transparent;
  border-radius: var(--radius-full);
}

.circle-1 {
  border-top-color: var(--primary);
  border-bottom-color: var(--primary);
  animation: spin 4s linear infinite;
}

.circle-2 {
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%;
  border-left-color: var(--text-muted);
  border-right-color: var(--text-muted);
  animation: spin-reverse 3s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes spin-reverse {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-360deg); }
}

.spinning-halo-wrapper i {
  position: absolute;
  top: 28%;
  left: 28%;
  width: 44%;
  height: 44%;
  color: var(--primary);
  font-size: 32px;
}

.state-empty-container h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 8px;
}

.state-empty-container p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 380px;
  margin-bottom: 32px;
}

.onboarding-carousel {
  width: 100%;
  max-width: 440px;
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
}

.carousel-lbl {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.carousel-track {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.carousel-slide {
  width: 110px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  cursor: pointer;
  transition: var(--transition-physics);
}

.carousel-slide:hover {
  transform: translateY(-3px);
}

.carousel-slide img {
  width: 100%;
  height: 80px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-color);
  transition: var(--transition-fast);
}

.carousel-slide:hover img {
  border-color: var(--primary);
}

.carousel-slide span {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 6. AI Deconstruct & Fission Matrix Selector Layout */
.deconstruct-workspace {
  display: flex;
  height: calc(100% - 52px);
  background: var(--bg-primary);
  overflow: hidden;
}

.dec-col {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dec-col-left {
  width: 320px;
  min-width: 320px;
  border-right: 1px solid var(--border-color);
  background: var(--bg-card);
  transition: background-color 0.3s var(--transition-physics);
}

.dec-col-right {
  flex-grow: 1;
  background: var(--bg-primary);
  transition: background-color 0.3s var(--transition-physics);
}

.dec-col-title {
  padding: 16px 20px 8px 20px;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dec-col-title i {
  color: var(--primary);
  font-size: 15px;
}

.dec-scroller {
  flex-grow: 1;
  overflow-y: auto;
  padding: 0 16px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dec-scroller::-webkit-scrollbar {
  width: 4px;
}
.dec-scroller::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

/* Storyboards list */
.orig-storyboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-physics);
}

.orig-storyboard-card:hover {
  border-color: rgba(0, 102, 204, 0.15);
}

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

.orig-scene-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11.5px;
  color: var(--text-main);
}

.orig-scene-time {
  font-size: 9px;
  color: var(--primary);
  background: var(--primary-glow);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  border: 1px solid rgba(0, 102, 204, 0.1);
}

.orig-scene-title {
  font-size: 11px;
  color: var(--text-main);
  font-weight: 600;
  flex: 1;
  padding: 0 8px;
}

.orig-storyboard-summary {
  background: var(--primary-glow);
  border: 1px solid rgba(0, 102, 204, 0.15);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-main);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.orig-storyboard-summary i {
  color: var(--primary);
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

.orig-card-field {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-dark);
}

.orig-card-field i {
  color: var(--primary);
  margin-right: 4px;
}

.orig-card-field strong {
  color: var(--text-main);
  font-weight: 700;
  margin-right: 4px;
}

/* Fission card templates */
.fission-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition-physics);
}

.fission-card:hover {
  border-color: rgba(0, 102, 204, 0.25);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.fission-card.active {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(0, 102, 204, 0.1);
  background: var(--primary-glow);
}

.fission-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fission-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.badge-orig {
  background: rgba(0, 102, 204, 0.08);
  color: var(--primary);
}

.badge-scene {
  background: rgba(255, 149, 0, 0.08);
  color: #eb5e28;
}

.badge-rider {
  background: rgba(36, 178, 99, 0.08);
  color: #24b263;
}

.fission-sub {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

.fission-desc {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text-dark);
}

.fission-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fission-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-dark);
  border: 1px solid var(--border-color);
}

/* 方案详情网格 */
.fission-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 4px;
  padding: 10px;
  background: var(--bg-primary);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.fission-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 10.5px;
  line-height: 1.4;
}

.fission-detail-item i {
  color: var(--primary);
  font-size: 12px;
  flex-shrink: 0;
  margin-top: 1px;
}

.fission-detail-item .detail-label {
  font-weight: 700;
  color: var(--text-main);
  min-width: 28px;
}

.fission-detail-item .detail-value {
  color: var(--text-dark);
  flex: 1;
}

.mapping-box {
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--border-color);
}

.map-row {
  display: flex;
  align-items: center;
  font-size: 11px;
}

.map-label {
  font-weight: 700;
  font-size: 9px;
  padding: 1.5px 5px;
  border-radius: var(--radius-sm);
  margin-right: 8px;
  min-width: 36px;
  text-align: center;
}

.fission-card[data-scheme="scene"] .map-label {
  background: rgba(255, 149, 0, 0.08);
  color: #eb5e28;
}

.fission-card[data-scheme="rider"] .map-label {
  background: rgba(36, 178, 99, 0.08);
  color: #24b263;
}

.map-from {
  color: var(--text-muted);
  text-decoration: line-through;
}

.map-arrow {
  margin: 0 6px;
  color: var(--text-muted);
  font-weight: 800;
}

.map-to {
  color: var(--text-main);
  font-weight: 700;
}

.btn-select-fission {
  width: 100%;
  background: var(--text-main);
  color: var(--bg-card);
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: var(--transition-fast);
}

.btn-select-fission:hover {
  opacity: 0.9;
}

/* 7. Script Editor List */
.script-list-container {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-primary);
}

.script-list-container::-webkit-scrollbar {
  width: 4px;
}
.script-list-container::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

.script-row {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: grid;
  grid-template-columns: 80px 1fr;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.3s var(--transition-physics);
}

.row-scene {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: background-color 0.3s var(--transition-physics);
}

.scene-num {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
}

.scene-duration {
  font-size: 9px;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

body:not([data-theme="light"]) .scene-duration {
  background: rgba(255, 255, 255, 0.05);
}

.row-inputs {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.editor-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.editor-field label {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 700;
}

.editor-field input {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 11.5px;
  background: var(--bg-primary);
  color: var(--text-main);
  outline: none;
  transition: var(--transition-fast);
}

.editor-field textarea {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 11.5px;
  outline: none;
  resize: none;
  color: var(--text-main);
  background: var(--bg-primary);
  line-height: 1.5;
  transition: var(--transition-fast);
}

.editor-field textarea:focus,
.editor-field input:focus {
  border-color: var(--primary);
  background: var(--bg-card);
}

.panel-state-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
  transition: background-color 0.3s var(--transition-physics);
}

.tips-card {
  background: var(--primary-glow);
  border: 1px solid rgba(0, 102, 204, 0.1);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: var(--text-dark);
}

.tips-card i {
  color: var(--primary);
  font-size: 14px;
}

/* 8. Loader & SSE Simulator layout */
.processing-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 48px;
}

.premium-glow-spinner {
  position: relative;
  width: 64px;
  height: 64px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
}

.ring-main {
  border-top-color: var(--primary);
  animation: spin 1.5s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.ring-sec {
  width: 80%;
  height: 80%;
  border-bottom-color: var(--text-muted);
  animation: spin-reverse 1.2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.premium-glow-spinner i {
  color: var(--primary);
  font-size: 20px;
  animation: pulse 1s ease-in-out infinite alternate;
}

.processing-wrapper h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
}

.processing-wrapper p {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.loading-timeline {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 36px;
}

.timeline-step {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0.35;
  transition: opacity 0.3s;
}

.timeline-step.active {
  opacity: 1;
}

.timeline-step.completed {
  opacity: 0.8;
}

.step-circle {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-circle i {
  font-size: 10px;
  display: none;
}

.timeline-step.completed .step-circle {
  background: var(--green);
  color: #fff;
}

.timeline-step.completed .step-circle i {
  display: block;
}

.step-lbl {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-dark);
}

.step-spinner {
  margin-left: auto;
  font-size: 12px;
  color: var(--primary);
  display: none;
}

.timeline-step.active .step-spinner {
  display: block;
}

.loading-progress-bar {
  width: 100%;
  max-width: 360px;
  height: 6px;
  background: var(--timeline-track);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.fission-card .loading-progress-bar {
  max-width: none;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.3s;
}

.progress-bar-val {
  position: absolute;
  right: 8px;
  top: -18px;
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 800;
  color: var(--text-muted);
}

/* 9. Cinematic Comparison Slider Player */
.comparison-view-container {
  flex-grow: 1;
  background: #09090b; /* True movie black */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
}

.slider-comparison-box {
  width: 100%;
  max-width: 380px;
  height: 380px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: #000;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  user-select: none;
}

.video-window {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.video-window video,
.video-window img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Replicated window overlay window */
.replica-video-window {
  width: 50%; /* JS controlled width overlay */
  border-right: 1.5px solid #ffffff;
  overflow: hidden;
  z-index: 2;
}

.video-inner-wrapper {
  width: 380px; /* Equal lock width to prevent image stretch on drag */
  height: 100%;
}

.video-indicator-badge {
  position: absolute;
  top: 12px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 8.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  z-index: 5;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.badge-orig-lbl {
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge-rep-lbl {
  left: 12px;
  background: var(--primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Vertical Slider bar drag control handle */
.comparison-slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: #ffffff;
  z-index: 3;
  cursor: ew-resize;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.handle-line {
  flex-grow: 1;
  width: 1.5px;
  background: #ffffff;
}

.handle-button {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  cursor: ew-resize;
}

.handle-button i {
  font-size: 14px;
  color: var(--text-main);
}

/* SubtitleOverlay inside player */
.subtitle-canvas-overlay {
  position: absolute;
  bottom: 24px;
  left: 5%;
  right: 5%;
  text-align: center;
  z-index: 4;
}

.subtitle-canvas-overlay span {
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  display: inline-block;
  max-width: 90%;
  font-weight: 600;
}

/* Finished Player controller interface */
.finished-player-controls {
  padding: 16px 24px 20px 24px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  transition: background-color 0.3s var(--transition-physics);
}

.controls-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-control-main {
  background: var(--text-main);
  color: var(--bg-card);
  border: none;
  border-radius: var(--radius-full);
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

.btn-control-main:hover {
  opacity: 0.9;
}

.timeline-slider-group {
  flex-grow: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.time-lbl {
  font-size: 10.5px;
  color: var(--text-muted);
}

#sync-time-slider {
  flex-grow: 1;
  accent-color: var(--primary);
  height: 4px;
  cursor: pointer;
}

.btn-control-sub {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-physics);
}

.btn-control-sub:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.textarea-lbl-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.textarea-lbl-group label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dark);
}

.btn-inner-remix {
  background: transparent;
  border: none;
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
}

.btn-inner-remix i {
  font-size: 12px;
}

.finished-player-controls textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 11.5px;
  outline: none;
  resize: none;
  background: var(--bg-primary);
  color: var(--text-main);
  transition: var(--transition-fast);
}

.finished-player-controls textarea:focus {
  border-color: var(--primary);
  background: var(--bg-card);
}

.export-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.btn-export-secondary {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition-physics);
}

.btn-export-secondary:hover {
  background: var(--bg-secondary);
}

.btn-export-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
  transition: var(--transition-physics);
}

.btn-export-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* 10. Avatars Library View Grid */
.avatar-library-workspace {
  display: grid;
  grid-template-columns: 1fr 340px;
  height: 100%;
  overflow: hidden;
}

.avatar-grid-card {
  height: 100%;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.avatar-grid-card::-webkit-scrollbar {
  width: 4px;
}
.avatar-grid-card::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

.library-header {
  margin-bottom: 20px;
}

.library-header h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.library-header p {
  font-size: 12px;
  color: var(--text-muted);
}

.library-filters {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.library-filters select,
.library-filters input {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 11.5px;
  background: var(--bg-card);
  color: var(--text-main);
  outline: none;
}

.avatar-grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.avatar-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition-physics);
}

.avatar-item-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.avatar-item-card.active {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(0, 102, 204, 0.12);
}

.item-card-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  position: relative;
  border-bottom: 1px solid var(--border-color);
}

.avatar-item-card.active .item-card-img::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.item-card-meta {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.item-card-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
}

.item-card-lbl {
  font-size: 9.5px;
  color: var(--text-muted);
}

/* Avatar Customize Panel */
.avatar-customize-panel {
  background: var(--bg-card);
  border-left: 1px solid var(--border-color);
  padding: 24px;
  height: 100%;
  overflow-y: auto;
  transition: background-color 0.3s var(--transition-physics), border-color 0.3s var(--transition-physics);
}

.avatar-customize-panel::-webkit-scrollbar {
  width: 4px;
}
.avatar-customize-panel::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

.avatar-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-detail-header img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.custom-avatar-meta h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
}

.custom-avatar-tags {
  font-size: 10px;
  color: var(--primary);
  background: var(--primary-glow);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-top: 2px;
  font-weight: 600;
  border: 1px solid rgba(0, 102, 204, 0.05);
}

.panel-section-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
  margin-bottom: 12px;
}

.customize-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.customize-field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dark);
}

.customize-field select {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  background: var(--bg-primary);
  color: var(--text-main);
  outline: none;
  transition: var(--transition-fast);
}

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

.field-slider-header span {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
}

.customize-field input[type="range"] {
  accent-color: var(--primary);
}

.voice-test-box {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 20px;
  border: 1px solid var(--border-color);
  transition: background-color 0.3s var(--transition-physics);
}

.voice-test-box label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
  display: block;
}

.voice-test-box textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 11.5px;
  resize: none;
  background: var(--bg-card);
  color: var(--text-main);
  outline: none;
  transition: var(--transition-fast);
}

.btn-play-voice {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--primary);
  padding: 8px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-physics);
}

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

.btn-play-voice.playing {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.btn-apply-avatar {
  width: 100%;
  background: var(--text-main);
  color: var(--bg-card);
  border: none;
  padding: 11px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
  transition: var(--transition-fast);
}

.btn-apply-avatar:hover {
  opacity: 0.9;
}

/* 11. Projects List Tables */
.projects-list-workspace, .settings-workspace {
  padding: 24px 32px;
  overflow-y: auto;
  height: 100%;
}

.projects-list-workspace::-webkit-scrollbar,
.settings-workspace::-webkit-scrollbar {
  width: 4px;
}
.projects-list-workspace::-webkit-scrollbar-thumb,
.settings-workspace::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

.projects-table-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-top: 16px;
  transition: background-color 0.3s var(--transition-physics);
}

.projects-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.projects-table th {
  background: var(--bg-secondary);
  padding: 12px 16px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background-color 0.3s var(--transition-physics);
}

.projects-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-dark);
}

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

.proj-thumb {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.proj-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.proj-name {
  font-weight: 700;
  color: var(--text-main);
}

.proj-size {
  font-size: 9.5px;
  color: var(--text-muted);
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
}

.badge-status.success {
  color: var(--green);
}

.badge-status.success .dot {
  width: 6px;
  height: 6px;
  background-color: var(--green);
  border-radius: var(--radius-full);
}

.table-actions {
  display: flex;
  gap: 8px;
}

.btn-tbl-action {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-tbl-action:hover {
  color: var(--primary);
}

.btn-tbl-action.delete:hover {
  color: var(--red);
}

.btn-tbl-action i {
  font-size: 16px;
}

/* 12. Settings Panel */
.settings-form-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 16px;
  box-shadow: var(--shadow-sm);
  max-width: 680px;
  transition: background-color 0.3s var(--transition-physics);
}

.settings-section-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main);
  border-bottom: 1.5px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.setting-item {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 20px;
}

.setting-item input[type="password"] {
  font-family: var(--font-mono);
}

.setting-lbl-grp {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.setting-lbl-grp label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.lbl-desc {
  font-size: 9.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dark);
  cursor: pointer;
  user-select: none;
}

.custom-checkbox input {
  display: none;
}

.checkmark {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.custom-checkbox:hover .checkmark {
  border-color: var(--primary);
}

.custom-checkbox input:checked + .checkmark {
  background: var(--primary);
  border-color: var(--primary);
}

.custom-checkbox input:checked + .checkmark::after {
  content: '';
  width: 8px;
  height: 4px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translate(1px, -1px);
}

/* 13. Cinema Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  width: 90%;
  max-width: 720px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-box {
  transform: translateY(0) scale(1);
}

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

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}

.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: var(--transition-fast);
}

.btn-close-modal:hover {
  color: var(--text-main);
}

.modal-body-scroll {
  padding: 24px;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-height: 80dvh;
  overflow-y: auto;
}

.modal-body-scroll::-webkit-scrollbar {
  width: 4px;
}
.modal-body-scroll::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

.modal-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  width: 100%;
  text-align: left;
  margin-top: -4px;
}

/* Cinematic Video Trimmer player box */
.trim-video-player {
  width: 100%;
  max-width: 320px;
  height: 280px;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.trim-video-player img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.trim-floating-time {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 600;
}

.trim-floating-controls {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.trim-floating-controls i,
.trim-floating-time i {
  font-size: 12px;
}

.trim-timeline-section {
  width: 100%;
}

.trim-timeline-track {
  height: 52px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--primary);
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.trim-frames-strip {
  display: flex;
  width: 100%;
  height: 100%;
  opacity: 0.75;
}

.trim-frames-strip img {
  flex: 1;
  object-fit: cover;
  height: 100%;
}

.trim-slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 16px;
  background: var(--primary-glow);
  cursor: ew-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.handle-left {
  left: 0;
  border-right: 4px solid var(--primary);
}

.handle-right {
  right: 0;
  border-left: 4px solid var(--primary);
}

.handle-anchor {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--primary);
}

.handle-timer {
  position: absolute;
  bottom: 2px;
  right: 20px;
  background: #000;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 8px;
  padding: 1px 4px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.trim-selected-range {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  bottom: 0;
  border-top: 1.5px solid var(--primary);
  border-bottom: 1.5px solid var(--primary);
  pointer-events: none;
}

.trim-timeline-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ===== 时间轴刻度背景（替代帧缩略图） ===== */
.trim-tick-strip {
  display: flex;
  width: 100%;
  height: 100%;
  opacity: 1;
  align-items: stretch;
  background: repeating-linear-gradient(
    90deg,
    var(--bg-secondary) 0,
    var(--bg-secondary) 1px,
    transparent 1px,
    transparent 100%
  );
}

.trim-tick {
  flex: 1;
  min-width: 0;
  border-right: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 2px;
}

.trim-tick:last-child {
  border-right: none;
}

.trim-tick-label {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-muted);
  opacity: 0.6;
  user-select: none;
}

/* ===== 固定窗口选区（整体拖动，不伸缩） ===== */
.trim-window {
  /* 覆盖 .trim-selected-range 的 left/right，由 JS 控制 left/width */
  right: auto;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  background: var(--primary-glow);
  cursor: grab;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35);
}

.trim-window:active {
  cursor: grabbing;
}

.trim-window-grip {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font-size: 14px;
  pointer-events: none;
}

.trim-window-grip .handle-timer {
  position: static;
  background: var(--primary);
  color: #fff;
}

.modal-actions-footer {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
}
.modal-actions-footer .btn-forge,
.modal-actions-footer .btn-secondary {
  margin-top: 0 !important;
  height: 38px;
  box-sizing: border-box;
}

/* Modal avatar grids */
.modal-avatar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  width: 100%;
}

/* Helper Spacing and Utility Classes */
.pane-title-margin-top {
  margin-top: 24px;
}
.input-row-spacing {
  margin-top: 12px;
}
.settings-title-spacing {
  margin-top: 32px;
}
.custom-checkbox-spacing {
  margin-top: 10px;
}
.btn-max-180 {
  max-width: 180px;
}
.btn-max-140 {
  max-width: 140px;
}
.modal-max-680 {
  max-width: 680px;
}
.w-full {
  width: 100%;
}
.video-display-toggle {
  display: none;
}
.btn-display-toggle {
  display: none;
}
.dec-title-icon {
  color: var(--primary);
}
.success-title-icon {
  color: var(--green);
}
.rep-img-filtered {
  filter: hue-rotate(180deg) saturate(1.2);
}

/* 14. UI Controls & Footers in Sidebar */
.sidebar-controls-footer {
  padding: 16px 14px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.sidebar-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-dark);
}

.lang-toggle-pill {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  display: flex;
  padding: 2px;
  cursor: pointer;
  user-select: none;
}

.lang-opt {
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.lang-opt.active {
  background: var(--primary);
  color: #ffffff;
}

/* 15. User Authentication Overlay Modals */
.auth-modal-box {
  max-width: 400px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 32px 24px;
}

.auth-alert {
  margin-bottom: 15px;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
  background-color: rgba(255, 59, 48, 0.08);
  border: 1px solid rgba(255, 59, 48, 0.15);
  color: #f87171;
  text-align: left;
}

body[data-theme="light"] .auth-alert {
  background-color: rgba(255, 59, 48, 0.05);
  border: 1px solid rgba(255, 59, 48, 0.15);
  color: #cc2222;
}

/* Interactive Stepper */
.auth-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-color);
  padding: 12px 16px;
  border-radius: var(--radius-md);
}

body[data-theme="light"] .auth-stepper {
  background: rgba(0, 0, 0, 0.01);
}

.stepper-step {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.5;
  transition: var(--transition-physics);
}

.stepper-step.active {
  opacity: 1;
}

.stepper-step.active .step-num {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 0 10px var(--primary-glow);
}

.stepper-step.active .step-label {
  color: var(--text-main);
  font-weight: 600;
}

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition-physics);
}

.step-label {
  font-size: 12px;
  color: var(--text-muted);
  transition: var(--transition-physics);
}

.stepper-line {
  flex: 1;
  height: 1px;
  border-bottom: 1px dashed var(--border-color);
  margin: 0 12px;
}

/* Password Strength Indicator */
.password-strength-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
}

.strength-bars {
  display: flex;
  gap: 4px;
  width: 90px;
}

.strength-bar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  transition: var(--transition-fast);
}

body[data-theme="light"] .strength-bar {
  background: rgba(0, 0, 0, 0.1);
}

.strength-bar.weak {
  background: var(--red);
}

.strength-bar.medium {
  background: var(--yellow);
}

.strength-bar.strong {
  background: var(--green);
}

.strength-text {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
}

/* Social Proof Hint */
.kyc-feedback-hint {
  font-size: 10.5px;
  color: var(--accent-color);
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--primary-glow);
  border-left: 2px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  text-align: left;
  animation: fadeInHint 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInHint {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slide Drawer for Referral Input */
.kyc-extra-input-drawer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.kyc-extra-input-drawer.open {
  max-height: 80px;
  opacity: 1;
}

/* KYC Chip Grid Layout & Micro-animations */
.kyc-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.kyc-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition-physics);
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

body[data-theme="light"] .kyc-chip {
  background: rgba(0, 0, 0, 0.02);
}

.kyc-chip:hover {
  border-color: var(--primary);
  background: var(--primary-glow);
  color: var(--text-main);
  transform: translateY(-1px);
}

.kyc-chip.active {
  background: linear-gradient(135deg, var(--primary) 0%, #0044bb 100%);
  border-color: var(--primary);
  color: #ffffff !important;
  box-shadow: 0 4px 12px var(--primary-glow);
  transform: scale(0.97);
}

#auth-step-1,
#auth-step-2 {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Animations for step transitions */
.fade-in-step {
  animation: fadeInStep 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInStep {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Vercel Split-Screen Layout for Auth Overlay */
#auth-modal {
  background: var(--bg-primary);
  backdrop-filter: none;
  z-index: 9999;
}

#auth-modal .auth-split-container {
  display: flex;
  width: 100%;
  height: 100vh;
}

#auth-modal .auth-brand-pane {
  flex: 1;
  background: linear-gradient(145deg, #09090b 0%, #121215 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--border-color);
}

#auth-modal .auth-brand-pane::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, rgba(0, 102, 204, 0.08) 0%, transparent 60%);
  z-index: 0;
  pointer-events: none;
}

#auth-modal .auth-brand-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 420px;
  text-align: center;
}

#auth-modal .brand-title {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1.5px;
  background: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

#auth-modal .brand-tagline {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 40px;
}

#auth-modal .auth-orb-wrapper {
  position: relative;
  width: 240px;
  height: 240px;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#auth-modal .auth-orb-glow {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 102, 204, 0.25) 0%, transparent 70%);
  filter: blur(20px);
  animation: orbPulse 8s infinite alternate ease-in-out;
}

#auth-modal .auth-orb-core {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 102, 204, 0.4) 0%, rgba(0, 68, 187, 0.1) 70%);
  border: 1px solid rgba(0, 102, 204, 0.3);
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.1), 0 0 30px rgba(0, 102, 204, 0.2);
}

#auth-modal .auth-orb-ring {
  position: absolute;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

#auth-modal .auth-orb-ring.ring-1 {
  width: 160px;
  height: 160px;
  animation: rotateClockwise 20s infinite linear;
}

#auth-modal .auth-orb-ring.ring-2 {
  width: 210px;
  height: 210px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  animation: rotateCounterClockwise 30s infinite linear;
}

#auth-modal .auth-telemetry-widget {
  width: 100%;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  backdrop-filter: blur(5px);
}

#auth-modal .widget-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

#auth-modal .widget-label {
  color: var(--text-muted);
  font-weight: 500;
}

#auth-modal .widget-val {
  color: var(--text-main);
  font-family: var(--font-mono);
  font-weight: 600;
}

#auth-modal .widget-val.val-green {
  color: var(--green);
}

#auth-modal .widget-val.val-blue {
  color: var(--primary);
}

#auth-modal .auth-form-pane {
  flex: 1.1;
  background: var(--bg-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  overflow-y: auto;
}

#auth-modal .auth-form-container {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
}

@keyframes orbPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.1); opacity: 1; }
}

@keyframes rotateClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes rotateCounterClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

@media (max-width: 768px) {
  #auth-modal .auth-brand-pane {
    display: none;
  }
  #auth-modal .auth-form-pane {
    flex: 1;
    padding: 24px;
  }
}

.auth-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 24px;
}

.auth-header .brand-logo {
  margin-bottom: 12px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
}

.auth-header .brand-logo i {
  font-size: 20px;
}

.auth-header h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.auth-header p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.auth-body,
#auth-form-body,
#auth-success-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pane-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 8px 0;
}

.pane-divider::before,
.pane-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.pane-divider:not(:empty)::before {
  margin-right: .5em;
}

.pane-divider:not(:empty)::after {
  margin-left: .5em;
}

.third-party-auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-third-party {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-third-party:hover {
  background: var(--bg-secondary);
  border-color: var(--text-muted);
}

/* 16. Points Recharge Panel Grid */
.recharge-modal-box {
  max-width: 940px !important;
  width: 95%;
  padding: 24px;
}

.recharge-split-layout {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  align-items: flex-start;
}

.recharge-split-left {
  flex: 1;
  min-width: 0;
}

.recharge-split-right {
  width: 330px;
  flex-shrink: 0;
}

.recharge-split-right .checkout-simulation-panel {
  margin-top: 0;
  height: 100%;
}

.recharge-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 0 16px 0;
}

.recharge-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  transition: var(--transition-physics);
}

.recharge-card:hover {
  transform: translateY(-4px);
  border-color: var(--text-muted);
  background: var(--bg-card);
}

.recharge-card.active {
  border: 2px solid var(--primary);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
}

.recharge-card-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
}

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

.pack-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.pack-price {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

.pack-credits-amount {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 12px;
}

.credits-num {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

.credits-unit {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.pack-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 20px;
}

.btn-buy-package {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
  margin-top: auto;
}

.recharge-card.active .btn-buy-package {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
}

.recharge-card:hover:not(.active) .btn-buy-package {
  border-color: var(--primary);
  color: var(--primary);
}

.pricing-rules-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.pricing-rules-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.rates-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
}

.rate-item {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.rate-name {
  font-weight: 500;
}

.rate-value {
  font-weight: 700;
  color: var(--text-main);
}

/* Pay Checkout Simulation */
.checkout-simulation-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: 16px;
  animation: slideDownFade 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideDownFade {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.checkout-simulation-panel h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
}

.checkout-methods {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
}

.checkout-qr-box {
  border-right: 1px solid var(--border-color);
  padding-right: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.qr-mock {
  width: 100px;
  height: 100px;
  background: #ffffff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
}

.qr-mock i {
  font-size: 80px;
  color: #000;
}

.checkout-qr-box span {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

.checkout-card-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}

/* 17. Bento Grid Asset Library Card UI */
.projects-list-workspace {
  flex-grow: 1;
  overflow-y: auto;
  padding: 24px 32px 80px 32px;
}

.projects-list-workspace::-webkit-scrollbar {
  width: 4px;
}

.projects-list-workspace::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

.asset-bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  width: 100%;
}

.asset-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-physics);
  box-shadow: var(--shadow-sm);
  height: 270px;
  position: relative;
}

/* Bento cell asymmetric spanning configuration */
.asset-card:nth-child(6n+1) {
  grid-column: span 4;
}
.asset-card:nth-child(6n+2) {
  grid-column: span 8;
}
.asset-card:nth-child(6n+3) {
  grid-column: span 8;
}
.asset-card:nth-child(6n+4) {
  grid-column: span 4;
}
.asset-card:nth-child(6n+5) {
  grid-column: span 6;
}
.asset-card:nth-child(6n+6) {
  grid-column: span 6;
}

.asset-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.asset-thumbnail-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #000;
}

.asset-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-physics);
}

.asset-card:hover .asset-thumbnail {
  transform: scale(1.05);
  opacity: 0.8;
}

.asset-badge-row {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 2;
}

.asset-engine-badge {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.asset-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.asset-status-badge.success i { color: var(--green); }
.asset-status-badge.rendering i { color: var(--yellow); }
.asset-status-badge.failed i { color: var(--red); }

.asset-actions-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: var(--transition-fast);
  z-index: 3;
}

.asset-card:hover .asset-actions-overlay {
  opacity: 1;
}

.btn-asset-action {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.95);
  border: none;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-asset-action:hover {
  transform: scale(1.1);
  background: var(--primary);
  color: #ffffff;
}

.btn-asset-action i {
  font-size: 18px;
}

.btn-asset-action.delete:hover {
  background: var(--red);
}

.asset-info {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  z-index: 4;
}

.asset-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--text-muted);
}

.asset-date {
  font-weight: 500;
}

.asset-cost {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--yellow);
}

/* Asset library Filter styling tweaks */
.library-filters {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

#asset-search-input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  font-size: 12px;
  color: var(--text-main);
  transition: var(--transition-fast);
}

#asset-search-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.asset-filter-tabs {
  display: flex;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2px;
}

.asset-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.asset-tab-btn.active {
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.asset-tab-btn:hover:not(.active) {
  color: var(--text-main);
}

/* Hide Coming Soon / Placeholder elements temporarily to focus product experience */
.nav-item[data-view*="placeholder"],
.tab-item[data-mode="placeholder"] {
  display: none !important;
}


/* Replication New - Additional Styles */
.upload-zone-small {
  padding: 16px;
  min-height: auto;
}

.upload-zone-small .upload-inner {
  padding: 12px;
}

.upload-zone-small .upload-inner i {
  font-size: 24px;
}

.gen-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.gen-step-item i {
  font-size: 16px;
}

.gen-step-item.active {
  color: var(--primary);
}

.gen-step-item.active i::before {
  content: "\e97f"; /* ph-spinner-gap */
}

.gen-step-item.completed {
  color: var(--accent-teal);
}

.gen-step-item.completed i::before {
  content: "\e93a"; /* ph-check-circle */
}

@keyframes pulse {
  0% { opacity: 0.65; transform: scale(0.995); }
  50% { opacity: 1; transform: scale(1); }
  100% { opacity: 0.65; transform: scale(0.995); }
}

@keyframes pulse-gentle {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.005); }
}

/* Payment Gateway Tabs styling */
.payment-gateway-tabs {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 20px;
  justify-content: center;
}

.payment-gateway-tab {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease-in-out;
}

.payment-gateway-tab:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
}

.payment-gateway-tab.active {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.03);
}

.payment-content-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.payment-content-pane.active {
  display: block;
}

