:root {
  --accent: #8b5cf6;
  --card-opacity: 0.6;
  --card-blur: 14px;
  --card-radius: 22px;
  --font-username: 'Orbitron', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

html, body {
  height: 100%;
  background: #07070c;
  color: #e8e8ee;
  font-family: var(--font-body);
  overflow: hidden;
}

.hidden { display: none !important; }

/* ===== background layers ===== */
.bg-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
#bg-color { background: #07070c; }
#bg-dim { background: rgba(0, 0, 0, var(--bg-dim, 0.45)); pointer-events: none; z-index: 1; }
#bg-image, #bg-video { filter: blur(var(--bg-blur, 0px)); transform: scale(1.05); }

/* ===== profile ===== */
.profile {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.profile-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
}
.profile.section-enter {
  animation: profileIn 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes profileIn {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}
.profile.slide-out-up {
  opacity: 0;
  transform: translateY(-40px) scale(0.98);
  pointer-events: none;
}
.profile.slide-in-down {
  animation: slideInDown 0.7s cubic-bezier(0.22,1,0.36,1) forwards;
}
@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-40px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

/* ===== section 2 ===== */
.section2 {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.section2.slide-in-up {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.section2.slide-out-down {
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  pointer-events: none;
}

.s2-card {
  width: min(520px, 92vw);
  padding: 40px 36px;
  text-align: center;
  background: rgba(14, 14, 22, var(--card-opacity));
  backdrop-filter: blur(var(--card-blur));
  -webkit-backdrop-filter: blur(var(--card-blur));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--card-radius);
  box-shadow: 0 0 40px -10px var(--accent), 0 30px 60px -30px rgba(0,0,0,0.8);
}
.s2-title {
  font-family: var(--font-username);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  text-shadow: 0 0 20px var(--accent);
}
.s2-content {
  font-size: 14px;
  color: #b0b0c8;
  line-height: 1.8;
}

/* ===== scroll hint ===== */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  animation: hintFadeIn 1s ease 1.4s both;
}
.scroll-hint-up {
  bottom: 32px;
}
@keyframes hintFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.scroll-hint-text {
  font-family: 'Consolas', monospace;
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  animation: hintPulse 2.4s ease-in-out infinite;
}
.scroll-hint-arrow {
  color: rgba(255,255,255,0.45);
  animation: hintBounce 2.4s ease-in-out infinite;
}
.scroll-hint-arrow.up {
  animation: hintBounceUp 2.4s ease-in-out infinite;
}
@keyframes hintPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; color: var(--accent); }
}
@keyframes hintBounce {
  0%, 100% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(5px); opacity: 1; }
}
@keyframes hintBounceUp {
  0%, 100% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(-5px); opacity: 1; }
}

.card {
  width: min(420px, 92vw);
  padding: 42px 34px 34px;
  text-align: center;
  background: rgba(14, 14, 22, var(--card-opacity));
  backdrop-filter: blur(var(--card-blur));
  -webkit-backdrop-filter: blur(var(--card-blur));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--card-radius);
  box-shadow: 0 0 40px -10px var(--accent), 0 30px 60px -30px rgba(0,0,0,0.8);
  transform-style: preserve-3d;
  transition: box-shadow 0.3s;
  will-change: transform;
}

.avatar-wrap { position: relative; display: inline-block; margin-bottom: 18px; }
.avatar {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 0 25px -5px var(--accent);
  display: block;
}
.avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-username);
  font-size: 42px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(255,255,255,0.04);
}
.presence-dot {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid #0e0e16;
  background: #747f8d;
}
.presence-dot.online { background: #3ba55c; }
.presence-dot.idle { background: #faa61a; }
.presence-dot.dnd { background: #ed4245; }

.username {
  font-family: var(--font-username);
  font-size: 38px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.bio {
  min-height: 24px;
  font-size: 15px;
  color: #b8b8c8;
  margin-bottom: 18px;
}
.caret {
  display: inline-block;
  color: var(--accent);
  animation: blink 0.9s step-end infinite;
  font-weight: 400;
}
@keyframes blink { 50% { opacity: 0; } }

.presence {
  display: none; /* replaced by the side discord card */
}

/* ===== links ===== */
.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
}
.links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #d6d6e2;
  transition: transform 0.2s, box-shadow 0.2s, color 0.2s, border-color 0.2s;
}
.links a:hover {
  transform: translateY(-4px) scale(1.08);
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 18px -4px var(--accent);
}
.links a svg { width: 21px; height: 21px; }

.views {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #8a8aa0;
}

/* ===== compact volume pill (top-left) — icon only, expands on hover ===== */
.audio-ctl {
  position: fixed;
  left: 14px;
  top: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(14, 14, 22, var(--card-opacity, 0.6));
  backdrop-filter: blur(var(--card-blur, 14px));
  -webkit-backdrop-filter: blur(var(--card-blur, 14px));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 20px -4px rgba(0,0,0,0.6);
  overflow: hidden;
  transition: padding 0.25s ease;
}
.audio-ctl:hover {
  gap: 7px;
  padding: 6px 10px;
}
.vol-mute-btn {
  background: none;
  border: none;
  color: #9898b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0;
  flex-shrink: 0;
  transition: color 0.15s;
}
.vol-mute-btn:hover { color: var(--accent); }
#vol-slider {
  width: 0;
  max-width: 0;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  border-radius: 99px;
  background: rgba(255,255,255,0.15);
  outline: none;
  cursor: pointer;
  opacity: 0;
  transition: max-width 0.25s ease, opacity 0.2s ease 0.05s;
  pointer-events: none;
}
.audio-ctl:hover #vol-slider {
  max-width: 72px;
  width: 72px;
  opacity: 1;
  pointer-events: auto;
}
#vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 5px var(--accent);
  cursor: pointer;
  transition: transform 0.15s;
}
#vol-slider:hover::-webkit-slider-thumb { transform: scale(1.3); }
#vol-slider::-moz-range-thumb {
  width: 11px; height: 11px;
  border-radius: 50%; border: none;
  background: var(--accent);
  cursor: pointer;
}

/* ===== in-card music player ===== */
.card-player {
  width: 100%;
  margin-top: 4px;
}
.card-player-divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 10px 0 12px;
}
.card-player-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
  overflow: hidden;
}
.player-title {
  font-size: 11px;
  color: #a0a0bc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  letter-spacing: 0.4px;
  font-family: var(--font-body, 'Inter', sans-serif);
}
.card-player-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.player-time {
  font-size: 9px;
  color: #666688;
  font-variant-numeric: tabular-nums;
  min-width: 24px;
  font-family: 'Consolas', monospace;
}
.player-time:last-child { text-align: right; }
.player-seek {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  border-radius: 99px;
  background: rgba(255,255,255,0.1);
  outline: none;
  cursor: pointer;
}
.player-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  cursor: pointer;
  transition: transform 0.15s;
}
.player-seek:hover::-webkit-slider-thumb { transform: scale(1.35); }
.player-seek::-moz-range-thumb {
  width: 11px; height: 11px;
  border-radius: 50%; border: none;
  background: var(--accent);
  cursor: pointer;
}
.card-player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.player-btn {
  background: none;
  border: none;
  color: #8888aa;
  cursor: pointer;
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.player-btn:hover { color: #fff; background: rgba(255,255,255,0.06); }
.player-btn-main {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff !important;
  box-shadow: 0 0 14px -3px var(--accent);
}
.player-btn-main:hover { filter: brightness(1.15); background: var(--accent) !important; }
.player-btn-stop { background: none !important; }
.player-btn-stop:hover { background: rgba(239,68,68,0.12) !important; }
.player-btn-stop svg circle { transition: opacity 0.15s; }
.player-btn-stop:hover svg circle { opacity: 0.85; }

/* ===== custom cursor ===== */
body.cursor-custom, body.cursor-custom * { cursor: none !important; }
.custom-cursor {
  position: fixed;
  z-index: 999;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.custom-cursor.glow {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px 4px var(--accent);
}
.custom-cursor.ring {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--accent);
}
.custom-cursor img { width: 32px; height: 32px; transform: translate(50%, 50%); }

@media (max-width: 480px) {
  .username { font-size: 30px; }
  .card { padding: 34px 22px 26px; }
}

/* ===== Discord presence card (right of main card) ===== */
.discord-card {
  /* sits as a flex sibling next to .card inside .profile-row */
  width: 190px;
  flex-shrink: 0;
  align-self: flex-start;
  padding: 11px 13px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(14, 14, 22, var(--card-opacity, 0.75));
  backdrop-filter: blur(var(--card-blur, 14px));
  -webkit-backdrop-filter: blur(var(--card-blur, 14px));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  box-shadow: 0 8px 32px -8px rgba(0,0,0,0.7),
              0 0 0 1px rgba(255,255,255,0.03),
              0 0 24px -10px var(--accent);
  animation: dcSlideIn 0.5s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes dcSlideIn {
  from { opacity: 0; transform: translateX(16px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

/* header row: discord logo + label + dot + status */
.dc-header {
  display: flex;
  align-items: center;
  gap: 5px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 8px;
}
.dc-logo { color: #5865f2; flex-shrink: 0; }
.dc-header-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #5865f2;
  flex: 1;
}
.dc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #747f8d;
}
.dc-dot.online  { background: #3ba55c; box-shadow: 0 0 5px #3ba55c; }
.dc-dot.idle    { background: #faa61a; box-shadow: 0 0 5px #faa61a; }
.dc-dot.dnd     { background: #ed4245; box-shadow: 0 0 5px #ed4245; }
.dc-dot.offline { background: #747f8d; }
.dc-status-label {
  font-size: 9px;
  color: #66667c;
  text-transform: lowercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* main row: avatar + info */
.dc-main {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.dc-avatar-wrap { flex-shrink: 0; }
.dc-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(88,101,242,0.6);
  box-shadow: 0 0 10px -3px rgba(88,101,242,0.5);
  display: block;
}
.dc-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 1px;
}
.dc-name {
  font-size: 12px;
  font-weight: 700;
  color: #e8e8ee;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.3px;
}

/* activity block */
.dc-activity {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dc-playing-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #5865f2;
  font-weight: 700;
}
.dc-game-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.dc-activity-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.dc-activity-name {
  font-size: 11px;
  font-weight: 600;
  color: #c8c8e0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dc-activity-detail {
  font-size: 10px;
  color: #66667c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* hide on small screens where card stacks */
@media (max-width: 900px) {
  .discord-card { display: none !important; }
}
