* { box-sizing: border-box; }

:root {
  --green: #25d366;
  --white: #f4f4f4;
  --soft: rgba(255,255,255,.72);
  --glass: rgba(9,9,9,.78);
  --line: rgba(255,255,255,.18);
}

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--white);
  font-family: "Share Tech Mono", monospace;
  letter-spacing: .08em;
  background: #050505;
  overflow-x: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,.82)),
    url("assets/background.gif");
  background-size: cover;
  background-position: center;
  filter: contrast(1.3) grayscale(1);
  z-index: -3;
}

.bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,.05) 0px,
    rgba(255,255,255,.05) 1px,
    transparent 2px,
    transparent 5px
  );
  mix-blend-mode: overlay;
  animation: scan 3s linear infinite;
}

.bg::after {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle, transparent 45%, rgba(0,0,0,.9) 78%);
  z-index: 1;
}

@keyframes scan { to { transform: translateY(18px); } }

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.profile-card {
  width: min(680px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(0,0,0,.86), rgba(16,16,16,.68));
  box-shadow: 0 0 45px rgba(0,0,0,.9), inset 0 0 45px rgba(255,255,255,.03);
  backdrop-filter: blur(6px);
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  text-align: left;
}

.avatar-wrap {
  position: relative;
  width: 126px;
  height: 126px;
  flex: 0 0 auto;
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.72);
  position: relative;
  z-index: 2;
  filter: grayscale(1) contrast(1.25);
}

.decoration {
  position: absolute;
  inset: -14px;
  z-index: 1;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from 10deg, rgba(255,255,255,.95) 0 4deg, transparent 5deg 10deg);
  clip-path: polygon(50% 0%, 57% 14%, 70% 5%, 72% 20%, 88% 17%, 80% 31%, 100% 41%, 82% 50%, 95% 67%, 76% 65%, 77% 85%, 61% 76%, 50% 100%, 39% 76%, 23% 85%, 24% 65%, 5% 67%, 18% 50%, 0% 41%, 20% 31%, 12% 17%, 28% 20%, 30% 5%, 43% 14%);
  animation: twitch 1.9s steps(2) infinite;
  filter: blur(.2px) drop-shadow(0 0 8px rgba(255,255,255,.25));
}

.status-dot {
  position: absolute;
  right: 6px;
  bottom: 10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--green);
  border: 5px solid #050505;
  z-index: 3;
  box-shadow: 0 0 14px rgba(37,211,102,.8);
}

@keyframes twitch {
  0%,100% { transform: rotate(0deg) scale(1); opacity: .9; }
  50% { transform: rotate(4deg) scale(1.04); opacity: .72; }
}

.name-block h1 {
  margin: 0 0 6px;
}

.handle-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: clamp(.9rem, 2vw, 1.1rem);
  color: var(--soft);
}

.server-badge {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--white);
  background: rgba(255,255,255,.06);
}

.center-line {
  text-align: center;
  margin: 32px 0 18px;
  font-size: clamp(1rem, 3vw, 1.4rem);
  color: var(--white);
  text-shadow: 0 0 12px rgba(255,255,255,.24);
}

.badges, .links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.badges span {
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.55);
  font-size: .82rem;
}

.links { margin: 24px 0; }

.links a {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--white);
  background: rgba(255,255,255,.05);
  text-decoration: none;
  font-size: 1.2rem;
  transition: transform .2s, background .2s, box-shadow .2s;
}

.links a:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,.13);
  box-shadow: 0 0 18px rgba(255,255,255,.15);
}

.server-card, .music-player {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--glass);
  box-shadow: inset 0 0 28px rgba(255,255,255,.025);
}

.server-card img {
  width: 66px;
  height: 66px;
  object-fit: cover;
  border-radius: 16px;
  filter: grayscale(1) contrast(1.25);
}

.server-info { flex: 1; min-width: 0; }
.server-info h2 { margin: 0 0 8px; font-size: 1.1rem; }
.server-info h2 span { font-size: .85rem; color: var(--soft); }
.server-info p { margin: 0; color: var(--soft); font-size: .82rem; }
.online { display:inline-block; width:8px; height:8px; background:var(--green); border-radius:50%; margin-right:6px; }
.divider { display:inline-block; width:7px; height:7px; background:#aaa; border-radius:50%; margin:0 6px; opacity:.8; }

.join {
  color: white;
  text-decoration: none;
  background: var(--green);
  padding: 13px 18px;
  border-radius: 12px;
  font-weight: bold;
}

.music-player { margin-top: 16px; }
.cover {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background-image: url("assets/avatar.jpg");
  background-size: cover;
  background-position: center;
  filter: grayscale(1) contrast(1.35);
}
.track { flex: 1; min-width: 0; }
.track-title { margin-bottom: 8px; font-size: 1rem; }
audio { width: 100%; height: 36px; filter: grayscale(1) contrast(1.2); }

@media (max-width: 560px) {
  .profile-card { padding: 22px 16px; border-radius: 22px; }
  .top-row { align-items: flex-start; gap: 16px; }
  .avatar-wrap { width: 96px; height: 96px; }
  .server-card, .music-player { border-radius: 18px; }
  .join { padding: 11px 13px; }
}

.typing-cursor {
  display: inline-block;
  margin-left: 3px;
  animation: blink 1s infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes ghostGlitch {
  0%, 90%, 100% {
    transform: translateX(0);
    text-shadow:
      2px 0 rgba(255,255,255,.95),
     -2px 0 rgba(255,255,255,.85),
      0 0 8px rgba(255,255,255,.25);
  }

  91% {
    transform: translateX(-2px);
    text-shadow:
      4px 0 rgba(255,255,255,.95),
     -4px 0 rgba(255,255,255,.85),
      0 0 12px rgba(255,255,255,.35);
  }

  92% {
    transform: translateX(2px);
  }

  93% {
    transform: translateX(-1px);
  }

  94% {
    transform: translateX(0);
  }
}

.ghost-name:hover {
  animation-duration: .25s;
}
