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

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
  background: #000;
  color: #fff;
  cursor: none;
}

/* Custom dot cursor */
body::after {
  content: '';
  position: fixed;
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  top: var(--my, -100px);
  left: var(--mx, -100px);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
  transition: transform 0.05s ease;
}

/* ── Splash Screen ── */
.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  cursor: none;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.splash.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-text {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.7);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ── Main Page ── */
.main {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.main.hidden {
  display: none;
}

/* Background video */
.bg-video {
  position: fixed;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%) scale(1.05);
  z-index: 0;
  filter: blur(2px) brightness(0.3);
  object-fit: cover;
}

/* Overlay gradient */
.bg-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.8) 100%);
  z-index: 1;
}

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

/* ── Sound Toggle ── */
.sound-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 50;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: none;
  transition: background 0.3s, transform 0.2s;
  backdrop-filter: blur(10px);
}

.sound-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
}

.sound-toggle.muted i::before {
  content: "\f6a9";
}

/* ── Profile Container ── */
.profile-container {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: fadeInUp 0.8s ease-out;
  max-width: 520px;
  width: 90%;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Avatar ── */
.avatar-wrapper {
  position: relative;
  margin-bottom: 6px;
}

.avatar-glow {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

.avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.8);
  position: relative;
  z-index: 1;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* ── Username ── */
.username {
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: #fff;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.8),
    0 0 20px rgba(255, 255, 255, 0.6),
    0 0 40px rgba(255, 255, 255, 0.3),
    0 0 80px rgba(255, 255, 255, 0.15);
  position: relative;
}

/* Glitch / fade animation like guns.lol */
.glitch {
  animation: glitchFade 8s ease-in-out infinite;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: #fff;
}

.glitch::before {
  animation: glitchLeft 6s ease-in-out infinite;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  color: #fff;
}

.glitch::after {
  animation: glitchRight 7s ease-in-out infinite;
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
  color: #fff;
}

@keyframes glitchFade {
  0%, 100% { opacity: 1; }
  15% { opacity: 0.85; }
  30% { opacity: 1; }
  45% { opacity: 0.6; text-shadow: 0 0 40px rgba(255, 255, 255, 0.8); }
  50% { opacity: 0.3; }
  55% { opacity: 0.9; }
  60% { opacity: 1; }
  75% { opacity: 0.95; }
  80% { opacity: 0.4; text-shadow: 0 0 60px rgba(255, 255, 255, 1); }
  85% { opacity: 1; }
}

@keyframes glitchLeft {
  0%, 100% { transform: translateX(0); opacity: 0; }
  44% { opacity: 0; }
  45% { transform: translateX(-3px) skewX(-2deg); opacity: 0.7; }
  46% { transform: translateX(2px) skewX(1deg); opacity: 0.4; }
  47% { transform: translateX(0); opacity: 0; }
  79% { opacity: 0; }
  80% { transform: translateX(4px) skewX(-3deg); opacity: 0.6; }
  81% { transform: translateX(-2px); opacity: 0.3; }
  82% { transform: translateX(0); opacity: 0; }
}

@keyframes glitchRight {
  0%, 100% { transform: translateX(0); opacity: 0; }
  49% { opacity: 0; }
  50% { transform: translateX(3px) skewX(2deg); opacity: 0.5; }
  51% { transform: translateX(-4px) skewX(-1deg); opacity: 0.7; }
  52% { transform: translateX(0); opacity: 0; }
  84% { opacity: 0; }
  85% { transform: translateX(-3px) skewX(3deg); opacity: 0.5; }
  86% { transform: translateX(2px); opacity: 0.3; }
  87% { transform: translateX(0); opacity: 0; }
}

/* ── Bio ── */
.bio {
  font-size: 0.95rem;
  font-weight: 400;
  color: #fff;
  letter-spacing: 1.5px;
  text-transform: lowercase;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4), 0 0 20px rgba(255, 255, 255, 0.15);
}

/* ── Social Links ── */
.social-links {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.social-link {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.25rem;
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.social-link:hover {
  background: rgba(138, 43, 226, 0.25);
  border-color: rgba(138, 43, 226, 0.5);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(138, 43, 226, 0.3);
}

.social-link:nth-child(1):hover {
  background: rgba(0, 136, 204, 0.25);
  border-color: rgba(0, 136, 204, 0.5);
  box-shadow: 0 8px 25px rgba(0, 136, 204, 0.3);
}

.social-link:nth-child(2):hover {
  background: rgba(27, 40, 56, 0.5);
  border-color: rgba(102, 192, 244, 0.5);
  box-shadow: 0 8px 25px rgba(102, 192, 244, 0.2);
}

.social-link:nth-child(3):hover {
  background: rgba(88, 101, 242, 0.25);
  border-color: rgba(88, 101, 242, 0.5);
  box-shadow: 0 8px 25px rgba(88, 101, 242, 0.3);
}

/* ── Player Stack ── */
.player-stack {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin-top: 16px;
}

/* ── Music Player ── */
.music-player {
  width: 100%;
  background: rgba(30, 30, 30, 0.2);
  border-radius: 12px;
  padding: 12px;
  backdrop-filter: blur(10px);
  transition: opacity 0.3s, transform 0.3s ease;
  position: relative;
  z-index: 3;
}

.music-player.track-out {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s cubic-bezier(0.4, 0, 1, 1), transform 0.2s cubic-bezier(0.4, 0, 1, 1);
}

.music-player.track-in {
  animation: trackSlideUp 0.35s cubic-bezier(0, 0, 0.2, 1) forwards;
}

@keyframes trackSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.music-player:hover {
  opacity: 1;
}

/* ── Peeking Cards ── */
.player-tabs {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -6px;
  position: relative;
  z-index: 1;
}

.player-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  width: calc(100% - 20px);
  background: rgba(35, 35, 35, 0.3);
  border-radius: 0 0 8px 8px;
  padding: 3px 10px 4px;
  cursor: none;
  transition: all 0.2s ease;
  backdrop-filter: blur(6px);
}

.player-tab + .player-tab {
  width: calc(100% - 36px);
  margin-top: -2px;
}

.player-tab:hover {
  background: rgba(50, 50, 50, 0.45);
}

.player-tab-cover {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
}

.player-tab-title {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-tab:hover .player-tab-title {
  color: rgba(255, 255, 255, 0.7);
}

.player-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-cover {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.player-info {
  flex: 1;
  min-width: 0;
}

.player-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  display: block;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-time {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  min-width: 28px;
  font-variant-numeric: tabular-nums;
}

.player-progress {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  cursor: none;
  position: relative;
  transition: height 0.15s ease, margin 0.15s ease;
}

.player-progress:hover {
  height: 8px;
}

.player-progress-fill {
  height: 100%;
  background: #fff;
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}

.player-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  cursor: none;
  transition: color 0.2s, transform 0.2s;
  padding: 4px;
}

.player-btn:hover {
  color: #fff;
  transform: scale(1.15);
}

.player-btn-main {
  font-size: 1.1rem;
  color: #fff;
}

/* ── Text Selection ── */
::selection {
  background: #fff;
  color: #000;
}

::-moz-selection {
  background: #fff;
  color: #000;
}

/* ── Visit Counter ── */
.visit-counter {
  position: fixed;
  bottom: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
  z-index: 50;
  opacity: 0;
  transition: opacity 0.5s;
}

.visit-counter.visible {
  opacity: 1;
}

.visit-counter i {
  font-size: 0.85rem;
}

/* ── Footer Link ── */
.footer-link {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.75rem;
  text-decoration: none;
  z-index: 50;
  transition: color 0.2s;
  white-space: nowrap;
}

.footer-link:hover {
  color: rgba(255, 255, 255, 0.6);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  display: none;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .username {
    font-size: 2rem;
    letter-spacing: 4px;
  }

  .avatar {
    width: 70px;
    height: 70px;
  }

  .avatar-letter {
    font-size: 1.8rem;
  }

  .social-link {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
  }

  .music-player {
    max-width: 300px;
  }
}
