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

body {
  background: linear-gradient(135deg, #0a0a12 0%, #1a1a2e 100%);
  color: #e0e0e8;
  font-family: 'SF Mono', Menlo, Monaco, 'Courier New', monospace;
  min-height: 100vh;
  padding: 20px;
}

.console {
  max-width: 1140px;
  margin: 0 auto;
  background: #14141f;
  border: 1px solid #2a2a3e;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}

header {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1px solid #2a2a3e;
  margin-bottom: 24px;
}

h1 {
  font-size: 28px;
  color: #00ffd5;
  letter-spacing: 4px;
  font-weight: 600;
  text-shadow: 0 0 16px rgba(0,255,213,0.3);
}

.meta {
  color: #8a8aa0;
  font-size: 13px;
  letter-spacing: 2px;
  margin-top: 8px;
}

h2 {
  font-size: 14px;
  color: #00ffd5;
  letter-spacing: 3px;
  margin-bottom: 16px;
}

.hidden { display: none !important; }

/* ---- Song selector ---- */

#song-selector { padding: 10px 0 20px; }

#song-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.song-card {
  background: #1a1a28;
  border: 1px solid #2a2a3e;
  border-radius: 8px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.song-card:hover {
  border-color: #00ffd5;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,255,213,0.15);
}

.song-card.pending { opacity: 0.6; }
.song-card.pending:hover { border-color: #ffdd00; box-shadow: 0 4px 20px rgba(255,221,0,0.15); }

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

.song-title {
  font-size: 15px;
  color: #00ffd5;
  font-weight: 700;
  letter-spacing: 1px;
}

.song-card.pending .song-title { color: #ffdd00; }

.song-status { font-size: 10px; color: #8a8aa0; letter-spacing: 1px; }
.song-subtitle { color: #c0c0d0; font-size: 13px; }

.song-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11px;
  color: #8a8aa0;
}
.song-stats span {
  padding: 3px 8px;
  background: #0a0a14;
  border-radius: 3px;
}

.song-stems { font-size: 10px; color: #6a6a80; letter-spacing: 1px; }

/* ---- Start ---- */

#start-section { text-align: center; padding: 40px 0; }
.selected-song { margin-bottom: 28px; }

#current-song-title {
  font-size: 20px;
  color: #00ffd5;
  letter-spacing: 3px;
  font-weight: 700;
  margin-bottom: 6px;
}

#start-btn {
  display: inline-block;
  background: #00ffd5;
  color: #000;
  border: none;
  padding: 18px 44px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 3px;
  border-radius: 8px;
  cursor: wait;
  font-family: inherit;
  box-shadow: 0 0 30px rgba(0,255,213,0.4);
  margin-right: 8px;
  animation: loading-pulse 1.2s ease-in-out infinite;
}

@keyframes loading-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 30px rgba(0,255,213,0.4); }
  50%      { opacity: 0.55; box-shadow: 0 0 20px rgba(0,255,213,0.2); }
}

button.secondary {
  background: transparent;
  color: #8a8aa0;
  border: 1px solid #3a3a50;
  padding: 18px 24px;
  font-size: 13px;
  letter-spacing: 1px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}
button.secondary:hover { color: #e0e0e8; border-color: #8a8aa0; }

.hint { margin-top: 16px; color: #6a6a80; font-size: 12px; }

/* ---- Visualizer ---- */

#visualizer {
  background: #0a0a14;
  padding: 8px;
  border-radius: 8px;
  margin-bottom: 16px;
  border: 1px solid #2a2a3e;
}

#spectrum {
  width: 100%;
  height: 90px;
  display: block;
}

/* ---- Transport ---- */

.track-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid #2a2a3e;
  gap: 12px;
}
#playing-title {
  color: #00ffd5;
  letter-spacing: 2px;
  font-weight: 600;
  font-size: 14px;
  flex: 1;
}
.autoplay-label {
  color: #8a8aa0;
  font-size: 11px;
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.autoplay-label input { accent-color: #00ffd5; cursor: pointer; }

button.small {
  background: transparent;
  color: #8a8aa0;
  border: 1px solid #3a3a50;
  padding: 6px 12px;
  font-size: 11px;
  letter-spacing: 1px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}
button.small:hover { color: #e0e0e8; border-color: #8a8aa0; }

#transport {
  background: #1a1a28;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.transport-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

button.xl {
  background: #2a2a3e;
  color: #e0e0e8;
  border: 1px solid #3a3a50;
  padding: 12px 18px;
  font-size: 18px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  min-width: 52px;
}

button.xl:hover { background: #3a3a50; }
button.xl.active { background: #00ffd5; color: #000; border-color: #00ffd5; }

button.xl.rec { font-size: 12px; color: #ff3355; border-color: #ff3355; letter-spacing: 1px; }
button.xl.rec:hover { background: rgba(255,51,85,0.2); }
button.xl.rec.active { background: #ff3355; color: #fff; border-color: #ff3355; animation: rec-pulse 1.2s infinite; }
@keyframes rec-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,51,85,0.5); }
  50% { box-shadow: 0 0 0 8px rgba(255,51,85,0); }
}
.rec-time {
  color: #ff3355;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
}

#time {
  margin-left: auto;
  font-size: 16px;
  color: #00ffd5;
  font-weight: 600;
  letter-spacing: 1px;
}

#seek {
  width: 100%;
  accent-color: #00ffd5;
}

/* ---- Crossfader ---- */

#crossfader {
  background: #1a1a28;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.xfader-label {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 700;
  white-space: nowrap;
}
.xfader-label.drums { color: #ff9944; }
.xfader-label.mel { color: #00ccff; }

#xfader {
  flex: 1;
  accent-color: #00ffd5;
  cursor: pointer;
}

#xfader-center { white-space: nowrap; }

/* ---- Channels ---- */

#channels {
  display: grid;
  gap: 10px;
  background: #1a1a28;
  padding: 18px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.channel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 10px 6px;
  background: #222234;
  border-radius: 6px;
  border: 1px solid #2a2a3e;
  border-top: 3px solid #3a3a50;
}
.channel.drum    { border-top-color: #ff9944; }
.channel.melodic { border-top-color: #00ccff; }

.channel .label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #00ffd5;
}

.vu {
  width: 6px;
  height: 55px;
  background: #0a0a14;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.vu-fill {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: linear-gradient(to top, #00ff66 0%, #ffdd00 70%, #ff3355 95%);
  height: 0%;
  transition: height 0.05s linear;
}

.vol { width: 100%; accent-color: #00ffd5; cursor: pointer; }
.vol-val { font-size: 10px; color: #8a8aa0; }

.channel button {
  width: 100%;
  padding: 5px;
  background: #2a2a3e;
  color: #8a8aa0;
  border: 1px solid #3a3a50;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  transition: all 0.15s;
}

.channel button.mute.active { background: #ff3355; color: #fff; border-color: #ff3355; }
.channel button.solo.active { background: #ffdd00; color: #000; border-color: #ffdd00; }
.channel button:hover:not(.active) { background: #3a3a50; color: #e0e0e8; }

/* ---- Master ---- */

#master {
  background: #1a1a28;
  padding: 18px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.knob-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.knob-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.knob-group label {
  font-size: 11px;
  color: #8a8aa0;
  letter-spacing: 2px;
}

.knob-group input[type="range"] {
  accent-color: #00ffd5;
  cursor: pointer;
}

.knob-group span {
  font-size: 12px;
  color: #00ffd5;
  font-weight: 600;
}

footer {
  text-align: center;
  color: #4a4a60;
  font-size: 11px;
  padding-top: 16px;
  border-top: 1px solid #2a2a3e;
}

footer p { margin: 4px 0; }
footer a { color: #00ffd5; text-decoration: none; }
footer a:hover { text-decoration: underline; }

@media (max-width: 900px) {
  #channels { grid-template-columns: repeat(6, 1fr) !important; }
}
@media (max-width: 700px) {
  #channels { grid-template-columns: repeat(4, 1fr) !important; }
  .knob-row { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 20px; letter-spacing: 2px; }
  #song-list { grid-template-columns: 1fr; }
  .transport-row { justify-content: center; }
  #time { margin-left: 0; width: 100%; text-align: center; }
}
