/* ==========================================================================
   GLOBAL LAYOUT & STUDIO STYLES
   ========================================================================== */
:root {
  --bg-gradient: radial-gradient(circle at 50% -20%, #1e1b4b, #0f172a 60%, #020617);
  --card-bg: rgba(30, 41, 59, 0.7);
  --card-border: rgba(255, 255, 255, 0.12);
  --accent-purple: #818cf8;
  --accent-pink: #c084fc;
  --accent-glow: rgba(129, 140, 248, 0.25);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --radius-xl: 24px;
  --radius-md: 12px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html, body {
  height: 100%;
}

/* style.css */

html {
  /* Match this to your navbar background color (#0f172a or #151d30) */
  background-color: #0f172a;
  height: 100%;
}

body {
  background: var(--bg-gradient);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.main-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
}

.container {
  width: 100%;
  max-width: 680px;
  z-index: 1;
}

/* Background Ambient Orbs */
.ambient-glow {
  position: fixed;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  filter: blur(140px);
  z-index: 0;
  pointer-events: none;
}
.glow-1 { top: 5%; left: 10%; background: rgba(99, 102, 241, 0.15); }
.glow-2 { bottom: 10%; right: 10%; background: rgba(192, 132, 252, 0.12); }

/* Main Card */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
              0 0 40px var(--accent-glow);
  transition: var(--transition-smooth);
}

.card:hover {
  border-color: rgba(129, 140, 248, 0.35);
}

.card-title {
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.6;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1.8rem;
}

.card-title .highlight {
  font-size: 1.55rem;
  font-weight: 800;
  background: linear-gradient(135deg, #a5b4fc 0%, #c084fc 50%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  margin-bottom: 0.3rem;
}

/* Format Conversion Badges */
.format-badge-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 1.8rem;
}

.format-badge {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.highlight-badge {
  border-color: rgba(192, 132, 252, 0.4);
  background: rgba(192, 132, 252, 0.1);
}

.badge-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-select {
  background: transparent;
  border: none;
  color: #c084fc;
  font-size: 0.95rem;
  font-weight: 800;
  outline: none;
  cursor: pointer;
}

.badge-select option {
  background: #0f172a;
  color: var(--text-primary);
}

.badge-arrow {
  color: var(--accent-purple);
  font-size: 1.2rem;
  font-weight: 800;
}

/* Mode Toggle Bar */
.mode-toggle-bar {
  display: flex;
  background: rgba(15, 23, 42, 0.6);
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 1.5rem;
  gap: 6px;
}

.toggle-btnn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.toggle-btnn.active {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* Upload Zones */
.upload-zone {
  display: block;
  border: 2px dashed rgba(129, 140, 248, 0.3);
  border-radius: 18px;
  padding: 3rem 1.5rem;
  text-align: center;
  background: rgba(15, 23, 42, 0.3);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--accent-purple);
  background: rgba(99, 102, 241, 0.08);
}

.upload-icon {
  font-size: 2.8rem;
  margin-bottom: 0.8rem;
}

#upload-prompt-files, #upload-prompt-folder {
  font-size: 1rem;
  font-weight: 600;
}

.supportParag {
  font-size: 0.8rem;
  color: #34d399;
  margin-top: 0.4rem;
}

.upload-zone input[type="file"] {
  display: none;
}

/* Controls Grid */
.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  background: rgba(15, 23, 42, 0.5);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 1.5rem;
}

.control-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.select-input, .range-input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0f172a;
  color: var(--text-primary);
  outline: none;
}

/* Queue List */
.file-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.file-count {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.file-list {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  background: rgba(15, 23, 42, 0.4);
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.file-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}

.status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.status-badge.done {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

/* Progress Bar */
.progress-wrapper {
  margin-bottom: 1.5rem;
  background: rgba(15, 23, 42, 0.5);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #6366f1 0%, #c084fc 100%);
  transition: width 0.2s ease;
}

/* Actions Footer */
.action-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.btn-secondary, .btn-primary {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.spinner {
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 2px solid white;
  width: 16px;
  height: 16px;
  animation: spin 0.8s linear infinite;
  display: none;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 480px) {
  .controls-grid { grid-template-columns: 1fr; }
  .action-footer { flex-direction: column-reverse; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
}