:root {
  --border: rgba(255, 255, 255, 0.14);
  --border-hover: rgba(255, 255, 255, 0.17);
  --text: rgba(255, 255, 255, 0.92);
  --text-dim: rgba(255, 255, 255, 0.789);
  --text-faint: rgba(255, 255, 255, 0.789);
}

* { box-sizing: border-box; }

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

body {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  cursor: default;
  position: relative;
  background: #000;
}

/* ---------- background ---------- */

.bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 0;
  overflow: hidden;
  background-image: url("background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.bg-img {
  display: none;
}

.rain {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.rain-drop {
  position: absolute;
  top: -10%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.55));
  animation: fall linear infinite;
  pointer-events: none;
}

@keyframes fall {
  0%   { transform: translateY(-10vh) rotate(10deg); }
  100% { transform: translateY(120vh) rotate(10deg); }
}

/* ---------- stage / panel (card + player tilt together) ---------- */

.stage {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 900px;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  will-change: transform;
  transform-style: preserve-3d;
}

.card,
.player {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  transition: border-color 0.3s ease, background 0.3s ease;
}

.panel.active .card,
.panel.active .player {
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.045);
}

.card {
  width: 560px;
  padding: 34px 34px;
  display: flex;
  align-items: stretch;
  gap: 28px;
}

.avatar-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 0;
  flex-shrink: 0;
}

.avatar {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: linear-gradient(155deg, #3a3a3a, #131313);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: 0.04em;
  user-select: none;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.info-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 6px 0;
  gap: 8px;
  min-width: 0;
}

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

.name {
  color: var(--text);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.badge-wrap {
  display: inline-flex;
  position: relative;
}

.badge {
  width: 26px;
  height: 26px;
}

.bio {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.5;
}

.socials {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.social-icon {
  width: 30px;
  height: 30px;
  opacity: 0.85;
  filter: drop-shadow(0 0 6px rgb(255, 255, 255));
  transition: opacity 0.2s ease, filter 0.2s ease, transform 0.2s ease;
}

.socials a:hover .social-icon {
  opacity: 1;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.9));
  transform: translateY(-2px);
}

/* ---------- tooltips (appear above the icon) ---------- */

.tooltip {
  position: relative;
}

.tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(10, 20, 18, 0.95);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
  padding: 5px 9px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 5;
}

.tooltip::after {
  content: "";
  position: absolute;
  bottom: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  border: 5px solid transparent;
  border-top-color: rgba(10, 20, 18, 0.95);
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
  z-index: 5;
}

.tooltip:hover::before,
.tooltip:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- audio player ---------- */

.player {
  width: 560px;
  padding: 20px 28px;
}

.track-name {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.time {
  color: var(--text-dim);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  width: 32px;
  flex-shrink: 0;
}

.time.end { text-align: right; }

.bar {
  position: relative;
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  border-radius: 2px;
  background: #fff;
  width: 8%;
}

.bar-fill::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%);
}

.controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 4px;
}

.controls button {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.controls button:hover { opacity: 1; }
.controls svg { width: 18px; height: 18px; }

.footer {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: 0.05em;
  user-select: none;
  z-index: 1;
}

/* ---------- click to enter ---------- */

.enter-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.enter-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.enter-text {
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}

/* ---------- typing name ---------- */

#typedName.typing::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 0.9em;
  margin-left: 2px;
  background: var(--text);
  vertical-align: -0.1em;
  animation: blink 0.8s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .panel { transition: none; animation: none; }
}

/* ---------- mobile ---------- */

@media (max-width: 600px) {
  .stage {
    padding: 0 16px;
  }

  .panel {
    width: 100%;
  }

  .card,
  .player {
    width: 100%;
    max-width: 420px;
  }

  .card {
    padding: 22px 20px;
    gap: 16px;
  }

  .avatar {
    width: 72px;
    height: 72px;
  }

  .avatar-col {
    padding: 6px 0;
  }

  .name {
    font-size: 19px;
  }

  .badge {
    width: 19px;
    height: 19px;
  }

  .bio {
    font-size: 13px;
  }

  .social-icon {
    width: 24px;
    height: 24px;
  }

  .player {
    padding: 16px 18px;
  }

  .enter-text {
    font-size: 12px;
    padding: 0 24px;
    text-align: center;
  }
}