:root {
  color-scheme: dark;
  --background: #000000;
  --text: #ffffff;
  --muted: #b8b8b8;
  --accent: #e5e5e5;
  --line: rgb(255 255 255 / 12%);
  --backdrop-image: url("assets/carro-de-drift.gif");
  --mono: "DM Mono", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  min-width: 280px;
  background: var(--background);
  color: var(--text);
  font-family: "Outfit", sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection { background: #555555; color: #ffffff; }

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

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

.icon-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.scene {
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background-color: #000000;
  background-image: var(--backdrop-image);
  background-size: cover;
  background-position: center;
}

.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, transparent 20%, rgb(0 0 0 / 24%) 100%),
    linear-gradient(180deg, rgb(0 0 0 / 10%), rgb(0 0 0 / 24%));
}

.skip-link {
  position: fixed;
  z-index: 5;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: #050505;
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.music-dock {
  position: fixed;
  z-index: 4;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: min(360px, calc(100% - 32px - env(safe-area-inset-right) - env(safe-area-inset-left)));
  border-radius: 13px;
  box-shadow: 0 8px 30px rgb(0 0 0 / 45%);
}

.music-entry {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(0 0 0 / 84%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.music-entry[hidden] { display: none; }

.music-entry-button {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 24px 32px;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 18px;
  background: rgb(0 0 0 / 96%);
  color: #ffffff;
  font: 500 14px var(--mono);
  cursor: pointer;
  box-shadow: 0 12px 44px rgb(0 0 0 / 35%);
}

.music-entry-button:hover { border-color: #ffffff; background: #111111; }
.music-entry-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.music-entry-button small { color: #aaaaaa; font: 10px var(--mono); }

.page-shell {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 48px 24px 128px;
}

.profile-card {
  width: min(100%, 600px);
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 26px;
  background: rgb(0 0 0 / 96%);
  box-shadow:
    0 28px 100px rgb(0 0 0 / 45%),
    0 0 60px rgb(0 0 0 / 35%),
    inset 0 0 0 1px rgb(255 255 255 / 3%);
  animation: arrive .6s ease both;
}

@supports ((backdrop-filter: blur(22px)) or (-webkit-backdrop-filter: blur(22px))) {
  .profile-card {
    background: rgb(0 0 0 / 92%);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}

.profile-intro {
  position: relative;
  padding: 28px 28px 23px;
  text-align: center;
}

.identity-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
}

.avatar-wrap {
  position: relative;
  width: 108px;
  height: 108px;
  margin: 0;
}

.avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 5px solid #000000;
  border-radius: 50%;
  background: #111111;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 28%), 0 0 28px rgb(0 0 0 / 35%);
}

h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 15px 0 0;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1.3px;
  text-shadow: 0 0 19px rgb(255 255 255 / 28%);
}

.handle {
  margin: 0;
  padding: 9px 14px;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 999px;
  color: #ffffff;
  font: 13px/1.4 var(--mono);
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.bio {
  margin: 0 auto;
  color: #e5e5e5;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
}

.socials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 19px;
  width: min(100%, 360px);
  margin-right: auto;
  margin-left: auto;
}

.socials > .social-link {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 11px;
  background: rgb(0 0 0 / 94%);
  color: #ffffff;
  font: 500 11px var(--mono);
  text-align: left;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.socials .social-link span { overflow-wrap: anywhere; }

.socials .icon {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  color: #ffffff;
  filter: none;
}

.socials > .social-link:hover {
  transform: translateY(-2px);
  border-color: rgb(255 255 255 / 42%);
  background: #111111;
}

/* Keep the readable labels compact on small screens. */
@media (max-width: 380px) {
  .socials { gap: 7px; }
  .socials > .social-link { min-height: 40px; padding: 0 9px; font-size: 10px; }
  .socials .icon { width: 17px; height: 17px; }
}

.profile-content { padding: 0 28px 25px; }

.profile-content > section + section { margin-top: 24px; }

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 11px;
}

.section-heading h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  margin: 0;
  color: #d0d0d0;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .5px;
}

.section-heading h2 .icon { width: 13px; height: 13px; color: #ffffff; }

.section-line { flex: 1; height: 1px; background: var(--line); }

.music-player {
  overflow: hidden;
  padding: 10px 12px 8px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 13px;
  background: rgb(5 5 5 / 96%);
  box-shadow: 0 5px 18px rgb(0 0 0 / 25%);
}

.music-player audio { display: none; }

.audio-toggle {
  display: block;
  width: 100%;
  min-height: 56px;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 12px;
  background: #050505;
  color: #ffffff;
  font: 500 12px var(--mono);
  cursor: pointer;
}

.audio-toggle .icon { width: 16px; height: 16px; margin-right: 8px; vertical-align: middle; color: var(--accent); }
.audio-toggle:hover { background: #111111; border-color: rgb(255 255 255 / 42%); }
.audio-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.links { display: grid; gap: 9px; }

.profile-link {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 69px;
  padding: 11px 15px;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 14px;
  background: #050505;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 3%);
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.link-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid rgb(255 255 255 / 6%);
  border-radius: 11px;
  background: #080808;
  color: #ffffff;
}

.link-icon .icon { width: 23px; height: 23px; }

.link-copy { display: grid; gap: 4px; min-width: 0; }

.link-copy strong {
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.link-copy > span {
  color: #b8b8b8;
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.link-arrow {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: #aaaaaa;
}

.discord-link {
  border-color: rgb(255 255 255 / 14%);
  background: #050505;
}

.discord-link .link-icon { background: #111111; color: #ffffff; }

.profile-link:hover {
  transform: translateY(-2px);
  border-color: rgb(255 255 255 / 42%);
  background: #111111;
  box-shadow: 0 5px 20px rgb(0 0 0 / 13%);
}

.playlist-cover {
  display: block;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  object-fit: cover;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 9px;
}

.discord-actions { display: flex; align-items: center; gap: 10px; }

.discord-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  color: var(--muted);
  font: 9px var(--mono);
}

.discord-open .icon { width: 11px; height: 11px; }
.discord-open:hover { color: var(--text); }

.discord-refresh {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgb(255 255 255 / 3%);
  color: var(--muted);
  cursor: pointer;
}

.discord-refresh .icon { width: 14px; height: 14px; }
.discord-refresh:hover { color: var(--text); border-color: rgb(255 255 255 / 42%); }
.discord-refresh:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.discord-refresh:disabled { opacity: .45; cursor: wait; }

.discord-user-card {
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 15px;
  background: #050505;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 3%);
}

.discord-card-banner {
  height: 64px;
  border-bottom: 1px solid rgb(255 255 255 / 8%);
  background-color: #080808;
  background-image: linear-gradient(120deg, #141414, #050505);
  background-size: cover;
  background-position: center;
}

.discord-card-banner[data-has-banner="true"] { height: auto; aspect-ratio: 5 / 2; }

.discord-card-content { padding: 0 19px 17px; }
.discord-user-heading { position: relative; display: flex; align-items: flex-start; gap: 16px; margin-top: -22px; }
.discord-avatar-wrap { position: relative; flex: 0 0 64px; width: 64px; height: 64px; }

.discord-avatar, .discord-avatar-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 4px solid #050505;
  border-radius: 50%;
  background: #111111;
}

.discord-avatar-placeholder .icon { width: 31px; height: 31px; color: #e8e8e8; }
.discord-avatar-decoration { position: absolute; z-index: 1; top: -8px; left: -8px; width: 80px; height: 80px; object-fit: contain; pointer-events: none; }
.discord-identity { flex: 1; min-width: 0; padding-top: 32px; }
.discord-name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.discord-name-row h3 { min-width: 0; max-width: 100%; margin: 0; color: #ffffff; font-size: 20px; line-height: 1.2; font-weight: 600; letter-spacing: -.3px; overflow-wrap: anywhere; }
.discord-username { margin: 5px 0 0; color: #b8b8b8; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.discord-guild-tag { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; padding: 4px 6px; border: 1px solid rgb(255 255 255 / 16%); border-radius: 6px; background: #111111; color: #eeeeee; font: 9px var(--mono); }
.discord-guild-tag img { display: block; width: 16px; height: 16px; object-fit: contain; }
.discord-status { display: flex; align-items: center; gap: 6px; margin: 9px 0 0; color: #b8b8b8; font-size: 11px; line-height: 1.5; }
.discord-status-dot { position: relative; flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: #90909a; }
.discord-status[data-status="online"] .discord-status-dot { background: #6dd39a; box-shadow: 0 0 9px #6dd39a30; }
.discord-status[data-status="idle"] .discord-status-dot { background: #f0ba65; }
.discord-status[data-status="dnd"] .discord-status-dot { background: #f27883; }
.discord-status[data-status="dnd"] .discord-status-dot::after { content: ""; position: absolute; top: 3px; left: 2px; width: 4px; height: 2px; background: #000000; }
.discord-status[data-status="unknown"] .discord-status-dot { display: none; }
.discord-user-card[data-state="unavailable"] .discord-avatar-decoration { opacity: .65; }
.discord-note { margin: 15px 0 0; color: #b8b8b8; font-size: 10px; line-height: 1.7; }

.profile-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 51px;
  margin: 0 28px;
  border-top: 1px solid var(--line);
  color: #aaaaaa;
  font: 9px/1.7 var(--mono);
  letter-spacing: .2px;
}

@keyframes arrive {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .page-shell { padding: 28px 16px 128px; }
  .profile-card { border-radius: 22px; }
  .profile-intro { padding-right: 20px; padding-left: 20px; }
  .profile-content { padding-right: 20px; padding-left: 20px; }
  .profile-footer { margin-right: 20px; margin-left: 20px; }
}

@media (max-width: 480px) {
}

@media (max-width: 380px) {
  .page-shell { padding: 18px 12px 128px; }
  .profile-card { border-radius: 20px; }
  .profile-intro { padding-right: 15px; padding-left: 15px; }
  .avatar-wrap { width: 96px; height: 96px; }
  h1 { font-size: 34px; }
  .bio { font-size: 13px; }
  .socials { gap: 7px; }
  .socials > .social-link { min-height: 40px; padding: 0 9px; font-size: 10px; }
  .socials .icon { width: 17px; height: 17px; }
  .profile-content { padding-right: 15px; padding-left: 15px; }
  .profile-link { gap: 10px; padding: 11px; }
  .link-icon { width: 36px; height: 36px; }
  .link-copy strong { font-size: 13px; }
  .link-copy > span { font-size: 10px; }
  .profile-footer { margin-right: 15px; margin-left: 15px; font-size: 8px; }
  .discord-card-content { padding-right: 13px; padding-left: 13px; }
  .discord-user-heading { gap: 13px; }
  .discord-name-row h3 { font-size: 18px; }
  .discord-actions { gap: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .profile-card { animation: none; }
  .profile-link, .socials > a { transition: none; }
  .profile-link:hover, .socials > a:hover { transform: none; }
}
