html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Orbitron', 'Segoe UI', 'Arial Black', Arial, sans-serif;
  background: #101018;
  color: #e0e0e0;
  min-height: 100vh;
  min-width: 100vw;
  overflow: hidden;
}

#visualizer-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
}

#waveform {
  position: absolute;
  top: 0; left: 0;
  width: 100vw !important;
  height: 100vh !important;
  display: block;
  background: #101018;
  z-index: 0;
  pointer-events: none;
}

#sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 320px;
  height: calc(100vh - 100px);
  background: rgba(16,16,24,0.85);
  box-shadow: 4px 0 24px #000a, 0 0 8px #2228;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 32px 16px 0 16px;
  backdrop-filter: blur(12px) saturate(120%);
  border-right: 1.5px solid #23233a;
  box-sizing: border-box;
  justify-content: flex-start;
  overflow-y: visible;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  position: relative;
  transition: transform 0.35s cubic-bezier(.77,.2,.05,1.0);
}
#sidebar.collapsed {
  transform: translateX(-324px);
}
#sidebar.collapsed #sidebar-toggle-btn {
  right: -56px;
}
#sidebar::-webkit-scrollbar {
  display: none;
}

#sidebar h1 {
  margin-top: 0;
  font-size: 2.2rem;
  color: #e0e0e0;
  text-shadow: 0 0 2px #b266ff, 0 0 8px #a259f7;
  letter-spacing: 2px;
  font-weight: 900;
}

#sidebar h2 {
  font-size: 1.2rem;
  color: #b0b0c0;
  text-shadow: 0 0 2px #b266ff, 0 0 8px #a259f7;
  font-weight: 700;
  letter-spacing: 1px;
}

#track-list {
  flex: 1 1 auto;
  overflow-y: auto;
  width: 100%;
  gap: 6px;
  margin-top: 0px;
  margin-bottom: 0;
  box-sizing: border-box;
  padding-left: 8px;
  padding-right: 8px;
  padding-top: 12px;
  padding-bottom: 48px;
  min-height: 80px;
  max-height: none;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  display: flex;
  flex-direction: column;
}
#track-list::-webkit-scrollbar {
  display: none;
}

#track-list button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  font-size: 1.1rem;
  border: none;
  border-radius: 8px;
  background: #b266ff;
  color: #e0e0e0;
  box-shadow: 0 0 4px #a259f7;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, border 0.2s;
  font-family: inherit;
  letter-spacing: 1px;
  outline: none;
  border: 1.5px solid #a259f7;
  backdrop-filter: blur(2px);
  box-sizing: border-box;
  max-width: 100%;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#track-list button:hover, #track-list button:focus {
  background: #b266ff;
  color: #00ffe7;
  box-shadow: 0 0 12px #00ffe7, 0 0 4px #00ffe7;
  border: 1.5px solid #00ffe7;
}

#progress-bar-container {
  width: 100%;
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 4;
  background: rgba(16,16,24,0.85);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  border: 1.5px solid #23233a;
  border-bottom: none;
  box-sizing: border-box;
}

#progress {
  width: 100%;
  max-width: 100vw;
  height: 8px;
  accent-color: #b266ff;
  background: #23233a;
  border-radius: 0;
  outline: none;
  border: none;
  box-shadow: 0 0 8px #b266ff44, 0 0 2px #23233a88;
  pointer-events: auto;
  margin: 0;
}

#custom-controls-container {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  width: 100vw;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0;
}

#custom-controls {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: rgba(16,16,24,0.85);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 0 12px #000a, 0 0 4px #23233a88;
  padding: 16px 20px 20px 20px;
  width: 100vw;
  backdrop-filter: blur(12px) saturate(120%);
  border: 1.5px solid #23233a;
  box-sizing: border-box;
  position: relative;
  min-height: 80px;
}
#main-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}
#volume-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
}
#custom-controls button {
  background: rgba(30,30,40,0.92);
  color: #e0e0e0;
  border: none;
  border-radius: 8px;
  font-size: 1.3rem;
  padding: 10px 18px;
  cursor: pointer;
  box-shadow: 0 0 4px #23233a80;
  transition: transform 0.15s, box-shadow 0.15s;
}
#play-btn {
  font-size: 2.3rem;
  padding: 20px 36px;
  z-index: 1;
  box-shadow: 0 0 20px #b266ff88, 0 0 10px #00ffe788;
  background: linear-gradient(90deg, #b266ff 0%, #00ffe7 100%);
  color: #181828;
  border: 2.5px solid #b266ff;
  position: relative;
}
#main-controls button:not(#play-btn) {
  font-size: 1.3rem;
  padding: 10px 18px;
  background: rgba(30,30,40,0.92);
  color: #e0e0e0;
  border: none;
  border-radius: 8px;
  box-shadow: 0 0 4px #23233a80;
}
#main-controls span#current-time {
  margin-left: 0;
}

#custom-controls button:hover, #custom-controls button:focus {
  background: #181028;
  color: #b266ff;
  box-shadow: 0 0 8px #b266ff44;
  transform: scale(1.1);
  border: 1.5px solid #b266ff;
}

#custom-controls #progress {
  display: none;
}

#custom-controls span {
  font-family: 'Orbitron', 'Segoe UI', 'Arial Black', Arial, sans-serif;
  font-size: 1.1rem;
  color: #e0e0e0;
  text-shadow: 0 0 2px #b266ff, 0 0 4px #a259f7;
  min-width: 40px;
  text-align: center;
  font-weight: 700;
}

#custom-controls button svg {
  width: 28px;
  height: 28px;
  vertical-align: middle;
  stroke: #e0e0e0;
  filter: drop-shadow(0 0 2px #b266ff) drop-shadow(0 0 1px #a259f7);
  transition: stroke 0.2s, filter 0.2s;
}

#custom-controls button:hover svg, #custom-controls button:focus svg {
  stroke: #b266ff;
  filter: drop-shadow(0 0 8px #b266ff) drop-shadow(0 0 2px #a259f7);
}

#custom-controls #play-btn.glow {
  box-shadow: 0 0 16px #b266ff, 0 0 32px #a259f7, 0 0 24px #e066ff;
  border: 1.5px solid #b266ff;
  color: #b266ff;
  background: #181028;
  animation: play-glow 1.2s linear infinite alternate;
}

@keyframes play-glow {
  0% { box-shadow: 0 0 8px #b266ff, 0 0 4px #a259f7, 0 0 2px #e066ff; }
  50% { box-shadow: 0 0 32px #b266ff, 0 0 24px #a259f7, 0 0 16px #e066ff; }
  100% { box-shadow: 0 0 8px #b266ff, 0 0 4px #a259f7, 0 0 2px #e066ff; }
}

#custom-controls #shuffle-btn.active {
  background: #23233a;
  color: #b266ff;
  border: 1.5px solid #b266ff;
  box-shadow: 0 0 8px #b266ff;
}

#sidebar-scrollbar {
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
  height: 100%;
  background: transparent;
  z-index: 10;
  pointer-events: none;
  display: flex;
  align-items: flex-start;
}
#sidebar-scrollbar-thumb {
  width: 8px;
  border-radius: 6px;
  background: linear-gradient(to bottom, #b266ff 0%, #00ffe7 100%);
  box-shadow: 0 0 8px #b266ff44;
  margin-left: 0;
  position: absolute;
  left: 0;
  pointer-events: auto;
}

#cycle-visualizer-btn {
  position: absolute;
  top: 12px;
  right: 8px;
  width: 36px;
  height: 36px;
  background: rgba(30,30,40,0.92);
  border: 2px solid #b266ff;
  border-radius: 50%;
  box-shadow: 0 0 12px #b266ff, 0 0 4px #a259f7;
  color: #b266ff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, border 0.35s cubic-bezier(.77,.2,.05,1.0), right 0.35s cubic-bezier(.77,.2,.05,1.0);
  padding: 0;
}
#cycle-visualizer-btn:hover {
  background: #b266ff;
  color: #fff;
  border: 2px solid #b266ff;
  box-shadow: 0 0 24px #b266ff, 0 0 8px #a259f7;
}
#cycle-visualizer-btn svg {
  width: 28px;
  height: 28px;
  stroke: #b266ff !important;
  color: #b266ff !important;
  filter: drop-shadow(0 0 1px #b266ff);
  transition: stroke 0.3s, filter 0.3s;
}
#cycle-visualizer-btn:hover svg {
  stroke: #fff !important;
  color: #fff !important;
  filter: drop-shadow(0 0 2px #fff);
}

/* Volume controls group */
#volume-controls button {
  margin: 0;
  padding: 8px 10px;
  background: rgba(30,30,40,0.92);
  border-radius: 8px;
  border: none;
  box-shadow: 0 0 4px #23233a80;
  color: #e0e0e0;
  cursor: pointer;
  display: flex;
  align-items: center;
}
#volume-controls input[type="range"] {
  width: 100px;
  margin: 0;
  vertical-align: middle;
}

@media (max-width: 520px) {
  body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
  }
  #sidebar {
    position: relative;
    width: 100vw;
    height: 100vh;
    min-width: 0;
    max-width: 100vw;
    padding: 6px 2vw 6px 2vw;
    background: rgba(16,16,24,0.96);
    border-radius: 0 0 18px 18px;
    border-right: none;
    border-bottom: 2px solid #00ffe7;
    box-shadow: 0 2px 12px #000a, 0 0 4px #2228;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
    flex: 1 1 auto;
  }
  #sidebar h1, #sidebar h2 {
    font-size: 1rem;
    margin: 0 0 0.2em 0;
    white-space: nowrap;
  }
  #track-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 2vw;
    width: 100%;
    align-items: stretch;
    padding-bottom: 100px;
  }
  #track-list button {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    font-size: 0.95rem;
    padding: 10px 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    min-height: 38px;
  }
  #visualizer-bg {
    display: none !important;
  }
  #custom-controls-container {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    max-width: 100vw;
    z-index: 20;
    margin-top: 0;
  }
  #custom-controls {
    width: 100vw;
    border-radius: 8px 8px 0 0;
    padding: 10px 4px 14px 4px;
    gap: 8px;
  }
  #progress-bar-container {
    width: 100vw;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  #volume-controls {
    gap: 4px;
    margin-left: 4px;
  }
  #volume-controls input[type="range"] {
    width: 60px;
  }
}

@media (max-width: 350px) {
  #sidebar,
  #visualizer-bg,
  #track-list,
  #sidebar-scrollbar {
    display: none !important;
  }
  body {
    background: #101018;
    overflow: hidden;
  }
  #custom-controls-container {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    max-width: 100vw;
    z-index: 20;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    background: none;
  }
  #custom-controls {
    width: 100vw;
    border-radius: 0;
    padding: 10px 0 14px 0;
    gap: 8px;
    background: rgba(16,16,24,0.95);
    box-shadow: 0 -2px 12px #000a, 0 0 4px #2228;
  }
  #progress-bar-container {
    width: 100vw;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}

@media (max-width: 700px) {
  #main-controls {
    gap: 8px;
  }
  #time-container {
    left: 12px;
  }
  #play-btn {
    font-size: 1.7rem;
    padding: 14px 20px;
  }
  #volume-controls input[type="range"] {
    width: 60px;
  }
  #volume-controls {
    right: 12px;
  }
}

#time-container {
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
}
#time-container #current-time {
  font-size: 1.1rem;
  color: #b0b0c0;
}

#sidebar-toggle-btn {
  position: absolute;
  top: 12px;
  right: 8px;
  background: rgba(30,30,40,0.92);
  border: 2px solid #b266ff;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px #b266ff, 0 0 4px #a259f7;
  color: #b266ff;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, border 0.35s cubic-bezier(.77,.2,.05,1.0), right 0.35s cubic-bezier(.77,.2,.05,1.0);
}
#sidebar.collapsed #sidebar-toggle-btn {
  right: -56px;
  background: rgba(16,16,24,0.92);
  border: 2px solid #b266ff;
  box-shadow: 0 0 16px #b266ff, 0 0 8px #a259f7;
  color: #b266ff;
}
#sidebar-toggle-btn:hover {
  background: #b266ff;
  color: #fff;
  border: 2px solid #b266ff;
  box-shadow: 0 0 24px #b266ff, 0 0 8px #a259f7;
}
#sidebar-chevron {
  transition: transform 0.3s, stroke 0.3s, filter 0.3s;
  stroke: #b266ff;
  filter: drop-shadow(0 0 2px #b266ff) drop-shadow(0 0 1px #a259f7);
}
#sidebar.collapsed #sidebar-chevron {
  stroke: #00ffe7;
  filter: drop-shadow(0 0 8px #00ffe7) drop-shadow(0 0 2px #a259f7);
}
@media (max-width: 900px) {
  #sidebar-toggle-btn {
    display: none;
  }
  #sidebar {
    transform: none !important;
  }
}

#seizure-warning {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  z-index: 10000;
  background: #ff0055;
  color: #fff;
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
  padding: 18px 8px 14px 8px;
  box-shadow: 0 2px 16px #000a;
  letter-spacing: 1px;
  opacity: 1;
  transition: opacity 1.2s ease;
}
#seizure-warning.fade-out {
  opacity: 0;
}

#hide-seizure-warning-btn {
  background: #fff;
  color: #ff0055;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: bold;
  padding: 6px 16px;
  margin-left: 24px;
  cursor: pointer;
  float: right;
  margin-top: -4px;
  margin-right: 16px;
  box-shadow: 0 1px 4px #0002;
  transition: background 0.2s, color 0.2s;
}
#hide-seizure-warning-btn:hover, #hide-seizure-warning-btn:focus {
  background: #ff3366;
  color: #fff;
  outline: none;
}

/* Hide UI for inactivity */
.ui-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.5s cubic-bezier(.77,.2,.05,1.0);
} 