*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 40px 20px;
  font-family: 'Orbitron', sans-serif;
  color: #FFD700;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 100vh;
  background: url('images/tie_dye_bg.png') center center / cover no-repeat fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(10, 8, 16, 0.45), rgba(10, 8, 16, 0.45)),
    radial-gradient(circle at center, rgba(255,255,255,0.03) 0%, transparent 60%),
    repeating-linear-gradient(
      45deg,
      rgba(255,255,255,0.015) 0px,
      rgba(255,255,255,0.015) 2px,
      transparent 2px,
      transparent 6px
    );
  mix-blend-mode: screen;
  opacity: 0.5;
}

.player-container {
  position: relative;
  z-index: 1;
  background: rgba(15, 15, 18, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 4px solid #C0C0C0;
  border-radius: 20px;
  padding: 0 30px 30px;
  max-width: 800px;
  width: 90%;
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.45);
}

.site-logo {
  display: block;
  width: 226px;
  height: 250px;
  margin: 0 auto 10px;
}

.cassette-player {
  background: url('images/brushed_metal_texture.png');
  background-size: cover;
  border-radius: 15px;
  padding: 20px;
  box-shadow: inset 0 0 10px #FFD700, 0 0 10px #FFD700;
  margin-top: 5px;
}

.cassette-window {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 100px;
  background: linear-gradient(to bottom, #000, #222);
  border: 2px inset #C0C0C0;
  padding: 10px 30px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.tape {
  width: 160px;
  height: 160px;
  filter: drop-shadow(0 0 8px #FFD700);
  transition: transform 0.1s linear;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.controls button {
  flex: 1 0 50px;
  min-width: 48px;
  height: 48px;
  background: linear-gradient(to bottom, #5E4B8B, #2A1F3D);
  border: 2px solid #C0C0C0;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 6px #5E4B8B;
  transition: background 0.3s, box-shadow 0.3s;
}

.controls button:hover {
  background: #FFD700;
  box-shadow: 0 0 10px #FFD700;
}

.controls button .material-icons {
  color: #FFD700;
  font-size: 24px;
}

.controls button:hover .material-icons {
  color: #111;
}

.controls input[type="range"]#seekBar {
  width: 100%;
  margin-top: 10px;
  appearance: none;
  height: 8px;
  background: #5E4B8B;
  border-radius: 5px;
  outline: none;
  box-shadow: 0 0 5px #FFD700;
  cursor: pointer;
}

.controls input[type="range"]#seekBar::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  background: #FFD700;
  border-radius: 50%;
  box-shadow: 0 0 3px #FFD700;
}

.controls input[type="range"]#seekBar::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: #FFD700;
  border-radius: 50%;
  box-shadow: 0 0 3px #FFD700;
}

.tracklist {
  max-height: 280px;
  overflow-y: auto;
  margin-top: 20px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px inset #FFD700;
  border-radius: 10px;
  scrollbar-width: thin;
  text-align: left;
}

.tracklist ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.track-item {
  color: #FFD700;
  border-bottom: 1px solid #FFF;
  transition: background 0.2s;
  font-weight: bold;
  text-shadow: 0 0 6px #FFD700;
  margin-bottom: 6px;
}

.track-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  cursor: pointer;
  border-radius: 6px;
}

.track-title-row:hover {
  background-color: #222;
  color: #FFF;
}

.track-title {
  flex: 1;
}

.track-meta {
  font-size: 0.8em;
  color: #d8c7ff;
  text-shadow: none;
}

.track-notes {
  max-height: 0;
  overflow: hidden;
  padding: 0 10px;
  color: #f5eec8;
  font-size: 0.9em;
  line-height: 1.5;
  text-shadow: none;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease;
}

.track-notes.open {
  max-height: 500px;
  padding: 0 10px 12px;
  opacity: 1;
}

.track-details {
  margin-top: 8px;
  display: grid;
  gap: 4px;
}

.track-item.expanded .track-title-row {
  background: rgba(94, 75, 139, 0.35);
}

#visualizer {
  display: block;
  margin-top: 30px;
  width: 100%;
  height: 80px;
  background: #111;
  border: 2px solid #5E4B8B;
  border-radius: 10px;
  box-shadow: 0 0 8px #5E4B8B inset;
}

.volume-container {
  margin-top: 15px;
  text-align: center;
}

.volume-container label {
  display: inline-block;
  font-size: 1em;
  color: #111;
  background-color: #FFD700;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 0 6px #FFD700;
}

.volume-container input[type="range"] {
  width: 120px;
  max-width: 30%;
  height: 6px;
  appearance: none;
  background: #5E4B8B;
  border-radius: 5px;
  box-shadow: 0 0 4px #FFD700;
  cursor: pointer;
}

.volume-container input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  background: #FFD700;
  border-radius: 50%;
  box-shadow: 0 0 3px #FFD700;
}

.volume-container input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: #FFD700;
  border-radius: 50%;
  box-shadow: 0 0 3px #FFD700;
}

.now-playing .track-title-row {
  position: relative;
  font-weight: bold;
  color: #FFF;
  background-color: #5E4B8B;
  border-radius: 6px;
  box-shadow: 0 0 8px #FFD700;
}

.now-playing .track-title-row::after {
  content: '🎶 Now Playing';
  display: inline-block;
  margin-left: 10px;
  padding: 2px 6px;
  background-color: #FFD700;
  color: #111;
  font-size: 0.75em;
  border-radius: 4px;
  font-style: normal;
  font-weight: 600;
  box-shadow: 0 0 3px #FFD700;
}

.lyrics-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 92vw;
  height: 100vh;
  background: rgba(16, 10, 24, 0.96);
  color: #f8ecb8;
  z-index: 9999;
  box-shadow: -8px 0 20px rgba(0, 0, 0, 0.45);
  padding: 24px 20px 20px;
  transition: right 0.35s ease;
  overflow-y: auto;
  text-align: left;
  border-left: 3px solid #FFD700;
}

.lyrics-panel.open {
  right: 0;
}

.close-lyrics {
  position: absolute;
  top: 12px;
  right: 14px;
  background: #FFD700;
  color: #111;
  border: none;
  border-radius: 6px;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 10px;
}

#lyricsTitle {
  margin-top: 20px;
  margin-bottom: 16px;
  color: #FFD700;
  font-size: 1.2rem;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.35);
}

#lyricsContent {
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: 0.95rem;
  color: #f4e9c0;
}

@media (max-width: 768px) {
  body {
    padding: 20px 12px;
  }

  .player-container {
    width: 100%;
    padding: 20px;
  }

  .site-logo {
    width: 180px;
    height: auto;
    margin: 0 auto 12px;
  }

  .cassette-window {
    flex-direction: row;
    justify-content: space-between;
    gap: 40px;
    padding: 10px 15px;
  }

  .tape {
    width: 80px;
    height: 80px;
  }

  .controls {
    gap: 6px;
    padding: 0 10px;
  }

  .controls button {
    flex: 1 0 18%;
    min-width: 44px;
    max-width: 56px;
    height: 44px;
  }

  .controls input[type="range"] {
    width: 100%;
  }

  #visualizer {
    width: 100%;
    height: auto;
  }

  .lyrics-panel {
    width: 100%;
    max-width: 100%;
    right: -100%;
  }
}