:root {
  --accent:        #a78bfa;
  --accent-glow:   #7c3aed;
  --accent-2:      #818cf8;
  --bg:            #07070f;
  --surface:       rgba(255,255,255,0.04);
  --surface-hover: rgba(255,255,255,0.08);
  --border:        rgba(255,255,255,0.08);
  --text:          #e2e8f0;
  --text-muted:    #94a3b8;
  --text-dim:      #64748b;
  --radius:        1.25rem;
  --card-w:        420px;
  --font-main:     'Outfit', sans-serif;
  --font-mono:     'Space Mono', monospace;

  --online:  #22c55e;
  --idle:    #f59e0b;
  --dnd:     #ef4444;
  --offline: #64748b;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
}

.click-to-enter {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
.click-to-enter.hidden {
  opacity: 0;
  visibility: hidden;
}
.cte-text {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: 0.1em;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  animation: pulseCTE 2s infinite;
}
@keyframes pulseCTE {
  0%, 100% { opacity: 1; transform: scale(1); text-shadow: 0 0 10px rgba(255, 255, 255, 0.5); }
  50% { opacity: 0.5; transform: scale(0.98); text-shadow: 0 0 20px rgba(255, 255, 255, 0.2); }
}

.bg-video, .bg-image {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.5;
  pointer-events: none;
}
.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: rgba(0,0,0,0.35);
  pointer-events: none;
}
#bgCanvas {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.top-controls {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  display: flex;
  gap: 1rem;
}
.top-btn {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}
.top-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}
.top-btn.muted svg {
  opacity: 0.5;
}

.uid-tag {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
  z-index: 50;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  animation: floatUid 4s ease-in-out infinite;
}
@keyframes floatUid {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -5px); }
}

.cursor-dot {
  position: fixed;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%,-50%);
  transition: opacity .15s;
  box-shadow: 0 0 8px var(--accent);
}
.cursor-ring {
  position: fixed;
  width: 28px; height: 28px;
  border: 1.5px solid rgba(167,139,250,.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%,-50%);
  transition: width .2s, height .2s, transform .05s;
}

.page-wrap {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 2rem 1rem;
  width: 100%;
}

.card {
  width: 100%;
  max-width: var(--card-w);
  background: rgba(5, 5, 10, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  backdrop-filter: blur(30px) saturate(1.8);
  -webkit-backdrop-filter: blur(30px) saturate(1.8);
  padding: 2.5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 20px 60px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(255, 255, 255, 0.05);
}

.card.anim-none { opacity: 1; transform: none; }

.card.anim-fade { opacity: 0; transform: translateY(28px) scale(.97); transition: opacity 0.8s cubic-bezier(.16,1,.3,1), transform 0.8s cubic-bezier(.16,1,.3,1); }
.card.anim-fade.visible { opacity: 1; transform: translateY(0) scale(1); }

.card.anim-drop { opacity: 0; transform: translateY(-50px); transition: opacity 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.card.anim-drop.visible { opacity: 1; transform: translateY(0); }

.card.anim-zoom { opacity: 0; transform: scale(0.8); transition: opacity 0.8s cubic-bezier(.16,1,.3,1), transform 0.8s cubic-bezier(.16,1,.3,1); }
.card.anim-zoom.visible { opacity: 1; transform: scale(1); }

.banner {
  width: calc(100% + 3.5rem);
  margin: -2rem -1.75rem 0;
  height: 100px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius) var(--radius) 0 0;
  margin-bottom: -.5rem;
}

.avatar-wrap {
  position: relative;
  margin-top: .5rem;
}
.avatar {
  width: 110px; height: 110px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 20px rgba(0,0,0,0.8);
  object-fit: cover;
  display: block;
  transition: transform .4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow .4s;
}
.avatar:hover {
  transform: scale(1.08) rotate(3deg);
  box-shadow: 0 0 30px rgba(255,255,255,0.15);
}
.presence-ring {
  position: absolute;
  bottom: 4px; right: 4px;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 3px solid var(--bg);
  background: var(--offline);
  transition: background .4s;
}
.presence-ring.online  { background: var(--online); }
.presence-ring.idle    { background: var(--idle); }
.presence-ring.dnd     { background: var(--dnd); }
.presence-ring.offline { background: var(--offline); }

.username-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.username {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #fff;
  text-shadow: 0 0 20px rgba(255,255,255,0.4);
}
.username[data-text] { position: relative; display: inline-block; }
.fx-gradient { background: linear-gradient(90deg, var(--accent) 0%, #f5576c 100%); -webkit-background-clip: text; color: transparent; animation: sweep 3s linear infinite; background-size: 200% 200%; }
.fx-glitch::before, .fx-glitch::after { content: attr(data-text); position: absolute; top: 0; left: 0; opacity: 0.8; }
.fx-glitch::before { left: 2px; text-shadow: -1px 0 red; animation: glitch-anim-1 2s infinite linear alternate-reverse; }
.fx-glitch::after { left: -2px; text-shadow: -1px 0 blue; animation: glitch-anim-2 3s infinite linear alternate-reverse; }
.fx-shuffle:hover { font-family: var(--font-mono); }
.fx-fuzzy { filter: blur(2px); transition: filter .2s; }
.fx-fuzzy:hover { filter: blur(0); }
.fx-rainbow { background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8f00ff, #ff0000); -webkit-background-clip: text; color: transparent; animation: sweep 5s linear infinite; background-size: 200% 200%; }
.fx-shake:hover { animation: shake .4s linear infinite; display: inline-block; }
.fx-typewriter { border-right: 2px solid var(--accent); white-space: nowrap; overflow: hidden; animation: typing 2s steps(20, end) infinite alternate, blink-caret .75s step-end infinite; display: inline-block; }

@keyframes sweep { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
@keyframes shake { 0% { transform: translate(1px, 1px) rotate(0deg); } 20% { transform: translate(-1px, -2px) rotate(-1deg); } 40% { transform: translate(-3px, 0px) rotate(1deg); } 60% { transform: translate(3px, 2px) rotate(0deg); } 80% { transform: translate(1px, -1px) rotate(1deg); } 100% { transform: translate(-1px, 2px) rotate(-1deg); } }
@keyframes typing { from { width: 0 } to { width: 100% } }
@keyframes blink-caret { from, to { border-color: transparent } 50% { border-color: var(--accent); } }
@keyframes glitch-anim-1 { 0% { clip-path: inset(20% 0 80% 0); } 100% { clip-path: inset(50% 0 10% 0); } }
@keyframes glitch-anim-2 { 0% { clip-path: inset(10% 0 60% 0); } 100% { clip-path: inset(30% 0 20% 0); } }

.badges { display: grid; grid-template-columns: repeat(8, auto); gap: .25rem; align-items: center; justify-items: center; }
.badge-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.badge {
  font-size: 1.1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: .4rem;
  padding: .2rem .4rem;
  line-height: 1;
  transition: all .2s;
  cursor: default;
}
.badge:hover { background: rgba(255,255,255,0.15); transform: translateY(-2px); box-shadow: 0 5px 10px rgba(0,0,0,0.5); }

.badge-tooltip {
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(0,0,0,0.8);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  backdrop-filter: blur(5px);
  z-index: 100;
}
.badge-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px;
  border-style: solid;
  border-color: rgba(0,0,0,0.8) transparent transparent transparent;
}
.badge-wrap:hover .badge-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.tag {
  font-size: .82rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: .03em;
  margin-top: -.45rem;
}

.discord-presence {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: rgba(88,101,242,.1);
  border: 1px solid rgba(88,101,242,.2);
  border-radius: .85rem;
  padding: .6rem 1rem;
  width: 100%;
  min-height: 48px;
  transition: background .2s;
}
.discord-presence:hover { background: rgba(88,101,242,.16); }
.dc-icon { width: 20px; height: 20px; flex-shrink: 0; }
.dc-avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; border: 2px solid rgba(255,255,255,.08); transition: border-color .2s; }
.discord-presence:hover .dc-avatar { border-color: rgba(88,101,242,.4); }
.dc-info { display: flex; flex-direction: column; gap: .1rem; overflow: hidden; flex: 1; min-width: 0; }
.dc-status {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}
.dc-activity {
  font-size: .75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dc-detail {
  font-size: .7rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.discord-presence-inner { display: flex; align-items: center; gap: .75rem; width: 100%; }

.bio {
  font-size: .95rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 320px;
  line-height: 1.6;
}

.typewriter-line {
  font-size: .85rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.typewriter { color: var(--accent); }
.typewriter-cursor {
  color: var(--accent);
  animation: blink .7s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.views-row {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.views-icon { font-size: .9rem; }

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  justify-content: center;
  width: 100%;
  margin-top: 0.5rem;
}
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  text-decoration: none;
  transition: all 0.3s ease;
  overflow: hidden;
}
.social-btn img { width: 20px; height: 20px; filter: drop-shadow(0 0 5px rgba(255,255,255,0.3)); }
.social-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255,255,255,0.1);
}
.social-btn:active { transform: translateY(0) scale(1); }

.social-btn[data-platform="discord"]:hover   { border-color: rgba(88,101,242,.5); box-shadow: 0 6px 20px rgba(88,101,242,.2); }
.social-btn[data-platform="github"]:hover    { border-color: rgba(255,255,255,.3); }
.social-btn[data-platform="twitter"]:hover   { border-color: rgba(29,155,240,.5); box-shadow: 0 6px 20px rgba(29,155,240,.2); }
.social-btn[data-platform="instagram"]:hover { border-color: rgba(225,48,108,.4); box-shadow: 0 6px 20px rgba(225,48,108,.2); }
.social-btn[data-platform="youtube"]:hover   { border-color: rgba(255,0,0,.4);    box-shadow: 0 6px 20px rgba(255,0,0,.2); }
.social-btn[data-platform="twitch"]:hover    { border-color: rgba(145,70,255,.5); box-shadow: 0 6px 20px rgba(145,70,255,.2); }
.social-btn[data-platform="spotify"]:hover   { border-color: rgba(30,215,96,.4);  box-shadow: 0 6px 20px rgba(30,215,96,.2); }
.social-btn[data-platform="steam"]:hover     { border-color: rgba(27,40,56,.6); }
.social-btn[data-platform="tiktok"]:hover    { border-color: rgba(105,201,208,.4); }

.link-buttons { display: flex; flex-wrap: wrap; gap: .4rem; width: 100%; justify-content: center; }
.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 1.1rem;
  transition: background .2s, transform .2s, border-color .2s;
  overflow: hidden;
}
.link-btn:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(167,139,250,.3);
  transform: translateY(-2px) scale(1.05);
}
.link-icon { display: flex; align-items: center; justify-content: center; }
.link-icon img, .link-icon svg { width: 18px; height: 18px; display: block; }

.music-player {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: rgba(30,215,96,.06);
  border: 1px solid rgba(30,215,96,.18);
  border-radius: .85rem;
  padding: .7rem 1rem;
  width: 100%;
}
.music-play-btn {
  background: rgba(30,215,96,.15);
  border: 1px solid rgba(30,215,96,.3);
  color: #1ed760;
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: .85rem;
  cursor: pointer;
  transition: background .2s, transform .2s;
  flex-shrink: 0;
}
.music-play-btn:hover { background: rgba(30,215,96,.25); transform: scale(1.1); }
.music-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.music-title { font-size: .84rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-artist { font-size: .74rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-bars { display: flex; align-items: flex-end; gap: 2px; height: 20px; flex-shrink: 0; }
.music-bars span {
  display: block; width: 3px; border-radius: 2px;
  background: #1ed760;
  height: 4px;
  transition: height .1s;
}
.music-bars.playing span:nth-child(1) { animation: bar 1s   ease-in-out infinite; }
.music-bars.playing span:nth-child(2) { animation: bar .8s  ease-in-out infinite .1s; }
.music-bars.playing span:nth-child(3) { animation: bar 1.2s ease-in-out infinite .2s; }
.music-bars.playing span:nth-child(4) { animation: bar .9s  ease-in-out infinite .15s; }
.music-bars.playing span:nth-child(5) { animation: bar 1.1s ease-in-out infinite .05s; }
@keyframes bar {
  0%,100% { height: 4px; }
  50%      { height: 18px; }
}

.footer-credit {
  font-size: .72rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  margin-top: .25rem;
  letter-spacing: .04em;
}

@media (max-width: 480px) {
  .card { padding: 1.75rem 1.25rem 1.25rem; }
  .avatar { width: 80px; height: 80px; }
  .username { font-size: 1.35rem; }
  .socials { gap: .4rem; }
  .social-btn { padding: .4rem .75rem; font-size: .78rem; }
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(167,139,250,.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(167,139,250,.5); }

::selection { background: rgba(167,139,250,.3); color: #fff; }
