/* ============================================================================
   Video Toolbox — Stylesheet
   Slikyface Dark Aesthetic (Neon Violet & Cyan Accents)
   Responsive desktop timeline & mobile touch layout
   ============================================================================ */

:root {
  --vid-purple: #a855f7;
  --vid-purple-dim: rgba(168, 85, 247, 0.15);
  --vid-purple-border: rgba(168, 85, 247, 0.35);
  --vid-cyan: #38bdf8;
  --vid-lime: #b8ff36;
  --vid-bg: #070907;
  --vid-card-bg: #0b110c;
  --vid-border: #162417;
  --vid-text: #e2e8f0;
  --vid-muted: #94a3b8;
}

/* Hero Section */
.vidtool-hero {
  text-align: center;
  padding: 40px 16px 24px;
}

.vidtool-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--vid-purple-dim);
  border: 1px solid var(--vid-purple-border);
  color: var(--vid-purple);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.vidtool-eyebrow .dot {
  width: 6px;
  height: 6px;
  background: var(--vid-purple);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--vid-purple);
}

.vidtool-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  color: #ffffff;
}

.vidtool-title span {
  color: var(--vid-purple);
  text-shadow: 0 0 30px rgba(168, 85, 247, 0.4);
}

.vidtool-subtitle {
  font-size: 17px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 8px;
}

.vidtool-desc {
  max-width: 620px;
  margin: 0 auto 20px;
  color: var(--vid-muted);
  font-size: 14px;
  line-height: 1.5;
}

/* Privacy Guarantee Banner */
.vidtool-privacy-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 780px;
  margin: 0 auto;
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 10px;
  padding: 12px 18px;
  text-align: left;
}

.vidtool-privacy-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.vidtool-privacy-text {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.45;
}

.vidtool-privacy-text strong {
  display: block;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 2px;
}

/* Auth Gate */
.vidtool-auth-gate-section {
  margin: 24px 0 40px;
  display: flex;
  justify-content: center;
}

.auth-gate-card {
  background: var(--vid-card-bg);
  border: 1px solid var(--vid-border);
  border-radius: 12px;
  padding: 36px 24px;
  max-width: 520px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.auth-gate-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.auth-gate-card h2 {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 10px;
}

.auth-gate-card p {
  color: var(--vid-muted);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 24px;
}

.auth-gate-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-action {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-action.primary {
  background: var(--vid-purple);
  color: #ffffff;
}

.btn-action.primary:hover {
  background: #c084fc;
}

.btn-action.secondary {
  background: #1e293b;
  color: #ffffff;
  border: 1px solid #334155;
}

.btn-action.secondary:hover {
  background: #334155;
}

/* Storage Section (My Completed Videos) */
.completed-storage-section {
  background: #090e09;
  border: 1px solid var(--vid-border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 28px;
}

.storage-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.storage-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.storage-panel-title h3 {
  font-size: 16px;
  font-weight: 850;
  margin: 0;
  color: #ffffff;
}

.storage-badge {
  background: var(--vid-purple-dim);
  color: var(--vid-purple);
  border: 1px solid var(--vid-purple-border);
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
}

.storage-badge.storage-quota-full {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.45);
}

.storage-panel-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.storage-auto-delete-note {
  color: var(--vid-muted);
  font-size: 11px;
}

.btn-subtle {
  background: transparent;
  border: 1px solid var(--vid-border);
  color: var(--vid-muted);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-subtle:hover {
  color: #ffffff;
  border-color: #334155;
}

.storage-quota-full-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  color: #fef3c7;
}

.storage-quota-full-notice .quota-full-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.storage-quota-full-notice .quota-full-text {
  font-size: 12px;
  line-height: 1.45;
}

.storage-quota-full-notice .quota-full-text strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 2px;
}

.completed-videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.completed-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 24px;
  color: var(--vid-muted);
  font-size: 13px;
  background: #081008;
  border: 1px dashed var(--vid-border);
  border-radius: 8px;
}

.completed-video-card {
  background: #0c140c;
  border: 1px solid var(--vid-border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.video-card-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #030603;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.video-card-mode-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}

.video-card-duration-tag {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.video-card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.video-card-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.video-card-meta {
  font-size: 11px;
  color: var(--vid-muted);
  margin-bottom: 6px;
}

.video-card-expiry {
  font-size: 10px;
  color: #ffaa00;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.video-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.card-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  color: #ffffff;
  font-size: 26px;
  opacity: 0.8;
  transition: opacity 0.15s ease, background 0.15s ease;
  pointer-events: none;
}

.video-card-thumb-wrap:hover .card-play-overlay {
  opacity: 1;
  background: rgba(0, 0, 0, 0.18);
}

.btn-card-preview {
  flex: 1;
  background: rgba(168, 85, 247, 0.18);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.45);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.btn-card-preview:hover {
  background: rgba(168, 85, 247, 0.35);
  color: #ffffff;
  border-color: #a855f7;
}

.btn-card-download {
  flex: 1;
  background: var(--vid-purple);
  color: #ffffff;
  border: none;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s ease;
}

.btn-card-download:hover {
  background: #c084fc;
}

/* Unified Editor Workspace */
.vidtool-workspace-section {
  margin-bottom: 40px;
}

.editor-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--vid-card-bg);
  border: 1px solid var(--vid-border);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.editor-mode-tabs {
  display: flex;
  gap: 6px;
  background: #060a06;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--vid-border);
}

.mode-tab {
  background: transparent;
  border: none;
  color: var(--vid-muted);
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.mode-tab:hover {
  color: #ffffff;
}

.mode-tab.active {
  background: var(--vid-purple);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
}

.editor-project-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.clip-count-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--vid-purple);
  background: var(--vid-purple-dim);
  border: 1px solid var(--vid-purple-border);
  padding: 4px 8px;
  border-radius: 6px;
}

.btn-add-clips {
  background: #1e293b;
  color: #ffffff;
  border: 1px solid #334155;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s ease;
}

.btn-add-clips:hover {
  background: #334155;
}

.btn-reset-project {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-reset-project:hover {
  background: rgba(239, 68, 68, 0.15);
}

/* Upload Dropzone (Empty State) */
.vidtool-upload-dropzone {
  background: var(--vid-card-bg);
  border: 2px dashed var(--vid-border);
  border-radius: 12px;
  padding: 60px 24px;
  text-align: center;
  transition: border-color 0.2s ease;
}

.vidtool-upload-dropzone.dragover {
  border-color: var(--vid-purple);
  background: rgba(168, 85, 247, 0.05);
}

.dropzone-inner {
  max-width: 480px;
  margin: 0 auto;
}

.dropzone-icon {
  font-size: 50px;
  margin-bottom: 16px;
}

.dropzone-inner h2 {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

.dropzone-inner p {
  font-size: 13px;
  color: var(--vid-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.btn-primary-large {
  background: var(--vid-purple);
  color: #ffffff;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
  transition: all 0.15s ease;
}

.btn-primary-large:hover {
  background: #c084fc;
}

.dropzone-hints {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  font-size: 11px;
  color: var(--vid-muted);
  flex-wrap: wrap;
}

/* Active Editing Layout */
.editor-main-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
  align-items: start;
}

/* Preview Player Card */
.preview-player-card {
  background: #050805;
  border: 1px solid var(--vid-border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
}

.preview-canvas-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.preview-canvas-container canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.preview-overlay-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--vid-purple);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.preview-controls-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #090e09;
  border-top: 1px solid var(--vid-border);
}

.ctrl-btn-play,
.ctrl-btn-restart,
.ctrl-btn-mute {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.ctrl-btn-play:hover,
.ctrl-btn-restart:hover,
.ctrl-btn-mute:hover {
  background: #1e293b;
}

.time-display {
  font-size: 11px;
  font-family: monospace;
  font-weight: 700;
  color: var(--vid-muted);
  white-space: nowrap;
}

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

.timeline-scrubber {
  width: 100%;
  height: 6px;
  background: #1e293b;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  accent-color: var(--vid-purple);
}

/* Clips Tray / Timeline List */
.clips-tray-container {
  background: var(--vid-card-bg);
  border: 1px solid var(--vid-border);
  border-radius: 10px;
  padding: 14px;
}

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

.clips-tray-header h4 {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.05em;
}

.tray-duration-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--vid-cyan);
}

.clips-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.clip-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #060a06;
  border: 1px solid var(--vid-border);
  border-radius: 6px;
  padding: 8px;
  transition: border-color 0.15s ease;
}

.clip-item-row:hover {
  border-color: #273e29;
}

.clip-index-tag {
  font-size: 11px;
  font-weight: 800;
  color: var(--vid-purple);
  width: 20px;
  text-align: center;
}

.clip-thumb {
  width: 56px;
  height: 36px;
  border-radius: 4px;
  background: #000000;
  object-fit: cover;
  flex-shrink: 0;
}

.clip-details {
  flex: 1;
  min-width: 0;
}

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

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

.clip-reorder-actions {
  display: flex;
  gap: 3px;
}

.btn-clip-reorder,
.btn-clip-remove {
  background: #111a12;
  border: 1px solid var(--vid-border);
  color: var(--vid-muted);
  width: 24px;
  height: 24px;
  border-radius: 4px;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-clip-reorder:hover:not(:disabled) {
  color: #ffffff;
  border-color: #334155;
}

.btn-clip-reorder:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-clip-remove:hover {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

/* Sidebar Settings Panels */
.settings-panel {
  background: var(--vid-card-bg);
  border: 1px solid var(--vid-border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}

.settings-panel-header h3 {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 4px;
}

.settings-panel-header p {
  font-size: 11px;
  color: var(--vid-muted);
  line-height: 1.4;
  margin: 0 0 14px;
}

.setting-group {
  margin-bottom: 14px;
}

.setting-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.form-select {
  width: 100%;
  background: #060a06;
  border: 1px solid var(--vid-border);
  color: #ffffff;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  outline: none;
}

.form-select:focus {
  border-color: var(--vid-purple);
}

.radio-pill-group {
  display: flex;
  gap: 4px;
}

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

.radio-pill input {
  display: none;
}

.radio-pill span {
  display: block;
  text-align: center;
  background: #060a06;
  border: 1px solid var(--vid-border);
  color: var(--vid-muted);
  padding: 6px 4px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  transition: all 0.15s ease;
}

.radio-pill input:checked + span {
  background: var(--vid-purple);
  color: #ffffff;
  border-color: var(--vid-purple);
}

.info-callout {
  background: #060a06;
  border: 1px solid var(--vid-border);
  border-radius: 6px;
  padding: 10px;
  font-size: 11px;
  color: var(--vid-muted);
  line-height: 1.4;
}

.info-callout strong {
  display: block;
  color: #ffffff;
  margin-bottom: 2px;
}

/* Duration Meter & Export Action */
.duration-meter-card {
  background: #060a06;
  border: 1px solid var(--vid-border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}

.meter-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--vid-muted);
  margin-bottom: 6px;
}

.meter-row strong {
  color: #ffffff;
  font-size: 12px;
}

.duration-progress-bar {
  width: 100%;
  height: 6px;
  background: #111a12;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 6px;
}

.duration-progress-fill {
  height: 100%;
  background: var(--vid-lime);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.duration-progress-fill.warning {
  background: #f59e0b;
}

.duration-progress-fill.exceeded {
  background: #ef4444;
}

.duration-warning-msg {
  color: #f87171;
  font-size: 11px;
  line-height: 1.4;
  margin-top: 8px;
}

.export-action-box {
  text-align: center;
}

.btn-download-video {
  width: 100%;
  background: linear-gradient(135deg, var(--vid-purple), #9333ea);
  color: #ffffff;
  border: none;
  padding: 12px;
  font-size: 14px;
  font-weight: 800;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.35);
  transition: all 0.15s ease;
}

.btn-download-video:hover:not(:disabled) {
  background: linear-gradient(135deg, #c084fc, #a855f7);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
}

.btn-download-video:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.export-policy-note {
  margin-top: 10px;
  font-size: 10px;
  color: var(--vid-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Render Progress Modal */
.render-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.render-modal-card {
  background: #0b110c;
  border: 1px solid var(--vid-border);
  border-radius: 12px;
  padding: 32px 24px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.export-preview-card {
  max-width: 680px;
  padding: 24px 20px;
}

.export-preview-player-wrap {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6);
}

.export-preview-player-wrap video {
  width: 100%;
  max-height: 440px;
  display: block;
  object-fit: contain;
  margin: 0 auto;
}

.render-modal-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(168, 85, 247, 0.2);
  border-top-color: var(--vid-purple);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}

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

.render-modal-card h3 {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 6px;
}

.render-modal-card p {
  font-size: 12px;
  color: var(--vid-muted);
  margin: 0 0 20px;
}

.render-progress-bar-wrap {
  width: 100%;
  height: 10px;
  background: #111a12;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 8px;
}

.render-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--vid-purple), var(--vid-cyan));
  border-radius: 5px;
  transition: width 0.15s ease;
}

.render-progress-stats {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 20px;
}

.btn-cancel-render {
  background: transparent;
  border: 1px solid #334155;
  color: var(--vid-muted);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-cancel-render:hover {
  color: #ffffff;
  border-color: #475569;
}

/* Import Progress Modal & Stage Indicators */
.import-progress-card {
  max-width: 520px;
  width: 100%;
  padding: 24px 20px;
  text-align: left;
}

.import-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  margin: 14px 0 6px;
  padding-right: 4px;
}

.import-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #111a12;
  border: 1px solid var(--vid-border);
  border-radius: 8px;
  padding: 10px 14px;
  gap: 12px;
  transition: all 0.2s ease;
}

.import-file-row.status-ready {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.05);
}

.import-file-row.status-error {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.05);
}

.import-file-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.import-file-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.import-file-meta {
  font-size: 11px;
  color: var(--vid-muted);
}

.import-file-stage {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.stage-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.02em;
}

.stage-badge.stage-metadata {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.stage-badge.stage-preview {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.stage-badge.stage-ready {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.stage-badge.stage-error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-remove-failed-file {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  cursor: pointer;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-remove-failed-file:hover {
  background: #ef4444;
  color: #fff;
}

/* Responsive adjustments */
@media (max-width: 860px) {
  .editor-main-layout {
    grid-template-columns: 1fr;
  }
  
  .editor-header-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .editor-mode-tabs {
    flex-direction: column;
  }
}

/* ============================================================================
   Active Work Protection Banner
   ============================================================================ */
.active-work-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 780px;
  margin: 14px auto 0;
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.4);
  border-radius: 10px;
  padding: 12px 18px;
  text-align: left;
}

.active-work-icon {
  font-size: 26px;
  flex-shrink: 0;
}

.active-work-text {
  font-size: 12px;
  color: #fef08a;
  line-height: 1.45;
  flex: 1;
}

.active-work-text strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #fef9c3;
  margin-bottom: 2px;
}

.btn-banner-reauth {
  background: #ca8a04;
  color: #ffffff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.btn-banner-reauth:hover {
  background: #eab308;
}

/* ============================================================================
   Screen Recorder & Instant Replay Layouts
   ============================================================================ */
.recorder-workspace-layout,
.replay-workspace-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 880px;
  margin: 0 auto;
}

.recorder-toolbar-card,
.replay-toolbar-card {
  background: var(--vid-card-bg);
  border: 1px solid var(--vid-border);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.recorder-toolbar-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 200px;
}

.recorder-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--vid-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.recorder-select {
  background: #081008;
  border: 1px solid var(--vid-border);
  border-radius: 6px;
  color: #ffffff;
  padding: 7px 10px;
  font-size: 12px;
}

.replay-dur-tabs {
  display: flex;
  gap: 4px;
  background: #081008;
  padding: 3px;
  border-radius: 6px;
  border: 1px solid var(--vid-border);
}

.replay-dur-btn {
  background: transparent;
  border: none;
  color: var(--vid-muted);
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.replay-dur-btn:hover {
  color: #ffffff;
}

.replay-dur-btn.active {
  background: var(--vid-cyan);
  color: #070907;
  font-weight: 800;
}

/* Central Interactive Card */
.recorder-central-card {
  background: var(--vid-card-bg);
  border: 1px solid var(--vid-border);
  border-radius: 12px;
  padding: 36px 24px;
  text-align: center;
}

.recorder-state-view,
.replay-state-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.recorder-icon {
  font-size: 54px;
  margin-bottom: 14px;
}

.recorder-state-view h2,
.replay-state-view h2 {
  font-size: 24px;
  font-weight: 850;
  color: #ffffff;
  margin: 0 0 8px;
}

.recorder-state-view p,
.replay-state-view p {
  color: var(--vid-muted);
  font-size: 13px;
  line-height: 1.55;
  max-width: 540px;
  margin: 0 auto 24px;
}

.btn-start-screen-record,
.btn-start-replay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.03em;
  padding: 14px 28px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-start-replay {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #041017;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.4);
}

.btn-start-screen-record:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(239, 68, 68, 0.55);
}

.btn-start-replay:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(56, 189, 248, 0.6);
}

.recorder-hints {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

/* Active Recording State */
.rec-live-badge-wrap,
.replay-live-badge-wrap {
  margin-bottom: 14px;
}

.rec-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #ef4444;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.rec-dot {
  width: 10px;
  height: 10px;
  background: #ef4444;
  border-radius: 50%;
  animation: recPulse 1s ease-in-out infinite;
}

@keyframes recPulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 10px #ef4444; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.rec-timer-display {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
  margin-bottom: 12px;
}

.rec-progress-bar {
  width: 100%;
  max-width: 440px;
  height: 8px;
  background: #111a12;
  border-radius: 4px;
  overflow: hidden;
  margin: 0 auto 14px;
}

.rec-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ef4444, #f97316);
  border-radius: 4px;
  transition: width 0.2s linear;
}

.rec-active-hint {
  font-size: 12px;
  color: var(--vid-muted);
  margin-bottom: 20px;
}

.rec-controls-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-rec-control {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid var(--vid-border);
  background: #1e293b;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-rec-control:hover {
  background: #334155;
}

.btn-rec-control.danger {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.6);
  color: #ef4444;
}

.btn-rec-control.danger:hover {
  background: #ef4444;
  color: #ffffff;
}

/* Completed Recording Preview */
.rec-preview-header {
  margin-bottom: 14px;
}

.rec-success-badge {
  display: inline-block;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #4ade80;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 6px;
}

.rec-preview-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.rec-player-wrap {
  width: 100%;
  max-width: 640px;
  aspect-ratio: 16 / 9;
  background: #000000;
  border: 1px solid var(--vid-border);
  border-radius: 8px;
  overflow: hidden;
  margin: 0 auto 14px;
}

.rec-player-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rec-meta-pills {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.meta-pill {
  background: #0d170e;
  border: 1px solid var(--vid-border);
  color: #94a3b8;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.rec-actions-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary-action {
  background: var(--vid-purple);
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-primary-action:hover {
  background: #c084fc;
}

.btn-secondary-action {
  background: #1e293b;
  border: 1px solid #334155;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-secondary-action:hover {
  background: #334155;
}

/* Instant Replay State */
.replay-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.replay-pulse {
  width: 10px;
  height: 10px;
  background: #38bdf8;
  border-radius: 50%;
  animation: replayNeonPulse 1.2s ease-in-out infinite;
}

@keyframes replayNeonPulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 10px #38bdf8; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.replay-status-text {
  font-size: 20px;
  font-weight: 850;
  color: #ffffff;
  margin-bottom: 6px;
}

.replay-gauge-text {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 24px;
}

.replay-clip-actions-box {
  background: #081008;
  border: 1px solid var(--vid-border);
  border-radius: 10px;
  padding: 18px 24px;
  max-width: 500px;
  width: 100%;
  margin: 0 auto 16px;
}

.replay-clip-actions-box h4 {
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.replay-save-buttons-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-save-replay {
  background: #1e293b;
  border: 1px solid #334155;
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-save-replay:hover {
  background: #334155;
  border-color: #475569;
}

.btn-save-replay.primary {
  background: var(--vid-cyan);
  color: #070907;
  border-color: var(--vid-cyan);
}

.btn-save-replay.primary:hover {
  background: #7dd3fc;
}

.replay-live-notice {
  font-size: 11px;
  color: #64748b;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.45;
}

.btn-stop-replay {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-stop-replay:hover {
  background: rgba(239, 68, 68, 0.15);
}

.replay-latest-card {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--vid-border);
  width: 100%;
}

.btn-card-import {
  background: #1e293b;
  border: 1px solid #334155;
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 6px;
  width: 100%;
  transition: background 0.15s ease;
}

.btn-card-import:hover {
  background: #334155;
}

/* ============================================================================
   Instant Replay Hotkey, Companion Bridge & Pending Clips Queue
   ============================================================================ */
.replay-hotkey-bar {
  margin: 18px auto 0;
  max-width: 620px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  padding: 12px 16px;
  text-align: left;
}

.replay-active-hotkey-bar {
  margin: 14px 0 6px;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 8px;
  padding: 10px 14px;
  text-align: left;
}

.replay-hotkey-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
}

.replay-hotkey-badge.active-mode {
  color: #38bdf8;
}

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

.key-cap {
  display: inline-block;
  padding: 2px 7px;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  color: #ffffff;
  background: #334155;
  border: 1px solid #475569;
  border-bottom: 2px solid #1e293b;
  border-radius: 5px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  line-height: 1.3;
}

.hotkey-sub {
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
  margin-left: 4px;
}

.hotkey-status-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hotkey-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
  white-space: nowrap;
}

.hotkey-status-pill.connected {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.page-active {
  background: #60a5fa;
  box-shadow: 0 0 6px #60a5fa;
}

.status-dot.ext-active {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.btn-guide-link {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-guide-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-save-replay.highlight {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
  font-weight: 800;
}

.btn-save-replay.highlight:hover {
  background: #0369a1;
}

.hotkey-inline-hint {
  display: block;
  font-size: 10px;
  font-weight: 600;
  opacity: 0.9;
  margin-top: 2px;
  color: #bae6fd;
}

/* Pending Clips Queue Card */
.pending-clips-card {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--vid-border);
  width: 100%;
}

.pending-clips-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.pending-title-group {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.pending-title-group h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #f1f5f9;
}

.pending-quota-note {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

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

.btn-bulk-action {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-bulk-download {
  background: #0284c7;
  color: #ffffff;
  border: 1px solid #0369a1;
}

.btn-bulk-download:hover {
  background: #0369a1;
}

.btn-bulk-discard {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.btn-bulk-discard:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

.pending-clips-warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde68a;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 14px;
  text-align: left;
}

.pending-clips-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pending-clip-item {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  align-items: center;
  gap: 14px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 8px;
  padding: 10px 14px;
  transition: border-color 0.15s ease;
}

.pending-clip-item:hover {
  border-color: rgba(56, 189, 248, 0.5);
}

.pending-clip-thumb-wrap {
  width: 140px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pending-clip-thumb-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pending-clip-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.pending-clip-name {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  word-break: break-all;
}

.pending-clip-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
}

.pending-clip-pill {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 2px 6px;
}

.pending-clip-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.btn-clip-action {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-clip-dl {
  background: #0284c7;
  color: #ffffff;
}

.btn-clip-dl:hover {
  background: #0369a1;
}

.btn-clip-preview {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #475569;
}

.btn-clip-preview:hover {
  background: #334155;
}

.btn-clip-import {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #475569;
}

.btn-clip-import:hover {
  background: #334155;
}

.btn-clip-discard {
  background: transparent;
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-clip-discard:hover {
  background: rgba(239, 68, 68, 0.2);
}

.pending-clips-footer-note {
  margin-top: 12px;
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
}

/* Hotkey Guide Modal */
.guide-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.guide-modal-card {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.guide-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 12px;
}

.guide-modal-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: #f8fafc;
}

.guide-section {
  margin-bottom: 20px;
  text-align: left;
}

.guide-section h4 {
  font-size: 14px;
  font-weight: 700;
  color: #38bdf8;
  margin: 0 0 8px;
}

.guide-section p {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.5;
  margin: 0 0 8px;
}

.guide-key-display {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}

.guide-key-alt {
  font-size: 12px;
  color: #94a3b8;
}

.guide-steps-box {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 10px 0;
  font-size: 12px;
  color: #cbd5e1;
}

.guide-steps-box ol {
  margin: 0;
  padding-left: 20px;
  line-height: 1.6;
}

.guide-privacy-badge {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 12px;
  color: #a7f3d0;
  margin-top: 10px;
  line-height: 1.45;
}

.guide-game-tip {
  margin-top: 10px;
  font-size: 12px;
  color: #fde68a;
  line-height: 1.45;
}

.guide-modal-footer {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .pending-clip-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .pending-clip-thumb-wrap {
    width: 100%;
    height: 140px;
  }
  .pending-clip-actions {
    justify-content: flex-start;
  }
}

/* System Stop Notice */
.rec-system-stop-notice {
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.4);
  color: #fef08a;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 14px;
  text-align: left;
}

/* Diagnostics Toggle & Drawer */
.diag-toggle-wrap {
  margin-top: 18px;
  text-align: center;
}

.btn-toggle-diag {
  background: transparent;
  border: 1px dashed #334155;
  color: #64748b;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-toggle-diag:hover {
  color: #94a3b8;
  border-color: #64748b;
}

.diag-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.diag-drawer-card {
  background: #090e09;
  border: 1px solid var(--vid-border);
  border-radius: 12px;
  padding: 24px;
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
}

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

.diag-drawer-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}

.diag-note {
  font-size: 11px;
  color: var(--vid-muted);
  margin: 0 0 14px;
  line-height: 1.4;
}

.diag-log-view {
  background: #040704;
  border: 1px solid var(--vid-border);
  border-radius: 6px;
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  color: #4ade80;
  flex: 1;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
  min-height: 180px;
  max-height: 380px;
  margin: 0 0 14px;
}

.diag-drawer-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ============================================================================
   Real Audio Activity Meter & Status Indicators
   ============================================================================ */
.audio-monitor-card {
  width: 100%;
  max-width: 520px;
  margin: 12px auto 14px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}

.audio-monitor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 12px;
}

.audio-source-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60a5fa;
}

.audio-source-pill.warn {
  background: rgba(234, 179, 8, 0.15);
  border-color: rgba(234, 179, 8, 0.4);
  color: #facc15;
}

.audio-source-pill.none {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.25);
  color: #94a3b8;
}

.audio-level-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
}

.audio-meter-track {
  width: 100%;
  height: 8px;
  background: rgba(30, 41, 59, 0.9);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.audio-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e 0%, #22c55e 65%, #eab308 85%, #ef4444 100%);
  transition: width 60ms ease-out;
}

.audio-warning-msg {
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
  color: #fef08a;
  font-size: 11px;
  line-height: 1.4;
  text-align: left;
}

.live-audio-feedback-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 520px;
  margin: 6px auto 12px;
  padding: 6px 12px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.4;
  text-align: center;
}

.preview-audio-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 640px;
  margin: 8px auto 14px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  box-sizing: border-box;
}

.preview-audio-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.preview-audio-badge.enabled {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
}

.preview-audio-badge.silent {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #94a3b8;
}

.preview-audio-help {
  font-size: 12px;
  color: var(--vid-muted);
  line-height: 1.4;
  text-align: left;
}

/* ============================================================================
   Persistent Video Ready Result Panel
   ============================================================================ */
.video-ready-panel {
  background: linear-gradient(135deg, rgba(11, 24, 18, 0.95) 0%, rgba(9, 14, 10, 0.98) 100%);
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.15);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
  animation: slideDownReady 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.video-ready-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.video-ready-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.video-ready-icon {
  font-size: 32px;
  line-height: 1;
}

.video-ready-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
}

.video-ready-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--vid-muted);
}

.video-ready-body {
  display: grid;
  grid-template-columns: minmax(280px, 440px) 1fr;
  gap: 24px;
  align-items: center;
}

@media (max-width: 860px) {
  .video-ready-body {
    grid-template-columns: 1fr;
  }
}

.video-ready-player-wrap {
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.video-ready-player-wrap video {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  display: block;
}

.video-ready-details {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

@media (max-width: 480px) {
  .video-ready-meta-grid {
    grid-template-columns: 1fr;
  }
}

.video-ready-meta-grid .meta-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
}

.video-ready-meta-grid .meta-label {
  font-size: 11px;
  color: var(--vid-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}

.video-ready-meta-grid .meta-val {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 3px;
  display: block;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.badge-pill.fast {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #4ade80;
}

.badge-pill.transcode {
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.4);
  color: #facc15;
}

.video-ready-cloud-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  font-size: 12px;
  color: #e0f2fe;
}

.video-ready-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 4px;
}

.btn-video-ready-download {
  flex: 1;
  padding: 14px 22px;
  background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 15px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.35);
  transition: all 0.2s ease;
  text-align: center;
}

.btn-video-ready-download:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
}

.btn-video-ready-retry {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-video-ready-retry:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* ============================================================================
   Merge Compatibility Notice Card
   ============================================================================ */
.merge-compat-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 12px;
}

.compat-status-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #38bdf8;
}

.compat-desc {
  font-size: 11.5px;
  color: #94a3b8;
  margin: 4px 0 0;
  line-height: 1.4;
}

.compat-reasons-list {
  font-size: 11px;
  color: #facc15;
  margin: 6px 0 0;
  padding-left: 18px;
  line-height: 1.45;
}

/* ============================================================================
   Persistent Video Export Error Card
   ============================================================================ */
.video-export-error-card {
  background: linear-gradient(135deg, rgba(38, 14, 18, 0.95) 0%, rgba(20, 10, 12, 0.98) 100%);
  border: 1px solid rgba(239, 68, 68, 0.45);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(239, 68, 68, 0.15);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
  animation: slideDownReady 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-error-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.video-error-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.video-error-icon {
  font-size: 32px;
  line-height: 1;
}

.video-error-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  color: #fca5a5;
}

.video-error-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--vid-muted);
}

.video-error-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.video-error-message-box {
  background: rgba(239, 68, 68, 0.1);
  border-left: 4px solid #ef4444;
  padding: 12px 16px;
  border-radius: 6px;
  color: #fecaca;
  font-size: 13.5px;
  line-height: 1.5;
}

.video-error-message-box p {
  margin: 0;
}

.video-error-remedies {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 12.5px;
  color: #cbd5e1;
}

.video-error-remedies strong {
  display: block;
  margin-bottom: 6px;
  color: #f8fafc;
}

.video-error-remedies ul {
  margin: 0;
  padding-left: 20px;
  line-height: 1.6;
}

.video-error-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 6px;
}

.btn-error-retry {
  padding: 10px 18px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 13.5px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-error-retry:hover {
  filter: brightness(1.1);
}

.btn-error-diag {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-weight: 600;
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-error-diag:hover {
  background: rgba(255, 255, 255, 0.14);
}
