:root {
  --bg: #060607;
  --panel: #0d0e10;
  --panel-2: #0a0b0c;
  --border: rgba(220,38,58,0.16);
  --border-strong: rgba(220,38,58,0.4);
  --red: #e0324a;
  --red-dim: #8f1f2f;
  --red-glow: rgba(224,50,74,0.45);
  --text: #f2f2f3;
  --text-dim: #9aa0a6;
  --text-mute: #63696f;
  --green: #2fd67a;
  --orange: #f2a93b;
  --blue: #5865f2;
  --purple: #8b5cf6;
  --radius: 12px;
  --mono: "JetBrains Mono", "SF Mono", Consolas, ui-monospace, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  user-select: none;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* Custom star cursor */
#cursor-star {
  position: fixed;
  top: 0; left: 0;
  width: 22px; height: 22px;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 8px var(--red-glow));
  transition: transform .06s ease-out;
  will-change: transform;
}
#cursor-star svg { width: 100%; height: 100%; animation: spin 4s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Click to enter overlay */
#enterOverlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(4, 5, 7, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.enter-text {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fff;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.4));
  animation: pulseEnter 2s infinite ease-in-out;
}
@keyframes pulseEnter {
  0%, 100% { opacity: 0.6; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.02); }
}

/* Home Wrap */
.home-wrap {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #050506;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  display: block;
  filter: saturate(1.05) brightness(0.75);
}

.home-bg-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(90, 25, 45, 0.4), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(40, 20, 80, 0.35), transparent 50%),
    linear-gradient(180deg, #090a0d 0%, #030304 100%);
}

.home-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(circle at center, rgba(0,0,0,0.15), rgba(0,0,0,0.7));
  pointer-events: none;
}

#particlesCanvas {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

/* Sound Toggle Button */
.sound-toggle-btn {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 20;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(18, 22, 32, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s ease;
}
.sound-toggle-btn:hover {
  background: rgba(220, 38, 58, 0.3);
  border-color: var(--red);
  transform: scale(1.05);
}
.sound-toggle-btn svg { width: 20px; height: 20px; }

/* Main Guns.lol Container */
.guns-card-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 16px;
}

/* Profile Box */
.guns-profile-box {
  background: rgba(13, 14, 18, 0.76);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Header */
.guns-header {
  display: flex;
  gap: 18px;
  align-items: center;
}

.guns-avatar-wrapper {
  position: relative;
  width: 78px;
  height: 78px;
  flex-shrink: 0;
}
.guns-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.guns-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #e0324a, #8f1f2f);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}

.guns-user-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}
.guns-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.guns-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}
.guns-badges {
  display: flex;
  gap: 6px;
  align-items: center;
}
.guns-badge-img {
  width: 19px;
  height: 19px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.guns-bio-line {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.4;
}
.guns-link {
  color: #fff;
  font-weight: 600;
  border-bottom: 1px dashed rgba(255,255,255,0.4);
  transition: all .2s ease;
}
.guns-link:hover {
  color: var(--red);
  border-bottom-color: var(--red);
}

.guns-joined {
  font-size: 11.5px;
  color: var(--text-mute);
  font-weight: 500;
}

/* Nested Discord Sub-Card */
.guns-discord-subcard {
  background: rgba(8, 9, 12, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guns-subcard-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.guns-subcard-avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.guns-subcard-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.guns-status-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e0324a; /* DND red */
  border: 3px solid #08090c;
  box-shadow: 0 0 8px rgba(224,50,74,0.7);
}

.guns-subcard-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
  flex: 1;
}
.guns-subcard-username-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.guns-subcard-username {
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
}
.guns-sub-tag {
  background: rgba(88, 101, 242, 0.3);
  color: #8da2fb;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}
.guns-sub-icon {
  font-size: 13px;
}

.guns-subcard-status {
  margin: 0;
  font-size: 12.5px;
  color: #c9ccd0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 18px;
}

/* Rich Presence Activity Box */
.guns-rpc-box {
  background: rgba(22, 24, 30, 0.75);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 3px solid #5865f2;
}
.guns-rpc-image-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}
.guns-rpc-large-img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
}
.guns-rpc-small-img {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #16181e;
  background: #000;
}
.guns-rpc-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-size: 12px;
}
.guns-rpc-title {
  font-weight: 700;
  color: #fff;
}
.guns-rpc-line {
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.guns-rpc-time {
  color: var(--text-mute);
  font-size: 11px;
}

/* Stats Footer */
.guns-stats-line {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 11.5px;
  color: var(--text-mute);
  padding-top: 4px;
}
.guns-stats-line span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Music Player Widget */
.guns-music-player {
  background: rgba(13, 14, 18, 0.76);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  padding: 14px 18px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 14px;
}
.music-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(220, 38, 58, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  flex-shrink: 0;
}
.music-note-icon { width: 20px; height: 20px; }

.music-info-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  overflow: hidden;
}
.music-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.music-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.music-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.music-time {
  font-size: 10.5px;
  font-family: var(--mono);
  color: var(--text-mute);
  min-width: 28px;
}
.music-bar-track {
  flex: 1;
  height: 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
  position: relative;
  cursor: pointer;
  overflow: hidden;
}
.music-bar-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: linear-gradient(90deg, #e0324a, #ff5770);
  border-radius: 3px;
  transition: width 0.1s linear;
}

.music-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.music-ctrl-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 14px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all .2s ease;
}
.music-ctrl-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}
.music-ctrl-btn.play-btn {
  font-size: 16px;
  color: #fff;
}

/* Corner Gengar */
.gengar-corner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 20;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease;
}
.gengar-corner:hover {
  transform: scale(1.15) rotate(5deg);
}
.gengar-corner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(139, 92, 246, 0.4));
}
.gengar-fallback {
  font-size: 28px;
}
.gengar-hint {
  position: fixed;
  bottom: 34px;
  right: 78px;
  z-index: 20;
  font-size: 11px;
  color: var(--text-mute);
  font-family: var(--mono);
}
