/* ==========================================================================
   AI MUSIC STUDIO PRO - LUXURY DARK DESIGN SYSTEM
   ========================================================================== */

:root {
  --bg-main: #0b0d14;
  --bg-card: rgba(18, 21, 34, 0.75);
  --bg-card-hover: rgba(28, 33, 52, 0.85);
  --bg-input: #121524;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #00f0ff;

  --primary: #00f0ff;
  --primary-glow: rgba(0, 240, 255, 0.45);
  --accent-cyan: #00f0ff;
  --accent-cyan-glow: rgba(0, 240, 255, 0.4);
  --accent-emerald: #00f5a0;
  --accent-pink: #ec4899;
  --accent-gold: #f59e0b;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', sans-serif;
  user-select: none;
}

body {
  background-color: #080b13;
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  background-image:
    radial-gradient(at 0% 0%, rgba(0, 240, 255, 0.16) 0px, transparent 55%),
    radial-gradient(at 100% 100%, rgba(0, 245, 160, 0.14) 0px, transparent 50%),
    radial-gradient(at 50% 30%, rgba(56, 189, 248, 0.08) 0px, transparent 60%);
}

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ==========================================================================
   TOP NAVIGATION
   ========================================================================== */
.top-nav {
  height: 64px;
  background: rgba(11, 13, 20, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-badge {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px var(--primary-glow);
}

.logo-icon {
  width: 22px;
  height: 22px;
  color: #fff;
}

.brand-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(to right, #fff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(0, 240, 255, 0.2);
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: #7dd3fc;
}

/* Quota & VIP in Header */
.nav-center {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Compact Model Selector in Header */
.header-model-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(0, 240, 255, 0.35);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.1);
  transition: var(--transition-normal);
}

.header-model-box:hover {
  border-color: rgba(0, 240, 255, 0.65);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.2);
}

.header-model-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.header-model-select {
  background: transparent;
  border: none;
  color: #f8fafc;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  padding-right: 4px;
}

.header-model-select option {
  background: #0f172a;
  color: #f8fafc;
  font-weight: 600;
  padding: 8px;
}

.quota-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.quota-icon {
  font-size: 1rem;
}

.quota-text {
  font-size: 0.82rem;
  color: #e2e8f0;
  font-weight: 600;
}

.btn-vip-upgrade {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(236, 72, 153, 0.2));
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde68a;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition-normal);
}

.btn-vip-upgrade:hover {
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  color: #fff;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
  transform: translateY(-1px);
}

.btn-vip-upgrade svg {
  width: 14px;
  height: 14px;
}

.server-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.85);
  }
}

.status-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   MAIN WORKSPACE
   ========================================================================== */
.workspace {
  flex: 1;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  height: calc(100vh - 64px - 84px);
  width: 100%;
}

/* Left Panel: Studio Workshop (Spacious DAW layout matching generated mockup ~68%) */
.studio-panel {
  flex: 1.7;
  min-width: 0;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: rgba(14, 16, 26, 0.4);
}

.tabs-header {
  display: flex;
  gap: 8px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition-normal);
}

.tab-btn svg {
  width: 16px;
  height: 16px;
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.25), rgba(6, 182, 212, 0.15));
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.2);
}

.studio-content {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.input-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition-normal);
}

.input-card:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 16px var(--primary-glow);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.label-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
}

.label-hint {
  display: block;
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.card-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-magic-wand {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.25) 0%, rgba(6, 182, 212, 0.25) 100%);
  border: 1px solid rgba(0, 240, 255, 0.5);
  color: #e0e7ff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.btn-magic-wand .wand-icon {
  width: 13px;
  height: 13px;
  stroke: #38bdf8;
  flex-shrink: 0;
}

.btn-magic-wand:hover {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.45) 0%, rgba(6, 182, 212, 0.45) 100%);
  border-color: #06b6d4;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

.btn-magic-wand:active {
  transform: scale(0.96);
}

.btn-magic-wand.loading {
  opacity: 0.7;
  pointer-events: none;
  animation: pulse-glow 1.5s infinite;
}

.btn-dice {
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: #7dd3fc;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-dice:hover {
  background: rgba(0, 240, 255, 0.3);
  color: #fff;
  border-color: var(--primary);
}

textarea,
input[type="text"] {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  color: var(--text-main);
  font-size: 0.9rem;
  line-height: 1.5;
  outline: none;
  transition: var(--transition-fast);
  user-select: text;
}

input[type="text"] {
  padding: 10px 14px;
}

textarea:focus,
input[type="text"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

.input-card-compact {
  padding: 12px 16px;
  gap: 8px;
}

.param-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cfg-slider {
  width: 100%;
  accent-color: var(--primary);
  margin-top: 6px;
  cursor: pointer;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.tag-chip:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--accent-cyan);
  color: #fff;
  transform: translateY(-1px);
}

/* Lyrics Toolbar */
.lyrics-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-insert-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.tag-insert-btn:hover {
  background: var(--primary);
  color: #fff;
}

.instrumental-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition-normal);
}

.instrumental-bar:hover {
  border-color: rgba(0, 240, 255, 0.4);
}

.toggle-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  width: 100%;
}

.toggle-switch input {
  display: none;
}

.slider {
  width: 36px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  position: relative;
  transition: var(--transition-fast);
}

.slider::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: var(--transition-fast);
}

.toggle-switch input:checked+.slider {
  background: var(--primary);
}

.toggle-switch input:checked+.slider::before {
  transform: translateX(16px);
}

.toggle-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Parameters Grid */
.params-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.param-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 78px;
  transition: border-color var(--transition-fast);
}

.param-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  height: 20px;
  white-space: nowrap;
}

.param-label-row label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.4px;
}

.param-box select,
.param-box input {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  height: 38px;
  min-height: 38px;
  line-height: 36px;
  padding: 0 10px;
  font-size: 0.85rem;
  width: 100%;
  box-sizing: border-box;
  display: block;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.param-box input[type="number"]::-webkit-inner-spin-button,
.param-box input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.param-box input[type="number"] {
  -moz-appearance: textfield;
}

.param-box select:focus,
.param-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}

/* Generate Button */
.action-footer {
  margin-top: 4px;
}

.action-footer-flex {
  display: flex;
  gap: 12px;
  align-items: center;
}

.action-footer-flex .btn-generate {
  color: #06111e;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
  font-weight: 800;
  flex: 1;
}

.btn-dice-large {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: var(--radius-lg);
  background: rgba(0, 240, 255, 0.2);
  border: 1px solid rgba(0, 240, 255, 0.4);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  color: #fff;
}

.btn-dice-large:hover {
  background: rgba(0, 240, 255, 0.4);
  border-color: #06b6d4;
  transform: translateY(-2px) rotate(15deg);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.btn-dice-large:active {
  transform: scale(0.95);
}

.btn-dice-large.loading {
  opacity: 0.6;
  pointer-events: none;
  animation: pulse-glow 1.2s infinite;
}

.btn-generate {
  color: #06111e;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
  font-weight: 800;
  width: 100%;
  height: 52px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #00f0ff 0%, #06b6d4 100%);
  border: none;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 24px var(--primary-glow);
  transition: var(--transition-normal);
}

.btn-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--primary-glow), 0 0 20px var(--accent-cyan-glow);
}

.btn-generate:active {
  transform: scale(0.98);
}

.btn-generate:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  background: linear-gradient(135deg, #0ea5e9 0%, #0891b2 100%);
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {

  0%,
  100% {
    opacity: 0.7;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
  }

  50% {
    opacity: 0.9;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.6);
  }
}

.btn-icon {
  width: 20px;
  height: 20px;
}

/* Progress Box */
.progress-box {
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #7dd3fc;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(196, 181, 253, 0.3);
  border-top-color: #7dd3fc;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.progress-time {
  font-family: 'Space Grotesk', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent-cyan));
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* Right Panel: Library (Balanced sleek sidebar ~32%) */
.library-panel {
  flex: 1;
  max-width: 440px;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  background: rgba(11, 13, 20, 0.6);
  overflow-y: auto;
}

.library-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.library-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.library-title svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.btn-clear-lib {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-clear-lib:hover {
  color: var(--accent-pink);
}

.track-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.empty-state {
  margin: auto;
  text-align: center;
  padding: 40px 20px;
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.6;
}

.empty-state h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.empty-state p {
  font-size: 0.82rem;
  color: var(--text-dim);
  max-width: 240px;
  line-height: 1.5;
}

/* Track Card Item */
.track-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition-normal);
}

.track-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 240, 255, 0.4);
  transform: translateX(2px);
}

.track-card.active {
  border-color: var(--primary);
  background: rgba(0, 240, 255, 0.15);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
}

.track-card-play {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  transition: var(--transition-fast);
}

.track-card:hover .track-card-play {
  background: var(--primary);
}

.track-card-play svg {
  width: 16px;
  height: 16px;
}

.track-card-info {
  flex: 1;
  min-width: 0;
}

.track-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-card-tags {
  font-size: 0.74rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.track-card-actions {
  display: flex;
  gap: 6px;
}

.btn-card-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-card-action:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-card-action svg {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   BOTTOM MASTER PLAYER
   ========================================================================== */
.master-player {
  height: 84px;
  background: rgba(11, 13, 20, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
}

.player-left {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 260px;
}

.track-cover {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.3), rgba(6, 182, 212, 0.3));
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.track-cover svg {
  width: 24px;
  height: 24px;
}

.track-meta {
  min-width: 0;
}

.track-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-subtitle {
  font-size: 0.76rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.player-center {
  flex: 1;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.waveform-canvas {
  width: 100%;
  height: 24px;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 0 14px var(--primary-glow);
  transition: var(--transition-fast);
}

.play-btn:hover:not(:disabled) {
  transform: scale(1.05);
}

.play-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.play-btn svg {
  width: 18px;
  height: 18px;
}

.seek-slider-wrap {
  flex: 1;
  display: flex;
  align-items: center;
}

.seek-slider-wrap input[type="range"] {
  width: 100%;
  height: 5px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.seek-slider-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.time-label {
  font-family: 'Space Grotesk', monospace;
  font-size: 0.74rem;
  color: var(--text-dim);
  width: 36px;
}

.player-right {
  width: 260px;
  display: flex;
  justify-content: flex-end;
}

.player-action-btn {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: #67e8f9;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.player-action-btn:hover:not(:disabled) {
  background: var(--accent-cyan);
  color: #fff;
}

.player-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.player-action-btn svg {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-card {
  width: 520px;
  background: #141726;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.modal-card-vip {
  width: 560px;
  max-width: 94vw;
}

.modal-header-tabs {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: var(--radius-md);
}

.vip-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.84rem;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.vip-tab-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 240, 255, 0.35);
}

.vip-tab-content {
  display: none;
}

.vip-tab-content.active {
  display: block;
}

.pkg-selector-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.pkg-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: var(--transition-fast);
}

.pkg-card:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: rgba(0, 240, 255, 0.4);
}

.pkg-card.active {
  background: linear-gradient(180deg, rgba(0, 240, 255, 0.25), rgba(6, 182, 212, 0.15));
  border-color: var(--primary);
  box-shadow: 0 0 14px var(--primary-glow);
}

.pkg-time {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}

.pkg-cost {
  font-size: 0.78rem;
  font-weight: 800;
  color: #fbbf24;
  margin-top: 2px;
}

.pkg-tag {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 4px;
  border-radius: 3px;
  margin-top: 4px;
  display: inline-block;
}

.pkg-tag.hot {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
}

.pkg-tag.best {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
}

.vip-plan-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(0, 240, 255, 0.15));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 12px;
}

.vip-badge-tag {
  font-size: 0.76rem;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.5px;
}

.vip-price-tag {
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
  margin: 4px 0 8px 0;
}

.vip-price-tag span {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: normal;
}

.vip-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.vip-benefits li {
  font-size: 0.78rem;
  color: #e2e8f0;
}

.qr-payment-wrapper {
  display: flex;
  gap: 16px;
  align-items: center;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
}

.qr-code-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 170px;
  flex-shrink: 0;
}

.qr-image {
  width: 160px;
  height: 160px;
  object-fit: contain;
  background: #fff;
  padding: 4px;
  border-radius: var(--radius-sm);
}

.qr-hint {
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-top: 6px;
}

.bank-details-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.b-label {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.b-value {
  color: #fff;
  font-weight: 600;
}

.b-highlight {
  color: #38bdf8;
  font-family: 'Space Grotesk', monospace;
  font-size: 0.86rem;
}

.b-price {
  color: #4ade80;
  font-weight: 800;
}

.b-memo {
  color: #fbbf24;
  font-family: 'Space Grotesk', monospace;
  font-size: 0.82rem;
}

.btn-mini-copy {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  margin-left: 6px;
}

.btn-mini-copy:hover {
  background: var(--primary);
}

.transfer-note {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 6px;
  line-height: 1.4;
}

.support-contact {
  font-size: 0.76rem;
  color: var(--text-dim);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
}

.form-group input {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: #fff;
  font-size: 0.88rem;
  outline: none;
  user-select: text;
}

.form-group small {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.machine-id-box {
  display: flex;
  gap: 8px;
}

.machine-id-box input {
  flex: 1;
  font-family: 'Space Grotesk', monospace;
  letter-spacing: 1px;
  background: rgba(0, 0, 0, 0.4);
  color: #a7f3d0;
}

.btn-copy {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 0 14px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-copy:hover {
  background: var(--primary);
}

.license-status-msg {
  font-size: 0.84rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: none;
  margin-top: 10px;
}

.license-status-msg.success {
  display: block;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.license-status-msg.error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-cancel {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
}

.btn-save {
  background: var(--primary);
  border: none;
  color: #fff;
  padding: 8px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Studio Toast Notification */
.studio-toast {
  position: fixed;
  bottom: 100px;
  right: 32px;
  z-index: 99999;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(15, 15, 26, 0.95));
  border: 1px solid rgba(0, 240, 255, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 240, 255, 0.25);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  backdrop-filter: blur(16px);
  transform: translateY(30px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 10px;
}

.studio-toast.show {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   LANGUAGE SWITCHER
   ========================================================================== */
.lang-switcher {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 2px;
  gap: 2px;
  margin-right: 10px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}

.lang-btn:hover {
  color: #fff;
}

.lang-btn.active {
  background: linear-gradient(135deg, var(--primary), #0ea5e9);
  color: #fff;
  box-shadow: 0 0 10px var(--primary-glow);
}

/* ==========================================================================
   4 MODE TABS HEADER
   ========================================================================== */
.tabs-header-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-color);
}

.tabs-header-4 .tab-btn {
  padding: 8px 10px;
  font-size: 0.8rem;
  white-space: nowrap;
  gap: 6px;
}

.tabs-header-4 .tab-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ==========================================================================
   AUDIO UPLOAD DROPZONE (REMIX & EDIT)
   ========================================================================== */
.upload-dropzone {
  border: 2px dashed rgba(0, 240, 255, 0.35);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  background: rgba(0, 240, 255, 0.04);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--primary);
  background: rgba(0, 240, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.dropzone-icon {
  width: 36px;
  height: 36px;
  color: var(--primary);
  margin-bottom: 8px;
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

.dropzone-text {
  font-size: 0.9rem;
  color: #e2e8f0;
  font-weight: 600;
  margin-bottom: 4px;
}

.dropzone-text .browse-link {
  color: var(--accent-cyan);
  text-decoration: underline;
}

.dropzone-subtext {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.audio-loaded-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.audio-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.audio-icon {
  font-size: 1.4rem;
}

.audio-filename {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  word-break: break-all;
}

.audio-duration {
  font-size: 0.78rem;
  color: var(--accent-cyan);
  font-family: 'Space Grotesk', monospace;
}

.mini-audio-player {
  width: 100%;
  height: 36px;
  border-radius: 8px;
  outline: none;
  filter: invert(1) hue-rotate(180deg);
}

.btn-mini-clear {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-mini-clear:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
}

/* ==========================================================================
   REMIX & EDIT SLIDERS
   ========================================================================== */
.remix-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 14px;
}

.slider-control-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.slider-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.slider-label strong {
  color: #7dd3fc;
  font-family: 'Space Grotesk', monospace;
}

.neon-slider {
  width: 100%;
  height: 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  cursor: pointer;
  accent-color: var(--primary);
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Edit Controls & Mask Slider */
.edit-controls-box {
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.02);
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mask-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mask-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 90px;
}

.mask-input-group label {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.input-mask-num {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 8px;
  text-align: center;
  font-family: 'Space Grotesk', monospace;
}

.mask-track-wrap {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mask-range-slider {
  width: 100%;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

.mask-hint-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ==========================================================================
   ADVANCE OPTIONS CARD
   ========================================================================== */
.advance-options-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.advance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.advance-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}

.advance-icon {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.btn-reset-advance {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-reset-advance:hover {
  color: var(--primary);
}

.param-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.param-label-row label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   INTERACTIVE TOOLTIP SYSTEM
   ========================================================================== */
.info-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: help;
  margin-left: 6px;
  transition: var(--transition-fast);
  vertical-align: middle;
}

.info-tooltip:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 8px var(--primary-glow);
}

/* Global Floating Tooltip Popup */
.global-tooltip {
  position: fixed;
  z-index: 999999;
  max-width: 320px;
  background: rgba(15, 17, 28, 0.96);
  border: 1px solid rgba(0, 240, 255, 0.4);
  border-radius: 10px;
  padding: 10px 14px;
  color: #f1f5f9;
  font-size: 0.8rem;
  line-height: 1.45;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 240, 255, 0.25);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  transform: translateY(4px);
  opacity: 0;
}

.global-tooltip.active {
  opacity: 1;
  transform: translateY(0);
}

.global-tooltip strong {
  color: #7dd3fc;
  display: block;
  margin-bottom: 3px;
}

@media (max-width: 800px) {
  body {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .app-container {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: 128px;
  }

  .top-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 8px;
    height: auto;
    min-height: 0;
    padding: 10px 12px;
  }

  .brand {
    min-width: 0;
    gap: 8px;
  }

  .brand-text {
    min-width: 0;
    gap: 6px;
  }

  .brand-name {
    font-size: 0.94rem;
    white-space: nowrap;
  }

  .brand-badge {
    padding: 2px 6px;
    font-size: 0.58rem;
  }

  .nav-actions {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    gap: 6px;
  }

  .lang-switcher {
    gap: 1px;
    margin: 0;
  }

  .lang-btn {
    padding: 5px 7px;
    font-size: 0.68rem;
  }

  .server-status {
    gap: 6px;
    padding: 6px 8px;
  }

  .status-text {
    font-size: 0.7rem;
  }

  .nav-center {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
    gap: 8px;
  }

  .header-model-box {
    width: 100%;
    min-width: 0;
    padding: 7px 10px;
    border-radius: var(--radius-md);
  }

  .header-model-select {
    flex: 1;
    min-width: 0;
    font-size: 0.76rem;
    text-overflow: ellipsis;
  }

  .workspace {
    flex: 0 0 auto;
    flex-direction: column;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .studio-panel {
    width: 100%;
    min-height: 0;
    flex: none;
    overflow: visible;
    border-right: 0;
  }

  .library-panel {
    width: 100%;
    max-width: none;
    min-width: 0;
    max-height: none;
    flex: none;
    overflow: visible;
    border-top: 1px solid var(--border-color);
  }

  .library-header {
    padding: 12px;
  }

  .library-header-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
  }

  .track-list {
    flex: none;
    max-height: 38dvh;
    overflow-y: auto;
    padding: 12px;
  }

  .tabs-header-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 12px;
  }

  .tabs-header-4 .tab-btn {
    min-width: 0;
    min-height: 44px;
    padding: 8px 6px;
    font-size: 0.74rem;
    line-height: 1.25;
    white-space: normal;
  }

  .tabs-header-4 .tab-text {
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: center;
  }

  .studio-content {
    gap: 12px;
    padding: 14px 12px;
  }

  .input-card {
    padding: 14px;
    border-radius: var(--radius-md);
  }

  .card-header {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }

  .card-header-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .btn-magic-wand,
  .btn-dice {
    min-height: 36px;
  }

  .params-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .param-box {
    min-width: 0;
  }

  .param-label-row {
    height: auto;
    min-height: 20px;
  }

  .mask-slider-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 64px;
    gap: 8px;
  }

  .mask-input-group {
    min-width: 0;
  }

  .master-player {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "track action"
      "controls controls";
    gap: 8px 12px;
    width: 100%;
    height: auto;
    min-height: 108px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  }

  .player-left {
    grid-area: track;
    width: auto;
    min-width: 0;
    gap: 8px;
  }

  .track-cover {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
  }

  .track-cover svg {
    width: 19px;
    height: 19px;
  }

  .track-title {
    font-size: 0.78rem;
  }

  .track-subtitle {
    font-size: 0.68rem;
  }

  .player-center {
    grid-area: controls;
    width: 100%;
    max-width: none;
    gap: 0;
  }

  .waveform-canvas {
    display: none;
  }

  .player-controls {
    gap: 8px;
  }

  .play-btn {
    width: 32px;
    height: 32px;
  }

  .time-label {
    width: 34px;
    font-size: 0.66rem;
  }

  .player-right {
    grid-area: action;
    width: auto;
  }

  .player-action-btn {
    min-height: 36px;
    gap: 6px;
    padding: 7px 10px;
    font-size: 0.72rem;
  }

  .player-action-btn svg {
    width: 14px;
    height: 14px;
  }

  .studio-toast {
    right: 12px;
    bottom: 132px;
    left: 12px;
    padding: 10px 12px;
    font-size: 0.82rem;
  }
}

@media (max-width: 390px) {
  .brand-badge,
  .status-text {
    display: none;
  }

  .header-model-label {
    font-size: 0.66rem;
  }

  .library-header {
    align-items: flex-start;
    gap: 8px;
  }

  .library-header-actions {
    gap: 6px;
  }

  .btn-clear-lib {
    font-size: 0.7rem;
  }
}