:root {
  --bg: #050606;
  --text: #f4f4f4;
  --muted: #cbcbcb;
  --font-body: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
  --card: rgba(12, 12, 12, 0.38);
  --card-soft: rgba(17, 17, 17, 0.28);
  --line: rgba(255, 255, 255, 0.12);
  --accent-a: #74f7ff;
  --accent-b: #7f6cff;
  --accent-c: #ff69cf;
  --status-online: #58d66e;
  --status-idle: #f2c84b;
  --status-dnd: #f45d5d;
  --status-offline: #7e7e7e;
}

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

body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  line-height: 1.45;
}

.scene-backdrop {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 18%, rgba(120, 73, 39, 0.2), transparent 46%),
    radial-gradient(circle at 78% 20%, rgba(27, 109, 134, 0.18), transparent 52%),
    linear-gradient(140deg, #121413 0%, #050707 60%, #070809 100%);
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: saturate(1.02) contrast(1.01) brightness(0.68);
}

.bg-layer {
  position: absolute;
  border-radius: 50%;
  filter: blur(95px);
  opacity: 0.18;
  pointer-events: none;
}

.blur-a {
  width: 420px;
  height: 420px;
  left: -110px;
  top: -100px;
  background: #d9a560;
}

.blur-b {
  width: 460px;
  height: 460px;
  right: -160px;
  top: 140px;
  background: #5d97aa;
}

.grid-layer,
.scanline-layer {
  display: none;
}

.grain-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 0.55px, transparent 0.55px);
  background-size: 3px 3px;
  opacity: 0.08;
}

.hero-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2.4rem 1rem;
}

.profile-shell {
  width: min(900px, 95vw);
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(158deg, rgba(14, 14, 14, 0.22), rgba(8, 8, 8, 0.3));
  backdrop-filter: blur(12px);
  box-shadow:
    0 20px 52px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 24px rgba(116, 247, 255, 0.12);
  padding: clamp(1rem, 3vw, 1.6rem);
  position: relative;
  transform-style: preserve-3d;
  transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
}

.profile-shell::before,
.profile-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.profile-shell::before {
  border: 1px solid rgba(116, 247, 255, 0.2);
  clip-path: polygon(0 0, 20% 0, 20% 2px, 2px 2px, 2px 20%, 0 20%);
  opacity: 0.45;
}

.profile-shell::after {
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(127, 108, 255, 0.16), transparent 50%);
  opacity: 0.4;
}

.trace-dots {
  position: absolute;
  top: 0.7rem;
  left: 0.9rem;
  display: flex;
  gap: 0.34rem;
  pointer-events: none;
}

.trace-dots span {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 7px rgba(255, 255, 255, 0.5);
  animation: pulseDot 1.8s ease-in-out infinite;
}

.trace-dots span:nth-child(2) { animation-delay: 0.12s; }
.trace-dots span:nth-child(3) { animation-delay: 0.24s; }
.trace-dots span:nth-child(4) { animation-delay: 0.36s; }
.trace-dots span:nth-child(5) { animation-delay: 0.48s; }
.trace-dots span:nth-child(6) { animation-delay: 0.6s; }
.trace-dots span:nth-child(7) { animation-delay: 0.72s; }
.trace-dots span:nth-child(8) { animation-delay: 0.84s; }
.trace-dots span:nth-child(9) { animation-delay: 0.96s; }
.trace-dots span:nth-child(10) { animation-delay: 1.08s; }
.trace-dots span:nth-child(11) { animation-delay: 1.2s; }
.trace-dots span:nth-child(12) { animation-delay: 1.32s; }

.identity-strip {
  width: fit-content;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-logo {
  width: min(110px, 28vw);
  display: block;
  border: 0;
  background: transparent;
}

.identity-meta {
  display: grid;
  gap: 0.2rem;
}

.identity-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.identity-name {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  line-height: 1;
  font-size: clamp(1.2rem, 3.2vw, 1.65rem);
}

.identity-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.34);
}

.identity-badges {
  color: #fff;
  font-size: 0.95rem;
}

.identity-sub {
  color: var(--muted);
  font-size: 0.9rem;
}

.presence-row {
  margin: 0.9rem auto 0;
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 700;
  font-size: 0.98rem;
  background: var(--card-soft);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0.38rem 0.78rem;
  position: relative;
  overflow: hidden;
}

.presence-row::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0, rgba(116, 247, 255, 0.25) 45%, transparent 80%);
  transform: translateX(-120%);
  animation: sweep 4.2s linear infinite;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 12px currentColor;
}

.status-dot.online {
  color: var(--status-online);
  background: var(--status-online);
}

.status-dot.idle {
  color: var(--status-idle);
  background: var(--status-idle);
}

.status-dot.dnd {
  color: var(--status-dnd);
  background: var(--status-dnd);
}

.status-dot.offline {
  color: var(--status-offline);
  background: var(--status-offline);
}

.floating-row {
  margin-top: 0.86rem;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 0.62rem;
}

.discord-profile-card,
.server-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(20, 20, 20, 0.34), rgba(9, 9, 9, 0.4));
  padding: 0.72rem;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
  transform-style: preserve-3d;
}

.discord-profile-card:hover,
.server-card:hover {
  border-color: rgba(116, 247, 255, 0.28);
  box-shadow: 0 0 18px rgba(116, 247, 255, 0.14);
}

.discord-profile-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.72rem;
  align-items: center;
}

.discord-avatar {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  object-fit: cover;
  background: #000;
}

.discord-name {
  font-weight: 800;
  font-size: 1rem;
}

.discord-tag,
.discord-activity,
.meta-row,
.server-stats {
  color: var(--muted);
}

.discord-badges {
  margin-top: 0.28rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
}

.discord-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(88, 101, 242, 0.45);
  padding: 0.14rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: #e9edff;
  background: linear-gradient(125deg, rgba(88, 101, 242, 0.2), rgba(116, 247, 255, 0.12));
}

.discord-activity {
  margin-top: 0.2rem;
}

.activity-list {
  margin-top: 0.42rem;
  list-style: none;
  display: grid;
  gap: 0.24rem;
}

.activity-list li {
  font-size: 0.8rem;
  color: #e6e6e6;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 9px;
  padding: 0.22rem 0.46rem;
}

.server-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.6rem;
  align-items: center;
}

.server-icon {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #2a0c5c, #5421a4 58%, #8f58e5);
  border: 1px solid rgba(255, 255, 255, 0.18);
  overflow: hidden;
  box-shadow: 0 0 22px rgba(143, 88, 229, 0.45);
}

.server-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.server-name {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  font-size: 1.08rem;
  line-height: 1.1;
}

.server-stats {
  margin-top: 0.2rem;
  font-size: 0.86rem;
}

.server-join-btn {
  text-decoration: none;
  background: linear-gradient(125deg, #21bf6a, #18af84);
  color: #fff;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.32rem 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  transition: transform 180ms ease, box-shadow 180ms ease;
  font-size: 0.82rem;
}

.server-join-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(38, 206, 115, 0.34);
}

.meta-row {
  margin-top: 0.82rem;
  display: flex;
  justify-content: center;
  gap: 0.54rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.quick-actions {
  margin-top: 0.82rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.action-pill {
  text-decoration: none;
  color: #f7f7f7;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 0.4rem 0.88rem;
  background: linear-gradient(90deg, rgba(116, 247, 255, 0.14), rgba(127, 108, 255, 0.15));
  font-weight: 700;
  font-size: 0.82rem;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.action-pill:hover {
  transform: translateY(-1px);
  border-color: #fff;
  box-shadow: 0 0 14px rgba(116, 247, 255, 0.24);
}

.tilt-surface {
  will-change: transform;
}

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

@keyframes pulseDot {
  0%,
  100% {
    transform: scale(0.85);
    opacity: 0.45;
  }
  50% {
    transform: scale(1.12);
    opacity: 1;
  }
}

@keyframes sweep {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}

@media (max-width: 780px) {
  .floating-row {
    grid-template-columns: 1fr;
  }

  .server-card {
    grid-template-columns: auto 1fr;
  }

  .server-join-btn {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .profile-shell {
    border-radius: 22px;
  }
}

@media (max-width: 560px) {
  .identity-strip {
    flex-direction: column;
    text-align: center;
  }

  .trace-dots {
    left: 50%;
    transform: translateX(-50%);
  }

  .identity-row {
    justify-content: center;
  }

  .discord-profile-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .discord-badges {
    justify-content: center;
  }

  .discord-avatar {
    margin-inline: auto;
  }
}
