 
:root {
  --theme-color: #5865f2;
  --theme-text: #ffffff;
  --bg-image: url("../background/thurs.jpeg");
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: Arial, sans-serif;
  color: white;
}

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* BACKGROUND */

body::before {
  content: "";
  position: fixed;
  inset: 0;

  background:
    linear-gradient(rgba(0,0,0,0.40), rgba(0, 0, 0, 0.40)),
    var(--bg-image) center/cover no-repeat;

  filter: blur(3px) brightness(0.45);
  transform: scale(1.05);

  z-index: -1;
}

/* TOPBAR */

.topbar {
  height: 70px;

  display: flex;
  flex-direction: column;
  justify-content: center;

  padding: 10px 16px;

  background: rgba(18,18,18,0.9);

  border-bottom: 1px solid #2a2a2a;
}

#title {
  font-weight: bold;
  color: var(--theme-color);
}

#meta {
  font-size: 12px;
  opacity: 0.85;
}

/* CENTER */

.center {
  flex: 1;
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* LYRICS */

#lyrics {
  position: absolute;
  top: 40px;

  width: 100%;

  text-align: center;

  font-size: 24px;
  font-weight: bold;

  text-shadow: 0 0 12px black;

  pointer-events: none;

  padding: 0 20px;
  box-sizing: border-box;
}

/* CANVAS */

canvas {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;

  z-index: 3;
}

/* CONTROLS */

.controls {
  position: absolute;
  bottom: 30px;

  display: flex;
  gap: 12px;
}

button,
select {
  background: var(--theme-color);
  color: var(--theme-text);

  border: none;

  padding: 10px 14px;

  border-radius: 10px;

  cursor: pointer;
}

/* PROGRESS */

.progress-container {
  position: absolute;
  bottom: 90px;

  width: 80%;
  height: 8px;

  background: rgba(255,255,255,0.15);

  border-radius: 20px;

  overflow: hidden;

  cursor: pointer;
}

.progress-bar {
  height: 100%;
  width: 0%;

  background: var(--theme-color);

  border-radius: 20px;
}

/* MENU */

.menu-wrap {
  position: absolute;
  right: 0;
  top: 18px;

  display: flex;
  align-items: flex-start;

  transition: transform 0.25s ease;
}

.menu-wrap.closed {
  transform: translateX(240px);
}

.song-menu {
  width: 240px;
  max-height: 70vh;

  background: rgba(15,15,15,0.88);

  border: 1px solid #2a2a2a;
  border-right: none;

  border-radius: 14px 0 0 14px;

  overflow: hidden;
}

.song-tab {
  width: 34px;
  height: 90px;

  background: var(--theme-color);

  border-radius: 10px 0 0 10px;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;

  user-select: none;

  font-size: 18px;
  font-weight: bold;

  margin-left: -34px;
}

.song-header {
  padding: 10px;

  border-bottom: 1px solid #2a2a2a;
}

#songList {
  overflow-y: auto;
  max-height: calc(70vh - 120px);
  padding-bottom: 20px;
  box-sizing: border-box;
}

.song {
  padding: 10px;

  cursor: pointer;

  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.song:hover {
  background: rgba(255,255,255,0.06);
}

.song.active {
  background: var(--theme-color);
  color: var(--theme-text);
}

.song-title {
  font-weight: bold;
  font-size: 14px;
}

.song-meta {
  font-size: 11px;
  opacity: 0.8;
}

.viz-wrap {
  width: 90%;
  height: 60%;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #2a2a2a;
  background: rgba(20,20,20,0.35);
}

.viz-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 2;
  pointer-events: none;
}

.menu-wrap {
  z-index: 9999;
}

.song-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.song-icons {
  font-size: 12px;
  opacity: 0.85;
  display: flex;
  gap: 6px;
}

#searchBox {
  width: calc(100% - 20px);
  padding: 8px;
  margin-bottom: 8px;
  border-radius: 8px;
  border: none;
  outline: none;
}

#favToggle {
  width: 100%;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.1);
}

#bgVideo {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: contain;   /* IMPORTANT CHANGE */

  background: black;     /* fills empty space */

  z-index: 1;

  opacity: 0;
  transition: opacity 0.5s ease;
}

#vocaloidLayer {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 10px;
  z-index: 10;
  pointer-events: none;
}

.vocaloid-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid white;
  object-fit: cover;
  background: rgba(0,0,0,0.3);
}