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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: 'Georgia', serif;
}

.bg-video {
  position: fixed;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  z-index: 0;
  object-fit: cover;
  filter: brightness(0.55) saturate(0.85);
  opacity: 0;
  transition: opacity 1.8s ease;
}

.bg-video.active {
  opacity: 1;
}

#overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.25) 0%,
    rgba(0,0,0,0.03) 35%,
    rgba(0,0,0,0.45) 100%
  );
}

#ui {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 56px;
}

#album-title {
  color: rgba(255, 255, 255, 0.35);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin-bottom: 24px;
  text-align: center;
  padding: 0 24px;
  transition: opacity 0.45s ease;
}

#controls {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.ctrl-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  outline: none;
  transition: transform 0.15s ease, opacity 0.2s ease;
  opacity: 0.5;
}

.ctrl-btn:hover {
  opacity: 0.9;
  transform: scale(1.1);
}

.ctrl-btn:active {
  transform: scale(0.93);
}

.ctrl-btn svg {
  fill: rgba(255, 255, 255, 0.85);
}

body.single-track .ctrl-btn {
  visibility: hidden;
  pointer-events: none;
}

#play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(6px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  outline: none;
}

#play-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.06);
}

#play-btn:active {
  transform: scale(0.97);
}

#play-icon, #pause-icon {
  fill: rgba(255, 255, 255, 0.9);
}

#pause-icon {
  display: none;
}

#progress-bar {
  width: 260px;
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

#progress-track {
  pointer-events: auto;
  width: 100%;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

#progress-fill {
  height: 100%;
  width: 0%;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 2px;
  pointer-events: none;
}

#time-display {
  color: rgba(255, 255, 255, 0.35);
  font-size: 10px;
  letter-spacing: 0.15em;
  font-family: 'Courier New', monospace;
}

#tracklist {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  list-style: none;
  text-align: center;
}

#tracklist li {
  color: rgba(255, 255, 255, 0.3);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 13px 20px;
  cursor: pointer;
  transition: color 0.3s ease, letter-spacing 0.3s ease;
}

#tracklist li:hover {
  color: rgba(255, 255, 255, 0.65);
}

#tracklist li.active {
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.3em;
}

#label-login-wrap {
  position: fixed;
  top: 44px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  text-align: center;
  padding: 0 24px;
  width: 100%;
  max-width: 520px;
}

#label-login {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.88);
  font-family: 'Georgia', serif;
  font-size: 12px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  padding: 16px 34px;
  cursor: pointer;
  outline: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

#label-login:hover {
  background: rgba(0, 0, 0, 0.62);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

#label-lock {
  fill: currentColor;
  opacity: 0.8;
  flex: none;
}

#label-note {
  display: none;
  margin: 20px auto 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  letter-spacing: 0.06em;
  line-height: 1.6;
  max-width: 340px;
}

#label-note.visible {
  display: block;
}

@media (max-width: 400px) {
  #label-login-wrap {
    top: 32px;
  }

  #label-login {
    font-size: 10px;
    letter-spacing: 0.24em;
    padding: 13px 22px;
    gap: 9px;
  }

  #label-note {
    font-size: 13px;
    max-width: 280px;
  }
}

#gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#gate.unlocked {
  display: none;
}

#gate-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

#gate-submit {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.28);
  font-family: 'Georgia', serif;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  cursor: pointer;
  outline: none;
}

#gate-submit:hover {
  color: rgba(255, 255, 255, 0.6);
}

#gate-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.75);
  font-family: 'Georgia', serif;
  font-size: 14px;
  letter-spacing: 0.22em;
  text-align: center;
  padding: 12px 8px;
  width: 240px;
  outline: none;
}

#gate-input::placeholder {
  color: rgba(255, 255, 255, 0.22);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 11px;
}

#gate-input.error {
  border-bottom-color: rgba(255, 180, 180, 0.7);
}

@media (max-width: 400px) {
  #tracklist li {
    font-size: 12px;
    letter-spacing: 0.14em;
    padding: 12px 12px;
  }

  #tracklist li.active {
    letter-spacing: 0.2em;
  }

  #album-title {
    font-size: 9px;
    letter-spacing: 0.16em;
    padding: 0 14px;
  }

  #progress-bar {
    width: min(260px, 74vw);
  }
}
