:root {
  --bg: #050505;
  --surface: #0e0e0e;
  --surface-hover: #151515;
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.14);
  --white: #ffffff;
  --text-1: #f0f0f0;
  --text-2: #7a7a7a;
  --text-3: #454545;
}

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

body {
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text-1);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
  font-size: 15px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle particle canvas */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.wrapper {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

/* ==========================================================================
   Mascot & Comic Section
   ========================================================================== */
.mascot-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  margin-bottom: 34px;
  z-index: 10;
  height: 152px;
  /* Completely locks the height of mascot area to prevent button shifting */
  width: 100%;
}

/* Speech Bubble Row */
.speech-bubble-row {
  position: relative;
  margin-bottom: 12px;
  transform: translateX(-42px);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  /* Anchors bubble bottom so tail stays stable */
  height: 60px;
  /* Fixed height container so 1-line or 2-lines never shift vertical layout */
}

.comic-bubble {
  position: relative;
  background: #ffffff;
  color: #0c0c0e;
  border: 2px solid #141416;
  border-radius: 15px;
  padding: 6px 12px;
  font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-align: center;
  box-shadow: 2.5px 2.5px 0px #000000, 0 8px 20px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  animation: bubbleFloat 4s ease-in-out infinite;
  width: fit-content;
  max-width: 165px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.comic-bubble:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 5px 5px 0px #000000, 0 14px 30px rgba(0, 0, 0, 0.55);
}

.comic-bubble:active {
  transform: scale(0.97) translateY(1px);
  box-shadow: 2px 2px 0px #000000;
}

/* Bubble swap animation every 3s */
.comic-bubble.bubble-swap {
  animation: bubbleSwap 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bubbleFloat {

  0%,
  100% {
    transform: translateY(0) rotate(-0.5deg);
  }

  50% {
    transform: translateY(-4px) rotate(0.8deg);
  }
}

@keyframes bubbleSwap {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  35% {
    transform: scale(0.85) translateY(3px);
    opacity: 0.3;
  }

  70% {
    transform: scale(1.08) translateY(-2px);
    opacity: 1;
  }

  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.bubble-text {
  display: block;
  white-space: pre-line;
}

.bubble-tail {
  position: absolute;
  bottom: -15px;
  left: 16px;
  width: 20px;
  height: 16px;
  pointer-events: none;
  filter: drop-shadow(1.5px 1.5px 0px #000000);
}

/* Mascot & Status Row */
.mascot-status-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  position: relative;
  height: 76px;
  /* Completely locked height */
}

/* Fixed container box for sticker prevents layout shifting across different aspect ratios */
.sticker-wrap {
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  user-select: none;
  transform: rotate(-6deg);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

.sticker-wrap:hover {
  transform: rotate(-2deg) scale(1.12);
}

.sticker-wrap:active {
  transform: rotate(-10deg) scale(0.95);
}

.sticker-wrap.is-hit,
.sticker-wrap.is-breaking,
.sticker-wrap.is-reviving {
  pointer-events: none;
}

.sticker-wrap.is-hit .sticker-img {
  animation: mascotHit 0.28s steps(2, end) both;
}

.sticker-wrap.is-breaking .sticker-img {
  animation: mascotBreak 0.52s cubic-bezier(0.32, 0, 0.25, 1) both;
}

.sticker-wrap.is-breaking .sticker-name-badge {
  animation: badgeKnock 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.sticker-wrap.is-reviving .sticker-img {
  animation: mascotRestore 0.52s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes mascotHit {

  0%,
  100% {
    transform: translate(0, 0) rotate(0);
    filter: drop-shadow(2px 0 0 #ffffff) drop-shadow(-2px 0 0 #ffffff) drop-shadow(0 2px 0 #ffffff) drop-shadow(0 -2px 0 #ffffff);
  }

  35% {
    transform: translate(-5px, 1px) rotate(-5deg) scale(1.04, 0.94);
    filter: brightness(1.7) sepia(1) saturate(7) hue-rotate(325deg) drop-shadow(3px 0 0 #ff6b5f) drop-shadow(-3px 0 0 #ff6b5f);
  }

  70% {
    transform: translate(5px, -1px) rotate(4deg) scale(0.96, 1.04);
    filter: brightness(1.45) sepia(1) saturate(6) hue-rotate(325deg) drop-shadow(2px 0 0 #ffffff) drop-shadow(-2px 0 0 #ffffff);
  }
}

@keyframes mascotBreak {
  0% {
    opacity: 1;
    transform: scale(1);
    clip-path: inset(0);
  }

  40% {
    opacity: 0.92;
    transform: translate(-2px, 1px) rotate(-3deg) scale(1.01, 0.97);
    filter: brightness(1.42) sepia(0.82) saturate(4) hue-rotate(326deg);
  }

  70% {
    opacity: 0.78;
    transform: translate(2px, 3px) rotate(3deg) scale(0.95, 0.98);
    clip-path: inset(3% 0 4% 0);
  }

  100% {
    opacity: 0.64;
    transform: translateY(4px) rotate(4deg) scale(0.9, 0.94);
    clip-path: inset(7% 1% 6% 1%);
  }
}

@keyframes mascotRestore {
  0% {
    opacity: 0.64;
    transform: translateY(4px) rotate(4deg) scale(0.9, 0.94);
    clip-path: inset(7% 1% 6% 1%);
    filter: brightness(1.72) sepia(0.85) saturate(4.2) hue-rotate(52deg) drop-shadow(2px 0 0 #ffffff) drop-shadow(-2px 0 0 #ffffff) drop-shadow(0 2px 0 #ffffff) drop-shadow(0 -2px 0 #ffffff) drop-shadow(0 0 8px rgba(151, 255, 93, 0.5));
  }

  58% {
    opacity: 1;
    transform: translateY(-2px) scale(1.045);
    clip-path: inset(0);
    filter: brightness(1.35) drop-shadow(2px 0 0 #ffffff) drop-shadow(-2px 0 0 #ffffff) drop-shadow(0 2px 0 #ffffff) drop-shadow(0 -2px 0 #ffffff) drop-shadow(0 0 10px rgba(151, 255, 93, 0.7));
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    clip-path: inset(0);
    filter: drop-shadow(2px 0 0 #ffffff) drop-shadow(-2px 0 0 #ffffff) drop-shadow(0 2px 0 #ffffff) drop-shadow(0 -2px 0 #ffffff) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.65));
  }
}

@keyframes badgeKnock {
  to {
    opacity: 0;
    transform: translate(-28%, 13px) rotate(13deg) scale(0.72);
  }
}

.totem-revival {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  opacity: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 30;
}

.totem-revival img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 10px rgba(227, 255, 108, 0.72));
}

.revival-pixels {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: #fff47a;
  box-shadow: -25px 0 #7ce65c, 25px 0 #d8ff6a, 0 -25px #fff47a, 0 25px #6adf67,
    -18px -18px #b9f25c, 18px -18px #fff06a, -18px 18px #6ee27a, 18px 18px #dafa67;
  transform: translate(-50%, -50%) scale(0);
}

.sticker-wrap.totem-saving .totem-revival {
  animation: revivalStage 1.25s linear both;
}

.sticker-wrap.totem-saving .totem-revival img {
  animation: rescueTotem 1.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.sticker-wrap.totem-saving .revival-pixels {
  animation: revivalPixels 1.08s steps(6, end) 0.08s both;
}

@keyframes revivalStage {
  0% {
    opacity: 0;
  }

  12%,
  76% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes rescueTotem {
  0% {
    transform: translate(-50%, -35%) rotate(-24deg) scale(0.18);
  }

  34% {
    transform: translate(-50%, -56%) rotate(7deg) scale(1.32);
  }

  55% {
    transform: translate(-50%, -50%) rotate(-4deg) scale(0.92);
  }

  74% {
    transform: translate(-50%, -52%) rotate(2deg) scale(1.02);
  }

  100% {
    transform: translate(-50%, -70%) rotate(0) scale(0.94);
  }
}

@keyframes revivalPixels {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2) rotate(0);
  }

  28% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.45) rotate(45deg);
  }
}

/* Regeneration motes linger after the Totem has returned to its hero slot. */
.healing-trail {
  position: absolute;
  inset: -7px;
  z-index: 24;
  opacity: 0;
  pointer-events: none;
}

.healing-trail::before,
.healing-trail::after {
  content: '';
  position: absolute;
  bottom: 8px;
  width: 4px;
  height: 4px;
  background: #a4f36f;
  image-rendering: pixelated;
}

.healing-trail::before {
  left: 17px;
  box-shadow: 20px 9px #70dc65, 39px -3px #d2f779, 50px 13px #83e866;
}

.healing-trail::after {
  right: 19px;
  bottom: 1px;
  background: #73dd63;
  box-shadow: -18px -8px #c7f573, -37px 5px #8be968, -48px -10px #efff8a;
}

.sticker-wrap.healing-active .healing-trail {
  animation: healingTrailFade 5.5s ease-out both;
}

.sticker-wrap.healing-active .healing-trail::before {
  animation: healingMotesA 1.08s steps(6, end) infinite;
}

.sticker-wrap.healing-active .healing-trail::after {
  animation: healingMotesB 1.26s steps(7, end) 0.16s infinite;
}

.sticker-wrap.healing-active:not(.is-reviving) .sticker-img {
  animation: healingAfterglow 4.95s ease-out both;
}

@keyframes healingTrailFade {

  0%,
  64% {
    opacity: 0.92;
  }

  100% {
    opacity: 0;
  }
}

@keyframes healingMotesA {
  0% {
    transform: translateY(5px) scale(0.55);
    opacity: 0;
  }

  18% {
    opacity: 1;
  }

  100% {
    transform: translateY(-27px) scale(1);
    opacity: 0;
  }
}

@keyframes healingMotesB {
  0% {
    transform: translateY(8px) scale(0.7);
    opacity: 0;
  }

  24% {
    opacity: 0.9;
  }

  100% {
    transform: translateY(-34px) scale(0.85);
    opacity: 0;
  }
}

@keyframes healingAfterglow {

  0%,
  18% {
    filter: brightness(1.18) drop-shadow(2px 0 0 #ffffff) drop-shadow(-2px 0 0 #ffffff) drop-shadow(0 2px 0 #ffffff) drop-shadow(0 -2px 0 #ffffff) drop-shadow(0 0 9px rgba(123, 234, 91, 0.58)) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.65));
  }

  100% {
    filter: drop-shadow(2px 0 0 #ffffff) drop-shadow(-2px 0 0 #ffffff) drop-shadow(0 2px 0 #ffffff) drop-shadow(0 -2px 0 #ffffff) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.65));
  }
}

.damage-pixel {
  position: fixed;
  width: var(--pixel-size);
  height: var(--pixel-size);
  left: var(--pixel-x);
  top: var(--pixel-y);
  background: var(--pixel-color);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.6);
  pointer-events: none;
  z-index: 999;
  animation: damagePixelFly 0.72s steps(6, end) var(--pixel-delay) forwards;
}

@keyframes damagePixelFly {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0);
  }

  100% {
    opacity: 0;
    transform: translate(var(--pixel-dx), var(--pixel-dy)) rotate(var(--pixel-rotate));
  }
}

/* Mascot Name Badge (Comic Yellow Pill Style) */
.sticker-name-badge {
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffd600;
  color: #000000;
  font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: -0.01em;
  padding: 1.5px 9px;
  border-radius: 999px;
  border: 1.5px solid #000000;
  box-shadow: 1.5px 1.5px 0px #000000;
  pointer-events: none;
  white-space: nowrap;
  z-index: 12;
  transition: transform 0.2s ease, background 0.2s ease;
  animation: nameTagBob 2.5s ease-in-out infinite alternate;
}

.sticker-wrap:hover .sticker-name-badge {
  transform: translateX(-50%) scale(1.12);
  background: #ffea00;
}

@keyframes nameTagBob {
  0% {
    transform: translateX(-50%) translateY(0);
  }

  100% {
    transform: translateX(-50%) translateY(-2px);
  }
}

.sticker-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(2px 0 0 #ffffff) drop-shadow(-2px 0 0 #ffffff) drop-shadow(0 2px 0 #ffffff) drop-shadow(0 -2px 0 #ffffff) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.65));
  animation: stickerBob 3.8s ease-in-out infinite alternate;
  transform-origin: center bottom;
}

@keyframes stickerBob {
  0% {
    transform: translateY(0px) rotate(0deg);
  }

  50% {
    transform: translateY(-3px) rotate(2deg);
  }

  100% {
    transform: translateY(1px) rotate(-1deg);
  }
}

/* Mascot transition animations (3s auto switch) */
.sticker-img.exit {
  animation: mascotExit 0.25s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.sticker-img.enter {
  animation: mascotEnter 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes mascotExit {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }

  50% {
    transform: scale(0.65) rotate(-18deg);
    opacity: 0.3;
  }

  100% {
    transform: scale(0.3) rotate(20deg);
    opacity: 0;
  }
}

@keyframes mascotEnter {
  0% {
    transform: scale(0.3) rotate(-22deg);
    opacity: 0;
  }

  60% {
    transform: scale(1.22) rotate(8deg);
    opacity: 1;
  }

  82% {
    transform: scale(0.92) rotate(-6deg);
  }

  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* Click wiggle */
.sticker-wrap.wiggle {
  animation: stickerWiggle 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes stickerWiggle {
  0% {
    transform: scale(1) rotate(-6deg);
  }

  25% {
    transform: scale(1.22, 0.85) rotate(-16deg);
  }

  55% {
    transform: scale(0.9, 1.15) rotate(6deg);
  }

  80% {
    transform: scale(1.05, 0.98) rotate(-4deg);
  }

  100% {
    transform: scale(1) rotate(-6deg);
  }
}

/* Mascot Indicator Dots */
.mascot-dots {
  position: absolute;
  bottom: -9px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2.5px;
  background: rgba(0, 0, 0, 0.65);
  padding: 2.5px 5.5px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  pointer-events: none;
  max-width: 90%;
  justify-content: center;
}

.mascot-dot {
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.mascot-dot.active {
  background: #ffffff;
  transform: scale(1.35);
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.85);
}

/* Floating comic particles */
.comic-particle {
  position: fixed;
  pointer-events: none;
  font-size: 20px;
  z-index: 9999;
  animation: comicParticleFloat 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes comicParticleFloat {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(0.4) rotate(0deg);
  }

  50% {
    opacity: 1;
    transform: translate(var(--dx), var(--dy)) scale(1.25) rotate(15deg);
  }

  100% {
    opacity: 0;
    transform: translate(calc(var(--dx) * 1.3), calc(var(--dy) - 24px)) scale(0.7) rotate(-15deg);
  }
}

/* ==========================================================================
   Server status HUD
   ========================================================================== */
.status {
  --status-color: #7d7d84;
  --status-rgb: 125, 125, 132;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 174px;
  padding: 9px 13px 9px 11px;
  border: 1px solid rgba(var(--status-rgb), 0.22);
  border-radius: 12px;
  color: var(--text-1);
  background:
    linear-gradient(105deg, rgba(var(--status-rgb), 0.09), transparent 62%),
    rgba(8, 8, 9, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 10px 28px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  transition: border-color 0.35s ease, background 0.35s ease;
  animation: statusReveal 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.42s both;
}

.status::after {
  content: '';
  position: absolute;
  top: 0;
  left: 22px;
  right: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--status-rgb), 0.55), transparent);
  opacity: 0.65;
}

.status-signal {
  position: relative;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
}

.status .dot,
.status-ping {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--status-color);
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.status .dot {
  box-shadow: 0 0 9px rgba(var(--status-rgb), 0.62);
}

.status-ping {
  opacity: 0;
}

.status-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  line-height: 1;
}

.status-label {
  font-family: 'Silkscreen', cursive;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.055em;
  color: var(--status-color);
  text-transform: uppercase;
}

.status-meta {
  margin-top: 5px;
  font-family: 'Inter', sans-serif;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.015em;
  color: #717177;
  white-space: nowrap;
}

.status-checking {
  --status-color: #92929a;
  --status-rgb: 146, 146, 154;
}

.status-online {
  --status-color: #70e39a;
  --status-rgb: 112, 227, 154;
}

.status-online .status-ping {
  animation: statusSignal 2.2s cubic-bezier(0.2, 0.7, 0.25, 1) infinite;
}

.status-empty {
  --status-color: #b0b0b6;
  --status-rgb: 176, 176, 182;
}

.status-offline {
  --status-color: #ff7a7a;
  --status-rgb: 255, 122, 122;
}

@keyframes statusSignal {
  0% {
    opacity: 0.48;
    transform: scale(1);
  }

  70%,
  100% {
    opacity: 0;
    transform: scale(2.5);
  }
}

@keyframes statusReveal {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Hero — one coordinated entrance, then a calm resting state
   ========================================================================== */
.hero-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  width: 100%;
  isolation: isolate;
}

.hero-lockup {
  position: relative;
  width: max-content;
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 5;
  gap: 2px;
  margin: 0;
}

.hero-word-wrap {
  position: relative;
  display: block;
  width: max-content;
}

.hero-word {
  position: relative;
  display: block;
  isolation: isolate;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(52px, 11vw, 84px);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.035em;
  line-height: 0.88;
  color: #f8faf8;
  -webkit-text-stroke: 0.25px rgba(255, 255, 255, 0.36);
  text-wrap: nowrap;
  text-shadow: 1px 1px 0 #15181b,
    2px 2px 0 rgba(91, 218, 240, 0.15),
    0 12px 32px rgba(0, 0, 0, 0.72);
  opacity: 0;
  transform: translateY(12px);
  clip-path: inset(100% -8% -12% -8%);
  animation: heroWordIn 0.82s cubic-bezier(0.16, 1, 0.3, 1) 0.08s forwards;
}

.hero-survival-wrap .hero-word {
  color: #e7e3da;
  text-shadow: 1px 1px 0 #171715,
    2px 2px 0 rgba(244, 207, 56, 0.14),
    0 12px 32px rgba(0, 0, 0, 0.72);
  animation-delay: 0.18s;
}

/* A one-pixel print echo gives the serif lockup its own crafted identity. */
.hero-word::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
  color: rgba(32, 84, 94, 0.34);
  -webkit-text-stroke: 0.5px rgba(117, 228, 247, 0.2);
  transform: translate(2px, 3px);
  pointer-events: none;
}

.hero-survival-wrap .hero-word::before {
  color: rgba(93, 75, 22, 0.3);
  -webkit-text-stroke-color: rgba(244, 207, 56, 0.18);
}

/* A restrained enchanted-item glint: brief, infrequent, and locked to the type. */
.hero-word::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: transparent;
  background: linear-gradient(108deg,
      transparent 35%,
      rgba(96, 226, 255, 0.45) 43%,
      rgba(255, 255, 255, 0.95) 49%,
      rgba(190, 119, 255, 0.58) 55%,
      transparent 64%);
  background-size: 240% 100%;
  background-position: 170% 0;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  animation: enchantedGlint 7.2s cubic-bezier(0.45, 0, 0.55, 1) 2.2s infinite;
}

.hero-survival-wrap .hero-word::after {
  animation-delay: 2.34s;
}

@keyframes enchantedGlint {

  0%,
  58% {
    opacity: 0;
    background-position: 170% 0;
  }

  61% {
    opacity: 0.85;
  }

  76% {
    opacity: 0.68;
    background-position: -130% 0;
  }

  79%,
  100% {
    opacity: 0;
    background-position: -130% 0;
  }
}

@keyframes heroWordIn {
  0% {
    opacity: 0;
    transform: translateY(12px);
    clip-path: inset(100% -8% -12% -8%);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
    clip-path: inset(-12% -8% -12% -8%);
  }
}

.hero-decor {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 10;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  image-rendering: pixelated;
  will-change: transform;
}

.hero-sword {
  width: 50px;
  height: 50px;
  top: -12px;
  left: -47px;
  opacity: 1;
  filter: drop-shadow(0 7px 12px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 8px rgba(80, 224, 255, 0.18));
  transform-origin: 42% 74%;
  animation: swordSettle 0.9s cubic-bezier(0.2, 0.85, 0.25, 1) 0.36s forwards;
}

.hero-sword.is-settled {
  opacity: 1;
  transform: rotate(-10deg) scale(1);
  animation: none;
}

.sword-trigger {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 0;
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.sword-trigger img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.22s ease;
}

.sword-trigger:hover img {
  transform: translateY(-2px) rotate(4deg) scale(1.1);
  filter: brightness(1.16) drop-shadow(0 0 5px rgba(102, 225, 255, 0.58));
}

.sword-trigger:focus-visible {
  outline: 2px solid #7ee8ff;
  outline-offset: 5px;
  border-radius: 7px;
}

.sword-trigger.is-attacking {
  z-index: 100;
  cursor: default;
  opacity: 1;
  animation: swordAttack 1.45s cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

.sword-trigger.is-attacking img {
  transform: none;
  filter: brightness(1.16) drop-shadow(0 0 8px rgba(102, 225, 255, 0.68));
}

.sword-label {
  position: absolute;
  top: 42px;
  left: -21px;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transform: translateX(-50%) rotate(-4deg);
  font-family: 'Silkscreen', cursive;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.12em;
  color: #f2fbff;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.86;
  text-shadow: 1px 1px 0 #0b2a33, 0 0 7px rgba(104, 229, 255, 0.42);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, color 0.18s ease,
    text-shadow 0.18s ease;
}

.sword-label::before {
  content: '';
  width: 4px;
  height: 4px;
  flex: 0 0 4px;
  background: #76eaff;
  transform: rotate(45deg);
  box-shadow: 0 0 6px rgba(118, 234, 255, 0.72);
}

.sword-label::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 1px;
  bottom: -4px;
  height: 1px;
  background: linear-gradient(90deg, rgba(118, 234, 255, 0.8), transparent);
}

.sword-trigger:hover+.sword-label {
  color: #ffffff;
  opacity: 1;
  transform: translateX(-50%) translateY(-1px) rotate(-4deg);
  text-shadow: 1px 1px 0 #0b2a33, 0 0 10px rgba(104, 229, 255, 0.7);
}

.sword-trigger.is-attacking+.sword-label {
  opacity: 0;
  transform: translate(-50%, 3px) rotate(-4deg);
}

@keyframes swordAttack {
  0% {
    transform: rotate(-10deg) scale(1);
  }

  16% {
    transform: translate(-7px, 9px) rotate(-42deg) scale(1.1);
  }

  38% {
    transform: translate(var(--attack-x), var(--attack-y)) rotate(var(--attack-angle)) scale(1.05);
  }

  47% {
    transform: translate(var(--recoil-x), var(--recoil-y)) rotate(var(--recoil-angle)) scale(0.98);
  }

  100% {
    transform: translate(0, 0) rotate(-10deg) scale(1);
  }
}

@keyframes swordSettle {
  0% {
    opacity: 1;
    transform: translate(-18px, -16px) rotate(-62deg) scale(0.78);
  }

  42% {
    opacity: 1;
    transform: translate(5px, 6px) rotate(7deg) scale(1.04);
  }

  67% {
    transform: translate(-2px, -2px) rotate(-15deg) scale(0.98);
  }

  100% {
    opacity: 1;
    transform: translate(0, 0) rotate(-10deg) scale(1);
  }
}

.hero-totem {
  width: 42px;
  height: 42px;
  right: -43px;
  bottom: -1px;
  opacity: 1;
  filter: drop-shadow(0 7px 12px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 8px rgba(255, 205, 66, 0.12));
  transform-origin: center bottom;
  animation: totemSettle 0.68s cubic-bezier(0.2, 0.9, 0.25, 1.25) 0.72s forwards;
}

.hero-totem.is-settled {
  opacity: 1;
  transform: rotate(10deg) scale(1);
  animation: none;
}

.hero-totem.is-consuming {
  z-index: 110;
  opacity: 1;
  animation: heroTotemUse 0.5s cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

.hero-totem.is-consumed {
  opacity: 0;
  animation: none;
  transform: translate(var(--totem-use-x), var(--totem-use-y)) scale(0);
}

.hero-totem.is-respawning {
  z-index: 50;
  animation: heroTotemDrop 0.78s cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

@keyframes heroTotemUse {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(10deg) scale(1);
  }

  18% {
    transform: translate(-4px, 5px) rotate(25deg) scale(0.94);
  }

  72% {
    opacity: 1;
    transform: translate(var(--totem-use-x), var(--totem-use-y)) rotate(-8deg) scale(1.2);
  }

  100% {
    opacity: 0;
    transform: translate(var(--totem-use-x), var(--totem-use-y)) rotate(2deg) scale(1.65);
    filter: brightness(1.8) drop-shadow(0 0 13px rgba(220, 255, 101, 0.9));
  }
}

@keyframes heroTotemDrop {
  0% {
    opacity: 0;
    transform: translateY(-190px) rotate(-28deg) scale(0.76);
    filter: brightness(1.5) drop-shadow(0 0 10px rgba(220, 255, 101, 0.68));
  }

  14% {
    opacity: 1;
  }

  66% {
    opacity: 1;
    transform: translateY(7px) rotate(15deg) scale(1.08);
  }

  80% {
    transform: translateY(-6px) rotate(5deg) scale(0.98);
  }

  91% {
    transform: translateY(2px) rotate(11deg) scale(1.02);
  }

  100% {
    opacity: 1;
    transform: translateY(0) rotate(10deg) scale(1);
    filter: drop-shadow(0 7px 12px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 8px rgba(255, 205, 66, 0.12));
  }
}

@keyframes totemSettle {
  0% {
    opacity: 1;
    transform: translateY(13px) rotate(13deg) scale(0.72);
  }

  65% {
    opacity: 1;
    transform: translateY(-3px) rotate(7deg) scale(1.06);
  }

  100% {
    opacity: 1;
    transform: translateY(0) rotate(10deg) scale(1);
  }
}

.hero-survival-wrap {
  padding-bottom: 9px;
}

.hero-underline {
  position: absolute;
  bottom: -7px;
  left: 50%;
  width: 102%;
  height: 18px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: -1;
  overflow: visible;
}

.hero-underline path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.hero-underline-shadow {
  stroke: rgba(117, 75, 0, 0.55);
  stroke-width: 6;
  animation: underlineDraw 0.72s cubic-bezier(0.65, 0, 0.25, 1) 0.83s forwards;
}

.hero-underline-stroke {
  stroke: #f4cf38;
  stroke-width: 3.2;
  filter: drop-shadow(0 0 5px rgba(244, 207, 56, 0.22));
  animation: underlineDraw 0.68s cubic-bezier(0.65, 0, 0.25, 1) 0.77s forwards;
}

@keyframes underlineDraw {
  to {
    stroke-dashoffset: 0;
  }
}

@media (max-width: 480px) {
  .hero-title {
    gap: 4px;
  }

  .hero-word {
    font-size: clamp(56px, 16.5vw, 68px);
    line-height: 0.86;
  }

  .hero-sword {
    width: 39px;
    height: 39px;
    left: -35px;
    top: -8px;
  }

  .sword-label {
    top: 34px;
    left: -15px;
    gap: 3px;
    font-size: 7px;
    letter-spacing: 0.1em;
  }

  .hero-totem {
    width: 34px;
    height: 34px;
    right: -34px;
    bottom: 1px;
  }
}

.subtitle {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  max-width: 400px;
  margin-top: 7px;
  margin-bottom: 15px;
  color: var(--text-2);
  text-align: center;
}

.subtitle-copy {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 16px;
  font-weight: 400;
  font-style: italic;
  line-height: 1.2;
  letter-spacing: 0.005em;
}

.subtitle-divider {
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, rgba(244, 207, 56, 0.1), rgba(244, 207, 56, 0.72));
}

.subtitle-class {
  font-family: 'Silkscreen', cursive;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.11em;
  color: #f0d664;
  text-shadow: 0 0 8px rgba(244, 207, 56, 0.22);
}

.subtitle-emoji {
  font-size: 14px;
  line-height: 1;
  transform: translateY(-1px);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 400px;
  margin-bottom: 34px;
}

.btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 12px;
  font-family: 'Silkscreen', cursive;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn svg {
  flex-shrink: 0;
}

.btn-primary {
  background: var(--white);
  color: #000000;
}

.btn-primary:hover {
  background: #e0e0e0;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(1px);
  background: #ccc;
}

/* Dual Segment Copy Button (IP & Port) */
.btn-copy-group {
  flex: 1.4;
  position: relative;
  display: inline-flex;
  align-items: stretch;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.045);
  -webkit-backdrop-filter: blur(18px) saturate(115%);
  backdrop-filter: blur(18px) saturate(115%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(255, 255, 255, 0.025),
    0 10px 30px rgba(0, 0, 0, 0.24);
  transition: border-color 0.22s ease, background-color 0.22s ease,
    box-shadow 0.22s ease, transform 0.22s ease;
  overflow: hidden;
}

.btn-copy-group::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  z-index: 2;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  pointer-events: none;
}

.btn-copy-group:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(255, 255, 255, 0.035),
    0 12px 32px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.btn-copy-part {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

.btn-copy-ip {
  flex: 1;
  gap: 10px;
  padding: 10px 14px;
}

.btn-copy-ip svg {
  flex-shrink: 0;
  color: #f2f2f2;
  opacity: 0.74;
}

.btn-copy-ip:hover {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.055);
}

.btn-copy-port {
  flex-shrink: 0;
  min-width: 98px;
  padding: 10px 15px;
  border-left: 1px solid rgba(255, 255, 255, 0.11);
}

.btn-copy-port:hover {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.055);
}

.btn-copy-part:active {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(1px);
}

.copy-part-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  line-height: 1;
}

.copy-kicker {
  font-family: 'Inter', sans-serif;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #7c838a;
}

.copy-value {
  font-family: 'Silkscreen', cursive;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.015em;
  color: #dfe3e7;
}

.copy-port-value {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
}

.port-sep {
  color: #85898e;
  font-size: 10px;
}

.btn-copy-part:hover .copy-kicker {
  color: #c9c9c9;
}

.btn-copy-part:hover .copy-value {
  color: #ffffff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text-1);
  border-color: var(--border-hover);
  background: var(--surface);
  transform: translateY(-1px);
}

.btn-ghost:active {
  transform: translateY(1px);
}

.ip-hint {
  font-family: 'Silkscreen', cursive;
  font-size: 11px;
  color: #ededed;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.ip-hint:hover {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.45);
}

/* ==========================================================================
   Discord CTA Button
   ========================================================================== */
.btn-discord {
  background: rgba(88, 101, 242, 0.08);
  color: #f0f0f0;
  border: 1px solid rgba(88, 101, 242, 0.3);
  font-size: 13px;
  position: relative;
  overflow: hidden;
  justify-content: space-between;
  padding: 13px 18px;
}

.btn-discord .discord-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-discord svg {
  color: #5865F2;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
  flex-shrink: 0;
}

.btn-discord-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(88, 101, 242, 0.16);
  border: 1px solid rgba(88, 101, 242, 0.3);
  padding: 3px 9px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #c9cdfb;
  transition: all 0.25s ease;
}

.discord-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #23a55a;
  box-shadow: 0 0 6px #23a55a;
  animation: pulseGreen 2s infinite;
}

.btn-discord:hover {
  background: #5865F2;
  color: #ffffff;
  border-color: #5865F2;
  box-shadow: 0 6px 25px rgba(88, 101, 242, 0.45);
  transform: translateY(-1px);
}

.btn-discord:hover svg {
  color: #ffffff;
  transform: scale(1.15) rotate(-6deg);
}

.btn-discord:hover .btn-discord-badge {
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.btn-discord:active {
  transform: translateY(1px);
  background: #4752c4;
}

@keyframes pulseGreen {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.3);
    opacity: 0.6;
  }
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  min-width: 164px;
  transform: translateY(-14px) scale(0.96);
  transform-origin: top right;
  opacity: 0;
  visibility: hidden;
  background: rgba(255, 255, 255, 0.065);
  color: #f7fafb;
  padding: 8px 14px 8px 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  -webkit-backdrop-filter: blur(20px) saturate(110%);
  backdrop-filter: blur(20px) saturate(110%);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 999;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(255, 255, 255, 0.025);
}

.toast-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  color: #101113;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 5px;
  box-shadow: inset 0 1px 0 #ffffff;
}

.toast-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.05;
}

.toast-kicker {
  font-family: 'Silkscreen', cursive;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
}

.toast.show {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
}

@media (max-width: 480px) {
  .toast {
    top: 12px;
    right: 12px;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  position: fixed;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: 'Silkscreen', cursive;
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.02em;
  z-index: 1;
}

footer a {
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.15s ease;
}

footer a:hover {
  color: var(--text-1);
}

/* Smooth selection */
::selection {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .hero-word,
  .hero-decor,
  .hero-underline path,
  .hero-word::after,
  .status-ping,
  .discord-pulse-dot {
    animation: none !important;
  }

  .hero-word {
    opacity: 1;
    transform: none;
    clip-path: none;
  }

  .hero-sword {
    opacity: 1;
    transform: rotate(-10deg);
  }

  .hero-totem {
    opacity: 1;
    transform: rotate(10deg);
  }

  .hero-underline path {
    stroke-dashoffset: 0;
  }
}