:root {
  --bg: #000000;
  --card-alpha: 0.74;
  --vamp-font: var(--sans);
  --ink: #f0f0f0;
  --muted: #888888;
  --dim: #555555;
  --mono: "JetBrains Mono", "Fira Code", "Cascadia Code", ui-monospace, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --sigil-cur: url('sigilkore.cur') 15 0, url('sigilkore_white.png') 15 0, crosshair, default;
}

*, *::before, *::after {
  box-sizing: border-box;
  cursor: var(--sigil-cur) !important;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  overflow: hidden;
  cursor: var(--sigil-cur) !important;
}

body {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  user-select: none;
  -webkit-user-select: none;
}

/* page hide transition (JS toggles .page-hidden on #hub-container) */
#hub-container.page-hidden {
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.4s;
}

/* =========================================================
   HOMEPAGE - COMING SOON (full-page takeover)
   ========================================================= */
#hub-container {
  position: relative;
  z-index: 10;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  overflow: hidden;
  padding: 0;
}

.stage {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
}

.home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.6rem;
  width: 100%;
  max-width: 860px;
  padding: 2rem;
  animation: heroIn 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

/* -- Coming Soon: animated white-black-purple/red gradient -- */
.home-coming {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(2.2rem, 7.5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  text-transform: uppercase;
  background: linear-gradient(
    100deg,
    #ffffff 0%,
    #1a1a1a 20%,
    #7b2ff7 40%,
    #ff2d55 55%,
    #1a1a1a 72%,
    #ffffff 100%
  );
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  position: relative;
  padding-bottom: 1.3rem;
  animation: comingGradient 7s linear infinite;
}

@keyframes comingGradient {
  0%   { background-position: 0% 50%; }
  100% { background-position: 260% 50%; }
}

.home-coming::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: clamp(90px, 22vw, 180px);
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(220, 60, 60, 0.9), transparent);
  box-shadow: 0 0 18px rgba(220, 60, 60, 0.5);
}

/* -- small bottom watermark -- */
.home-watermark {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: rgba(220, 220, 220, 0.32);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
  z-index: 20;
  white-space: nowrap;
}

/* -- Violence Forums logo (centered) -- */
.home-brand-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.2rem, 3vw, 2rem);
  padding: 0.5rem;
}

.home-brand-row .home-logo {
  width: clamp(140px, 30vw, 280px);
  height: auto;
  max-height: 30vh;
  display: block;
  /* blend into the forest: soft pink glow instead of a hard drop-shadow box */
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 22px rgba(214, 77, 128, 0.28));
  opacity: 0.94;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease, opacity 0.5s ease;
}

.home-brand-row .home-logo:hover {
  transform: scale(1.04);
  opacity: 1;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 34px rgba(214, 77, 128, 0.45));
}

/* Pill navigation buttons */
.hub-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.hub-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 8px 22px;
  border-radius: 9999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  cursor: var(--sigil-cur) !important;
}

.hub-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.hub-btn:active {
  transform: translateY(0);
}

.hub-btn.shake-red {
  animation: violent-shake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both !important;
  color: #ff3344 !important;
  border-color: #ff3344 !important;
  box-shadow: 0 0 16px rgba(255, 51, 68, 0.4) !important;
}

@keyframes violent-shake {
  10%, 90% { transform: translate3d(-3px, 0, 0) scale(1.02); }
  20%, 80% { transform: translate3d(4px, 0, 0) scale(1.04); }
  30%, 50%, 70% { transform: translate3d(-5px, 0, 0) scale(1.05); }
  40%, 60% { transform: translate3d(5px, 0, 0) scale(1.04); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

/* ---------------- footer ---------------- */
.foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1rem 1.5rem 1.4rem;
  text-align: center;
}

.foot-brand {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: #b0b0b0;
}

.foot-alias {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #888888;
}

.foot-copy {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  color: #555555;
}

/* ---------------- animated rain-forest background ---------------- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #000000;
}

/* real rain-forest footage, self-hosted.
   Source: "Gloomy forest full of trees during a rainy afternoon" (Mixkit item 22729),
   used under the Mixkit Stock Video Free License (free for commercial + personal use,
   no attribution required). See assets/README.md. */
.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  /* grade the footage into a moody forest theme and darken for legibility */
  filter: grayscale(0.55) brightness(0.5) contrast(1.2) sepia(0.25) hue-rotate(58deg) saturate(1.1);
  transform: scale(1.06);
  animation: forestDrift 70s ease-in-out infinite alternate;
}

@keyframes forestDrift {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to   { transform: scale(1.12) translate3d(-1.6%, -0.8%, 0); }
}

/* slow rolling fog */
.bg-fog {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 55% 22% at 30% 62%, rgba(150, 168, 178, 0.075) 0%, transparent 70%),
    radial-gradient(ellipse 48% 18% at 74% 74%, rgba(140, 158, 170, 0.06) 0%, transparent 72%),
    radial-gradient(ellipse 70% 16% at 50% 88%, rgba(120, 138, 150, 0.05) 0%, transparent 75%);
  filter: blur(24px);
  animation: fogRoll 46s linear infinite alternate;
}

@keyframes fogRoll {
  from { transform: translate3d(-4%, 1.5%, 0); }
  to   { transform: translate3d(4%, -1.5%, 0); }
}

/* rain canvas sits above the forest, below the UI */
#rain {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  opacity: 0.72;
}

/* darkening vignette so the title always reads */
.bg-vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 78% 68% at 50% 46%, transparent 0%, rgba(0, 0, 0, 0.55) 72%, rgba(0, 0, 0, 0.88) 100%);
}

/* ---------------- mute button ---------------- */
.mute-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(14, 14, 14, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.75);
  cursor: var(--sigil-cur) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.mute-btn:hover {
  background: rgba(28, 28, 28, 0.95);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.8), 0 0 12px rgba(255, 255, 255, 0.15);
}

.mute-btn:active {
  transform: scale(0.94);
}

.mute-btn.is-muted {
  color: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.08);
}

.mute-icon {
  width: 19px;
  height: 19px;
  pointer-events: none;
}

.mute-icon.hidden {
  display: none;
}

/* ---------------- ghost audio ---------------- */
.ghost {
  position: fixed;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

/* =========================================================
   BIOLINK VIEWS (Logic + Elijah)
   ========================================================= */
.biolink-view {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s;
  background: #000000;
  overflow: hidden;
}

.biolink-view.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.biolink-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) brightness(0.38) contrast(1.2);
}

/* elijah's footage is full-color ASCII art — keep the color, just tame it
   so the card stays readable and it melts into the black page */
.biolink-view[data-profile="elijah"] .biolink-video-bg {
  /* portrait ascii art: contain (not cover) so nothing gets cropped,
     gentle zoom drift keeps it alive without stretching */
  object-fit: contain;
  object-position: center center;
  transform: scale(1.04);
  filter: brightness(0.9) contrast(1.1) saturate(1.15);
  animation: eliDrift 12s ease-in-out infinite alternate;
}
@keyframes eliDrift {
  from { transform: scale(1.03); }
  to   { transform: scale(1.08); }
}

.biolink-bg-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.88) 100%);
  pointer-events: none;
}

/* soft top/bottom blend so the footage melts into the page instead of
   ending on a hard edge */
.biolink-view[data-profile="elijah"] .biolink-bg-overlay {
  background:
    radial-gradient(ellipse 62% 46% at 50% 50%, rgba(0, 0, 0, 0.42) 0%, transparent 70%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.88) 0%, transparent 24%, transparent 76%, rgba(0, 0, 0, 0.92) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.75) 0%, transparent 18%, transparent 82%, rgba(0, 0, 0, 0.75) 100%);
}

/* Biolink Card */
.biolink-card {
  position: relative;
  z-index: 5;
  width: 90%;
  max-width: 420px;
  background: rgba(8, 8, 10, var(--card-alpha, 0.74));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  backdrop-filter: blur(26px) saturate(140%);
  -webkit-backdrop-filter: blur(26px) saturate(140%);
  padding: 30px 32px 22px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
  --mouse-x: 50%;
  --mouse-y: 50%;
  transform-style: preserve-3d;
  will-change: transform;
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s ease,
              border-color 0.35s ease,
              opacity 0.5s ease;
  opacity: 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.biolink-card.dragging {
  cursor: grabbing;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.95), 0 0 40px rgba(255, 255, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, opacity 0.5s ease;
  z-index: 20;
}

.biolink-card.card-pop {
  animation: cardPop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cardPop {
  0%   { scale: 1; }
  35%  { scale: 0.96; }
  65%  { scale: 1.02; }
  100% { scale: 1; }
}

/* soft cursor-tracking spotlight glow */
.biolink-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    260px circle at var(--mouse-x) var(--mouse-y),
    rgba(255, 255, 255, 0.14),
    rgba(255, 255, 255, 0.04) 45%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

/* thin luminous rim that lights up near the cursor */
.biolink-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(
    220px circle at var(--mouse-x) var(--mouse-y),
    rgba(255, 255, 255, 0.85),
    rgba(255, 255, 255, 0.10) 40%,
    transparent 72%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.biolink-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.98),
              0 0 45px rgba(255, 255, 255, 0.10),
              inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.biolink-card:hover::before,
.biolink-card:hover::after {
  opacity: 1;
}

#biolink-container.active .biolink-card,
#biolink-container-elijah.active .biolink-card {
  opacity: 1;
  animation: card-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: perspective(1000px) translateY(22px) scale3d(0.96, 0.96, 0.96);
  }
  to {
    opacity: 1;
    transform: perspective(1000px) translateY(0) scale3d(1, 1, 1);
  }
}


.biolink-back-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: var(--sigil-cur) !important;
  transition: all 0.2s ease;
  font-size: 13px;
}

.biolink-back-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
  transform: scale(1.1);
}

.biolink-profile {
  display: flex;
  align-items: center;
  gap: 22px;
  width: 100%;
}

.biolink-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
  transition: box-shadow 0.3s ease;
}

.biolink-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  filter: grayscale(100%) brightness(1.05) contrast(1.05);
  transition: filter 0.35s ease, transform 0.35s ease;
}

/* shown only if the avatar image is missing */
.biolink-avatar.avatar-fallback {
  font-family: var(--sans);
  font-size: 26px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.biolink-card:hover .biolink-avatar {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.75), 0 0 18px rgba(255, 255, 255, 0.22);
}

.biolink-card:hover .biolink-avatar-img {
  filter: grayscale(0%) brightness(1.05) contrast(1.02);
  transform: scale(1.04);
}

.biolink-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.biolink-name {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 800;
  font-style: normal;
  letter-spacing: 1.5px;
  color: #f4f4f4;
  text-transform: none;
  margin: 0;
  line-height: 1.1;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.28),
    0 0 26px rgba(160, 0, 20, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.9);
}

.shining-text {
  background: linear-gradient(90deg, #ffffff 0%, #a0a0a0 50%, #ffffff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 3.5s linear infinite;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

.biolink-sub {
  font-family: var(--sans);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  font-weight: 400;
  letter-spacing: 0.2px;
}

.biolink-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  row-gap: 10px;
  column-gap: 26px;
  margin-top: 24px;
  width: 100%;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 0.3px;
}

.biolink-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.biolink-meta-item svg {
  width: 15px;
  height: 15px;
  opacity: 0.8;
  fill: currentColor;
}

.glitch-views {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.5px;
  display: inline-block;
  min-width: 48px;
}

.glitch-views.glitching {
  color: #ffffff;
  text-shadow: -1px 0 #888888, 1px 0 #ffffff;
}

/* card transparency slider: subtle dark, blends into footer */
.biolink-shade {
  display: flex;
  align-items: center;
  flex-basis: 100%;
  width: 100%;
  padding: 10px 2px 0;
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  user-select: none;
}

.alpha-slider {
  -webkit-appearance: none !important;
  appearance: none !important;
  flex: 1;
  width: 100%;
  height: 14px;
  background: transparent !important;
  background-image: none !important;
  border: none;
  outline: none;
  cursor: pointer;
  margin: 0;
  padding: 0;
  color-scheme: dark;
}

.alpha-slider::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.14);
}

.alpha-slider::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 8px;
  height: 8px;
  margin-top: -3px;
  border-radius: 50%;
  background: #1a1a1a !important;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.alpha-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  border-color: rgba(255, 255, 255, 0.7);
}

.alpha-slider::-moz-range-thumb {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: none;
}

.alpha-slider::-moz-range-track {
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.14);
}

::selection {
  background: rgba(255, 255, 255, 0.3);
}
