/* ═══════════════════════════════════════════════
   DJ DECKS — Animated turntables
   ═══════════════════════════════════════════════ */

/* ─── SECTION WITH BACKGROUND IMAGE ─── */
.dj-section {
  position: relative;
  padding: 80px 0 48px;
  overflow: hidden;
}

.dj-section-bg {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  filter: blur(2px) saturate(0.7);
  pointer-events: none;
  z-index: 0;
}

/* Dark overlay gradient */
.dj-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(8,8,16,0.92) 0%,
    rgba(8,8,16,0.7) 40%,
    rgba(8,8,16,0.85) 80%,
    rgba(8,8,16,0.98) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.dj-decks {
  background: linear-gradient(180deg, #0a0a14 0%, #0f0f1a 100%);
  border: 1px solid rgba(0,212,160,0.15);
  border-radius: 24px;
  padding: 32px 24px 28px;
  margin-bottom: 48px;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.04);
  overflow: hidden;
  position: relative;
}

/* Subtle ambient glow */
.dj-decks::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 20%;
  width: 60%;
  height: 100%;
  background: radial-gradient(ellipse, rgba(0,212,160,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.dj-header {
  text-align: center;
  margin-bottom: 28px;
  position: relative;
}

.dj-brand {
  font-family: 'Space Grotesk', monospace;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 4px;
  color: #00d4a0;
  text-transform: uppercase;
}

.dj-sub {
  font-size: 0.78rem;
  color: rgba(245,245,247,0.3);
  margin-top: 6px;
  letter-spacing: 0.5px;
}

/* ─── TABLE LAYOUT ─── */
.dj-table {
  display: grid;
  grid-template-columns: 1fr 120px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .dj-table {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .dj-mixer {
    order: -1;
  }
}

/* ─── DECK ─── */
.dj-deck {
  position: relative;
}

.deck-label {
  font-family: 'Space Grotesk', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: rgba(0,212,160,0.6);
  text-align: center;
  margin-bottom: 12px;
}

/* ─── TURNTABLE ─── */
.vinyl-turntable {
  position: relative;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  aspect-ratio: 1;
  background: radial-gradient(circle at 50% 50%, #1a1a28 0%, #12121e 50%, #0e0e18 100%);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.4),
    0 4px 16px rgba(0,0,0,0.3);
  padding: 16px;
  overflow: hidden;
}

.platter {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #1c1c2c;
  border: 2px solid rgba(255,255,255,0.05);
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.platter-dots {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    rgba(255,255,255,0.03) 0deg 2deg,
    transparent 2deg 12deg
  );
}

.vinyl-record {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle,
    #111 0%, #1a1a1a 20%, #0d0d0d 40%, #181818 60%, #0a0a0a 80%, #111 100%
  );
  box-shadow:
    0 0 0 2px rgba(0,0,0,0.8),
    0 0 20px rgba(0,0,0,0.5);
  transition: none;
}

/* Vinyl grooves */
.vinyl-grooves {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow:
    inset 0 0 0 8px rgba(255,255,255,0.015),
    inset 0 0 0 16px rgba(255,255,255,0.02),
    inset 0 0 0 24px rgba(255,255,255,0.015),
    inset 0 0 0 32px rgba(255,255,255,0.02);
  pointer-events: none;
}
.vinyl-grooves.g2 {
  inset: 25%;
  border-color: rgba(255,255,255,0.03);
}
.vinyl-grooves.g3 {
  inset: 38%;
  border-color: rgba(255,255,255,0.025);
}

/* Center label */
.vinyl-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32%;
  height: 32%;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d4a0 0%, #007a5e 50%, #004a38 100%);
  border: 2px solid rgba(0,0,0,0.6);
  box-shadow:
    0 0 10px rgba(0,212,160,0.3),
    inset 0 2px 4px rgba(255,255,255,0.2);
  overflow: hidden;
}

.vinyl-label-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  opacity: 0.85;
}

/* Center hole */
.vinyl-label::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0a0a14;
  border: 1px solid rgba(255,255,255,0.1);
}

/* Light reflection on vinyl */
.vinyl-shine {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.06) 0%,
    transparent 40%,
    transparent 60%,
    rgba(255,255,255,0.03) 100%
  );
  pointer-events: none;
}

/* SPINNING ANIMATION */
.vinyl-record.spinning {
  animation: vinyl-spin 1.8s linear infinite;
}

@keyframes vinyl-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ─── TONEARM ─── */
.tonearm {
  position: absolute;
  top: 8px;
  right: 12px;
  z-index: 2;
  transform-origin: top right;
}

.tonearm-base {
  width: 14px;
  height: 14px;
  background: radial-gradient(circle, #555 0%, #333 100%);
  border-radius: 50%;
  border: 1px solid #222;
  position: absolute;
  top: 0;
  right: 0;
}

.tonearm-arm {
  width: 3px;
  height: 80px;
  background: linear-gradient(180deg, #888 0%, #555 100%);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  right: 5px;
  transform-origin: top center;
  transform: rotate(25deg);
  box-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.tonearm-head {
  width: 8px;
  height: 12px;
  background: #666;
  border-radius: 1px 1px 2px 2px;
  position: absolute;
  top: 80px;
  right: -8px;
  transform: rotate(25deg);
}

/* ─── DECK CONTROLS ─── */
.deck-controls {
  margin-top: 14px;
  text-align: center;
}

.deck-select {
  width: 100%;
  max-width: 280px;
  background: #14141f;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #d0e8f0;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  padding: 8px 12px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2300d4a0' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.deck-select:focus {
  border-color: rgba(0,212,160,0.5);
}

.deck-select option {
  background: #14141f;
  color: #d0e8f0;
}

.deck-transport {
  margin-top: 10px;
}

.deck-play {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(0,212,160,0.4);
  background: rgba(0,212,160,0.08);
  color: #00d4a0;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: system-ui;
}

.deck-play:hover {
  background: rgba(0,212,160,0.2);
  border-color: #00d4a0;
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(0,212,160,0.2);
}

.deck-play.active {
  background: #00d4a0;
  color: #000;
  border-color: #00d4a0;
  box-shadow: 0 0 24px rgba(0,212,160,0.4);
}

.deck-track-label {
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(245,245,247,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

.deck-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

.deck-time-cur, .deck-time-dur {
  font-size: 0.68rem;
  color: rgba(245,245,247,0.3);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-width: 32px;
}

.deck-progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  cursor: pointer;
  overflow: hidden;
}

.deck-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00d4a0, #7c3aed);
  border-radius: 2px;
  transition: width 0.3s linear;
}

/* ─── MIXER ─── */
.dj-mixer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-top: 20px;
}

.mixer-label {
  font-family: 'Space Grotesk', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.25);
}

.mixer-meters {
  display: flex;
  gap: 6px;
}

.meter {
  width: 8px;
  height: 80px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.meter-fill {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(180deg, #ff4444 0%, #ffaa00 30%, #00d4a0 70%);
  border-radius: 4px;
  transition: height 0.15s;
  animation: meter-bounce 0.8s ease-in-out infinite alternate;
}

#meter-a .meter-fill { animation-delay: 0s; }
#meter-b .meter-fill { animation-delay: 0.15s; }

@keyframes meter-bounce {
  0%   { height: 25%; }
  50%  { height: 60%; }
  100% { height: 35%; }
}

/* Knobs (decorative) */
.mixer-knobs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.knob-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.2);
}

.knob {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #444 0%, #222 70%);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 2px 6px rgba(0,0,0,0.4),
    inset 0 1px 2px rgba(255,255,255,0.1);
  position: relative;
}

/* Knob indicator line */
.knob::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 50%;
  width: 2px;
  height: 8px;
  background: #00d4a0;
  border-radius: 1px;
  transform: translateX(-50%);
}

/* ─── SYNC CONTROLS ─── */
.sync-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.sync-btn {
  font-family: 'Space Grotesk', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.25s ease;
}

.sync-btn:hover {
  border-color: rgba(0,212,160,0.4);
  color: rgba(0,212,160,0.8);
  background: rgba(0,212,160,0.08);
}

.sync-btn.active {
  background: rgba(0,212,160,0.15);
  border-color: #00d4a0;
  color: #00d4a0;
  box-shadow: 0 0 12px rgba(0,212,160,0.2);
}

.sync-master {
  font-size: 0.6rem;
  color: rgba(0,212,160,0.5);
  font-weight: 600;
  min-height: 14px;
}

/* ─── BPM DISPLAY ─── */
.deck-transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.deck-bpm {
  font-family: 'Space Grotesk', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(124,58,237,0.8);
  letter-spacing: 0.5px;
  min-width: 70px;
}

/* ─── VU METERS (real audio) ─── */
.meter-fill {
  animation: none !important;
  transition: height 0.08s ease-out;
}

/* ─── CROSSFADER ─── */
.crossfader-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.cf-label {
  font-family: 'Space Grotesk', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(0,212,160,0.6);
}

.crossfader {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.crossfader::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 28px;
  background: linear-gradient(180deg, #555 0%, #333 100%);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  cursor: grab;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.crossfader::-moz-range-thumb {
  width: 20px;
  height: 28px;
  background: linear-gradient(180deg, #555 0%, #333 100%);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  cursor: grab;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .dj-table {
    grid-template-columns: 1fr 1fr;
  }
  .dj-mixer {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    padding: 16px 0;
  }
  .crossfader-wrap {
    margin-top: 0;
  }
}

@media (max-width: 600px) {
  .dj-table {
    grid-template-columns: 1fr;
  }
  .dj-decks {
    padding: 20px 16px;
    border-radius: 16px;
  }
  .vinyl-turntable {
    max-width: 220px;
  }
}
