/* Design Tokens & Theme Variables */
:root {
  --bg-primary: #0a0915;
  --bg-secondary: #121026;
  --glass-bg: rgba(18, 16, 38, 0.45);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-focus: rgba(168, 85, 247, 0.4);
  
  --accent-purple: #a855f7;
  --accent-cyan: #06b6d4;
  --accent-pink: #ec4899;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  
  --font-title: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --shadow-glow: 0 0 20px rgba(168, 85, 247, 0.35);
  --shadow-glow-cyan: 0 0 20px rgba(6, 118, 212, 0.35);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables */
body.theme-light {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(15, 23, 42, 0.08);
  --glass-border-focus: rgba(139, 92, 246, 0.5);
  
  --accent-purple: #8b5cf6;
  --accent-cyan: #0891b2;
  --accent-pink: #db2777;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.15);
  --shadow-glow-cyan: 0 0 20px rgba(8, 145, 178, 0.15);
}

/* Grey Theme Variables */
body.theme-grey {
  --bg-primary: #e4e4e7;
  --bg-secondary: #f4f4f5;
  --glass-bg: rgba(255, 255, 255, 0.5);
  --glass-border: rgba(24, 24, 27, 0.08);
  --glass-border-focus: rgba(39, 39, 42, 0.3);
  
  --accent-purple: #71717a;
  --accent-cyan: #52525b;
  --accent-pink: #a1a1aa;
  
  --text-primary: #18181b;
  --text-secondary: #3f3f46;
  --text-muted: #71717a;
  
  --shadow-glow: 0 0 20px rgba(113, 113, 122, 0.15);
  --shadow-glow-cyan: 0 0 20px rgba(82, 82, 91, 0.15);
}

/* Synthwave Pop Theme Variables */
body.theme-synthwave {
  --bg-primary: #120224;
  --bg-secondary: #230440;
  --glass-bg: rgba(35, 4, 64, 0.5);
  --glass-border: rgba(255, 0, 127, 0.15);
  --glass-border-focus: rgba(0, 242, 254, 0.5);
  
  --accent-purple: #bd00ff;
  --accent-cyan: #00f2fe;
  --accent-pink: #ff007f;
  
  --text-primary: #ffffff;
  --text-secondary: #e2c6ff;
  --text-muted: #8d6cb8;
  
  --shadow-glow: 0 0 20px rgba(189, 0, 255, 0.45);
  --shadow-glow-cyan: 0 0 20px rgba(0, 242, 254, 0.45);
}

/* Base resets & Layout */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Drifting Ambient Background Glows */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  opacity: 0.45;
  pointer-events: none;
  animation: drift 25s infinite alternate ease-in-out;
}

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

.glow-2 {
  background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
  width: 600px;
  height: 600px;
  bottom: -15%;
  right: -5%;
  animation-duration: 30s;
  animation-delay: -5s;
}

.glow-3 {
  background: radial-gradient(circle, var(--accent-pink) 0%, transparent 70%);
  width: 400px;
  height: 400px;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 35s;
  animation-delay: -10s;
}

@keyframes drift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(80px, -50px) scale(1.15);
  }
  100% {
    transform: translate(-50px, 80px) scale(0.9);
  }
}

/* App Main Container */
.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header styling */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 28px;
}

.logo {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.5px;
}

.logo-icon {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(236, 72, 153, 0.4));
}

.accent-text {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Premium Glassmorphic Panels */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

/* Layout Grid */
.app-content {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 28px;
  align-items: start;
  flex-grow: 1;
}

/* Panel Title styling */
.panel-title {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 14px;
}

.panel-title i {
  color: var(--accent-purple);
}

/* Control Group Fields */
.control-group {
  margin-bottom: 24px;
}

.group-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* File Drop Zone styling */
.upload-dropzone {
  border: 2px dashed var(--glass-border);
  border-radius: var(--radius-md);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  transition: var(--transition-smooth);
}

.upload-dropzone * {
  pointer-events: none;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--accent-purple);
  background: rgba(168, 85, 247, 0.05);
  box-shadow: inset 0 0 12px rgba(168, 85, 247, 0.1);
}

.upload-icon {
  font-size: 2.2rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  transition: var(--transition-smooth);
}

.upload-dropzone:hover .upload-icon {
  color: var(--accent-purple);
  transform: translateY(-4px);
}

.upload-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.upload-text .highlight {
  color: var(--accent-purple);
  text-decoration: underline;
}

.upload-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Upload Preview Bar */
.preview-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-top: 10px;
}

.file-info {
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-cyan);
}

/* Aspect Ratio Selectors */
.ratio-selectors {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.ratio-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  padding: 14px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition-smooth);
}

.ratio-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.ratio-btn.active {
  border-color: var(--accent-purple);
  background: rgba(168, 85, 247, 0.1);
  color: var(--text-primary);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
}

.ratio-box {
  border: 2px solid currentColor;
  border-radius: 3px;
  display: block;
}

.r-16-9 { width: 32px; height: 18px; }
.r-4-3  { width: 28px; height: 21px; }
.r-1-1  { width: 22px; height: 22px; }
.r-9-16 { width: 15px; height: 26px; }

/* Textarea styling */
.form-textarea {
  width: 100%;
  min-height: 100px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 14px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  resize: vertical;
  outline: none;
  transition: var(--transition-smooth);
}

.form-textarea:focus, .form-input:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
  background: rgba(0, 0, 0, 0.35);
}

/* Text Overlay Custom Styles */
#text-overlay-input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  width: 100%;
  outline: none;
  font-family: var(--font-body);
  transition: var(--transition-smooth);
}

#text-overlay-input:focus {
  border-color: var(--accent-purple);
  background: rgba(0, 0, 0, 0.45);
}

#text-coords-container input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  margin: 6px 0;
}

#text-coords-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  cursor: pointer;
  box-shadow: 0 0 6px rgba(6, 182, 212, 0.6);
  transition: transform 0.1s ease;
}

#text-coords-container input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}

/* Select Form Controls */
.form-select {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 12px 14px;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

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

select option {
  background-color: #12111a;
  color: #ffffff;
}

body.theme-light select option {
  background-color: #ffffff;
  color: #0f172a;
}

.custom-audio-uploader {
  margin-top: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}

/* Buttons styling */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple) 0%, #7e22ce 100%);
  color: var(--text-primary);
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-large {
  width: 100%;
  padding: 16px 24px;
  font-size: 1.05rem;
}

.btn-glowing {
  position: relative;
  overflow: hidden;
}

.btn-glowing::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(45deg);
  transition: all 0.6s ease;
  pointer-events: none;
  left: -150%;
}

.btn-glowing:hover::after {
  left: 150%;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-icon:hover {
  color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}

/* Viewport Layout */
.viewport-outer {
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  min-height: 480px;
  overflow: hidden;
  position: relative;
}

.viewport-frame {
  position: relative;
  background: #020205;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0,0,0,0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: aspect-ratio 0.4s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.4s ease, max-height 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Aspect Ratio Configurations */
.ratio-16-9 {
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: 760px;
}
.ratio-4-3 {
  aspect-ratio: 4 / 3;
  width: 100%;
  max-width: 600px;
}
.ratio-1-1 {
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 480px;
}
.ratio-9-16 {
  aspect-ratio: 9 / 16;
  width: 100%;
  max-width: 270px;
}

.viewport-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-muted);
  z-index: 5;
  background: #040409;
}

.placeholder-icon {
  font-size: 3rem;
  color: var(--text-muted);
}

.render-viewport {
  width: 100%;
  height: 100%;
  position: relative;
  display: none;
}

.render-viewport img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

#visualizer-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

/* Lyrics overlay text */
.lyrics-overlay {
  position: absolute;
  bottom: 30px;
  left: 0;
  width: 100%;
  text-align: center;
  z-index: 3;
  padding: 0 40px;
}

#lyrics-text {
  display: inline-block;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.3rem;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8), 0 0 15px rgba(168,85,247,0.6);
  background: rgba(0,0,0,0.4);
  padding: 8px 18px;
  border-radius: 20px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.06);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#lyrics-text.active {
  opacity: 1;
  transform: translateY(0);
}

/* Player Audio-Visual Controls */
.player-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-bottom: 24px;
}

.btn-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--accent-purple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(168,85,247,0.3);
  transition: var(--transition-smooth);
}

.btn-circle:hover:not(:disabled) {
  transform: scale(1.08);
  box-shadow: 0 4px 15px rgba(168,85,247,0.5);
}

.btn-circle:disabled {
  background: var(--text-muted);
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.timeline-container {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-grow: 1;
}

.time-lbl {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: monospace;
}

.progress-bar-outer {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  flex-grow: 1;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.progress-bar-inner {
  height: 100%;
  background: linear-gradient(to right, var(--accent-purple), var(--accent-cyan));
  border-radius: 3px;
  width: 0%;
}

/* Console & Rendering Logs */
.status-console {
  background: #020206;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
  font-family: monospace;
  font-size: 0.85rem;
}

.console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.spinner {
  color: var(--accent-purple);
}

.console-body {
  max-height: 130px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-line {
  color: var(--text-secondary);
}

.log-line.success {
  color: var(--success);
}

.log-line.info {
  color: var(--accent-cyan);
}

.log-line.error {
  color: var(--error);
}

/* Export Result panel */
.export-result {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: slideUp 0.4s ease-out;
}

.success-message {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.success-icon {
  font-size: 1.8rem;
  color: var(--success);
}

.success-message h3 {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.success-message p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.result-actions {
  display: flex;
  gap: 12px;
}

.result-actions .btn {
  flex: 1;
}

/* Modals overlays */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  width: 100%;
  max-width: 580px;
  animation: zoomIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.modal-header h3 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-description {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 12px 14px;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-smooth);
}

.field-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

.code-font {
  font-family: monospace;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

/* Video Player Modal spec */
.video-modal-content {
  max-width: 800px;
  padding: 16px;
}

.video-modal-body video {
  width: 100%;
  max-height: 500px;
  border-radius: var(--radius-sm);
  background: #000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Checkbox Options Styling */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 14px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--text-muted);
  border-radius: 4px;
  outline: none;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.checkbox-label input[type="checkbox"]:checked {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
}

.checkbox-label input[type="checkbox"]:checked::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.7rem;
  color: #fff;
}

.checkbox-text {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.checkbox-label:hover .checkbox-text {
  color: var(--text-primary);
}

/* Responsive Rules */
@media(max-width: 1100px) {
  .app-content {
    grid-template-columns: 1fr;
  }
  
  .viewport-outer {
    min-height: auto;
  }
}

/* Custom range slider styling */
.form-range {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  margin: 10px 0;
}

.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  cursor: pointer;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
  transition: transform 0.1s ease;
}

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

.btn-secondary.active {
  background: rgba(168, 85, 247, 0.2) !important;
  border-color: var(--accent-purple) !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

/* Lyrics overlay text overrides for dynamic formatting placement */
.lyrics-overlay.position-top {
  top: 30px;
  bottom: auto;
}

.lyrics-overlay.position-center {
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}

.lyrics-overlay.position-bottom {
  bottom: 30px;
  top: auto;
}

/* Interactive Subtitles Timeline Styles */
.subtitles-timeline-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.subtitles-timeline-list::-webkit-scrollbar {
  width: 4px;
}
.subtitles-timeline-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}

.subtitle-editor-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 8px;
  transition: var(--transition-smooth);
}

.subtitle-editor-item:hover, .subtitle-editor-item.active {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--glass-border-focus);
}

.subtitle-editor-row-top {
  display: flex;
  gap: 6px;
  align-items: center;
}

.subtitle-editor-row-bottom {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.subtitle-text-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  color: var(--text-primary);
  padding: 4px 8px;
  font-size: 0.78rem;
  outline: none;
  transition: var(--transition-smooth);
}
.subtitle-text-input:focus {
  border-color: var(--accent-purple);
  background: rgba(0, 0, 0, 0.4);
}

.subtitle-time-inputs {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.subtitle-time-input {
  width: 52px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  color: var(--accent-cyan);
  padding: 2px 4px;
  font-size: 0.72rem;
  font-family: monospace;
  text-align: center;
  outline: none;
}
.subtitle-time-input:focus {
  border-color: var(--accent-purple);
}

.btn-subtitle-action {
  padding: 4px;
  width: 24px;
  height: 24px;
  font-size: 0.75rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}
.btn-subtitle-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}
.btn-subtitle-action.delete:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
  border-color: rgba(239, 68, 68, 0.25);
}
.btn-subtitle-action.jump:hover {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border-color: rgba(6, 182, 212, 0.25);
}

/* Clear Uploads Button Hover & Action Styles */
#btn-clear-uploads:hover {
  background: rgba(255, 59, 48, 0.25) !important;
  border-color: rgba(255, 59, 48, 0.5) !important;
}
#btn-clear-uploads:active {
  transform: scale(0.98);
}

/* Volume Slider Input Range Thumb Styling */
#volume-slider::-webkit-slider-runnable-track {
  background: rgba(255, 255, 255, 0.2);
}
#volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-purple);
  cursor: pointer;
  margin-top: -3px;
}
#volume-slider::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-purple);
  cursor: pointer;
}

/* Watermark Blur Brush Cursors */
.brush-active {
  cursor: crosshair !important;
}

/* Collapsible Control Groups */
.control-group.collapsible .group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}
.control-group.collapsible .group-header:hover .group-label {
  color: var(--accent-purple);
}
.control-group.collapsible .toggle-icon {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s;
}
.control-group.collapsible .group-header:hover .toggle-icon {
  color: var(--text-secondary);
}
.control-group.collapsible.collapsed .group-content {
  display: none !important;
}

/* Viewport Panning Cursors */
.pan-grab {
  cursor: grab !important;
}
.pan-grabbing {
  cursor: grabbing !important;
}

