:root {
  --accent: #7c5cff;
  --ui-font: "Courier New", monospace;
  --name-font: "Courier New", monospace;
}

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

body {
  font-family: var(--ui-font);
  background: #000;
  color: #fff;
  overflow: hidden;
  height: 100vh;
}
body.cursor-hidden, body.cursor-hidden * { cursor: none; }
.hidden { display: none !important; }
a { color: inherit; text-decoration: none; }

.custom-cursor {
  position: fixed; width: 40px; height: 40px;
  background-size: contain; background-repeat: no-repeat; background-position: center;
  pointer-events: none; z-index: 9999; transform: translate(-50%, -50%);
}
#fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 9998; overflow: hidden; }
.fx-dot, .fx-particle { position: fixed; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.fx-dot { width: 8px; height: 8px; }
.fx-particle { width: 6px; height: 6px; }
.fx-snow { position: fixed; color: #fff; opacity: 0.8; pointer-events: none; }
.fx-bubble { position: fixed; border: 1.5px solid; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.fx-ghost { position: fixed; font-size: 22px; transform: translate(-50%, -50%); pointer-events: none; }
.fx-cat { position: fixed; font-size: 30px; transform: translate(-50%, -50%); pointer-events: none; }

#bg { position: fixed; inset: 0; z-index: 1; background-size: cover; background-position: center; pointer-events: none; }
#bg video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#overlay { position: fixed; inset: 0; z-index: 2; background: #000; opacity: 0; pointer-events: none; }

#start-screen {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.9); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center; z-index: 30; cursor: pointer;
}
#start-text { font-size: 24px; text-align: center; padding: 0 20px; }

#stage {
  position: fixed; inset: 0; z-index: 20; opacity: 0;
  display: flex; align-items: center; justify-content: center; padding: 24px; overflow-y: auto;
}
#profile-root { width: 100%; display: flex; flex-direction: column; align-items: center; }

.avatar { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; cursor: pointer; background: #16161f; border: 2px solid var(--accent); box-shadow: 0 0 22px -6px var(--accent); }
.avatar.spin { animation: spin 0.6s ease; }
@keyframes spin { to { transform: rotate(360deg); } }

#profile-name { font-family: var(--name-font); font-weight: 700; letter-spacing: 1px; filter: drop-shadow(0 0 8px rgba(255,255,255,0.5)); }
.glitch { animation: glitch 0.2s ease-in-out; }
@keyframes glitch { 0%,100%{transform:translate(0)} 25%{transform:translate(-2px,1px)} 50%{transform:translate(2px,-1px)} 75%{transform:translate(-1px,-1px)} }

.badge-box { background: rgba(255,255,255,0.12); padding: 2px; border-radius: 14px; display: inline-block; }
.badge-box-inner { background: rgba(0,0,0,0.45); padding: 4px 8px; border-radius: 12px; box-shadow: inset 0 0 10px rgba(255,255,255,0.15); }
.badge-group { display: flex; flex-wrap: wrap; gap: 7px; }
.badge-container { position: relative; }
.badge { width: 20px; height: 20px; transition: transform 0.2s; }
.badge:hover { transform: scale(1.25); }
.badge-container .tooltip, .visitor-counter .tooltip {
  visibility: hidden; opacity: 0; width: 130px; background: rgba(0,0,0,0.85); color: #fff;
  text-align: center; border-radius: 6px; padding: 5px; position: absolute; z-index: 100;
  bottom: 140%; left: 50%; margin-left: -65px; font-size: 12px; transition: opacity 0.25s;
}
.badge-container:hover .tooltip { visibility: visible; opacity: 1; }

.social-links { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.social-icon { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; color: #fff; filter: drop-shadow(0 0 8px rgba(255,255,255,0.5)); transition: transform 0.25s, color 0.25s; }
.social-icon svg { width: 28px; height: 28px; fill: currentColor; }
.social-icon:hover { transform: scale(1.3); color: var(--accent); }

.card-meta { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.65); font-size: 14px; }
.visitor-counter { display: inline-flex; align-items: center; gap: 7px; position: relative; }
.visitor-icon { width: 16px; height: 16px; }
.location { display: inline-flex; align-items: center; gap: 5px; }
.location svg { opacity: 0.8; }
.dot-sep { opacity: 0.4; }

.layout-card { max-width: 760px; }
.card-panel {
  width: 100%; background: rgba(10,10,16,0.55); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 22px; padding: 26px 28px; backdrop-filter: blur(16px);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 0 40px -10px var(--accent), 0 24px 60px rgba(0,0,0,0.5);
  display: flex; flex-direction: column; gap: 20px; transform-style: preserve-3d;
}
.card-header { display: flex; align-items: center; gap: 20px; }
.card-header .avatar { width: 96px; height: 96px; }
.card-info { flex: 1; min-width: 0; }
.name-and-badges { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.layout-card #profile-name { font-size: 30px; }
.handle { margin-top: 6px; color: rgba(255,255,255,0.75); font-size: 16px; min-height: 1.2em; }

.widgets-row { display: flex; gap: 14px; flex-wrap: wrap; }
.widget { flex: 1; min-width: 220px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 14px; display: flex; align-items: center; gap: 12px; position: relative; }
.dw-icon { width: 44px; height: 44px; border-radius: 12px; background: rgba(88,101,242,0.25); display: flex; align-items: center; justify-content: center; color: #fff; }
.dw-icon svg { width: 26px; height: 26px; fill: currentColor; }
.dw-name { font-weight: 700; }
.dw-sub { font-size: 13px; color: rgba(255,255,255,0.65); display: flex; align-items: center; gap: 6px; }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: #43e97b; display: inline-block; }
.dw-join { margin-left: auto; background: #248046; color: #fff; padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.dw-join:hover { background: #1f6e3c; }

.layout-card .social-links { justify-content: center; }

.music-player {
  width: 100%; margin-top: 4px; background: rgba(10,10,16,0.55); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px; padding: 14px 18px; backdrop-filter: blur(16px);
  display: flex; align-items: center; gap: 16px;
}
.mp-cover { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; }
.mp-main { flex: 1; min-width: 0; }
.mp-meta { font-size: 15px; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-artist { color: rgba(255,255,255,0.6); }
.mp-bar { display: flex; align-items: center; gap: 10px; font-size: 12px; color: rgba(255,255,255,0.6); }
.mp-track { flex: 1; height: 5px; background: rgba(255,255,255,0.2); border-radius: 5px; cursor: pointer; overflow: hidden; }
.mp-fill { height: 100%; width: 0%; background: var(--accent); border-radius: 5px; }
.mp-ctrl { display: flex; align-items: center; gap: 10px; }
.mp-ctrl button { background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; opacity: 0.85; }
.mp-ctrl button:hover { opacity: 1; color: var(--accent); }
.mp-play { font-size: 22px !important; }

.layout-classic { max-width: 560px; text-align: center; gap: 14px; }
.layout-classic > * { width: 100%; }
.classic-banner { height: 120px; border-radius: 16px; background-size: cover; background-position: center; margin-bottom: -55px; }
.classic-avatar-wrap { display: flex; justify-content: center; }
.layout-classic .avatar { width: 120px; height: 120px; }
.classic-name { display: flex; justify-content: center; }
.layout-classic #profile-name { font-size: 36px; }
.layout-classic .badge-box { margin: 0 auto; }
.classic-bio { color: rgba(255,255,255,0.8); font-size: 16px; min-height: 1.2em; }
.layout-classic .location { justify-content: center; }
.layout-classic .social-links { margin: 6px 0; }
.layout-classic .card-meta { justify-content: center; }

.link-buttons { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.link-button {
  display: block; padding: 16px; border-radius: 14px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(10px); transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.link-button:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 0 26px -10px var(--accent); }
.lb-title { font-weight: 700; font-size: 16px; }
.lb-sub { margin-top: 4px; font-size: 12px; color: rgba(255,255,255,0.6); display: flex; align-items: center; justify-content: center; gap: 5px; }
.layout-classic .music-player { margin-top: 10px; }

.controls {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 25;
  background: rgba(0,0,0,0.7); padding: 5px 10px; border-radius: 20px; backdrop-filter: blur(5px);
}
.controls:empty { display: none; }
.theme-button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.3); background: rgba(0,0,0,0.5); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: bold; transition: all 0.3s; }
.theme-button:hover, .theme-button.active { transform: scale(1.1); border-color: var(--accent); color: var(--accent); }

@media (max-width: 640px) {
  .card-header { flex-direction: column; text-align: center; }
  .name-and-badges { justify-content: center; }
  .card-meta { justify-content: center; }
  .layout-card #profile-name, .layout-classic #profile-name { font-size: 26px; }
  .music-player { flex-wrap: wrap; }
  .mp-ctrl { width: 100%; justify-content: center; }
}
