:root {
  --bg-color: #070709;
  --card-bg: rgba(18, 18, 22, 0.68);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-blur: 16px;
  --card-radius: 20px;
  --card-width: 460px;
  --text-main: #f2f2f7;
  --text-muted: #8e8e93;
  --accent: #ffffff;
  --badge-color: #ffffff;
  --cursor-color: #ffffff;
  --cursor-size: 28px;
  --font-main: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-user-select: none;
  user-select: none;
}

img,
video,
svg,
canvas {
  -webkit-user-drag: none;
  user-drag: none;
}

img::selection,
video::selection {
  background: transparent;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  perspective: 1100px;
}

body.custom-cursor-active,
body.custom-cursor-active * {
  cursor: none !important;
}

body.cursor-out .cursor-main,
body.cursor-out .cursor-secondary,
body.cursor-out .cursor-img,
body.cursor-out .cursor-trail-layer {
  visibility: hidden !important;
}

.hidden {
  display: none !important;
}

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(circle at 50% 30%, #1f1d2e 0%, #070709 70%);
}

.bg-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bg-dim {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.crt-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  overflow: hidden;
}

.crt-scanlines {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0) 50%,
    rgba(0, 0, 0, 0.42) 50%,
    rgba(0, 0, 0, 0.42)
  );
  background-size: 100% 4px;
  opacity: 0.25;
}

.crt-noise {
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  opacity: 0.04;
  background-image: radial-gradient(rgba(255, 255, 255, 0.8) 1px, transparent 0);
  background-size: 3px 3px;
  animation: crtNoiseMove 0.28s steps(2) infinite;
}

@keyframes crtNoiseMove {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-1%, 1%); }
  100% { transform: translate(1%, -1%); }
}

.crt-vignette {
  position: fixed;
  inset: 0;
  z-index: 96;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 58%, rgba(0, 0, 0, 0.78) 100%);
}

.crt-rgb {
  text-shadow: -1.1px 0 rgba(255, 0, 80, 0.42), 1.1px 0 rgba(0, 225, 255, 0.42);
}

.custom-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  width: max-content;
  max-width: min(320px, calc(100vw - 24px));
  transform: translate(-50%, calc(-100% - 2px)) scale(0.96);
  transform-origin: center bottom;
  background: rgba(12, 12, 16, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: 8px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  white-space: normal;
  text-align: center;
  overflow-wrap: anywhere;
  pointer-events: none;
  z-index: 95;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.custom-tooltip.visible {
  opacity: 1;
  transform: translate(-50%, -100%) scale(1);
}

.custom-tooltip.below {
  transform-origin: center top;
  transform: translate(-50%, 2px) scale(0.96);
}

.custom-tooltip.below.visible {
  transform: translate(-50%, 0) scale(1);
}

.cursor-main,
.cursor-secondary {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 100;
  transform: translate(-50%, -50%);
}

.cursor-main.mode-ring {
  width: 6px;
  height: 6px;
  background: var(--cursor-color);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--cursor-color);
}
.cursor-secondary.mode-ring {
  width: var(--cursor-size);
  height: var(--cursor-size);
  border: 1.5px solid var(--cursor-color);
  border-radius: 50%;
  opacity: 0.75;
  transition: width 0.18s ease, height 0.18s ease, opacity 0.18s ease;
}
.cursor-secondary.mode-ring.hovering {
  width: calc(var(--cursor-size) * 1.45);
  height: calc(var(--cursor-size) * 1.45);
  opacity: 1;
}

.cursor-main.mode-dot {
  width: 12px;
  height: 12px;
  background: var(--cursor-color);
  border-radius: 50%;
  box-shadow: 0 0 16px var(--cursor-color), 0 0 30px var(--cursor-color);
  transition: transform 0.15s ease;
}
.cursor-main.mode-dot.hovering {
  transform: translate(-50%, -50%) scale(1.6);
}

.cursor-main.mode-crosshair {
  width: var(--cursor-size);
  height: var(--cursor-size);
  border: 1.5px solid var(--cursor-color);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cursor-color);
  transition: transform 0.2s ease;
}
.cursor-main.mode-crosshair::before,
.cursor-main.mode-crosshair::after {
  content: "";
  position: absolute;
  background: var(--cursor-color);
}
.cursor-main.mode-crosshair::before {
  top: 50%;
  left: -5px;
  right: -5px;
  height: 1.5px;
  transform: translateY(-50%);
}
.cursor-main.mode-crosshair::after {
  left: 50%;
  top: -5px;
  bottom: -5px;
  width: 1.5px;
  transform: translateX(-50%);
}
.cursor-main.mode-crosshair.hovering {
  transform: translate(-50%, -50%) rotate(45deg) scale(1.2);
}

.cursor-main.mode-diamond {
  width: 8px;
  height: 8px;
  background: var(--cursor-color);
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow: 0 0 10px var(--cursor-color);
}
.cursor-secondary.mode-diamond {
  width: var(--cursor-size);
  height: var(--cursor-size);
  border: 1.5px solid var(--cursor-color);
  animation: diamondSpin 4s linear infinite;
}
@keyframes diamondSpin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.cursor-main.mode-ghost {
  width: 14px;
  height: 14px;
  background: var(--cursor-color);
  border-radius: 50%;
  opacity: 0.85;
  filter: blur(1px);
}
.cursor-secondary.mode-ghost {
  width: 26px;
  height: 26px;
  background: var(--cursor-color);
  border-radius: 50%;
  opacity: 0.28;
  filter: blur(6px);
}

.cursor-main.mode-laser {
  width: 6px;
  height: 6px;
  background: #ff0033;
  border-radius: 50%;
  box-shadow: 0 0 12px #ff0033, 0 0 24px #ff0033;
}
.cursor-secondary.mode-laser {
  width: 18px;
  height: 18px;
  border: 1px dashed rgba(255, 0, 51, 0.7);
  border-radius: 50%;
}

.cursor-main.mode-target {
  width: 10px;
  height: 10px;
  background: var(--cursor-color);
  border-radius: 50%;
}
.cursor-secondary.mode-target {
  width: 32px;
  height: 32px;
  border: 2px solid var(--cursor-color);
  border-radius: 50%;
  box-shadow: inset 0 0 6px var(--cursor-color);
}

.cursor-main.mode-spark {
  width: 12px;
  height: 12px;
  background: #ffea00;
  transform: rotate(45deg);
  box-shadow: 0 0 14px #ffea00;
}

.cursor-main.mode-bubble {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(2px);
}

.cursor-main.mode-orbit {
  width: 6px;
  height: 6px;
  background: var(--cursor-color);
  border-radius: 50%;
}
.cursor-secondary.mode-orbit {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  animation: orbitSpin 2s linear infinite;
}

.cursor-main.mode-pulse_ring {
  width: 10px;
  height: 10px;
  background: var(--cursor-color);
  border-radius: 50%;
}
.cursor-secondary.mode-pulse_ring {
  width: 20px;
  height: 20px;
  border: 2px solid var(--cursor-color);
  border-radius: 50%;
  animation: cursorPulse 1.2s infinite ease-out;
}

@keyframes orbitSpin {
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes cursorPulse {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; }
}

.cursor-img {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--cursor-size);
  height: var(--cursor-size);
  object-fit: contain;
  pointer-events: none;
  z-index: 100;
  transform: translate(-4px, -4px);
}

.cursor-trail-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 98;
}

.trail-dot {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cursor-color);
  box-shadow: 0 0 6px var(--cursor-color);
  animation: trailFade 0.55s forwards ease-out;
}

.trail-star {
  position: absolute;
  color: var(--cursor-color);
  font-size: 11px;
  line-height: 1;
  text-shadow: 0 0 8px var(--cursor-color);
  animation: starFall 0.65s forwards ease-out;
}

.trail-echo {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--cursor-color);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: echoExpand 0.5s forwards ease-out;
}

.trail-fire {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #ff5500;
  border-radius: 50%;
  box-shadow: 0 0 8px #ff2200;
  animation: fireUp 0.6s forwards ease-out;
}

.trail-heart {
  position: absolute;
  color: #ff3366;
  font-size: 12px;
  animation: heartFloat 0.7s forwards ease-out;
}

.trail-matrix {
  position: absolute;
  color: #00ff66;
  font-family: monospace;
  font-size: 12px;
  text-shadow: 0 0 6px #00ff66;
  animation: trailFade 0.5s forwards ease-out;
}

.click-ripple {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid var(--cursor-color);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px var(--cursor-color);
  animation: rippleExpand 0.55s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes trailFade {
  0% { opacity: 0.85; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, 8px) scale(0.2); }
}

@keyframes starFall {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(-50%, 16px) scale(0.3) rotate(90deg); }
}

@keyframes echoExpand {
  0% { opacity: 0.7; transform: translate(-50%, -50%) scale(0.6); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2.2); }
}

@keyframes fireUp {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -18px) scale(0.4); }
}

@keyframes heartFloat {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.8); }
  100% { opacity: 0; transform: translate(-50%, -22px) scale(1.3); }
}

@keyframes rippleExpand {
  0% { opacity: 0.95; width: 6px; height: 6px; }
  100% { opacity: 0; width: 64px; height: 64px; }
}

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(18, 18, 24, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text-main);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.82rem;
  backdrop-filter: blur(12px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.screen-slot {
  position: fixed;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 10px;
}
.screen-slot:empty {
  display: none;
}
.screen-top-left { top: 20px; left: 76px; }
.screen-top-right { top: 20px; right: 20px; }
.screen-bottom-left { bottom: 20px; left: 20px; }
.screen-bottom-right { bottom: 20px; right: 20px; }

.screen-slot .meta-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 0.78rem;
  color: var(--text-main);
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(5, 5, 7, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.splash.hidden-splash {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-text {
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  color: var(--text-main);
  animation: pulse 2.2s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.95; }
}

.top-controls {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.control-btn:hover {
  border-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.sound-control {
  position: relative;
  display: flex;
  align-items: center;
}

.volume-panel {
  display: flex;
  align-items: center;
  width: 0;
  height: 40px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  opacity: 0;
  overflow: hidden;
  transition: width 0.2s ease, opacity 0.2s ease, padding 0.2s ease, margin 0.2s ease, border-color 0.2s ease;
}

.sound-control.open .volume-panel {
  width: 118px;
  margin-left: 8px;
  padding: 0 10px;
  border-color: var(--card-border);
  background: var(--card-bg);
  opacity: 1;
}

#volume-slider {
  width: 96px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.22);
  outline: none;
  cursor: pointer;
}

#volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

#volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

body.custom-cursor-active #volume-slider,
body.custom-cursor-active #volume-slider::-webkit-slider-thumb {
  cursor: none !important;
}

body.custom-cursor-active #volume-slider::-moz-range-thumb {
  cursor: none !important;
}

.audio-title-top {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 6px 10px;
  border-radius: 8px;
  backdrop-filter: blur(12px);
}

.profile-card {
  position: relative;
  z-index: 10;
  width: min(92vw, var(--card-width));
  padding: 32px 26px 22px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  backdrop-filter: blur(var(--card-blur));
  -webkit-backdrop-filter: blur(var(--card-blur));
  --card-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.6s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
  transform-style: flat;
  filter: none;
}

.profile-card.visible {
  opacity: 1;
  transform: rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1);
}

.profile-card.no-card-shadow {
  --card-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.profile-card.border-glow:hover {
  border-color: var(--accent);
  box-shadow: var(--card-shadow), 0 0 24px -4px var(--accent);
}

.profile-card.border-pulse {
  animation: cardBorderPulse 3s infinite alternate ease-in-out;
}

@keyframes cardBorderPulse {
  0% { border-color: rgba(255, 255, 255, 0.08); box-shadow: var(--card-shadow); }
  100% { border-color: var(--accent); box-shadow: var(--card-shadow), 0 0 18px -4px var(--accent); }
}

.profile-card.border-rainbow {
  border-color: rgba(255, 255, 255, 0.22);
  animation: rainbowShadow 6s linear infinite;
}

@keyframes rainbowShadow {
  0% { box-shadow: var(--card-shadow), 0 0 20px -4px #ff0055; }
  33% { box-shadow: var(--card-shadow), 0 0 20px -4px #00ff88; }
  66% { box-shadow: var(--card-shadow), 0 0 20px -4px #00aaff; }
  100% { box-shadow: var(--card-shadow), 0 0 20px -4px #ff0055; }
}

.card-top-slots {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 0.76rem;
  color: var(--text-muted);
}
.card-top-slots:empty {
  display: none;
}

.card-banner {
  width: calc(100% + 52px);
  height: 115px;
  margin: -32px -26px 0;
  overflow: hidden;
  border-radius: calc(var(--card-radius) - 1px) calc(var(--card-radius) - 1px) 0 0;
  border-bottom: 1px solid var(--card-border);
}

.card-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.card-banner:not(.hidden) + .avatar-wrapper {
  margin-top: -46px;
}

.avatar-wrapper {
  position: relative;
  width: 98px;
  height: 98px;
  margin-top: 4px;
  margin-bottom: 14px;
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.16);
  background: #1b1b22;
  position: relative;
  z-index: 2;
}

.avatar.square {
  border-radius: 22px;
}

.avatar.glow {
  box-shadow: 0 0 22px var(--accent);
}

.avatar-deco {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
}

.avatar-deco.square {
  border-radius: 26px;
}

.avatar-deco.deco-neon_ring {
  border: 2px solid var(--accent);
  box-shadow: 0 0 14px var(--accent), inset 0 0 10px var(--accent);
}

.avatar-deco.deco-cyber_dashed {
  border: 2px dashed var(--accent);
  animation: spinDeco 10s linear infinite;
}

.avatar-deco.deco-rainbow_spin {
  background: conic-gradient(#ff0055, #ffaa00, #00ff88, #00d4ff, #9d00ff, #ff0055);
  animation: spinDeco 3.5s linear infinite;
  filter: blur(2px);
}

.avatar-deco.deco-pulse {
  border: 2px solid var(--accent);
  animation: pulseDeco 2s infinite ease-out;
}

.avatar-deco.deco-halo {
  border: 2px solid #ffea00;
  top: -14px;
  height: 14px;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  box-shadow: 0 0 12px #ffea00;
}

.avatar-deco.deco-wings {
  background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
  filter: blur(6px);
}

.avatar-deco.deco-fire_ring {
  border: 2px solid #ff3300;
  box-shadow: 0 0 16px #ff3300, inset 0 0 10px #ff6600;
  animation: firePulse 1.5s infinite alternate ease-in-out;
}

.avatar-deco.deco-star_orbit {
  border: 1px dotted rgba(255,255,255,0.5);
  animation: spinDeco 6s linear infinite;
}

@keyframes firePulse {
  0% { transform: scale(0.98); opacity: 0.8; }
  100% { transform: scale(1.04); opacity: 1; }
}

@keyframes spinDeco {
  100% { transform: rotate(360deg); }
}

@keyframes pulseDeco {
  0% { transform: scale(0.95); opacity: 0.9; }
  100% { transform: scale(1.18); opacity: 0; }
}

.status-dot {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid #121216;
  z-index: 3;
}

.status-online { background: #23a55a; }
.status-idle { background: #f0b232; }
.status-dnd { background: #f23f43; }
.status-offline { background: #80848e; }

.username-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.username {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  position: relative;
  color: var(--username-color, var(--text-main));
}

.username.glow {
  text-shadow: 0 0 14px var(--username-color, var(--accent));
}

.username.fx-writing::after {
  content: "";
  display: inline-block;
  width: 0.09em;
  height: 0.95em;
  margin-left: 3px;
  vertical-align: -0.12em;
  background: currentColor;
  animation: blink 0.8s step-end infinite;
}

.username.fx-writing.done::after {
  display: none;
}

.username-particle-layer {
  position: absolute;
  inset: -14px -22px -12px;
  pointer-events: none;
  overflow: visible;
}

.username-particle {
  position: absolute;
  bottom: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  animation: usernameParticleFloat linear forwards;
}

@keyframes usernameParticleFloat {
  0% { opacity: 0; transform: translate3d(0, 4px, 0) scale(0.6); }
  20% { opacity: 0.9; }
  100% { opacity: 0; transform: translate3d(var(--drift, 0px), -30px, 0) scale(1); }
}

.macro-rainbow {
  background: linear-gradient(90deg, #ff4d4d, #f9cb28, #4ade80, #38bdf8, #c084fc, #ff4d4d);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rainbowText 4s linear infinite;
}

@keyframes rainbowText {
  to { background-position: 200% center; }
}

.uid-badge {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  padding: 2px 7px;
  border-radius: 6px;
}

.uid-badge.uid-block {
  margin-bottom: 10px;
}

.macro-code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85em;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 1px 5px;
  border-radius: 5px;
  color: var(--text-main);
}

.macro-mark {
  background: rgba(255, 255, 255, 0.18);
  color: var(--text-main);
  padding: 1px 5px;
  border-radius: 4px;
}

.macro-spoiler {
  background: rgba(255, 255, 255, 0.22);
  color: transparent;
  border-radius: 4px;
  padding: 0 4px;
  transition: color 0.2s ease, background 0.2s ease;
}

.macro-spoiler:hover {
  color: inherit;
  background: rgba(255, 255, 255, 0.08);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  margin-bottom: 14px;
  max-width: 100%;
}

.badge {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  color: var(--badge-color);
  transition: transform 0.18s ease;
}

.badge.glow {
  filter: drop-shadow(0 0 6px var(--badge-color));
}

.badge:hover {
  transform: scale(1.22);
}

.badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bio {
  font-size: 0.92rem;
  color: var(--text-muted);
  min-height: 1.5em;
  margin-bottom: 16px;
}

.type-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--text-muted);
  vertical-align: -2px;
  margin-left: 2px;
  animation: blink 0.9s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.audio-player-box {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  margin-bottom: 12px;
  text-align: left;
}

.audio-player-cover {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2b2b36, #15151c);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.audio-player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.audio-player-body {
  flex: 1;
  overflow: hidden;
}

.audio-player-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.audio-player-meta {
  overflow: hidden;
  min-width: 0;
}

.player-artist-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.player-artist {
  flex: 1;
  min-width: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-track-count {
  flex-shrink: 0;
  font-size: 0.62rem;
  color: var(--text-muted);
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.player-skip-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.player-skip-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.player-skip-btn.hidden {
  display: none;
}

.player-title {
  font-size: 0.83rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-play-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.player-progress-wrap {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  margin-top: 7px;
  cursor: pointer;
  overflow: hidden;
}

.player-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 99px;
}

.player-times {
  display: flex;
  justify-content: space-between;
  font-size: 0.66rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.presence-box,
.discord-server-box {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  text-align: left;
  margin-bottom: 12px;
}

.presence-cover {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2b2b36, #15151c);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.presence-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.presence-info {
  overflow: hidden;
  flex: 1;
}

.presence-title {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.presence-sub,
.presence-details {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.discord-server-left {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.discord-server-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
  background: #2b2d31;
  flex-shrink: 0;
}

.discord-server-meta {
  overflow: hidden;
  min-width: 0;
}

.discord-server-label {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.discord-server-name {
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discord-server-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.count-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dot-online,
.dot-total {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.dot-online { background: #23a55a; }
.dot-total { background: #80848e; }

.discord-join-btn {
  padding: 7px 14px;
  border-radius: 8px;
  border: none;
  background: #248046;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.18s ease, transform 0.18s ease;
}

.discord-join-btn:hover {
  background: #1a6334;
  transform: translateY(-1px);
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin: 6px 0 18px;
}

.link-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.link-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.link-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.25);
  filter: drop-shadow(0 0 8px var(--accent));
}

.card-footer {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--card-border);
  font-size: 0.76rem;
  color: var(--text-muted);
}

.card-footer.footer-hidden {
  display: none;
}

#card-bottom-left { justify-self: start; }
#card-bottom-center { justify-self: center; }
#card-bottom-right { justify-self: end; }

.meta-slot {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  position: relative;
}

svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

@media (max-width: 600px) {
  body {
    align-items: flex-start;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    padding:
      calc(72px + env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      calc(24px + env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }

  body.has-screen-top {
    padding-top: calc(116px + env(safe-area-inset-top));
  }

  body.has-screen-bottom {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .profile-card {
    width: 100%;
    max-width: var(--card-width);
    padding: 24px 18px 18px;
    filter: none;
  }

  .card-banner {
    width: calc(100% + 36px);
    height: 96px;
    margin: -24px -18px 0;
  }

  .card-banner:not(.hidden) + .avatar-wrapper {
    margin-top: -38px;
  }

  .avatar-wrapper {
    width: 84px;
    height: 84px;
    margin-bottom: 12px;
  }

  .username-wrap {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }

  .username {
    font-size: 1.3rem;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .uid-badge {
    font-size: 0.65rem;
  }

  .badges {
    gap: 6px;
    padding: 5px 10px;
    margin-bottom: 12px;
  }

  .badge {
    width: 17px;
    height: 17px;
  }

  .bio {
    font-size: 0.86rem;
    overflow-wrap: anywhere;
  }

  .audio-player-box,
  .presence-box,
  .discord-server-box {
    padding: 10px;
    gap: 10px;
  }

  .audio-player-cover,
  .presence-cover,
  .discord-server-icon {
    width: 42px;
    height: 42px;
  }

  .discord-server-box {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .discord-server-left {
    flex: 1 1 100%;
  }

  .discord-server-name {
    font-size: 0.78rem;
  }

  .discord-server-counts {
    font-size: 0.66rem;
  }

  .discord-join-btn {
    padding: 7px 10px;
    margin-left: auto;
  }

  .player-title,
  .presence-title {
    font-size: 0.78rem;
  }

  .player-artist,
  .presence-sub,
  .presence-details {
    font-size: 0.66rem;
  }

  .links {
    gap: 10px;
    margin: 4px 0 14px;
  }

  .link-btn {
    width: 40px;
    height: 40px;
  }

  .card-footer {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 6px;
    padding-top: 12px;
    font-size: 0.72rem;
  }

  #card-bottom-left,
  #card-bottom-center,
  #card-bottom-right {
    justify-self: center;
  }

  .meta-slot {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .top-controls {
    top: calc(12px + env(safe-area-inset-top));
    left: max(12px, env(safe-area-inset-left));
  }

  .control-btn {
    width: 38px;
    height: 38px;
  }

  .screen-slot {
    z-index: 16;
  }

  .screen-top-left {
    top: calc(62px + env(safe-area-inset-top));
    left: max(12px, env(safe-area-inset-left));
  }

  .screen-top-right {
    top: calc(62px + env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
  }

  .screen-bottom-left {
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: max(12px, env(safe-area-inset-left));
  }

  .screen-bottom-right {
    bottom: calc(12px + env(safe-area-inset-bottom));
    right: max(12px, env(safe-area-inset-right));
  }

  .screen-slot .meta-item {
    padding: 5px 9px;
    font-size: 0.7rem;
  }

  .toast {
    bottom: calc(18px + env(safe-area-inset-bottom));
    max-width: calc(100vw - 24px);
  }

  .splash {
    padding: 24px;
  }

  .splash-text {
    font-size: 0.85rem;
    letter-spacing: 0.14em;
    text-align: center;
  }
}

@media (max-height: 620px) {
  body {
    align-items: flex-start;
    overflow-y: auto;
    padding-top: calc(72px + env(safe-area-inset-top));
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
}

@media (hover: none), (pointer: coarse) {
  body.custom-cursor-active,
  body.custom-cursor-active * {
    cursor: auto !important;
  }

  .cursor-main,
  .cursor-secondary,
  .cursor-img,
  .cursor-trail-layer,
  .custom-tooltip {
    display: none !important;
  }

  .profile-card {
    filter: none;
  }

  .control-btn:hover,
  .link-btn:hover,
  .badge:hover,
  .discord-join-btn:hover {
    transform: none;
  }
}