/* ── INTERACTIVE VINYL TURNTABLE DECK ──────────────────────────────────
   Bottom-left fold-out retro turntable with tonearm, vinyl crackle & scratch.
   ───────────────────────────────────────────────────────────────────────── */

.turntable-deck {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9980;
  width: 260px;
  background: #101016;
  border: 1px solid rgba(255, 102, 0, 0.3);
  border-radius: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 102, 0, 0.1);
  font-family: var(--f-mono, ui-monospace, 'Cascadia Mono', monospace);
  color: #E2E2E8;
  padding: 10px;
  user-select: none;
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.24s ease;
}

.turntable-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 5px;
}

.turntable-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: #FF6600;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 5px;
}

.turntable-close-btn {
  background: transparent;
  border: none;
  color: #7A7A8C;
  font-family: inherit;
  font-size: 0.72rem;
  cursor: pointer;
  padding: 1px 5px;
}

.turntable-close-btn:hover {
  color: #FF6600;
}

/* ── Platter & Vinyl Visual ─────────────────────────────────────────── */
.turntable-stage {
  position: relative;
  width: 240px;
  height: 180px;
  background: #0B0B0F;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #1E1E26;
  display: flex;
  align-items: center;
  justify-content: center;
}

.turntable-platter {
  position: absolute;
  left: 14px;
  top: 14px;
  width: 152px;
  height: 152px;
  border-radius: 50%;
  background: radial-gradient(circle, #252530 0%, #15151E 70%, #0A0A0F 100%);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
}

.turntable-platter.scratching {
  cursor: grabbing;
}

/* Grooved Vinyl Record */
.turntable-vinyl {
  width: 144px;
  height: 144px;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle at 50% 50%,
    #141418,
    #141418 2px,
    #1C1C22 3px,
    #141418 4px
  );
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.turntable-deck.is-playing .turntable-vinyl {
  animation: spin-vinyl 1.8s linear infinite;
}

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

/* Center Dongen Label */
.vinyl-label {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FF6600;
  border: 2px solid #111118;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 6px;
  font-weight: 800;
  color: #111118;
  text-align: center;
  line-height: 1.1;
  pointer-events: none;
}

.vinyl-spindle {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #D2D2DC;
  border: 1px solid #111118;
  position: absolute;
  pointer-events: none;
}

/* ── Tonearm ────────────────────────────────────────────────────────── */
.turntable-arm-assembly {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 45px;
  height: 140px;
  pointer-events: none;
  transform-origin: 32px 18px;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  transform: rotate(-16deg);
}

.turntable-deck.is-playing .turntable-arm-assembly {
  transform: rotate(18deg);
}

.tonearm-base {
  position: absolute;
  top: 8px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, #D2D2DC 30%, #555562 100%);
  border: 1px solid #1E1E24;
}

.tonearm-rod {
  position: absolute;
  top: 18px;
  right: 15px;
  width: 3px;
  height: 105px;
  background: linear-gradient(90deg, #E2E2E8, #9A9AA6);
  transform-origin: top center;
  transform: rotate(5deg);
}

.tonearm-headshell {
  position: absolute;
  bottom: 0;
  left: -4px;
  width: 10px;
  height: 16px;
  background: #FF6600;
  border: 1px solid #111118;
  border-radius: 1px;
}

/* ── Controls Bar ───────────────────────────────────────────────────── */
.turntable-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.65rem;
}

.turntable-play-btn {
  background: #1E1E26;
  border: 1px solid #FF6600;
  color: #FF6600;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.turntable-play-btn:hover {
  background: #FF6600;
  color: #111118;
}

.turntable-rpm {
  color: #7A7A8C;
}

/* Collapsed tab button */
.turntable-dock-tab {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9979;
  background: #111118;
  border: 1px solid rgba(255, 102, 0, 0.4);
  color: #FF6600;
  font-family: var(--f-mono, monospace);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 50px;
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transition: all 0.15s ease;
}

.turntable-dock-tab:hover {
  background: #FF6600;
  color: #111118;
}

.turntable-deck.is-minimized {
  display: none;
}

.turntable-dock-tab.is-visible {
  display: flex;
}
