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

:root {
  --bg: #0c0c0e;
  --card: #131316;
  --card-2: #18181c;
  --border: rgba(255, 255, 255, 0.06);
  --border-2: rgba(255, 255, 255, 0.04);
  --text: #ededed;
  --text-2: #b4b4b8;
  --dim: #6a6a70;
  --accent: #ffffff;
  --accent-soft: #d4d4d8;
  --online: #57c97a;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(255, 255, 255, 0.025), transparent 60%);
  pointer-events: none;
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  cursor: pointer;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.intro.fade-out { opacity: 0; visibility: hidden; }

.intro-inner { text-align: center; }

.intro-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 6px;
  animation: pulse 2.2s ease-in-out infinite;
}

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

.main {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.5s ease;
}

.main.hidden { opacity: 0; pointer-events: none; }
.main.visible { opacity: 1; }

.card {
  position: relative;
  width: 340px;
  max-width: 100%;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0 22px 18px;
  text-align: center;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.5),
    0 1px 0 rgba(255, 255, 255, 0.04) inset;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

.main.visible .card {
  transform: translateY(0);
  opacity: 1;
}

.card-head {
  height: 56px;
  margin: 0 -22px 0;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, #1d2030, #161820);
  border-bottom: 1px solid var(--border-2);
}

.avatar-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  margin: -42px auto 14px;
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #1a1a1f;
  border: 3px solid var(--card);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px var(--border), 0 8px 20px rgba(0, 0, 0, 0.5);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.status-dot {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--online);
  border: 3px solid var(--card);
  box-shadow: 0 0 8px rgba(87, 201, 122, 0.5);
}

.status-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--online);
  opacity: 0.4;
  animation: ping 2s ease-out infinite;
}

@keyframes ping {
  0% { transform: scale(0.9); opacity: 0.5; }
  100% { transform: scale(1.8); opacity: 0; }
}

.identity { margin-bottom: 10px; }

.name {
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.3px;
  margin-bottom: 2px;
}

.handle {
  font-size: 12.5px;
  color: var(--dim);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}

.social {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.2s ease;
}

.social svg { width: 18px; height: 18px; }

.social:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--accent);
  transform: translateY(-1px);
}

.social::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  white-space: nowrap;
  font-size: 10.5px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text);
  background: #0a0a0c;
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 5;
}

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

.now-playing {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-2);
  border-radius: 10px;
}

.np-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  flex-shrink: 0;
}

.np-bars span {
  width: 2.5px;
  background: var(--accent-soft);
  border-radius: 1px;
  transform-origin: bottom;
  animation: bars 1s ease-in-out infinite;
  height: 100%;
}

.np-bars span:nth-child(1) { animation-delay: 0s; }
.np-bars span:nth-child(2) { animation-delay: 0.2s; }
.np-bars span:nth-child(3) { animation-delay: 0.4s; }
.np-bars span:nth-child(4) { animation-delay: 0.15s; }

.np-bars.paused span {
  animation-play-state: paused;
  transform: scaleY(0.3);
}

@keyframes bars {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

.np-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.np-label {
  font-size: 9.5px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--dim);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.np-title {
  font-size: 12px;
  color: var(--text-2);
  width: 100%;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-mute {
  background: transparent;
  border: none;
  color: var(--dim);
  cursor: pointer;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  flex-shrink: 0;
}

.np-mute:hover { color: var(--accent); }
.np-mute svg { width: 16px; height: 16px; }
.np-mute svg.hidden { display: none; }

.embed {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 12px 12px 12px 16px;
  background: #0f0f12;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  overflow: hidden;
}

.embed-accent {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: #d49a47;
}

.embed-logo {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #1a1a1f;
}

.embed-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
}

.embed-eyebrow {
  font-size: 9.5px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.embed-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.embed-desc {
  font-size: 11px;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.embed-btn {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 7px;
  background: #ffffff;
  color: #0c0c0e;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.2px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.embed-btn:hover {
  background: #e6c075;
  transform: translateY(-1px);
}

.views {
  position: fixed;
  bottom: 22px;
  right: 22px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  z-index: 50;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.views.visible { opacity: 1; }
.views.hidden { display: flex; }

.views svg {
  width: 16px;
  height: 16px;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
}

.views span {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2px;
}

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  font-size: 12px;
  color: var(--text);
  background: #1a1a1f;
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

::-webkit-scrollbar { width: 0; }

@media (max-width: 380px) {
  .card { padding: 0 18px 16px; }
  .card-head { margin: 0 -18px; }
}

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