/* ==========================================================================
   VibeAI Studio - Modern Minimalist Design System
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-primary: #07090e;
  --bg-secondary: #0f141f;
  --bg-card: rgba(18, 24, 38, 0.65);
  --bg-card-hover: rgba(26, 34, 52, 0.85);
  --bg-input: rgba(12, 17, 29, 0.7);
  
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-focus: rgba(99, 102, 241, 0.5);
  --border-active: rgba(139, 92, 246, 0.6);

  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Gradients */
  --gradient-brand: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  --gradient-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
  --gradient-cyan: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);

  /* Radius & Shadows */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.25);

  --transition-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand-logo, .model-name {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
}

/* Ambient Background Lights */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

.glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #6366f1 0%, rgba(99, 102, 241, 0) 70%);
  top: -150px;
  left: -100px;
}

.glow-2 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #8b5cf6 0%, rgba(217, 70, 239, 0) 70%);
  bottom: 50px;
  right: -100px;
}

/* App Container */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px 130px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Glassmorphism Card Utility */
.card-glass {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  margin-bottom: 28px;
  background: rgba(15, 20, 31, 0.7);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
}

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

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.brand-info h1 {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-studio {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  background: rgba(8, 12, 20, 0.6);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.nav-tab i {
  font-size: 1.1rem;
}

.nav-tab:hover {
  color: var(--text-primary);
}

.nav-tab.active {
  background: var(--gradient-brand);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.count-badge {
  font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
}

/* Colab Status Button */
.colab-status-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: rgba(18, 24, 38, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.825rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.colab-status-btn:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: var(--border-focus);
}

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

.status-dot.online {
  background-color: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
}

.status-dot.online::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--accent-emerald);
  animation: pulseDot 2s infinite;
}

.status-dot.offline {
  background-color: var(--accent-amber);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(0.9); opacity: 0; }
}

/* ==========================================================================
   LAYOUT GRID & TAB PANES
   ========================================================================== */
.tab-pane {
  display: none;
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-pane.active {
  display: block;
}

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

.pane-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
}

.creation-panel {
  padding: 28px;
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel-status {
  padding: 24px;
}

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

.panel-header h3 {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.status-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.status-pill.ready {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   FORM CONTROLS & MODEL SELECTORS
   ========================================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }
.mt-4 { margin-top: 16px; }
.ml-auto { margin-left: auto; }

.section-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.label-with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-text {
  background: transparent;
  border: none;
  color: #a5b4fc;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-smooth);
}

.btn-text:hover {
  color: #c7d2fe;
  text-decoration: underline;
}

/* Model Selector Cards */
.model-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.model-card {
  position: relative;
  background: rgba(12, 17, 29, 0.6);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.model-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.model-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(99, 102, 241, 0.3);
}

.model-card.active {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.18);
}

.model-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.model-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.model-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.tag-primary {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}

.tag-secondary {
  background: rgba(6, 182, 212, 0.2);
  color: #67e8f9;
}

.model-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Textarea & Inputs */
.textarea-wrapper textarea,
textarea,
input[type="text"],
input[type="url"] {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  resize: vertical;
  transition: var(--transition-smooth);
}

textarea:focus,
input[type="text"]:focus,
input[type="url"]:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  background: rgba(14, 20, 35, 0.9);
}

/* Quick Genre Tags */
.genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tag-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.78rem;
  padding: 5px 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tag-chip:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

.tag-chip.active {
  background: rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
  border-color: rgba(99, 102, 241, 0.5);
}

/* Collapsible Lyrics Section */
#lyricsSection {
  background: rgba(12, 17, 29, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.lyrics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  transition: var(--transition-smooth);
}

.lyrics-header:hover {
  background: rgba(255, 255, 255, 0.03);
}

.lyrics-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.lyrics-title small {
  color: var(--text-muted);
  font-weight: 400;
}

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

.toggle-badge {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.caret-icon {
  transition: transform 0.25s ease;
}

#lyricsSection.open .caret-icon {
  transform: rotate(180deg);
}

.lyrics-body {
  display: none;
  padding: 0 16px 16px;
}

#lyricsSection.open .lyrics-body {
  display: block;
}

.lyrics-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.lyric-tag-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #cbd5e1;
  font-size: 0.75rem;
  padding: 2px 8px;
  cursor: pointer;
  font-family: monospace;
}

.lyric-tag-btn:hover {
  background: rgba(99, 102, 241, 0.25);
  color: #fff;
}

/* Controls Row */
.controls-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.control-item label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.custom-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

.custom-select:focus {
  border-color: var(--border-focus);
}

/* Buttons */
.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 24px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

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

.btn-large {
  width: 100%;
  padding: 16px 24px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn-glow {
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   TAB 2: AI COVER UI
   ========================================================================== */
.upload-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  background: rgba(12, 17, 29, 0.4);
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.06);
}

.file-input-hidden {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.dropzone-content h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.highlight {
  color: #818cf8;
  text-decoration: underline;
}

.dropzone-content p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.loaded-file-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.9);
  border-radius: var(--radius-md);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.file-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.file-badge i {
  font-size: 28px;
  color: #818cf8;
}

.file-details strong {
  display: block;
  font-size: 0.88rem;
}

.file-details span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-icon-danger {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fb7185;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-icon-danger:hover {
  background: rgba(244, 63, 94, 0.3);
}

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

.voice-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(12, 17, 29, 0.6);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
}

.voice-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(99, 102, 241, 0.3);
}

.voice-card.active {
  background: rgba(99, 102, 241, 0.12);
  border-color: var(--accent-primary);
}

.voice-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
}

.custom-avatar {
  background: rgba(255, 255, 255, 0.08);
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

.voice-meta h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.voice-meta span {
  font-size: 0.72rem;
  color: var(--text-secondary);
  display: block;
}

.check-mark {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 14px;
  color: var(--accent-emerald);
  opacity: 0;
  transform: scale(0.6);
  transition: var(--transition-smooth);
}

.voice-card.active .check-mark {
  opacity: 1;
  transform: scale(1);
}

/* Slider Boxes */
.slider-box {
  background: rgba(12, 17, 29, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.825rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.slider-val {
  font-size: 0.78rem;
  color: #a5b4fc;
  font-weight: 600;
}

.custom-range {
  width: 100%;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.range-presets {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.preset-pill {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  color: var(--text-secondary);
  font-size: 0.72rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.preset-pill:hover,
.preset-pill.active {
  background: rgba(99, 102, 241, 0.2);
  color: #fff;
  border-color: rgba(99, 102, 241, 0.4);
}

/* Pipeline Flow Steps (AI Cover) */
.pipeline-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: rgba(12, 17, 29, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.step-content p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Progress States */
.progress-state {
  text-align: center;
  padding: 24px 16px;
}

.progress-ring-container {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #818cf8;
}

.pulse-wave {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(99, 102, 241, 0.4);
  animation: pulseLoop 1.8s infinite;
}

@keyframes pulseLoop {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.progress-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.progress-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--gradient-brand);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.progress-percent {
  font-size: 0.75rem;
  color: #a5b4fc;
  font-weight: 600;
}

/* Tips Box */
.tips-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tip-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.78rem;
}

.tip-item i {
  font-size: 16px;
  color: var(--accent-emerald);
  margin-top: 2px;
  flex-shrink: 0;
}

.tip-item strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.tip-item p {
  color: var(--text-secondary);
}

.tip-item code {
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 0.72rem;
}

/* ==========================================================================
   TAB 3: LIBRARY & HISTORY
   ========================================================================== */
.library-container {
  padding: 28px;
}

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

.library-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
}

.library-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.song-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.song-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(12, 17, 29, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

.song-item-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(99, 102, 241, 0.3);
}

.song-item-card.now-playing {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.12);
}

.song-item-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.song-item-play-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.2);
  color: #fff;
  border: 1px solid rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.song-item-play-btn:hover {
  background: var(--gradient-brand);
  transform: scale(1.05);
}

.song-item-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.song-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.song-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  font-size: 30px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.empty-state h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   BOTTOM FLOATING PLAYER
   ========================================================================== */
.bottom-player {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 1232px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  z-index: 100;
  border-radius: var(--radius-xl);
  background: rgba(13, 18, 30, 0.88);
  backdrop-filter: blur(24px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(99, 102, 241, 0.15);
}

.player-left {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 250px;
}

.now-playing-cover {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  flex-shrink: 0;
}

.now-playing-info {
  overflow: hidden;
}

.now-playing-info h4 {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-playing-info span {
  font-size: 0.72rem;
  color: var(--text-secondary);
  display: block;
}

.player-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 600px;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ctrl-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.ctrl-btn:hover {
  color: var(--text-primary);
  transform: scale(1.1);
}

.ctrl-btn.active {
  color: var(--accent-primary);
}

.ctrl-btn-play {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
  transition: var(--transition-smooth);
}

.ctrl-btn-play:hover {
  transform: scale(1.08);
}

.player-timeline {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.time-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  width: 32px;
}

.waveform-container {
  flex: 1;
  height: 24px;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
}

#waveformCanvas {
  width: 100%;
  height: 100%;
}

.seek-bar-track {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 4px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  pointer-events: none;
}

.seek-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient-brand);
  border-radius: var(--radius-full);
}

.player-right {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 250px;
  justify-content: flex-end;
}

.volume-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-range {
  width: 75px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

/* ==========================================================================
   MODAL DIALOG (COLAB CONFIG)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 7, 18, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  width: 100%;
  max-width: 580px;
  padding: 28px;
  border-radius: var(--radius-xl);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title-box {
  display: flex;
  gap: 14px;
}

.colab-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-title-box h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-title-box p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}

.btn-close:hover {
  color: #fff;
}

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.guide-step {
  display: flex;
  gap: 12px;
  font-size: 0.825rem;
}

.badge-number {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.guide-step p {
  color: var(--text-secondary);
  margin-top: 2px;
}

.guide-step code {
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  color: #e2e8f0;
}

.link-highlight {
  color: #818cf8;
  text-decoration: underline;
}

.input-with-button {
  display: flex;
  gap: 8px;
}

.connection-status-box {
  background: rgba(12, 17, 29, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 14px;
}

.status-indicator-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.status-detail-text {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.25s ease;
}

.toast.success {
  border-left: 3px solid var(--accent-emerald);
}

.toast.error {
  border-left: 3px solid var(--accent-rose);
}

.toast.info {
  border-left: 3px solid var(--accent-primary);
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 960px) {
  .pane-grid {
    grid-template-columns: 1fr;
  }
  
  .controls-row {
    grid-template-columns: 1fr;
  }
  
  .voice-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bottom-player {
    flex-direction: column;
    width: calc(100% - 24px);
    bottom: 8px;
    padding: 12px 16px;
    gap: 10px;
  }

  .player-left, .player-right {
    width: 100%;
    justify-content: space-between;
  }

  .player-center {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .app-header {
    flex-direction: column;
    gap: 12px;
    padding: 14px;
  }

  .nav-tabs {
    width: 100%;
    justify-content: space-between;
  }

  .nav-tab span {
    display: none;
  }

  .model-selector {
    grid-template-columns: 1fr;
  }

  .voice-grid {
    grid-template-columns: 1fr;
  }
}

.hidden {
  display: none !important;
}
