/*
 * main stylesheet — most of the look lives in the variables below.
 */
:root {
  --bg: #0a0a0a;
  --panel: rgba(17, 17, 17, 0.4);
  --panel-solid: #0f0f0f;
  --border: #333;
  --text: #b0b0b0;
  --text-dim: #888;
  --text-bright: #e0e0e0;
  --accent: #aaa;
  --radius: 10px;
  --font: monospace;
  --bg-video-opacity: 0.4;
}

* {
  box-sizing: border-box;
}

html {
  overflow-y: scroll;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  letter-spacing: 0.5px;
  overflow-x: hidden;
}

/* ── background video ─────────────────────────────────────────────── */
.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: var(--bg-video-opacity);
  pointer-events: none;
  z-index: 0;
}

/* ── card layout ──────────────────────────────────────────────────── */
#content-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 14px 120px;
}

#card {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

#header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

#header h1 {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  color: #ccc;
}

#pfp {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border: 1px solid #444;
  border-radius: var(--radius);
  background: #151515;
}

.infobox {
  padding: 10px;
  background: rgba(15, 15, 15, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12px;
  line-height: 1.5;
  color: #aaa;
}

.infobox h3 {
  margin: 6px 0;
  font-size: 12px;
  font-weight: 400;
  color: #ccc;
}

.infobox p {
  margin: 4px 0;
  color: #999;
}

a {
  display: inline-block;
  margin: 3px 3px 3px 0;
  padding: 6px 10px;
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--accent);
  font-size: 12px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

a:hover {
  background: #151515;
  color: #ddd;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.badges img {
  height: 31px;
  image-rendering: pixelated;
}

/* ── music player ─────────────────────────────────────────────────── */
#musicPlayer {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  width: 230px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  background: rgba(17, 17, 17, 0.75);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#musicPlayer.music-hidden {
  transform: translateY(170%);
  opacity: 0;
  pointer-events: none;
}

#cover {
  width: 60px;
  height: 60px;
  align-self: center;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #151515;
}

#songInfo {
  text-align: center;
  overflow: hidden;
}

#songInfo #title {
  color: #eee;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#songInfo #artist {
  color: var(--text-dim);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#musicControls {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.controls-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ctl-label,
#progressTime,
#volumePercent {
  flex-shrink: 0;
  font-size: 10px;
  color: #666;
}

#musicControls button {
  padding: 5px 8px;
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--accent);
  font-family: var(--font);
  font-size: 11px;
  cursor: pointer;
}

#musicControls button:hover {
  background: #151515;
  color: #ddd;
}

#musicControls input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 1;
  min-width: 0;
  height: 4px;
  border-radius: 2px;
  background: #333;
  cursor: pointer;
}

/* --progress / --volume are set from music.js so the filled part follows the thumb */
#progress {
  background: linear-gradient(to right, #888 0 var(--progress, 0%), #333 var(--progress, 0%) 100%);
}

#volume {
  background: linear-gradient(to right, #888 0 var(--volume, 60%), #333 var(--volume, 60%) 100%);
}

#musicControls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #aaa;
  border: 1px solid #555;
}

#musicControls input[type="range"]::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #aaa;
  border: 1px solid #555;
}

#music-toggle {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 22px;
  height: 18px;
  padding: 0;
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: #999;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

#music-show {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1001;
  width: 42px;
  height: 42px;
  padding: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(17, 17, 17, 0.85);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: #ccc;
  font-size: 16px;
  cursor: pointer;
}

#music-show.visible {
  display: flex;
}

/* ── click-to-enter overlay ───────────────────────────────────────── */
#overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  text-align: center;
  background: var(--bg);
  color: var(--accent);
  font-size: 18px;
  cursor: pointer;
  transition: opacity 0.6s ease; /* keep in sync with FADE_MS in enter.js */
}

#clickEnter {
  letter-spacing: 2px;
  color: #777;
}

#enterText {
  font-size: 1.4rem;
  color: var(--text-bright);
}

.enter-word {
  display: inline-block;
  margin: 0 3px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
