/* Modern Luxury Glassmorphism Theme for Ai Studio Mini App */
:root {
  --bg-primary: #0a0e17;
  --bg-card: rgba(18, 26, 43, 0.72);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --bg-card-hover: rgba(26, 38, 63, 0.85);
  
  --accent-cyan: #00d2ff;
  --accent-cyan-glow: rgba(0, 210, 255, 0.35);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.35);
  --accent-gold: #f59e0b;
  --accent-red: #ef4444;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-kh: 'Kantumruy Pro', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-en: 'Outfit', sans-serif;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-kh);
  background: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 210, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(16, 185, 129, 0.06) 0%, transparent 40%);
  color: var(--text-main);
  min-height: 100vh;
  padding-bottom: 95px; /* space for fixed footer */
  overflow-x: hidden;
}

.app-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 20px;
}

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

.logo-icon {
  font-size: 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-card-border);
  padding: 8px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.app-header h1 {
  font-family: var(--font-en);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.badge-status {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  color: var(--accent-emerald);
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulseDot 2s infinite ease-in-out;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  background: rgba(18, 26, 43, 0.8);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
  margin-bottom: 16px;
  backdrop-filter: blur(12px);
  overflow-x: auto;
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--text-muted);
  font-family: var(--font-kh);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.2), rgba(16, 185, 129, 0.2));
  color: #ffffff;
  border: 1px solid rgba(0, 210, 255, 0.4);
  box-shadow: 0 2px 10px var(--accent-cyan-glow);
}

.tab-content {
  display: block;
}

.tab-content.hidden {
  display: none !important;
}

/* Tools Grid View (Tab 2) */
.tools-grid-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tool-category-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-cyan);
  padding-left: 4px;
}

.tools-buttons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-card:hover, .tool-card:active {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
  border-color: rgba(0, 210, 255, 0.4);
  box-shadow: 0 4px 18px var(--accent-cyan-glow);
}

.t-icon {
  font-size: 26px;
  display: block;
  margin-bottom: 6px;
}

.tool-card h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}

.tool-card p {
  font-size: 10px;
  color: var(--text-muted);
}

/* Account & Shield Controls (Tabs 3 & 4) */
.btn-primary-block {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-emerald));
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-family: var(--font-kh);
  font-size: 13px;
  font-weight: 700;
  color: #050811;
  cursor: pointer;
  margin-top: 10px;
  box-shadow: 0 4px 16px rgba(0, 210, 255, 0.35);
  transition: all 0.2s;
}

.btn-primary-block:active {
  transform: scale(0.98);
}

.account-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 13px;
}

.vip-badge {
  color: var(--accent-gold);
  font-weight: 700;
}

.gpu-online-text {
  color: var(--accent-emerald);
}

.field-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 6px;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Section Title */
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-refresh {
  background: transparent;
  border: 1px solid var(--bg-card-border);
  color: var(--accent-cyan);
  font-family: var(--font-kh);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-refresh:active {
  transform: scale(0.95);
  background: rgba(0, 210, 255, 0.1);
}

/* Interactive Preview Box */
.video-preview-wrapper {
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.aspect-ratio-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050811;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none !important;
  -webkit-user-select: none !important;
  touch-action: none !important;
  margin: 0 auto;
}

.aspect-ratio-box.portrait {
  aspect-ratio: 9 / 16;
  max-height: 68vh;
  max-width: calc(68vh * 9 / 16);
  margin: 0 auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 210, 255, 0.2);
}

.preview-video-player {
  width: 100%;
  height: 100%;
  object-fit: fill;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  background: #000;
}

.preview-frame-img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.preview-placeholder {
  text-align: center;
  color: var(--text-dim);
  padding: 20px;
}

.ph-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 8px;
  opacity: 0.5;
}

.preview-placeholder p {
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.btn-upload-direct {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.25), rgba(16, 185, 129, 0.25));
  border: 1.5px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-kh);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-upload-direct:hover, .btn-upload-direct:active {
  transform: scale(0.97);
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.4), rgba(16, 185, 129, 0.4));
  box-shadow: 0 0 20px var(--accent-cyan-glow);
}

.up-icon {
  font-size: 16px;
}

.upload-progress-box {
  margin-top: 12px;
  width: 80%;
  max-width: 240px;
  margin-left: auto;
  margin-right: auto;
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

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

.progress-text {
  display: block;
  font-size: 11px;
  color: var(--accent-cyan);
  margin-top: 6px;
  font-weight: 500;
}

/* ========================================================
   Clean Professional Studio Overlay System (CapCut/Figma Standard)
   ======================================================== */

/* Logo Overlay Container & Image */
.overlay-logo-badge {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 45px;
  min-height: 35px;
  max-width: 90%;
  line-height: 0;
  border-radius: 6px;
}

.overlay-logo-img {
  display: block !important;
  width: 100%;
  height: auto;
  min-height: 25px;
  max-height: 160px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.overlay-item {
  position: absolute;
  pointer-events: auto !important;
  touch-action: none !important;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  z-index: 10;
  transition: outline 0.15s ease, box-shadow 0.15s ease;
}

/* 1. Default Inactive State: 100% Clean Studio Preview (NO handles, NO dashed borders, NO tags) */
.overlay-item:not(.selected-target) {
  outline: none !important;
  box-shadow: none !important;
}

.overlay-item:not(.selected-target) .resize-handle,
.overlay-item:not(.selected-target) .overlay-close-btn,
.overlay-item:not(.selected-target) .drag-handle-tag {
  display: none !important;
}

/* 2. Actively Selected State: Sleek Luxury Bounding Box (Only on active item) */
.overlay-item.selected-target {
  outline: 1.5px solid #00d2ff !important;
  outline-offset: 3px;
  border-radius: 4px;
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.45) !important;
  z-index: 50 !important;
}

.overlay-item.is-dragging {
  cursor: grabbing !important;
  box-shadow: 0 0 18px rgba(0, 210, 255, 0.65) !important;
}

/* ✖ Elegant Minimal Close Button (Top-Right on selected item only) */
.overlay-close-btn {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 20px;
  height: 20px;
  background: #ef4444;
  color: #ffffff;
  border: 1.5px solid #ffffff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 70;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
  transition: transform 0.15s ease, background 0.15s ease;
}

.overlay-item.selected-target .overlay-close-btn {
  display: flex !important;
}

.overlay-close-btn:hover {
  background: #dc2626;
  transform: scale(1.15);
}

.overlay-close-btn:active {
  transform: scale(0.9);
}

/* Floating Drag Coordinate Tooltip */
.drag-tooltip {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(4, 10, 20, 0.92);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 20px;
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
}

/* 3. Sleek Minimal Studio Handles (Only visible on selected overlay) */
.resize-handle {
  position: absolute;
  display: none;
  background: #ffffff;
  border: 1.5px solid #00d2ff;
  z-index: 65;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  touch-action: none !important;
  transition: transform 0.12s ease, background 0.12s ease;
}

.overlay-item.selected-target .resize-handle {
  display: flex !important;
}

/* Generous transparent hit-area so fingers easily touch handles on mobile */
.resize-handle::after {
  content: '';
  position: absolute;
  top: -14px;
  bottom: -14px;
  left: -14px;
  right: -14px;
  z-index: 80;
}

/* 4 Corner Dots (Figma/CapCut Standard) */
.corner-tl, .corner-tr, .corner-bl, .corner-br {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.corner-tl { top: -6px; left: -6px; cursor: nwse-resize; }
.corner-tr { top: -6px; right: -6px; cursor: nesw-resize; }
.corner-bl { bottom: -6px; left: -6px; cursor: nesw-resize; }
.corner-br { bottom: -6px; right: -6px; cursor: nwse-resize; }

/* 4 Edge Slim Bars */
.edge-t, .edge-b {
  width: 22px;
  height: 6px;
  border-radius: 3px;
  left: 50%;
  transform: translateX(-50%);
  cursor: ns-resize;
}
.edge-t { top: -4px; }
.edge-b { bottom: -4px; }

.edge-l, .edge-r {
  width: 6px;
  height: 22px;
  border-radius: 3px;
  top: 50%;
  transform: translateY(-50%);
  cursor: ew-resize;
}
.edge-l { left: -4px; }
.edge-r { right: -4px; }

.resize-handle:hover, .resize-handle:active {
  background: #00d2ff !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.9) !important;
  transform: scale(1.3) !important;
}
.edge-t:hover, .edge-t:active,
.edge-b:hover, .edge-b:active {
  transform: translateX(-50%) scale(1.3) !important;
}
.edge-l:hover, .edge-l:active,
.edge-r:hover, .edge-r:active {
  transform: translateY(-50%) scale(1.3) !important;
}

/* Remove all ugly old floating handle tags */
.drag-handle-tag {
  display: none !important;
}


/* 1. Logo Overlay Badge (Top-Left: Transparent PNG without background) */
.overlay-logo-badge {
  top: 16px;
  left: 16px;
  background: transparent !important;
  border: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.overlay-logo-badge.hidden {
  display: none !important;
}

.overlay-logo-img {
  width: 110px;
  height: auto;
  max-width: 100%;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.85));
  pointer-events: none;
}

/* 2. Luxury Title Badge Overlay (Bottom-Center: Translucent Pill Badge) */
.overlay-badge {
  top: auto;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(8, 12, 22, 0.9);
  border: 1.2px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 5px 16px;
  border-radius: 20px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overlay-badge.hidden {
  display: none !important;
}

/* 3. Chinese Subtitle Blur Simulator Zone (Lower-Third: Covering Original Chinese Subtitles) */
.overlay-blur-zone {
  left: 0;
  right: 0;
  bottom: 30%;
  height: 7%;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-top: 1px dashed rgba(255, 255, 255, 0.35);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.35);
}

.blur-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(0, 0, 0, 0.28);
  transition: opacity 0.3s;
}

.overlay-blur-zone.blur-off {
  display: none !important;
}

.blur-indicator-line {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.blur-resize-handle {
  position: absolute;
  top: -10px;
  right: 14px;
  background: var(--accent-cyan);
  color: #050811;
  font-size: 12px;
  font-weight: 800;
  width: 22px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ns-resize;
  pointer-events: auto;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* Glowing Mobile Touch Drag Handles on Left & Right */
.blur-touch-handle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 28px;
  background: linear-gradient(135deg, #00d2ff, #0284c7);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 14px rgba(0, 210, 255, 0.8), 0 2px 8px rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  z-index: 15;
  user-select: none;
  touch-action: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.blur-touch-handle:active {
  cursor: grabbing;
  transform: translateY(-50%) scale(1.18);
  box-shadow: 0 0 20px rgba(0, 210, 255, 1);
}

.blur-touch-handle.handle-left {
  left: 6px;
}

.blur-touch-handle.handle-right {
  right: 6px;
}

.blur-touch-handle .handle-grip-icon {
  font-size: 13px;
  color: #040914;
  font-weight: 900;
  line-height: 1;
}

/* Voice Card Preview Button */
.btn-voice-preview {
  margin-top: 8px;
  padding: 5px 8px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  border-radius: 6px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  transition: all 0.2s ease;
  z-index: 5;
}

.btn-voice-preview:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #ffffff;
}

.btn-voice-preview.is-playing {
  background: linear-gradient(135deg, #00d2ff, #0284c7);
  border-color: #ffffff;
  color: #040914;
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.6);
  animation: pulse-audio 1s infinite alternate;
}

@keyframes pulse-audio {
  0% { transform: scale(1); }
  100% { transform: scale(1.04); }
}

/* 4. Burned Khmer Subtitle Simulator (Centered on Blur Zone) */
.overlay-khmer-sub {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  padding: 3px 8px;
  line-height: 1.35;
  text-shadow: 
    -1.8px -1.8px 0 #000,
     1.8px -1.8px 0 #000,
    -1.8px  1.8px 0 #000,
     1.8px  1.8px 0 #000,
     0px 2px 10px rgba(0,0,0,0.98);
  max-width: 88%;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 4px;
}

.overlay-khmer-sub.hidden {
  display: none !important;
}

/* Dedicated Video Player Toolbar */
.video-player-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(14, 21, 37, 0.95);
  border: 1px solid var(--bg-card-border);
  border-top: none;
  padding: 8px 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.btn-play-toggle {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-emerald));
  border: none;
  border-radius: var(--radius-sm);
  color: #050811;
  font-family: var(--font-kh);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0, 210, 255, 0.3);
  transition: all 0.2s;
}

.btn-play-toggle:active {
  transform: scale(0.95);
}

.player-timeline-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-slider {
  width: 100%;
  -webkit-appearance: none;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
  cursor: pointer;
}

.timeline-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan-glow);
  cursor: pointer;
}

.timeline-time-info {
  display: flex;
  justify-content: flex-end;
  font-family: var(--font-en);
  font-size: 10px;
  color: var(--text-muted);
}

.btn-mute-toggle {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-sm);
  color: #ffffff;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
}

.btn-mute-toggle:active {
  background: rgba(255, 255, 255, 0.12);
}

/* Orientation Bar & Drag Hint */
.orientation-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(10, 16, 30, 0.85);
  border: 1px solid var(--bg-card-border);
  border-top: none;
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 11.5px;
}

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

.ori-label {
  color: var(--text-dim);
  font-weight: 500;
}

.pill-group-mini {
  display: inline-flex;
  gap: 3px;
  background: rgba(0, 0, 0, 0.35);
  padding: 2px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.aspect-pill, .align-pill {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-kh);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.aspect-pill.active, .align-pill.active {
  background: var(--accent-cyan);
  color: #050811;
  font-weight: 700;
  box-shadow: 0 0 10px var(--accent-cyan-glow);
}

.preview-info-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  color: var(--text-muted);
}

.drag-hint-banner {
  background: linear-gradient(90deg, rgba(0, 210, 255, 0.1), rgba(16, 185, 129, 0.08));
  border: 1px dashed rgba(0, 210, 255, 0.35);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  margin-top: 8px;
  font-size: 11.5px;
  color: #c4f5ff;
  line-height: 1.4;
}

/* Layout Editor Group Boxes */
.btn-reset-layout {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--bg-card-border);
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  font-size: 11px;
  font-family: var(--font-kh);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-reset-layout:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.layout-group-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 12px;
}

.layout-group-box:last-child {
  margin-bottom: 0;
}

.layout-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.toggle-row-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.layout-title-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-bright);
}

.logo-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-mini-action {
  background: rgba(0, 210, 255, 0.15);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  font-size: 11px;
  font-family: var(--font-kh);
  padding: 4px 9px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-mini-action:active {
  transform: scale(0.96);
}

.btn-mini-danger {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #ef4444;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.alignment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.align-label {
  font-size: 11.5px;
  color: var(--text-dim);
}

/* Glass Cards */
.config-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: border-color 0.2s;
}

.glass-card:focus-within {
  border-color: rgba(0, 210, 255, 0.3);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.card-icon {
  font-size: 18px;
}

.card-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Styled Inputs */
.input-with-action {
  display: flex;
  gap: 8px;
}

.styled-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-family: var(--font-kh);
  font-size: 13px;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s;
}

.styled-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan-glow);
}

.btn-ai-action {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.2), rgba(16, 185, 129, 0.2));
  border: 1px solid rgba(0, 210, 255, 0.4);
  border-radius: var(--radius-md);
  padding: 0 14px;
  font-family: var(--font-kh);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-cyan);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-ai-action:active {
  transform: scale(0.96);
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.35), rgba(16, 185, 129, 0.35));
}

/* Toggle Rows */
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.highlight-row {
  background: rgba(0, 210, 255, 0.04);
  border-color: rgba(0, 210, 255, 0.15);
}

.toggle-label {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  flex: 1;
  padding-right: 12px;
}

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

.toggle-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Custom Styled Switch */
.styled-switch {
  appearance: none;
  -webkit-appearance: none;
  width: 44px;
  height: 24px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  outline: none;
  transition: background 0.25s;
  flex-shrink: 0;
}

.styled-switch::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.styled-switch:checked {
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald-glow);
}

.styled-switch:checked::before {
  transform: translateX(20px);
}

/* Sliders */
.slider-group {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.slider-val {
  color: var(--accent-cyan);
  font-weight: 600;
  font-family: var(--font-en);
}

.styled-slider {
  width: 100%;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.styled-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent-cyan-glow);
}

/* Voice Picker Grid */
.voice-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.voice-option {
  cursor: pointer;
}

.voice-option input {
  display: none;
}

.voice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  text-align: center;
  transition: all 0.2s;
}

.voice-option input:checked + .voice-card {
  background: rgba(0, 210, 255, 0.12);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 14px var(--accent-cyan-glow);
}

.v-emoji {
  font-size: 22px;
  margin-bottom: 4px;
}

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

.v-tag {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Pill Group & Quality */
.pill-group {
  display: flex;
  gap: 8px;
}

.pill-option {
  flex: 1;
  cursor: pointer;
}

.pill-option input {
  display: none;
}

.pill-btn {
  display: block;
  text-align: center;
  padding: 10px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s;
}

.pill-option input:checked + .pill-btn {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-emerald);
  color: #ffffff;
  box-shadow: 0 0 12px var(--accent-emerald-glow);
}

.split-select-wrap {
  margin-top: 4px;
}

.field-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.styled-select {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-family: var(--font-kh);
  font-size: 13px;
  color: var(--text-main);
  outline: none;
}

/* Fixed Bottom Action Bar */
.app-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 14, 23, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--bg-card-border);
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  max-width: 600px;
  margin: 0 auto;
  z-index: 100;
}

.btn-save-draft {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-family: var(--font-kh);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-save-draft:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.1);
}

.btn-render-action {
  flex: 1;
  background: linear-gradient(135deg, #00d2ff, #10b981);
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-family: var(--font-kh);
  font-size: 14px;
  font-weight: 700;
  color: #050811;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 210, 255, 0.35);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-render-action:active {
  transform: scale(0.98);
  box-shadow: 0 2px 10px rgba(0, 210, 255, 0.5);
}

/* ========================================================
   HCH Mobile Reference Styles (Task Card, Golden Alert, Voice Pills)
   ======================================================== */

/* 1. Golden Server Warning Banner */
.hch-alert-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin: 14px 0;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.08);
}

.hch-alert-banner .alert-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.hch-alert-banner .alert-text strong {
  font-size: 12px;
  color: #fbbf24;
  display: block;
  margin-bottom: 2px;
}

.hch-alert-banner .alert-text p {
  font-size: 11px;
  color: #fef3c7;
  line-height: 1.4;
  opacity: 0.9;
}

/* 2. In-Progress Task Section */
.hch-task-section {
  background: rgba(18, 26, 43, 0.7);
  border: 1px solid rgba(0, 210, 255, 0.25);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.hch-task-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.task-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-section-icon {
  font-size: 16px;
}

.hch-task-header h3 {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}

.task-subtag {
  font-size: 10.5px;
  background: rgba(0, 210, 255, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 210, 255, 0.3);
  padding: 2px 8px;
  border-radius: 12px;
}

/* Video Task Card */
.hch-video-card {
  display: flex;
  gap: 12px;
  background: rgba(10, 15, 26, 0.88);
  border: 1px solid rgba(0, 210, 255, 0.35);
  border-radius: var(--radius-md);
  padding: 10px;
  margin-bottom: 10px;
  box-shadow: 0 4px 18px rgba(0, 210, 255, 0.12);
  position: relative;
  overflow: hidden;
}

.video-card-thumb-wrap {
  width: 68px;
  height: 68px;
  border-radius: 8px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.card-thumb-fallback {
  font-size: 24px;
}

.thumb-play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.video-card-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-top-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.card-ep-index {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(0, 210, 255, 0.12);
  padding: 1px 5px;
  border-radius: 4px;
}

.card-filename {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.card-duration-badge {
  font-size: 10px;
  color: var(--text-dim);
  white-space: nowrap;
}

.card-middle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

.card-stage-pill {
  font-size: 10.5px;
  color: #38bdf8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 75%;
}

.card-percent-val {
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-cyan);
}

.card-progress-bar-wrap {
  height: 8px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
  margin-bottom: 4px;
}

.card-progress-bar-fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, #00d2ff, #10b981, #00d2ff);
  background-size: 200% 100%;
  transition: width 0.4s ease-out;
  animation: progressGlowShift 2s linear infinite;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.6);
  position: relative;
}

.card-bar-glow {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 10px;
  background: rgba(255, 255, 255, 0.7);
  filter: blur(2px);
}

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

/* Add Video Full Width Button */
.btn-hch-add-video {
  width: 100%;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-family: var(--font-kh);
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: all 0.2s;
}

.btn-hch-add-video:active {
  transform: scale(0.98);
  background: linear-gradient(135deg, #1e40af, #1d4ed8);
}

/* 3. Horizontal Voice Selection Pills */
.hch-voice-section {
  margin-bottom: 16px;
}

.section-title-mini {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hch-voice-pills {
  display: flex;
  gap: 8px;
}

.hch-voice-pill {
  flex: 1;
  cursor: pointer;
}

.hch-voice-pill input {
  display: none;
}

.pill-voice-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(18, 26, 43, 0.65);
  border: 1px solid var(--bg-card-border);
  border-radius: 24px;
  padding: 9px 8px;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.v-radio-circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--text-dim);
  display: inline-block;
  transition: all 0.2s;
  flex-shrink: 0;
}

.v-icon {
  font-size: 15px;
}

.v-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
}

.hch-voice-pill input:checked + .pill-voice-box {
  background: rgba(0, 210, 255, 0.15);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 14px rgba(0, 210, 255, 0.35);
}

.hch-voice-pill input:checked + .pill-voice-box .v-radio-circle {
  border-color: var(--accent-cyan);
  background: var(--accent-cyan);
  box-shadow: inset 0 0 0 3px #0a0e17;
}

.hch-voice-pill input:checked + .pill-voice-box .v-name {
  color: #ffffff;
}

/* ========================================================
   Live Video Rendering Card & Progress Tracker (Mini Web)
   ======================================================== */
.live-render-card {
  margin-top: 20px;
  margin-bottom: 24px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(10, 14, 23, 0.98));
  border: 1px solid rgba(0, 210, 255, 0.35);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 12px 36px -8px rgba(0, 210, 255, 0.22), 0 0 20px rgba(0, 210, 255, 0.1) inset;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: fadeInSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

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

.live-render-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.live-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-pulse-spinner {
  font-size: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: rgba(0, 210, 255, 0.15);
  border: 1px solid rgba(0, 210, 255, 0.4);
  box-shadow: 0 0 14px rgba(0, 210, 255, 0.35);
  animation: liveIconPulse 1.8s infinite ease-in-out;
}

@keyframes liveIconPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 22px rgba(0, 210, 255, 0.65);
  }
}

.live-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.2px;
}

.live-subtitle {
  font-size: 11px;
  color: var(--accent-cyan);
  margin-top: 1px;
}

.live-status-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.live-status-pill.running {
  background: rgba(0, 210, 255, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 210, 255, 0.35);
  animation: pillBlink 2s infinite ease-in-out;
}

@keyframes pillBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

.live-status-pill.completed {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.live-status-pill.error {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.45);
}

.live-stage-display {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 14px;
}

.live-stage-icon {
  font-size: 16px;
  animation: spinSlow 3s linear infinite;
}

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

.live-stage-text {
  font-size: 12.5px;
  color: #f1f5f9;
  font-weight: 500;
  flex: 1;
}

.live-progress-container {
  margin-bottom: 14px;
}

.live-progress-track {
  height: 12px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 10px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}

.live-progress-bar {
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, #00d2ff, #10b981, #00d2ff);
  background-size: 200% 100%;
  position: relative;
  transition: width 0.4s ease-out;
  animation: progressGlowShift 2s linear infinite;
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.5);
}

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

.live-progress-glow {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 14px;
  background: rgba(255, 255, 255, 0.7);
  filter: blur(3px);
  border-radius: 50%;
}

.live-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11.5px;
}

.live-percent-number {
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-cyan);
}

.live-eta-info {
  color: var(--text-muted);
}

.live-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.live-stat-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 8px;
  text-align: center;
}

.live-stat-label {
  display: block;
  font-size: 10px;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.live-stat-val {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Delivery Completed Card */
.live-delivery-notice {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(16, 185, 129, 0.25);
  animation: fadeInSlideUp 0.3s ease;
}

.delivery-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 12px;
}

.delivery-icon {
  font-size: 26px;
}

.delivery-box strong {
  font-size: 13px;
  color: #34d399;
  display: block;
  margin-bottom: 2px;
}

.delivery-box p {
  font-size: 11.5px;
  color: #cbd5e1;
  line-height: 1.4;
}

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

.btn-open-telegram {
  flex: 1.4;
  background: linear-gradient(135deg, #229ed9, #0088cc);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-family: var(--font-kh);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(34, 158, 217, 0.35);
  transition: all 0.2s;
}

.btn-open-telegram:active {
  transform: scale(0.97);
}

.btn-new-render {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-family: var(--font-kh);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-new-render:active {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(0.97);
}

/* ========================================================
   HCH Reference Architecture Styles (Header, Cards, Bottom Nav)
   ======================================================== */

.header-right-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-vip {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(168, 85, 247, 0.25));
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #c084fc;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  white-space: nowrap;
}

.badge-lang {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--bg-card-border);
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 12px;
  white-space: nowrap;
}

/* Quick Action Links Bar */
.quick-links-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.quick-links-scroll::-webkit-scrollbar {
  display: none;
}

.quick-pill-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-card-border);
  border-radius: 20px;
  padding: 6px 12px;
  color: var(--text-main);
  font-family: var(--font-kh);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.quick-pill-btn:active {
  transform: scale(0.96);
  background: rgba(255, 255, 255, 0.1);
}

.quick-pill-btn.btn-highlight {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

/* Main Cards */
.hch-card {
  background: rgba(16, 24, 40, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 14px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

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

.card-title-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-icon-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.card-icon-badge.gold {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.card-icon-badge.cyan {
  background: rgba(0, 210, 255, 0.15);
  border: 1px solid rgba(0, 210, 255, 0.4);
}

.card-icon-badge.purple {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.card-icon-badge.green {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.hch-card-header h3 {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}

.card-subtitle-sub {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 1px;
}

.counter-badge {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.counter-badge.green {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

/* Social icons */
.social-icons-group {
  display: flex;
  gap: 5px;
}

.soc-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #ffffff;
}

.soc-icon.yt { background: #ff0000; }
.soc-icon.tk { background: #000000; border: 1px solid rgba(0, 210, 255, 0.5); font-size: 12px; }
.soc-icon.fb { background: #1877f2; }

/* Input with button */
.url-input-wrap {
  display: flex;
  gap: 8px;
}

.hch-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--bg-card-border);
  border-radius: 10px;
  padding: 10px 12px;
  color: #fff;
  font-family: var(--font-kh);
  font-size: 12px;
  outline: none;
}

.hch-input:focus {
  border-color: var(--accent-cyan);
}

.btn-hch-download {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-family: var(--font-kh);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.hch-card-hint {
  font-size: 10.5px;
  color: var(--text-dim);
  margin-top: 6px;
}

/* Info banner */
.hch-info-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 11px;
  color: #fef3c7;
  margin-bottom: 12px;
}

/* Dashed box */
.hch-upload-dashed-box {
  border: 1.5px dashed rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.03);
  border-radius: 12px;
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 12px;
}

.hch-upload-dashed-box:active {
  background: rgba(245, 158, 11, 0.08);
  transform: scale(0.99);
}

.cloud-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 4px;
}

.dashed-text strong {
  font-size: 12.5px;
  color: #fbbf24;
  display: block;
}

.dashed-text p {
  font-size: 10.5px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Controls row */
.hch-controls-row {
  display: flex;
  gap: 10px;
}

.control-col {
  flex: 1;
}

.hch-field-label {
  font-size: 10.5px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.hch-select {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--bg-card-border);
  border-radius: 8px;
  padding: 8px 10px;
  color: #fff;
  font-family: var(--font-kh);
  font-size: 11.5px;
  outline: none;
}

/* Upload blue button */
.btn-hch-upload-blue {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-family: var(--font-kh);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.4);
}

.btn-hch-upload-blue:active {
  transform: scale(0.97);
}

/* Quick Accordion inside preview */
.hch-subcard-accordion {
  margin-top: 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 10px;
}

.toggle-row-inline-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bg-card-border);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 10.5px;
  cursor: pointer;
}

.btn-xs-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--bg-card-border);
  border-radius: 12px;
  padding: 4px 8px;
  font-family: var(--font-kh);
  font-size: 10.5px;
  color: #fff;
  cursor: pointer;
}

.btn-text-danger {
  background: none;
  border: none;
  color: #f87171;
  font-family: var(--font-kh);
  font-size: 11px;
  cursor: pointer;
}

/* Voice Selection Grid (Matching Reference) */
.hch-voice-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.voice-card-select input {
  display: none;
}

.voice-card-inner {
  background: rgba(10, 15, 26, 0.85);
  border: 1px solid var(--bg-card-border);
  border-radius: 14px;
  padding: 14px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.22s;
}

.v-large-avatar {
  font-size: 28px;
  display: block;
  margin-bottom: 4px;
}

.v-card-name {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  display: block;
}

.v-sub-tag {
  font-size: 9.5px;
  color: var(--text-dim);
  display: block;
  margin-top: 2px;
}

.voice-card-select.female input:checked + .voice-card-inner {
  border-color: #ec4899;
  background: rgba(236, 72, 153, 0.12);
  box-shadow: 0 0 16px rgba(236, 72, 153, 0.35);
}

.voice-card-select.male input:checked + .voice-card-inner {
  border-color: #00d2ff;
  background: rgba(0, 210, 255, 0.12);
  box-shadow: 0 0 16px rgba(0, 210, 255, 0.35);
}

.voice-card-select.both input:checked + .voice-card-inner {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.35);
}

/* Action Card (Matching Reference) */
.hch-action-card {
  background: rgba(18, 26, 43, 0.85);
  border: 1px solid rgba(0, 210, 255, 0.3);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0, 210, 255, 0.15);
}

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

.action-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-icon {
  font-size: 22px;
}

.action-title-wrap h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}

.action-title-wrap p {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 1px;
}

.action-cost-badge {
  font-size: 10.5px;
  font-weight: 600;
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 3px 8px;
  border-radius: 12px;
  white-space: nowrap;
}

.btn-hch-primary-translate {
  width: 100%;
  background: linear-gradient(135deg, #00d2ff, #2563eb);
  border: none;
  border-radius: 12px;
  padding: 13px 16px;
  font-family: var(--font-kh);
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 210, 255, 0.4);
  transition: all 0.2s;
}

.btn-hch-primary-translate:active {
  transform: scale(0.98);
}

/* Completed Section */
.completed-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.completed-empty-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 24px 12px;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
}

.empty-icon {
  font-size: 26px;
  display: block;
  margin-bottom: 6px;
}

/* Bottom Nav (Docked - Matching Reference) */
.hch-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 600px;
  margin: 0 auto;
  background: rgba(10, 14, 23, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-around;
  padding: 8px 4px 12px;
  z-index: 1000;
}

.hch-nav-item {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  padding-top: 4px;
}

.hch-nav-item .nav-icon {
  font-size: 18px;
}

.hch-nav-item .nav-label {
  font-family: var(--font-kh);
  font-size: 10.5px;
  font-weight: 600;
}

.hch-nav-pill {
  position: absolute;
  top: -12px;
  background: var(--accent-cyan);
  color: #050811;
  font-size: 8.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.2s;
}

.hch-nav-item.active {
  color: var(--accent-cyan);
}

.hch-nav-item.active .hch-nav-pill {
  opacity: 1;
  transform: translateY(0);
}

.mp3-item .equalizer-waves {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 8px;
  margin-top: 1px;
}

.equalizer-waves i {
  width: 2px;
  background: var(--accent-cyan);
  border-radius: 1px;
  animation: eqWave 1s infinite ease-in-out;
}

.equalizer-waves i:nth-child(1) { animation-delay: 0.1s; height: 3px; }
.equalizer-waves i:nth-child(2) { animation-delay: 0.3s; height: 7px; }
.equalizer-waves i:nth-child(3) { animation-delay: 0.2s; height: 5px; }
.equalizer-waves i:nth-child(4) { animation-delay: 0.4s; height: 8px; }

@keyframes eqWave {
  0%, 100% { height: 2px; }
  50% { height: 8px; }
}

/* Helpers */
.hidden {
  display: none !important;
}

/* --- Subtitle Quick Editor Styling --- */
.sub-editor-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  background: rgba(15, 23, 42, 0.6);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sub-search-replace-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.hch-input-sm {
  flex: 1;
  background: rgba(10, 14, 23, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #fff;
  padding: 6px 10px;
  font-size: 13px;
  outline: none;
}

.hch-input-sm:focus {
  border-color: var(--accent-cyan, #00f2fe);
}

.btn-xs-action {
  background: linear-gradient(135deg, #00f2fe, #4facfe);
  color: #000;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.sub-editor-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #94a3b8;
}

.sub-status-idle { color: #94a3b8; }
.sub-status-saving { color: #f59e0b; }
.sub-status-saved { color: #10b981; }

.subtitle-lines-container {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.sub-line-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(20, 27, 45, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 8px;
  transition: all 0.2s ease;
}

.sub-line-row:hover {
  background: rgba(30, 41, 69, 0.7);
  border-color: rgba(0, 242, 254, 0.3);
}

.sub-line-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #64748b;
}

.sub-time-tag {
  background: rgba(0, 242, 254, 0.1);
  color: #00f2fe;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

.sub-gender-tag {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  cursor: pointer;
}

.sub-gender-tag.female {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
}

.sub-gender-tag.male {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.sub-original-text {
  font-size: 12px;
  color: #94a3b8;
  font-style: italic;
}

.sub-line-input {
  width: 100%;
  background: rgba(10, 14, 23, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  color: #f8fafc;
  padding: 6px 8px;
  font-size: 13px;
  line-height: 1.4;
  font-family: 'Kantumruy Pro', sans-serif;
  box-sizing: border-box;
}

.sub-line-input:focus {
  border-color: #f59e0b;
  outline: none;
  background: rgba(15, 23, 42, 0.95);
}

.sub-empty-state {
  text-align: center;
  padding: 24px 12px;
  color: #64748b;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.sub-empty-state span {
  font-size: 28px;
}

/* ========================================================
   Full Movie Cinema Modal & YouTube Embed Player
   ======================================================== */
.full-movie-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.25s ease-out;
}

.full-movie-modal-overlay.hidden {
  display: none !important;
}

.full-movie-modal-card {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(145deg, #131c2e, #0c121d);
  border: 1px solid rgba(0, 210, 255, 0.35);
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 24px rgba(0, 210, 255, 0.2);
  display: flex;
  flex-direction: column;
}

.full-movie-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-icon {
  font-size: 24px;
}

.modal-title-wrap h3 {
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.modal-title-wrap p {
  font-size: 11px;
  color: var(--accent-cyan, #00d2ff);
  margin: 2px 0 0 0;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
}

.full-movie-modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cinema-player-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 12px;
  border: 1px solid rgba(0, 210, 255, 0.3);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.cinema-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  gap: 6px;
}

.cinema-ph-icon {
  font-size: 38px;
  margin-bottom: 4px;
  filter: drop-shadow(0 0 10px rgba(0, 210, 255, 0.4));
}

.cinema-placeholder p {
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.cinema-ph-sub {
  font-size: 11px;
  color: #94a3b8;
  max-width: 320px;
}

.cinema-iframe,
.cinema-direct-video {
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
}

.yt-tip-alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 10px;
  padding: 10px 12px;
}

.yt-tip-alert .tip-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.yt-tip-alert .tip-content {
  font-size: 11.5px;
  color: #fef3c7;
  line-height: 1.45;
}

.yt-tip-alert .tip-content strong {
  color: #fbbf24;
}

.yt-tip-alert .tip-content b {
  color: #34d399;
}

.full-movie-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.full-movie-input-group .input-with-btn {
  display: flex;
  gap: 8px;
}

.full-movie-input-group input {
  flex: 1;
}

.btn-save-link {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-save-link:active {
  transform: scale(0.96);
}

.modal-action-buttons {
  display: flex;
  gap: 10px;
}

.btn-cinema-play {
  flex: 1.4;
  background: linear-gradient(135deg, #00d2ff, #0088cc);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0, 210, 255, 0.35);
  transition: all 0.2s;
}

.btn-cinema-play:active {
  transform: scale(0.97);
}

.btn-cinema-open-ext {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
  border-radius: 10px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-cinema-open-ext:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ========================================================
   DramaBox Short Drama Hub, Cards Grid & Paywall Styles
   ======================================================== */
.cinema-hub-card {
  max-width: 640px !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.8), 0 0 30px rgba(245, 158, 11, 0.15) !important;
}

.header-cinema-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cinema-coins-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(217, 119, 6, 0.28));
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: 20px;
  padding: 4px 10px;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.25);
}

.cinema-coins-badge .coin-icon {
  font-size: 14px;
}

.cinema-coins-badge .coin-val {
  font-family: var(--font-en, sans-serif);
  font-size: 13px;
  font-weight: 700;
  color: #fbbf24;
}

.cinema-coins-badge .coin-unit {
  font-size: 11px;
  color: #fef3c7;
}

/* Admin Bar & Add Form */
.admin-cinema-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(168, 85, 247, 0.12);
  border: 1px dashed rgba(168, 85, 247, 0.4);
  border-radius: 10px;
  padding: 8px 12px;
}

.admin-cinema-bar.hidden {
  display: none !important;
}

.admin-bar-info {
  font-size: 11.5px;
  color: #e9d5ff;
}

.btn-admin-add-movie {
  background: linear-gradient(135deg, #9333ea, #7c3aed);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
  transition: all 0.2s;
}

.btn-admin-add-movie:active {
  transform: scale(0.96);
}

.admin-add-form-card {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeIn 0.2s ease-out;
}

.admin-add-form-card.hidden {
  display: none !important;
}

.form-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.form-card-header h4 {
  font-size: 13px;
  color: #c084fc;
  margin: 0;
}

.btn-xs-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #ffffff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 11px;
  color: var(--text-dim, #94a3b8);
  font-weight: 500;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-primary-gradient {
  width: 100%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-primary-gradient:active {
  transform: scale(0.97);
}

/* Catalog Section & Drama Grid */
.cinema-catalog-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.catalog-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-title-wrap .fire-icon {
  font-size: 18px;
}

.section-title-wrap h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.catalog-hint {
  font-size: 10.5px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

/* 2-Column Responsive Drama Cards Grid */
.drama-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 520px) {
  .drama-cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

/* Drama Movie Card (Matching Screenshot exactly!) */
.drama-movie-card {
  position: relative;
  background: #0d131f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.drama-movie-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.2);
}

.drama-poster-wrap {
  width: 100%;
  aspect-ratio: 9 / 13;
  position: relative;
  overflow: hidden;
  background: #000;
}

.drama-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.drama-movie-card:hover .drama-poster-img {
  transform: scale(1.05);
}

/* Poster Top Tags (Orange Pills matching reference [爱情] [都市爱情]) */
.poster-tags-group {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  z-index: 2;
  pointer-events: none;
}

.poster-genre-pill {
  background: linear-gradient(135deg, #ff5722, #ea580c);
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.3px;
}

/* Poster Bottom-Right Badge (e.g. [全68集]) */
.poster-ep-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(10, 15, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  z-index: 2;
  pointer-events: none;
}

/* Big Round Center Play Button */
.poster-center-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  border: 2px solid rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 16px;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.8);
  transition: all 0.2s ease;
  z-index: 2;
  pointer-events: none;
}

.drama-movie-card:hover .poster-center-play {
  transform: translate(-50%, -50%) scale(1.12);
  background: rgba(245, 158, 11, 0.85);
  border-color: #ffffff;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.7);
}

.poster-center-play .play-tri {
  margin-left: 2px;
}

/* Card Info Bottom Strip */
.drama-card-info {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #0d131f;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.drama-card-title {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.card-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.btn-card-status {
  flex: 1;
  border: none;
  border-radius: 6px;
  padding: 5px 8px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-card-status.unlocked {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.2), rgba(16, 185, 129, 0.25));
  border: 1px solid rgba(0, 210, 255, 0.45);
  color: #38bdf8;
}

.btn-card-status.locked {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.35);
}

.btn-card-dl {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.25));
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #34d399;
  border-radius: 6px;
  padding: 5px 8px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-card-dl:active {
  transform: scale(0.96);
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
}

.tab-content .cinema-hub-card {
  width: 100%;
  max-width: 600px;
  margin: 0 auto 90px auto;
  max-height: none;
  overflow: visible;
}

.btn-card-delete {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  border-radius: 6px;
  padding: 5px 7px;
  font-size: 11px;
  cursor: pointer;
}

/* Manual URL Accordion Section */
.manual-url-section {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
}

.btn-toggle-manual {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-dim, #94a3b8);
  font-family: inherit;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 6px 4px;
}

.btn-toggle-manual:hover {
  color: #ffffff;
}

.manual-url-body {
  margin-top: 8px;
}

.manual-url-body.hidden {
  display: none !important;
}

/* ========================================================
   Unlock Confirmation Modal Styles
   ======================================================== */
.unlock-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10005;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease-out;
}

.unlock-modal-overlay.hidden {
  display: none !important;
}

.unlock-modal-card {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(145deg, #161f30, #0c121d);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 25px rgba(245, 158, 11, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.unlock-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.unlock-modal-header .lock-icon {
  font-size: 22px;
}

.unlock-modal-header h3 {
  font-size: 14px;
  color: #ffffff;
  margin: 0;
  flex: 1;
}

.unlock-modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.unlock-movie-preview {
  display: flex;
  gap: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px;
}

.unlock-thumb-img {
  width: 64px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.unlock-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.unlock-details h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.unlock-ep-pill {
  font-size: 10.5px;
  color: #38bdf8;
  background: rgba(0, 210, 255, 0.12);
  border: 1px solid rgba(0, 210, 255, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  align-self: flex-start;
}

.unlock-desc {
  font-size: 11px;
  color: var(--text-dim, #94a3b8);
  margin: 0;
  line-height: 1.35;
}

.unlock-price-card {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: #f1f5f9;
}

.price-row .gold-text {
  font-size: 14px;
  color: #fbbf24;
}

.price-tip {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed rgba(245, 158, 11, 0.25);
  font-size: 10.5px;
  color: #fde68a;
}

.unlock-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-confirm-unlock {
  width: 100%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
  transition: all 0.2s;
}

.btn-confirm-unlock:active {
  transform: scale(0.97);
}

.btn-buy-coins {
  width: 100%;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
  transition: all 0.2s;
}

.btn-buy-coins.hidden {
  display: none !important;
}

/* ========================================================
   Full Screen Cinema Theater Player Modal Styles
   ======================================================== */
.theater-player-modal {
  position: fixed;
  inset: 0;
  background: #000000;
  z-index: 10010;
  display: flex;
  flex-direction: column;
}

.theater-player-modal.hidden {
  display: none !important;
}

.theater-player-topbar {
  height: 52px;
  background: rgba(10, 15, 26, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 2;
}

.theater-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.btn-theater-back {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-radius: 6px;
  padding: 5px 10px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.theater-title-wrap h3 {
  font-size: 13.5px;
  color: #ffffff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theater-controls-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-theater-fullscreen {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  border-radius: 6px;
  padding: 5px 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-theater-download {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.35));
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #34d399;
  border-radius: 6px;
  padding: 5px 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.btn-theater-download:active {
  transform: scale(0.96);
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
}

.theater-video-wrapper {
  flex: 1;
  width: 100%;
  height: calc(100% - 52px);
  background: #000;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
}

/* Stealth YouTube Iframe Container */
.theater-iframe-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theater-iframe-container.hidden {
  display: none !important;
}

.theater-iframe-container iframe,
.theater-iframe-container #theaterIframeMount {
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
  pointer-events: none !important; /* Intercepted by click shield so no YouTube tooltips/menus occur */
  transform: scale(1.05); /* Slight zoom crops any YouTube edge branding */
  transform-origin: center center;
}

.theater-direct-video {
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
  object-fit: contain;
}

.theater-direct-video.hidden {
  display: none !important;
}

/* Click Shield Overlay */
.theater-click-shield {
  position: absolute;
  inset: 0;
  z-index: 10;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

/* Center Action Indicator (Pulse flash on Play/Pause/Seek) */
.theater-center-action-indicator {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: rgba(10, 15, 26, 0.78);
  border: 2px solid rgba(0, 210, 255, 0.7);
  box-shadow: 0 0 25px rgba(0, 210, 255, 0.45);
  color: #ffffff;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}

.theater-center-action-indicator.show-pulse {
  opacity: 1;
  transform: scale(1.08);
}

/* Luxury Cinema Watermark Badge */
.theater-cinema-brand-badge {
  position: absolute;
  bottom: 74px;
  right: 14px;
  z-index: 15;
  background: rgba(10, 15, 26, 0.82);
  border: 1px solid rgba(0, 210, 255, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 5px 11px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.theater-cinema-brand-badge .brand-spark {
  font-size: 13px;
}

.theater-cinema-brand-badge .brand-text {
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.3px;
  text-shadow: 0 0 8px rgba(0, 210, 255, 0.4);
}

/* Custom Cinema Controls Toolbar */
.theater-custom-toolbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.65) 60%, transparent 100%);
  padding: 20px 16px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.theater-custom-toolbar.fade-out {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.th-timeline-row {
  width: 100%;
  display: flex;
  align-items: center;
}

.th-seek-slider {
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(to right, #00d2ff 0%, #00d2ff 0%, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.2) 100%);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: height 0.15s;
}

.th-seek-slider:hover {
  height: 7px;
}

.th-seek-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #00d2ff;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.9);
  transition: transform 0.15s;
}

.th-seek-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

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

.th-controls-left,
.th-controls-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-th-ctrl {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-radius: 8px;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.btn-th-ctrl:hover {
  background: rgba(0, 210, 255, 0.2);
  border-color: #00d2ff;
  color: #00d2ff;
}

.btn-th-ctrl:active {
  transform: scale(0.95);
}

.btn-th-play {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d2ff, #0284c7);
  border: none;
  color: #040914;
  font-size: 14px;
  font-weight: 800;
  justify-content: center;
  box-shadow: 0 0 14px rgba(0, 210, 255, 0.5);
}

.btn-th-play:hover {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #ffffff;
}

.th-time-display {
  font-size: 11.5px;
  font-family: var(--font-en, monospace);
  color: #94a3b8;
  font-weight: 600;
  margin-left: 4px;
}

#thCurrentTime {
  color: #00d2ff;
}

/* ========================================================
   Live Movie Download Progress Modal Styles
   ======================================================== */
.download-progress-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease-out;
}

.download-progress-modal-overlay.hidden {
  display: none !important;
}

.download-progress-card {
  width: 100%;
  max-width: 460px;
  background: linear-gradient(145deg, #131c2e, #0c121d);
  border: 1px solid rgba(0, 210, 255, 0.4);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 210, 255, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.progress-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.progress-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-header-title .pulse-icon {
  font-size: 24px;
  animation: pulse 1.5s infinite;
}

.progress-header-title h3 {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.progress-header-title p {
  font-size: 11px;
  color: #38bdf8;
  margin: 2px 0 0 0;
}

.progress-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.progress-bar-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-bar-track {
  flex: 1;
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00d2ff, #3b82f6, #10b981);
  border-radius: 10px;
  transition: width 0.3s ease;
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.6);
}

.progress-percent-badge {
  font-size: 13px;
  font-weight: 700;
  color: #00d2ff;
  min-width: 42px;
  text-align: right;
}

.progress-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.metric-item {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  font-size: 11px;
  color: #94a3b8;
}

.metric-val {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}

.metric-val.gold {
  color: #fbbf24;
}

.metric-val.cyan {
  color: #38bdf8;
}

.dl-status-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #cbd5e1;
  background: rgba(0, 210, 255, 0.08);
  border: 1px solid rgba(0, 210, 255, 0.25);
  padding: 8px 12px;
  border-radius: 8px;
}

.btn-direct-device-save {
  width: 100%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 11px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: all 0.2s;
}

.btn-direct-device-save:active {
  transform: scale(0.97);
}

/* 📺 Theater Quality Selector Dropdown */
.theater-res-control {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(0, 210, 255, 0.35);
  border-radius: 8px;
  padding: 2px 8px;
}

.theater-res-icon {
  font-size: 13px;
}

.theater-res-select {
  background: transparent;
  color: #38bdf8;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 2px;
}

.theater-res-select option {
  background: #0f172a;
  color: #ffffff;
}

/* 🎯 Download Quality Selector Pills */
.dl-res-selector-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dl-res-header-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: #94a3b8;
  font-weight: 600;
}

.dl-selected-badge {
  font-size: 11px;
  font-weight: 700;
  color: #00d2ff;
  background: rgba(0, 210, 255, 0.15);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(0, 210, 255, 0.3);
}

.dl-res-pills-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.btn-dl-res-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  color: #cbd5e1;
}

.btn-dl-res-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 210, 255, 0.4);
}

.btn-dl-res-pill.active {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.2), rgba(59, 130, 246, 0.25));
  border: 1.5px solid #00d2ff;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(0, 210, 255, 0.35);
  transform: translateY(-1px);
}

.res-pill-tag {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.2px;
}

.res-pill-tag.tag-fhd {
  background: rgba(0, 210, 255, 0.2);
  color: #00d2ff;
}

.res-pill-tag.tag-hd {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.res-pill-tag.tag-sd {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.res-pill-title {
  font-size: 11.5px;
  font-weight: 700;
}

/* ========================================================
   Clean Studio Layout & Customizer Styles
   ======================================================== */

.studio-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.4) 0%, rgba(3, 7, 18, 0.95) 100%);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding-top: 10px;
  z-index: 2;
}

.studio-guide-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 20px;
  font-size: 10.5px;
  color: #7dd3fc;
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.studio-dot-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Studio Tab Buttons */
.studio-tab-btn {
  padding: 6px 12px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #94a3b8;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.studio-tab-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #e2e8f0;
}

.studio-tab-btn.active {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #38bdf8;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

/* Studio Quick Preset Pills */
.preset-pill {
  flex: 1;
  padding: 5px 6px;
  font-family: inherit;
  font-size: 10.5px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #7dd3fc;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.preset-pill:hover, .preset-pill.active {
  background: rgba(56, 189, 248, 0.3);
  border-color: #38bdf8;
  color: #ffffff;
  font-weight: 600;
}

/* Floating Sticky Quick Action Bar (Mobile-first UX) */
.floating-quick-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 16px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(56, 189, 248, 0.25);
  z-index: 999;
  display: flex;
  justify-content: center;
  box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.5);
}

.quick-bar-inner {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 520px;
}

.quick-btn-save {
  flex: 1;
  padding: 12px 14px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid #38bdf8;
  color: #bae6fd;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.quick-btn-save:hover {
  background: rgba(56, 189, 248, 0.25);
  color: #fff;
}

.quick-btn-render {
  flex: 1.4;
  padding: 12px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 13.5px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  border: 1px solid #60a5fa;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
  transition: all 0.2s;
}

.quick-btn-render:hover {
  background: linear-gradient(135deg, #0369a1, #1d4ed8);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
}

.quick-btn-render:disabled, .quick-btn-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Reserve space at bottom so content is not hidden by floating bar */
body {
  padding-bottom: 78px !important;
}




