:root {
  --deep: #04060a;
  --panel: rgba(12,18,28,0.55);
  --glass: rgba(255,255,255,0.03);
  --border: rgba(126,200,227,0.10);
  --border-hover: rgba(126,200,227,0.35);
  --text: #dce8f0;
  --muted: #6b8fa3;
  --cyan: #7ec8e3;
  --cyan-dim: rgba(126,200,227,0.15);
  --cyan-glow: rgba(126,200,227,0.25);
  --silver: #8aa4b8;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
img, video, canvas { user-drag: none; -webkit-user-drag: none; pointer-events: none; }
button, a, input { pointer-events: auto; }

html, body {
  height: 100%;
  background: var(--deep);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  overflow: hidden;
}

/* Video Background */
.video-bg {
  position: fixed;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  object-position: center 40%;
  z-index: 0;
  pointer-events: none;
}
@media (max-width: 768px) {
  .video-bg {
    object-position: center 20%;
    transform: translate(-50%, -50%) scale(1.25);
  }
}
.video-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(4,6,10,0.08) 0%, rgba(4,6,10,0.22) 60%, rgba(4,6,10,0.45) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Particles */
#particles {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .55;
}

/* Click to Enter Overlay */
.enter-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4,6,10,0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity .8s ease, visibility .8s ease;
  cursor: pointer;
}
.enter-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.enter-box {
  text-align: center;
  user-select: none;
}
.enter-name {
  font-size: clamp(2.2rem, 8vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -.05em;
  margin-bottom: 8px;
  color: var(--text);
  text-shadow: 0 2px 20px rgba(0,0,0,.5);
}
.enter-line {
  font-family: 'Space Mono', monospace;
  font-size: clamp(.75rem, 2.5vw, .9rem);
  color: var(--cyan);
  letter-spacing: .25em;
  text-transform: lowercase;
  white-space: nowrap;
  animation: pulseLine 2.5s ease-in-out infinite;
}
@keyframes pulseLine {
  0%, 100% { opacity: .6; }
  50% { opacity: 1; }
}

/* Profile */
.profile {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transform: scale(.96);
  transition: opacity 1s cubic-bezier(.22,1,.36,1), transform 1s cubic-bezier(.22,1,.36,1);
  pointer-events: none;
}
.profile.active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* Card with 3D tilt */
.card {
  width: min(92%, 420px);
  max-height: 92vh;
  overflow-y: auto;
  padding: 32px 26px 28px;
  border-radius: 24px;
  background: rgba(12,18,28,0.04);
  border: 1px solid rgba(126,200,227,0.18);
  box-shadow: 0 40px 100px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.02);
  transform-style: preserve-3d;
  will-change: transform;
  scrollbar-width: none;
}
.card::-webkit-scrollbar { display: none; }

/* Audio Player */
.audio-player {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,0.005);
  border: 1px solid rgba(126,200,227,0.1);
}
.ap-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--silver);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .25s;
}
.ap-btn:hover { color: var(--text); border-color: var(--border-hover); }
.ap-btn:active { transform: scale(.95); }
.ap-icon { width: 16px; height: 16px; }
.ap-track { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.06); cursor: pointer; position: relative; }
.ap-bar { width: 100%; height: 100%; border-radius: 2px; overflow: hidden; }
.ap-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--cyan-dim), var(--cyan)); border-radius: 2px; transition: width .1s linear; }
.ap-time { font-family: 'Space Mono', monospace; font-size: .6rem; color: var(--muted); white-space: nowrap; }

/* Avatar */
.avatar-box {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 0 auto 16px;
}
.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.06);
  position: relative;
  z-index: 2;
  filter: saturate(.9) contrast(1.05);
}
.avatar-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  background: conic-gradient(from 0deg, var(--cyan-dim), var(--cyan), var(--cyan-dim), var(--cyan-dim)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: spinRing 6s linear infinite;
  z-index: 1;
}
@keyframes spinRing { to { transform: rotate(360deg); } }

/* Badges */
.badge-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.badge {
  position: relative;
  width: 28px;
  height: 28px;
  color: var(--silver);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  transition: color .25s;
}
.badge:hover { color: var(--cyan); }
.badge svg { width: 22px; height: 22px; }
.badge::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(10,16,24,0.9);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: .65rem;
  font-family: 'Space Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 20;
}
.badge:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Name */
.username {
  font-size: clamp(2.4rem, 9vw, 3rem);
  font-weight: 800;
  letter-spacing: -.05em;
  text-align: center;
  line-height: 1;
  margin-bottom: 8px;
  background: linear-gradient(180deg, #fff 20%, #aecce0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Typewriter */
.type-box {
  text-align: center;
  font-family: 'Space Mono', monospace;
  font-size: .72rem;
  color: var(--cyan);
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 22px;
  white-space: nowrap;
  line-height: 1.4;
}
.cursor {
  color: var(--cyan);
  animation: blink 1s step-end infinite;
  text-shadow: none;
}
@keyframes blink { 50% { opacity: 0; } }

/* Links */
.link-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.glink {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.005);
  border: 1px solid rgba(126,200,227,0.1);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  font-size: .9rem;
  position: relative;
  overflow: hidden;
  transition: border-color .3s, background .3s, transform .25s;
}
.glink:hover {
  background: rgba(255,255,255,.015);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}
.glink:active { transform: translateY(0); }
.glink-ico {
  width: 18px;
  height: 18px;
  color: var(--silver);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color .3s;
}
.glink:hover .glink-ico { color: var(--cyan); }
.glink-ico svg { width: 18px; height: 18px; }
.glink-txt { font-weight: 600; font-size: .85rem; }
.glink-sub { margin-left: auto; font-family: 'Space Mono', monospace; font-size: .72rem; color: var(--muted); transition: color .3s; }
.glink:hover .glink-sub { color: var(--text); }
.glink-arr, .glink-tick { width: 14px; height: 14px; color: var(--muted); flex-shrink: 0; margin-left: 8px; transition: transform .3s, color .3s, opacity .3s; }
.glink:hover .glink-arr { transform: translateX(3px); color: var(--cyan); }
.glink-tick { display: none; color: #3b82f6; }
.glink.copied .glink-arr { display: none; }
.glink.copied .glink-tick { display: block; }

/* Footer */
.pfooter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.pfooter-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  color: var(--muted);
  font-family: 'Space Mono', monospace;
}
.pfooter-item svg { pointer-events: none; }
.online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 8px #3b82f6;
  animation: pulseDot 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.85); }
}

/* Mobile */
@media (max-width: 480px) {
  .card { padding: 26px 20px 22px; border-radius: 20px; }
  .avatar-box { width: 96px; height: 96px; }
  .username { margin-bottom: 6px; }
  .type-box { margin-bottom: 18px; }
  .audio-player { margin-bottom: 14px; }
  .badge { width: 26px; height: 26px; }
  .badge svg { width: 20px; height: 20px; }
}
