*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --accent: #ffffff;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.55);
  --card-bg: rgba(0, 0, 0, 0.55);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-blur: 18px;
  --font: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 18px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: #000;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

/* ── Gate ── */
.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: #000;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: opacity var(--transition), visibility var(--transition);
}

.gate.leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-text {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--text);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

/* ── App shell ── */
.app {
  position: fixed;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.app.visible {
  opacity: 1;
}

.bg {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(var(--bg-blur, 8px)) brightness(var(--bg-brightness, 0.45));
  transform: scale(1.05);
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.55) 100%);
}

/* ── Volume ── */
.volume-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 20;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: background 0.2s, transform 0.2s;
}

.volume-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(1.05);
}

.volume-btn svg {
  width: 18px;
  height: 18px;
}

.volume-slider {
  position: fixed;
  top: 20px;
  left: 64px;
  z-index: 20;
  width: 100px;
  height: 4px;
  accent-color: var(--accent);
  cursor: pointer;
  background: transparent;
}

/* ── Card ── */
.card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100vw - 32px));
  padding: 28px 24px 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  backdrop-filter: blur(var(--card-blur));
  -webkit-backdrop-filter: blur(var(--card-blur));
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: card-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.card-header {
  text-align: center;
  margin-bottom: 20px;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
}

.display-name {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.views {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.views svg {
  width: 14px;
  height: 14px;
}

.tagline {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 400;
}

.globe-icon {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  opacity: 0.7;
}

.globe-icon svg {
  width: 22px;
  height: 22px;
}

/* ── Profile row ── */
.profile-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.profile-meta {
  min-width: 0;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.discord-username {
  font-size: 0.88rem;
  font-weight: 600;
}

.badges {
  display: flex;
  gap: 4px;
}

.badge {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.55rem;
  font-weight: 700;
}

.badge.verified {
  background: #5865f2;
  color: #fff;
}

.badge.nitro {
  background: #ff73fa;
  color: #fff;
}

.status {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ── Links ── */
.links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.link-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.link-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.85;
}

.link-icon svg {
  width: 100%;
  height: 100%;
}

/* ── Player ── */
.player {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.player-cover {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.player-info {
  flex: 1;
  min-width: 0;
}

.player-title {
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.player-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 28px;
}

.player-progress {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  cursor: pointer;
  overflow: hidden;
}

.player-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.1s linear;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.player-controls button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  opacity: 0.75;
  border-radius: 6px;
  transition: opacity 0.2s, background 0.2s;
}

.player-controls button:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
}

.player-controls svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 480px) {
  .card {
    padding: 24px 18px 18px;
  }

  .display-name {
    font-size: 1.4rem;
  }

  .volume-slider {
    width: 72px;
  }
}
