:root {
  --bg-dark: #07090e;
  --card-bg: rgba(16, 22, 36, 0.75);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-hover: rgba(56, 189, 248, 0.3);
  --accent-cyan: #38bdf8;
  --accent-blue: #6366f1;
  --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --input-bg: rgba(9, 12, 20, 0.6);
  --radius: 16px;
  --radius-sm: 10px;
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  padding-bottom: 60px;
}

/* Background Ambient Glows */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.25;
}
.bg-glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #38bdf8, #6366f1);
  top: -100px;
  left: -100px;
}
.bg-glow-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #7928ca, #ff0080);
  bottom: -150px;
  right: -150px;
  opacity: 0.18;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 20px;
  position: relative;
  z-index: 1;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  margin-bottom: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-icon {
  font-size: 32px;
  background: rgba(56, 189, 248, 0.12);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}
.brand-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.brand-title span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-sub {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #34d399;
  background: rgba(52, 211, 153, 0.1);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(52, 211, 153, 0.2);
}
.pulse-dot {
  width: 8px;
  height: 8px;
  background: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 10px #34d399;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Main Grid */
.main-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}
@media (max-width: 960px) {
  .main-grid { grid-template-columns: 1fr; }
}

/* Card General */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  padding: 28px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
  transition: border-color 0.2s ease;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
}
.card-header h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.section-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}
.badge-tag {
  font-size: 12px;
  font-weight: 600;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  padding: 4px 10px;
  border-radius: 8px;
}

/* Form Styles */
.input-tabs {
  display: flex;
  gap: 8px;
  background: var(--input-bg);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  border: 1px solid var(--card-border);
}
.tab-btn {
  flex: 1;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.tab-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.input-wrapper {
  display: flex;
  align-items: center;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  transition: all 0.2s ease;
}
.input-wrapper:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}
.input-icon {
  font-size: 16px;
  margin-right: 10px;
}
.input-wrapper input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  padding: 13px 0;
  outline: none;
}
.input-hint {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 6px;
}

/* File Drop Zone */
.file-drop-zone {
  border: 2px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--input-bg);
}
.file-drop-zone:hover {
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.04);
}
.file-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 8px;
}
.file-drop-zone p {
  font-size: 14px;
  color: var(--text-muted);
}
.browse-link {
  color: var(--accent-cyan);
  font-weight: 600;
  text-decoration: underline;
}
.selected-file-name {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #38bdf8;
  font-weight: 500;
}

/* Format Selector */
.format-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.format-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  padding: 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.format-card input[type="radio"] {
  display: none;
}
.format-card.active, .format-card:hover {
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.06);
}
.landscape-icon {
  width: 28px;
  height: 18px;
  border: 2px solid var(--accent-cyan);
  border-radius: 4px;
}
.portrait-icon {
  width: 18px;
  height: 28px;
  border: 2px solid var(--accent-cyan);
  border-radius: 4px;
}
.format-info strong {
  display: block;
  font-size: 13px;
  color: var(--text-main);
}
.format-info span {
  font-size: 11px;
  color: var(--text-dim);
}

/* Custom Select */
.custom-select {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.custom-select:focus {
  border-color: var(--accent-cyan);
}
.custom-select option {
  background: #0f172a;
  color: #fff;
}

/* Toggles */
.toggles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.toggle-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background: var(--input-bg);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
}
.toggle-item input {
  display: none;
}
.slider {
  width: 36px;
  height: 20px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
}
.toggle-item input:checked + .slider {
  background: var(--accent-cyan);
}
.toggle-item input:checked + .slider::before {
  transform: translateX(16px);
}
.toggle-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

/* Speaker Section */
.speaker-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}
.speaker-section:focus-within {
  border-color: rgba(56, 189, 248, 0.4);
}
.speaker-sub-box {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.section-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}
.speaker-upload-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.speaker-preview-wrap {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--accent-cyan);
  background: rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}
.speaker-preview-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.remove-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.speaker-pos-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.radio-inline {
  display: flex;
  align-items: center;
  gap: 14px;
}
.radio-inline label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
}
.radio-inline input[type="radio"] {
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

/* Button */
.primary-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  padding: 15px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 8px 24px -6px rgba(56, 189, 248, 0.4);
  transition: all 0.2s ease;
  font-family: inherit;
}
.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -6px rgba(56, 189, 248, 0.6);
}
.primary-btn:active {
  transform: translateY(0);
}
.primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}
.empty-icon {
  font-size: 48px;
  margin-bottom: 14px;
  opacity: 0.7;
}
.empty-state h3 {
  font-size: 18px;
  margin-bottom: 8px;
}
.empty-state p {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 320px;
  margin: 0 auto;
}

/* Progress Tracker & Live Countdown Center */
.progress-section {
  padding: 8px 0;
}

.progress-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.pct-box {
  display: flex;
  flex-direction: column;
}
.progress-pct-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.progress-big-pct {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(135deg, #38bdf8 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

.timers-cluster {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.timer-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 6px 12px;
}
.countdown-badge {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.25);
}
.countdown-badge .timer-value {
  color: #38bdf8;
}
.elapsed-badge {
  background: rgba(255, 255, 255, 0.03);
}
.elapsed-badge .timer-value {
  color: #cbd5e1;
}
.timer-icon {
  font-size: 16px;
}
.timer-texts {
  display: flex;
  flex-direction: column;
}
.timer-title {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.timer-value {
  font-size: 14px;
  font-weight: 700;
  font-family: monospace;
}

.progress-bar-container {
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0284c7, #38bdf8, #818cf8, #38bdf8);
  background-size: 200% 100%;
  border-radius: 10px;
  transition: width 0.35s ease;
  animation: progressShimmer 2.2s linear infinite;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
}
@keyframes progressShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.current-task-status {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: 16px;
  text-align: center;
  min-height: 20px;
}
.stepper {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 18px;
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
}
.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: all 0.2s;
}
.step-item.active .step-circle {
  background: var(--accent-cyan);
  color: #000;
  box-shadow: 0 0 12px var(--accent-cyan);
}
.step-item.completed .step-circle {
  background: #34d399;
  color: #000;
}
.step-item.active, .step-item.completed {
  color: var(--text-main);
}

.logs-console {
  background: #06090e;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 14px;
  height: 120px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 12px;
  color: #cbd5e1;
}
.log-line {
  margin-bottom: 4px;
  line-height: 1.4;
}

/* Video Preview Section */
.video-preview-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.video-wrapper {
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-wrapper video {
  width: 100%;
  max-height: 380px;
  object-fit: contain;
}
.video-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}
.video-meta h3 {
  font-size: 16px;
  font-weight: 700;
}
.video-meta p {
  font-size: 12px;
  color: var(--text-dim);
}
.preview-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #22c55e;
  color: #fff;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
}
.download-btn:hover {
  background: #16a34a;
  transform: translateY(-2px);
}
.action-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.action-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}
.action-btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.action-btn-danger:hover {
  background: rgba(239, 68, 68, 0.28);
  border-color: rgba(239, 68, 68, 0.5);
  transform: translateY(-1px);
}
.transcript-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.transcript-box h4 {
  font-size: 12px;
  color: var(--accent-cyan);
  margin-bottom: 6px;
}
.transcript-box p {
  color: var(--text-muted);
  line-height: 1.5;
  max-height: 90px;
  overflow-y: auto;
}

/* Gallery Section */
.gallery-card {
  margin-top: 8px;
}
.gallery-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.action-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.2s;
}
.action-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}
.action-btn-danger {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.2s;
}
.action-btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.gallery-item {
  background: rgba(12, 16, 28, 0.7);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all 0.25s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}
.gallery-item:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.6);
}
.gallery-thumb-container {
  position: relative;
  width: 100%;
  height: 155px;
  background: #000;
  cursor: pointer;
  overflow: hidden;
}
.gallery-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.9;
  transition: opacity 0.2s;
}
.gallery-thumb-container:hover .gallery-thumb {
  opacity: 1;
}
.thumb-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s;
  pointer-events: none;
}
.gallery-thumb-container:hover .thumb-play-overlay {
  background: var(--accent-cyan);
  color: #000;
  transform: translate(-50%, -50%) scale(1.1);
}
.thumb-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  font-size: 11px;
  font-weight: 600;
  color: #e2e8f0;
  padding: 3px 7px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.gallery-info {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.gallery-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}
.gallery-date {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.gallery-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.gallery-link-upload {
  background: linear-gradient(135deg, #e50914, #ff3344);
  border: 1px solid #ff4d55;
  color: #ffffff !important;
  padding: 5px 11px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(229, 9, 20, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.gallery-link-upload:hover {
  background: linear-gradient(135deg, #ff1a26, #ff4d55);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.6);
}
.gallery-link-download {
  font-size: 12px;
  color: #38bdf8;
  text-decoration: none;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 6px;
  transition: color 0.2s;
}
.gallery-link-download:hover {
  color: #7dd3fc;
}
.gallery-link-copy {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}
.gallery-link-copy:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}
.card-delete-btn {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}
.card-delete-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fff;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e293b;
  color: #f8fafc;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  font-size: 13px;
  font-weight: 600;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Video Preview Lightbox / Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 14, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.2s ease-out;
}
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85), 0 0 40px rgba(56, 189, 248, 0.15);
  width: 100%;
  max-width: 860px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalScaleUp 0.2s ease-out;
}
@keyframes modalScaleUp {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80%;
}
.modal-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
}
.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fff;
}

.modal-video-container {
  background: #000;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 520px;
  overflow: hidden;
}
.modal-video-container video {
  max-width: 100%;
  max-height: 500px;
  width: 100%;
  height: auto;
  outline: none;
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: rgba(9, 14, 26, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.modal-footer-actions {
  display: flex;
  gap: 12px;
}

/* Floating Ongoing Render Banner */
.render-sticky-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(16, 24, 40, 0.95);
  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.25);
  backdrop-filter: blur(16px);
  padding: 12px 24px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 100;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.render-sticky-banner:hover {
  transform: translateX(-50%) scale(1.02);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.7), 0 0 28px rgba(56, 189, 248, 0.4);
}
.render-sticky-icon {
  font-size: 20px;
  animation: spinSlow 3s linear infinite;
}
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.render-sticky-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.render-sticky-pct {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-cyan);
}

/* =========================================================
   INTERACTIVE SPEAKER FRAMING & COMPOSITION MODAL
========================================================= */
.speaker-ai-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-cyan);
  padding: 10px 14px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

.spinner-inline {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(56, 189, 248, 0.3);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spinSlow 0.8s linear infinite;
}

.speaker-framing-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.badge-framing {
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.adjust-frame-btn {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(129, 140, 248, 0.2));
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #fff;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.adjust-frame-btn:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.3), rgba(129, 140, 248, 0.35));
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.25);
}

/* Modal Backdrop & Card */
.frame-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(6, 10, 19, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.frame-modal-card {
  background: #0d1527;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  width: 100%;
  max-width: 960px;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.85), 0 0 35px rgba(56, 189, 248, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 94vh;
}

.frame-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.modal-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 6px;
}

.modal-title-text {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px 0;
}

.modal-desc-text {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

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

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

/* Modal Body: Viewport + Controls */
.frame-modal-body {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 20px;
  padding: 24px;
  overflow-y: auto;
}

@media (max-width: 820px) {
  .frame-modal-body {
    grid-template-columns: 1fr;
  }
}

/* Viewport Box */
.frame-viewport-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-viewport {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(56, 189, 248, 0.35);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8), 0 8px 24px rgba(0, 0, 0, 0.5);
  user-select: none;
}

.frame-16-9 {
  aspect-ratio: 16 / 9;
}

.frame-9-16 {
  aspect-ratio: 9 / 16;
  max-width: 320px;
  margin: 0 auto;
}

.viewport-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  filter: brightness(0.92);
}

/* Draggable Speaker Box inside Viewport */
.viewport-speaker-box {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 72%;
  cursor: grab;
  touch-action: none;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: bottom center;
}

.viewport-speaker-box:active {
  cursor: grabbing;
}

.viewport-speaker-box img {
  height: 100%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(4px 6px 12px rgba(0, 0, 0, 0.75));
  pointer-events: none;
}

.speaker-drag-tag {
  position: absolute;
  top: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--accent-cyan);
  color: #38bdf8;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  pointer-events: none;
  opacity: 0.85;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Live Subtitle Mock in Viewport */
.viewport-captions-mock {
  position: absolute;
  top: 50%;
  left: 42%;
  transform: translateY(-50%);
  font-family: 'Arial Black', Impact, sans-serif;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.5px;
  pointer-events: none;
  z-index: 12;
  text-align: center;
  text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 0 3px 6px rgba(0, 0, 0, 0.9);
  transition: left 0.2s ease;
}

.cap-white {
  color: #ffffff;
}

.cap-yellow {
  color: #ffff00;
}

/* Headroom Safe Line */
.headroom-guide-line {
  position: absolute;
  top: 8%;
  left: 0;
  right: 0;
  border-top: 1px dashed rgba(245, 158, 11, 0.6);
  pointer-events: none;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  padding-right: 12px;
}

.headroom-guide-line span {
  font-size: 9px;
  font-weight: 800;
  color: #f59e0b;
  letter-spacing: 1px;
  background: rgba(15, 23, 42, 0.8);
  padding: 1px 6px;
  border-radius: 4px;
}

.viewport-tip {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
}

/* Controls Column */
.frame-controls-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ctrl-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.ctrl-header label {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
}

.ctrl-val {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
}

.custom-range {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  outline: none;
  cursor: pointer;
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.custom-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.ctrl-subtext {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.3;
}

/* Presets & Actions */
.preset-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.preset-btn:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: var(--accent-cyan);
  color: #fff;
}

.preset-btn.active {
  background: rgba(56, 189, 248, 0.18);
  border-color: var(--accent-cyan);
  color: #38bdf8;
}

/* Modal Footer */
.frame-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.pulse-glow {
  animation: pulseGlow 2.5s infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(56, 189, 248, 0.4); }
  50% { box-shadow: 0 0 25px rgba(56, 189, 248, 0.75); }
}

/* ========================================================
   YOUTUBE PUBLISHING & CANVA THUMBNAIL SUITE
   ======================================================== */
.yt-publish-section {
  background: rgba(16, 21, 35, 0.9);
  border: 1px solid rgba(229, 9, 20, 0.3);
  border-radius: 18px;
  padding: 24px;
  margin-top: 24px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), 0 0 30px rgba(229, 9, 20, 0.08);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.yt-publish-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff0000, #ff5e62, #ff9900, #ff0000);
  background-size: 300% 100%;
  animation: ytBarShift 6s linear infinite;
}

@keyframes ytBarShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

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

.yt-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(229, 9, 20, 0.15);
  color: #ff4444;
  border: 1px solid rgba(229, 9, 20, 0.35);
  margin-bottom: 6px;
}

.yt-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff0000;
  box-shadow: 0 0 8px #ff0000;
  animation: pulseDot 1.6s infinite;
}

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

.yt-title {
  margin: 0 0 4px 0;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}

.yt-subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* Channel Status Pill */
.yt-channel-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 24px;
}

.yt-channel-info {
  display: flex;
  flex-direction: column;
}

.yt-status-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.yt-channel-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.yt-connect-btn {
  background: rgba(229, 9, 20, 0.18);
  border: 1px solid rgba(229, 9, 20, 0.4);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.yt-connect-btn:hover {
  background: #e50914;
  border-color: #ff3333;
}

/* 2-Column Suite Grid */
.yt-suite-grid {
  display: grid;
  grid-template-columns: 1fr 1.18fr;
  gap: 22px;
  margin-top: 20px;
}

@media (max-width: 980px) {
  .yt-suite-grid {
    grid-template-columns: 1fr;
  }
}

.yt-thumbnail-card,
.yt-seo-card {
  background: rgba(12, 16, 26, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.yt-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.yt-card-head h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #f1f5f9;
}

.yt-card-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Thumbnail Preview */
.yt-thumb-preview-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

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

.yt-thumb-overlay-action {
  position: absolute;
  bottom: 8px;
  right: 8px;
}

.yt-thumb-dl-btn {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.yt-thumb-dl-btn:hover {
  background: #38bdf8;
  color: #000;
  border-color: #38bdf8;
}

/* High-CTR Viral Hook Presets */
.thumb-presets-box {
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.08), rgba(255, 230, 0, 0.05));
  border: 1px solid rgba(255, 230, 0, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.thumb-presets-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.thumb-presets-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: #ffe600;
  letter-spacing: 0.5px;
}

.thumb-presets-hint {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 600;
}

.viral-hook-select {
  width: 100%;
  background: rgba(10, 14, 25, 0.9);
  border: 1px solid rgba(255, 230, 0, 0.4);
  color: #ffffff;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
}

.viral-hook-select:focus {
  border-color: #ffe600;
  box-shadow: 0 0 10px rgba(255, 230, 0, 0.3);
}

/* 4-Lines Editor */
.thumb-lines-editor {
  display: flex;
  flex-direction: column;
  gap: 9px;
  background: rgba(255, 255, 255, 0.02);
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.thumb-input-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.thumb-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.line-yellow { color: #ffe600; }
.line-white { color: #ffffff; }
.line-red { color: #ff4d55; }
.line-speaker { color: #38bdf8; }

.thumb-input {
  background: rgba(5, 8, 15, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 8px 10px;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.2s;
}

.thumb-input:focus {
  outline: none;
  border-color: #38bdf8;
  background: rgba(5, 8, 15, 0.95);
}

.yt-rerender-btn {
  margin-top: 4px;
  background: linear-gradient(135deg, #ff9900, #ff5e62);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(255, 94, 98, 0.3);
}

.yt-rerender-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 94, 98, 0.5);
}

/* SEO Card */
.yt-copy-all-btn {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #22c55e;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.yt-copy-all-btn:hover {
  background: #22c55e;
  color: #000;
}

.seo-field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

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

.seo-field-header label {
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
}

.copy-small-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.copy-small-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border-color: #38bdf8;
}

.seo-text-input,
.seo-textarea,
.seo-select {
  width: 100%;
  background: rgba(5, 8, 15, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 9px 12px;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.seo-text-input:focus,
.seo-textarea:focus,
.seo-select:focus {
  outline: none;
  border-color: #e50914;
  background: rgba(5, 8, 15, 0.95);
}

.seo-textarea {
  resize: vertical;
  line-height: 1.45;
  font-size: 12px;
}

.seo-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.seo-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.seo-meta-item label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

/* Upload Action Button */
.yt-upload-action-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.yt-upload-btn {
  background: #e50914;
  border: none;
  border-radius: 10px;
  padding: 13px 20px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  box-shadow: 0 6px 20px rgba(229, 9, 20, 0.4);
}

.yt-upload-btn:hover {
  background: #ff1f2d;
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(229, 9, 20, 0.6);
}

.yt-upload-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.yt-upload-feedback {
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 8px;
  line-height: 1.4;
}

.yt-upload-feedback.success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #22c55e;
}

.yt-upload-feedback.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

/* User Profile & Auth Modal Styling */
.user-profile-widget {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 4px 12px 4px 6px;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.user-pill:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(56, 189, 248, 0.4);
}

.user-avatar-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #6366f1);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.4);
}

.user-info-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.user-name-display {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
}

.user-role-badge {
  font-size: 9.5px;
  color: #38bdf8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.user-logout-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 13px;
  padding: 3px 6px;
  border-radius: 6px;
  color: #94a3b8;
  transition: all 0.2s ease;
  margin-left: 2px;
}

.user-logout-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  transform: scale(1.1);
}

.user-signin-btn {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
  transition: all 0.2s ease;
}

.user-signin-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.5);
}

.auth-modal-box {
  background: #0f172a;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(56, 189, 248, 0.15);
  overflow: hidden;
}

.auth-modal-body {
  padding: 22px 24px;
}

.auth-tabs {
  display: flex;
  gap: 6px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.auth-tab-btn {
  flex: 1;
  padding: 9px 12px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-weight: 600;
  font-size: 13px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab-btn.active {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}

.auth-form .form-group label {
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
  display: block;
}

.auth-form .input-wrapper input {
  width: 100%;
  background: #070b14;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #ffffff;
  padding: 10px 12px 10px 36px;
  font-size: 13px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.auth-form .input-wrapper input:focus {
  border-color: #38bdf8;
  outline: none;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.auth-error-msg {
  padding: 9px 12px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  border-radius: 8px;
  font-size: 12.5px;
  margin-bottom: 14px;
  line-height: 1.4;
}

.auth-note {
  margin-top: 18px;
  padding: 12px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px dashed rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
}

/* Thumbnail Source Toggle (2 Options) */
.thumb-source-section {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 12px;
  padding: 16px;
  margin-top: 18px;
  margin-bottom: 20px;
}

.thumb-source-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

@media (max-width: 680px) {
  .thumb-source-pills {
    grid-template-columns: 1fr;
  }
}

.thumb-pill-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(30, 41, 59, 0.5);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.thumb-pill-opt:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(56, 189, 248, 0.45);
}

.thumb-pill-opt.active {
  background: rgba(14, 165, 233, 0.12);
  border-color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
}

.thumb-pill-opt input[type="radio"] {
  margin-top: 3px;
  accent-color: #38bdf8;
  cursor: pointer;
}

.pill-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pill-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
}

.pill-desc {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.35;
}

.custom-template-box {
  animation: fadeInDown 0.25s ease-out;
}

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

.template-dropzone {
  padding: 16px;
  border: 2px dashed rgba(56, 189, 248, 0.35);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.7);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.template-dropzone:hover, .template-dropzone.dragover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}

.yt-thumb-overlay-action {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.progress-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  margin-bottom: 8px;
}

.cancel-render-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cancel-render-btn:hover {
  background: rgba(239, 68, 68, 0.28);
  border-color: #ef4444;
  color: #fff;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.35);
}

.cancel-render-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cancel-sticky-btn {
  background: rgba(239, 68, 68, 0.25);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: 10px;
}

.cancel-sticky-btn:hover {
  background: rgba(239, 68, 68, 0.45);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.hidden {
  display: none !important;
}
