:root {
  --bg: #0a0a0f;
  --bg-2: #14141d;
  --fg: #e8e8f0;
  --muted: #8a8aa0;
  --accent: #7c5cff;
  --card: #1a1a25;
  --border: #2a2a3a;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}
body.home {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.home .grid { flex: 1; align-content: center; }

a { color: inherit; text-decoration: none; }

/* HOME */
/* Background simples e leve */
.home-bg {
  position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(180deg, #06060d 0%, #0c0c1a 100%);
  contain: strict;
}
/* particulas CSS-only (zero JS, GPU compositing puro) */
.home-bg .p {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #5865f2;
  box-shadow: 0 0 8px #5865f2;
  will-change: transform;
  animation: float-up linear infinite;
  opacity: .5;
}
.home-bg .p.c1 { background: #7c5cff; box-shadow: 0 0 8px #7c5cff; }
.home-bg .p.c2 { background: #ff5cb1; box-shadow: 0 0 8px #ff5cb1; }
.home-bg .p.c3 { background: #5cf3ff; box-shadow: 0 0 8px #5cf3ff; }
@keyframes float-up {
  from { transform: translate3d(0, 110vh, 0); opacity: 0; }
  10%  { opacity: .6; }
  90%  { opacity: .6; }
  to   { transform: translate3d(0, -10vh, 0); opacity: 0; }
}

.hero {
  text-align: center;
  padding: 56px 16px 24px;
  position: relative;
}
.hero-discord {
  width: 72px; height: 72px;
  margin: 0 auto 14px;
  color: #5865f2;
  filter: drop-shadow(0 0 24px rgba(88,101,242,.6));
  animation: hero-bob 3s ease-in-out infinite;
}
.hero-discord svg { width: 100%; height: 100%; }
@keyframes hero-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.hero h1 {
  font-size: clamp(48px, 7vw, 88px);
  margin: 0;
  background: linear-gradient(135deg, #fff 0%, #c5c8ff 35%, #5865f2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.03em;
  font-weight: 900;
  text-shadow: 0 0 60px rgba(88,101,242,.3);
}
.hero .tag {
  color: #b5bac1; margin-top: 10px; font-size: 15px;
  font-weight: 500;
}
.hero-stats {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 14px; font-size: 12px; color: var(--muted);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  padding: 6px 14px; border-radius: 99px;
}
.hero-stats .stat-sep { opacity: .4; }
.hero-stats .live { display: inline-flex; align-items: center; gap: 6px; color: #b1ffae; }
.hero-stats .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: #2fff70;
  box-shadow: 0 0 8px #2fff70;
  animation: live-pulse 1.4s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: .4; transform: scale(.8); }
  50%      { opacity: 1; transform: scale(1.2); }
}

.foot {
  display: flex; justify-content: center; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.foot-mark { color: #b5bac1; font-weight: 600; }
.foot-sep { opacity: .4; }
.foot-credits { color: var(--muted); }

@keyframes burst-pop {
  0%   { transform: translate(-50%,-50%) scale(.3); opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(8); opacity: 0; }
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 340px));
  gap: 24px;
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
  justify-content: center;
}

/* Card da home = mesmo estilo Discord popup */
.card {
  background: #000;
  color: #f2f3f5;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  font-family: "gg sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
  display: block;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(124,92,255,.3);
}
.card { will-change: transform; contain: layout paint; }
.card .banner {
  height: 60px;
  background-size: cover; background-position: center;
  background-color: var(--accent);
  border-radius: 8px 8px 0 0;
}
.card .badges-strip {
  position: absolute; top: 70px; right: 12px;
  background: #000;
  border: 1px solid #1a1a1a;
  border-radius: 8px;
  padding: 4px 6px;
  display: flex; gap: 2px; flex-wrap: wrap;
  max-width: 60%;
  z-index: 2;
  justify-content: flex-end;
}
.card .badges-strip:empty { display: none; }
.card .badge-img { width: 22px; height: 22px; cursor: help; }
.card .badge-emoji {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: help;
}
.card .body { padding: 0 16px 16px; }
.card .avatar-wrap {
  width: 80px; height: 80px; border-radius: 50%;
  border: 6px solid #000;
  margin: -40px 0 0; overflow: visible; position: relative;
  background: #000;
}
.card .avatar-wrap img.av { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.card .avatar-decoration {
  position: absolute; inset: -10%;
  width: 120%; height: 120%; pointer-events: none;
}
.card .name-row { margin-top: 8px; }
.card .name { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.2; color: #fff; }
.card .uname { color: #b5bac1; font-size: 13px; margin-top: 2px; }
.card .pronouns { color: #b5bac1; font-size: 11px; margin-top: 2px; }
.card .visit-count {
  display: inline-block;
  margin: 10px 0 0; padding: 3px 10px;
  font-size: 11px; color: #b5bac1;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 99px;
}
.status-dot {
  position: absolute; bottom: 4px; right: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  border: 4px solid #000; box-sizing: border-box;
  z-index: 5;
}
.activity {
  display: flex; align-items: center; gap: 10px;
  background: #0a0a0a; border: 1px solid #1a1a1a; border-radius: 6px;
  padding: 8px; margin-top: 10px; font-size: 12px;
}
.activity img { width: 36px; height: 36px; border-radius: 4px; object-fit: cover; }
.activity strong { display: block; color: #fff; font-size: 13px; }
.activity span { color: #b5bac1; font-size: 11px; }
.activity .ic { font-size: 22px; }
.activity.spotify { border-color: rgba(30,215,96,.4); }

.visit-pill {
  position: fixed; top: 16px; right: 16px;
  font-size: 12px; color: #b5bac1;
  background: rgba(0,0,0,.75);
  padding: 6px 12px; border-radius: 99px;
  z-index: 100;
}
.card .bio {
  margin-top: 10px;
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px; color: #dbdee1;
  white-space: pre-wrap; line-height: 1.4;
  max-height: 80px; overflow: hidden;
}
.badge {
  font-size: 11px; padding: 3px 8px; border-radius: 99px;
  background: rgba(124,92,255,.15); color: #cabaff;
  border: 1px solid rgba(124,92,255,.35);
  display: inline-flex; align-items: center; gap: 4px;
}
.profile-card .badge { font-size: 12px; padding: 5px 10px; }
.profile-card .badge .icon { font-size: 14px; }
.badge .bicon { width: 16px; height: 16px; vertical-align: middle; }
.profile-card .badge .bicon { width: 20px; height: 20px; }

.loading { color: var(--muted); padding: 24px; text-align: center; }
.foot { text-align: center; color: var(--muted); padding: 24px; font-size: 12px; }

/* PROFILE - estilo Discord popup, centralizado vertical e horizontal */
.profile-page { min-height: 100vh; position: relative; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.profile-root { width: 100%; max-width: 340px; margin: 0; padding: 0; position: relative; z-index: 2; }
body[data-theme="winxp"].profile-page { display: block; padding: 0; }

.profile-card {
  background: #000;
  color: #f2f3f5;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  font-family: "gg sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.profile-card .banner {
  height: 60px;
  background-size: cover; background-position: center;
  background-color: var(--accent);
  border-radius: 8px 8px 0 0;
}
.profile-card .badges-strip {
  position: absolute; top: 70px; right: 12px;
  background: #000;
  border: 1px solid #1a1a1a;
  border-radius: 8px;
  padding: 4px 6px;
  display: flex; gap: 2px; flex-wrap: wrap;
  max-width: 60%;
  z-index: 2;
  justify-content: flex-end;
}
.profile-card .badges-strip:empty { display: none; }
.profile-card .badge-img {
  width: 22px; height: 22px;
  display: inline-block;
  cursor: help;
}
.profile-card .badge-emoji {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
  cursor: help;
}
.profile-card .body { padding: 0 16px 16px; }
.profile-card .avatar-wrap {
  width: 92px; height: 92px; border-radius: 50%;
  border: 6px solid #000;
  margin: -46px 0 0; overflow: visible; position: relative;
  background: #000;
}
.profile-card .avatar-wrap img.av { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.profile-card .avatar-decoration {
  position: absolute; inset: -10%;
  width: 120%; height: 120%;
  pointer-events: none;
}
.profile-card .name-row, .card .name-row { margin-top: 10px; position: relative; }

/* nameplate: cobre o CARD INTEIRO */
.profile-card .nameplate, .card .nameplate {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
  display: block;
}
.profile-card .banner, .card .banner { position: relative; z-index: 1; }
.profile-card .body, .card .body { position: relative; z-index: 1; }
.profile-card .badges-strip, .card .badges-strip { z-index: 2; }
.profile-card h1 { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.2; color: #fff; }
.profile-card .uname { color: #b5bac1; font-size: 14px; margin-top: 2px; }
.profile-card .pronouns { color: #b5bac1; font-size: 12px; margin-top: 4px; }

.profile-card .section {
  margin-top: 12px;
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 8px;
  padding: 10px 12px;
}
.profile-card .section h3 {
  margin: 0 0 6px; font-size: 12px; color: #fff; text-transform: uppercase; font-weight: 700; letter-spacing: .02em;
}
.profile-card .bio {
  font-size: 14px; color: #dbdee1; white-space: pre-wrap; line-height: 1.4;
}
.profile-card .meta-row { font-size: 13px; color: #dbdee1; }

.profile-effect { display: none; }

/* Discord-style emoji + links na bio */
.d-emoji { width: 1.4em; height: 1.4em; vertical-align: -0.3em; display: inline-block; }
.bio .d-emoji { width: 22px; height: 22px; vertical-align: middle; }
.d-link { color: #00a8fc; text-decoration: none; word-break: break-all; }
.d-link:hover { text-decoration: underline; }
.profile-card .nitro-bar {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: #dbdee1;
}
.profile-card .nitro-icon { width: 18px; height: 18px; flex-shrink: 0; }

.theme-fx {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  contain: strict;
}

.audio-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.85);
  display: flex; align-items: center; justify-content: center;
  z-index: 9998;
}
.audio-overlay.hidden { display: none; }
.audio-cta {
  background: var(--accent); color: white; border: none;
  padding: 18px 36px; font-size: 18px; border-radius: 99px;
  cursor: pointer; font-weight: 600;
  box-shadow: 0 10px 40px rgba(124,92,255,.5);
}
.audio-cta:hover { transform: scale(1.05); }

.back-link {
  position: fixed; top: 16px; left: 16px;
  color: var(--muted); font-size: 13px; z-index: 100;
  background: rgba(0,0,0,.65); padding: 6px 12px; border-radius: 99px;
}
.back-link:hover { color: var(--fg); }

@media (max-width: 720px) {
  /* home: 1 perfil por linha, ocupa quase toda a largura */
  .grid {
    grid-template-columns: 1fr;
    max-width: 380px;
    gap: 16px;
    padding: 16px;
  }
  body.home .grid { align-content: start; }

  /* hero menor */
  .hero { padding: 32px 16px 16px; }
  .hero h1 { font-size: clamp(36px, 10vw, 56px); }
  .hero-discord { width: 56px; height: 56px; }

  /* card: ajustes de leitura */
  .card .badges-strip { top: 64px; right: 8px; padding: 3px 5px; gap: 1px; }
  .card .badge-img, .card .badge-emoji { width: 18px; height: 18px; }
  .card .name { font-size: 17px; }
  .card .uname { font-size: 12px; }
  .card .bio { font-size: 13px; max-height: 100px; }

  /* profile page: card ocupa quase tudo, mas mantem legivel */
  .profile-root { max-width: calc(100vw - 24px); }
  .profile-card .banner { height: 70px; }
  .profile-card .badges-strip { top: 80px; right: 8px; }

  /* visit pill nao colide com back-link */
  .visit-pill { top: 12px; right: 12px; font-size: 11px; padding: 4px 10px; }
  .back-link { top: 12px; left: 12px; font-size: 12px; padding: 4px 10px; }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 32px; }
  .card .name { font-size: 16px; }
}
