@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ===== Design Tokens ===== */
:root {
  /* Cream/Beige palette from reference image */
  --bg-primary: #f0ebe3;
  --bg-secondary: #e8e2d8;
  --bg-dark: #1a1a1a;
  --surface: #f5f0e8;
  --surface-light: #faf7f2;
  --surface-dark: #ddd6ca;

  /* Record colors */
  --record-dark: #1a1714;
  --record-groove: #2a2520;
  --record-label: #f0ebe3;

  /* Song colors */
  --color-princess: #e63946;
  --color-vienna: #457bdb;
  --color-ayof: #2ecc71;
  --color-white-glow: #ffffff;

  /* UI colors */
  --text-primary: #2c2c2c;
  --text-secondary: #6b6560;
  --text-muted: #9e9690;
  --accent: #c4a882;
  --accent-hover: #b89970;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --shadow-xl: 0 16px 60px rgba(0,0,0,0.16);
  --shadow-inset: inset 0 2px 8px rgba(0,0,0,0.05);

  /* Sizing */
  --turntable-width: min(90vw, 720px);
  --border-radius: 16px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-x: hidden;
  padding: 40px 20px;
}

.flash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: white;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.5s ease;
}
.flash-overlay.blind {
  opacity: 1;
  background: white;
  transition: opacity 1.5s ease-out;
}
.flash-overlay.black {
  opacity: 1;
  background: black;
  transition: background 2s ease;
}

/* ===== Header ===== */
.header {
  text-align: center;
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeInDown 0.8s ease forwards;
}

.header h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.06em;
  margin-bottom: 6px;
}

.header .subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* ===== Player Container ===== */
.player-container {
  position: relative;
  width: var(--turntable-width);
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

/* ===== Record Sleeve ===== */
.record-sleeve {
  position: absolute;
  top: 0;
  left: 0; 
  height: 100%; 
  aspect-ratio: 1; 
  border-radius: 0;
  box-shadow: 10px 0 30px rgba(0,0,0,0.5);
  z-index: 15; 
  overflow: hidden;
  background: var(--record-dark);
  
  /* OFF State */
  transform: translate(100%, 0) rotate(5deg);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.8s ease, visibility 0.8s ease;
}

.record-sleeve.active {
  /* ON State */
  transform: translate(0, 0) rotate(0deg);
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.sleeve-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sleeve-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 35px;
  color: white;
}

.sleeve-overlay h2 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  margin: 0;
  margin-bottom: -8px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.8);
  line-height: 1;
}

.sleeve-overlay h3 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.8rem);
  font-weight: 400;
  letter-spacing: 0.05em;
  margin: 0;
  text-shadow: 0 2px 15px rgba(0,0,0,0.8);
  color: rgba(255,255,255,0.9);
}

/* ===== Turntable Container ===== */
.turntable-wrapper {
  position: relative;
  width: 100%;
  container-type: inline-size;
  aspect-ratio: 1.35 / 1;
  background: linear-gradient(145deg, var(--surface-light), var(--surface));
  border-radius: var(--border-radius);
  box-shadow: 
    var(--shadow-xl),
    inset 0 1px 0 rgba(255,255,255,0.6),
    inset 0 -1px 0 rgba(0,0,0,0.04);
  overflow: hidden;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.2s forwards;
}

/* Subtle texture overlay */
.turntable-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.003) 2px,
      rgba(0,0,0,0.003) 4px
    );
  pointer-events: none;
  z-index: 5;
}

/* ===== Record Platter Area ===== */
.platter-area {
  position: absolute;
  left: 8%;
  top: 50%;
  transform: translateY(-50%);
  width: 62%;
  aspect-ratio: 1;
}

.platter-base {
  position: absolute;
  inset: -4%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--surface-dark), var(--surface));
  box-shadow: 
    var(--shadow-md),
    inset 0 2px 4px rgba(255,255,255,0.3),
    inset 0 -2px 4px rgba(0,0,0,0.06);
}

/* Canvas for record + spiral — always visible, video fades in above it */
#recordCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  cursor: pointer;
}

/* ===== Tonearm ===== */
.tonearm {
  position: absolute;
  right: 16%;
  top: 12%;
  z-index: 10;
  transform-origin: 50% 8px;
  transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  /* Resting position: arm is away from the record */
  transform: rotate(0deg);
}

.tonearm.playing {
  /* Arm at outer edge of the record */
  transform: rotate(28deg);
}

.tonearm.finished {
  /* Arm near the center of the record (played through) */
  transform: rotate(12deg);
}

.tonearm-pivot {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--surface-light), var(--surface-dark));
  border-radius: 50%;
  box-shadow: var(--shadow-md), inset 0 1px 2px rgba(255,255,255,0.5);
  position: relative;
  z-index: 4;
}

.tonearm-pivot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: var(--surface-dark);
  border-radius: 50%;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.tonearm-arm {
  position: absolute;
  top: 1.2cqw;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 19.4cqw;
  background: linear-gradient(180deg, var(--surface-dark), var(--surface), var(--surface-dark));
  border-radius: 2px;
  box-shadow: 1px 2px 6px rgba(0,0,0,0.1);
  transform-origin: top center;
}

.tonearm-head {
  position: absolute;
  bottom: -1.1cqw;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 24px;
  background: linear-gradient(180deg, var(--surface), var(--surface-dark));
  border-radius: 2px 2px 4px 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tonearm-head::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 6px;
  background: var(--text-secondary);
  border-radius: 0 0 1px 1px;
}
/* Removed needle-glow */
/* ===== Control Panel (Right Side) ===== */
.control-panel {
  position: absolute;
  right: 6%;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  z-index: 20;
}

.toggle-switch {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.slider {
  position: relative;
  width: 44px;
  height: 24px;
  background-color: var(--surface-dark);
  border-radius: 12px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-primary);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.toggle-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ===== Media Overlay Area (Mapped perfectly to the Vinyl Record) ===== */
.media-overlay {
    position: absolute;
    left: 39%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 57%;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    pointer-events: none;
    display: flex;
    opacity: 0;
    visibility: hidden;
    clip-path: circle(0%);
    transition: clip-path 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease, visibility 0.6s ease, z-index 0.6s ease;
}

.media-overlay.visible {
    opacity: 1;
    visibility: visible;
    clip-path: circle(50%); /* Fully reveals the circular video */
    z-index: 5;
}

.video-layer {
  position: absolute;
  inset: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 4;             /* Above canvas (z:2) and tonearm (z:3) */
  transition: opacity 0.5s ease, visibility 0.5s ease;
  overflow: hidden;
}

.video-layer.active {
  opacity: 1;             /* Fully opaque — covers record and spiral completely */
  visibility: visible;
  pointer-events: auto;
}

/* When video is OFF, canvas and tonearm are fully visible */
.video-layer:not(.active) {
  opacity: 0;
  pointer-events: none;
}

#epVideo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none !important;
  background: transparent;
  transition: filter 0.4s ease;
}

#ytplayer-container {
  position: absolute !important;
  top: 0 !important;
  left: 50% !important;
  height: 100% !important;
  width: calc(100% * 16 / 9) !important; /* Scale 16:9 video to cover the 1:1 circle */
  transform: translateX(-50%) !important;
  pointer-events: none !important;
}

.video-layer:not(.active) #epVideo {
  filter: brightness(0);
}

.video-placeholder {
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  z-index: 1;
  text-align: center;
  padding: 20px;
}

.text-layer {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5); /* Dim background to make text readable */
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  z-index: 5; /* Above video-layer (z:4) */
}

.text-layer.active {
  opacity: 1;
  visibility: visible;
}

.lyrics-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 15px var(--primary);
  letter-spacing: 0.05em;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: translateY(8px);
  opacity: 0;
  padding: 0 20px;
}

.lyrics-text.active {
  transform: translateY(0);
  opacity: 1;
}

/* ===== Bottom Controls ===== */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 28px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.4s forwards;
}

.playback-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.skip-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.08);
  background: linear-gradient(145deg, var(--surface-light), var(--surface-dark));
  box-shadow: 
    var(--shadow-sm),
    inset 0 1px 2px rgba(255,255,255,0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.skip-btn:hover {
  transform: scale(1.05);
}

.skip-btn:active {
  transform: scale(0.95);
}

.skip-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.skip-btn svg {
  width: 20px;
  height: 20px;
  fill: var(--text-primary);
  transition: fill var(--transition-fast);
}

.play-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(145deg, var(--surface), var(--surface-light));
  box-shadow: 
    var(--shadow-md),
    inset 0 1px 0 rgba(255,255,255,0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.play-btn:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.5);
}

.play-btn:active {
  transform: scale(0.96);
}

.play-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.play-btn svg {
  width: 24px;
  height: 24px;
  fill: var(--text-primary);
  transition: fill var(--transition-fast);
}

.play-btn.playing svg {
  fill: var(--color-princess);
}

/* ===== Song Info Display ===== */
.song-info {
  text-align: center;
  min-width: 200px;
}

.song-info .now-playing {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.song-info .now-playing.visible {
  opacity: 1;
}

.song-info .song-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color var(--transition-normal);
  min-height: 1.4em;
}

.song-info .song-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
  min-height: 1.2em;
}

/* ===== Progress Bar ===== */
.progress-container {
  width: var(--turntable-width);
  max-width: 100%;
  margin-top: 20px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.5s forwards;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--surface-dark);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width 0.3s linear, background-color 0.5s ease;
  background: var(--color-princess);
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.progress-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  transition: all var(--transition-normal);
}

.progress-label.active {
  color: var(--text-primary);
  background: var(--surface-dark);
}

/* ===== Drop Zone Overlay ===== */
.drop-zone {
  position: absolute;
  inset: 0;
  background: rgba(240, 235, 227, 0.95);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: var(--border-radius);
  transition: opacity var(--transition-normal);
  cursor: pointer;
}

.drop-zone.hidden {
  opacity: 0;
  pointer-events: none;
}

.drop-zone-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  animation: pulse 2s ease-in-out infinite;
}

.drop-zone-icon svg {
  width: 28px;
  height: 28px;
  fill: var(--text-secondary);
}

.drop-zone h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.drop-zone p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.drop-zone.dragover {
  background: rgba(196, 168, 130, 0.15);
  border: 2px dashed var(--accent);
}

/* File input hidden */
#audioFileInput {
  display: none;
}

/* ===== Song Slots ===== */
.song-slots {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.song-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border-radius: 10px;
  border: 1.5px dashed var(--surface-dark);
  transition: all var(--transition-normal);
  cursor: pointer;
  min-width: 140px;
}

.song-slot.filled {
  border-style: solid;
  border-color: var(--accent);
  background: var(--surface-light);
}

.song-slot .slot-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.song-slot:nth-child(1) .slot-dot { background: var(--color-princess); }
.song-slot:nth-child(2) .slot-dot { background: var(--color-vienna); }
.song-slot:nth-child(3) .slot-dot { background: var(--color-ayof); }

.song-slot .slot-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.song-slot .slot-file {
  font-size: 0.65rem;
  color: var(--text-muted);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== Action Buttons ===== */
.action-buttons-wrapper {
  margin-top: 16px;
  text-align: center;
}

.action-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.action-hint .hint-or {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 0 4px;
}

.action-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.action-buttons a, .action-buttons button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-normal);
  border: none;
  outline: none;
}

.btn-shop {
  background: var(--surface-dark);
  color: var(--text-primary);
  border: 1px solid rgba(0,0,0,0.1);
}

.btn-shop:hover {
  background: var(--text-primary);
  color: var(--surface);
}

.btn-download {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 15px rgba(196, 168, 130, 0.3);
}

.btn-download.locked {
  background: var(--surface-dark);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.6;
}

@keyframes shootUnlock {
  0% { transform: scale(1); }
  10% { transform: scale(1.1) rotate(-3deg); background: white; color: black; }
  20% { transform: scale(1.1) rotate(3deg); box-shadow: 0 0 30px rgba(255,255,255,0.8); }
  100% { transform: scale(1) rotate(0deg); background: var(--primary); color: white; box-shadow: 0 4px 15px rgba(196, 168, 130, 0.3); }
}

.btn-download.shot-unlocked {
  animation: shootUnlock 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.btn-download:not(.locked):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 168, 130, 0.4);
}

/* ===== Finished State ===== */
.finished-message {
  text-align: center;
  margin-top: 16px;
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.finished-message.visible {
  opacity: 1;
}

.finished-message h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.finished-message p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== Keyframe Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

@keyframes glowPulse {
  0%, 100% {
    filter: brightness(1) drop-shadow(0 0 0 transparent);
  }
  50% {
    filter: brightness(1.4) drop-shadow(0 0 20px rgba(255,255,255,0.4));
  }
}

@keyframes floatCrane {
  0% {
    opacity: 0;
    transform: translate(-50px, 100px) rotate(-15deg);
  }
  10% {
    opacity: 1;
  }
  50% {
    transform: translate(50vw, -50px) rotate(5deg);
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(110vw, -150px) rotate(25deg);
  }
}

/* ===== Paper Crane Effect ===== */
.paper-crane {
  position: absolute;
  width: 48px;
  height: 48px;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
  animation: floatCrane 8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  :root {
    --turntable-width: 95vw;
  }

  .tonearm {
    right: 14%;
  }

  .label-toggle:has(#videoToggle) {
    display: none !important;
  }

  .lyrics-text {
    font-size: 1rem;
  }

  .controls-bar {
    flex-direction: column;
    gap: 12px;
  }

  .song-slots {
    flex-direction: column;
    align-items: stretch;
  }

  .control-panel {
    display: none;
  }
}

@media (max-width: 768px) {
  #videoToggleContainer {
    display: none !important;
  }
}

/* ===== VYNL Branding & Custom Controls ===== */

/* Premium Brand Badge on Plinth */
.deck-brand-badge {
  position: absolute;
  top: 5%;
  left: 5%;
  z-index: 5;
  background: linear-gradient(135deg, #2c2c35 0%, #15151c 100%);
  border: 1.5px solid #4a4a5a;
  border-radius: 4px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 2px 4px rgba(0,0,0,0.3);
  text-decoration: none;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.deck-brand-badge:hover {
  transform: scale(1.05);
  border-color: var(--accent);
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.15),
    0 0 10px rgba(196, 168, 130, 0.4),
    0 4px 8px rgba(0,0,0,0.4);
}

.deck-brand-logo {
  width: 20px;
  height: 20px;
  stroke: var(--accent);
  stroke-width: 9.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  filter: drop-shadow(0 0 2px rgba(196, 168, 130, 0.5));
}

.deck-brand-name {
  font-family: 'Outfit', sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  color: #d5d5df;
  letter-spacing: 1.5px;
  text-shadow: 0 1px 1px rgba(0,0,0,0.5);
  text-transform: uppercase;
}

/* Disabled Toggle State */
.toggle-switch.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* Powered-By Footer Badge */
.footer-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 24px auto 0;
  opacity: 0.8;
  transition: opacity var(--transition-normal);
}

.footer-badge:hover {
  opacity: 1;
}

.powered-by-text {
  font-family: 'Outfit', sans-serif;
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.footer-brand-logo-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  background: rgba(44, 44, 53, 0.4);
  border: 1px solid rgba(74, 74, 90, 0.5);
  border-radius: 4px;
  padding: 4px 8px;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.footer-brand-logo-wrapper:hover {
  border-color: var(--accent);
  background: rgba(44, 44, 53, 0.7);
}

.footer-brand-logo {
  width: 14px;
  height: 14px;
  stroke: var(--accent);
  stroke-width: 9.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.footer-brand-name {
  font-family: 'Outfit', sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--text-secondary);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Draggable Tonearm Styling */
.tonearm {
  cursor: grab;
}

.tonearm:active {
  cursor: grabbing;
}