:root {
  --bg-start: #020617;
  --bg-end: #020521;
  --bg-header: rgba(15, 23, 42, 0.82);
  --accent: #4f46e5;
  --accent-soft: rgba(79, 70, 229, 0.16);
  --accent-strong: #fb7185;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --border-soft: rgba(55, 65, 81, 0.8);
  --ny-gold: #facc15;
  --ny-cyan: #22d3ee;
  --ny-pink: #fb7185;
}

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

html,
body {
  height: 100%;
}

.footer-links {
  color: white;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    radial-gradient(circle at top, #0b1120, var(--bg-start)) fixed,
    radial-gradient(circle at bottom, #020617, var(--bg-end)) fixed;
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

canvas#snow-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.9;
}

.site-root {
  position: relative;
  min-height: 100vh;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: linear-gradient(
      to bottom,
      rgba(15, 23, 42, 0.96),
      rgba(15, 23, 42, 0.9)
    );
  border-bottom: 1px solid var(--border-soft);
}

.navbar {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 20px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 10%, #fef3c7, #6366f1, #4f46e5);
  box-shadow:
    0 0 14px rgba(129, 140, 248, 0.6),
    0 0 0 1px rgba(15, 23, 42, 0.9);
  color: #fefce8;
  font-size: 13px;
}

.navbar-animation {
  font-size: 1.1rem;
  white-space: nowrap;
  color: var(--accent-strong);
  display: flex;
  align-items: center;
  gap: 4px;
}

.navbar-animation-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.nav-animation-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--accent-soft);
  border: 1px solid rgba(129, 140, 248, 0.75);
  box-shadow:
    0 0 18px rgba(79, 70, 229, 0.45),
    0 0 0 1px rgba(15, 23, 42, 0.9);
  min-width: 120px;
  cursor: pointer;
  transition:
    transform 0.12s ease-out,
    box-shadow 0.12s ease-out,
    background 0.18s ease-out,
    border-color 0.18s ease-out;
}

.nav-animation-text.is-bouncing {
  animation: navBounce 0.6s ease-out;
}

.nav-animation-text:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow:
    0 0 24px rgba(79, 70, 229, 0.7),
    0 0 0 1px rgba(30, 64, 175, 1);
  background: rgba(30, 64, 175, 0.35);
  border-color: rgba(129, 140, 248, 1);
}

.page {
  flex: 1 0 auto;
}

.page--blog {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 40px;
}

.post {
  background: radial-gradient(
    circle at top left,
    rgba(11, 17, 32, 0.7),
    rgba(2, 6, 23, 0.7)
  );
  border-radius: 18px;
  padding: 28px 24px 24px;
  box-shadow:
    0 24px 55px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(51, 65, 85, 0.9);
}

.post-eyebrow {
  flex-direction: row;
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.new-year-countdown-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  padding: 3px 10px 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(129, 140, 248, 0.9);
  box-shadow:
    0 0 18px rgba(79, 70, 229, 0.4),
    0 0 0 1px rgba(15, 23, 42, 0.95);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 0.78rem;
  color: var(--accent-strong);
  letter-spacing: 0.08em;
  text-transform: none;
  cursor: pointer;
  transition:
    transform 0.12s ease-out,
    box-shadow 0.12s ease-out,
    background 0.18s ease-out,
    border-color 0.18s ease-out;
}

.new-year-countdown-pill-label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.new-year-countdown-pill-value {
  color: var(--accent-strong);
}

.new-year-countdown-pill:hover {
  box-shadow:
    0 0 24px rgba(79, 70, 229, 0.7),
    0 0 0 1px rgba(30, 64, 175, 1);
  transform: translateY(-1px);
  border-color: rgba(129, 140, 248, 1);
}

.fireworks-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease-out;
  z-index: 24;
  overflow: hidden;
   background:
    radial-gradient(circle at top, rgba(15, 23, 42, 0.6), transparent 60%),
    radial-gradient(circle at bottom, rgba(15, 23, 42, 0.6), transparent 55%);
}

.fireworks-layer.is-visible {
  opacity: 1;
}

.firework {
  --ny-hue: 40;
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: radial-gradient(
    circle,
    hsl(var(--ny-hue), 100%, 90%),
    hsl(var(--ny-hue), 95%, 60%),
    hsl(var(--ny-hue), 95%, 50%)
  );
  box-shadow:
    0 0 0 0 hsla(var(--ny-hue), 100%, 70%, 0.95),
    0 0 0 0 hsla(var(--ny-hue), 100%, 65%, 0.9),
    0 0 0 0 hsla(var(--ny-hue), 100%, 60%, 0.85);
  animation: newYearFireworkBurst 1.6s ease-out infinite;
  mix-blend-mode: screen;
}

.firework--ring {
  width: 5px;
  height: 5px;
  animation: newYearFireworkRing 1.7s ease-out infinite;
}

.firework--comet {
  width: 4px;
  height: 10px;
  border-radius: 999px;
  box-shadow:
    0 -10px 12px 0 hsla(var(--ny-hue), 100%, 75%, 0.8),
    0 0 0 0 hsla(var(--ny-hue), 100%, 65%, 0.8);
  animation: newYearFireworkComet 1.8s ease-out infinite;
}

@keyframes newYearFireworkBurst {
  0% {
    transform: scale(0);
    opacity: 1;
    box-shadow:
      0 0 0 0 hsla(var(--ny-hue), 100%, 70%, 0.95),
      0 0 0 0 hsla(var(--ny-hue), 100%, 65%, 0.9),
      0 0 0 0 hsla(var(--ny-hue), 100%, 60%, 0.85);
  }
  60% {
    transform: scale(1);
    opacity: 1;
    box-shadow:
      -26px 0 0 4px hsla(var(--ny-hue), 100%, 70%, 0.95),
      20px -12px 0 4px hsla(var(--ny-hue), 100%, 65%, 0.9),
      10px 22px 0 4px hsla(var(--ny-hue), 100%, 60%, 0.85);
  }
  100% {
    transform: scale(1.05);
    opacity: 0;
    box-shadow:
      -32px 0 0 0 hsla(var(--ny-hue), 100%, 70%, 0),
      24px -16px 0 0 hsla(var(--ny-hue), 100%, 65%, 0),
      14px 28px 0 0 hsla(var(--ny-hue), 100%, 60%, 0);
  }
}

@keyframes newYearFireworkRing {
  0% {
    transform: scale(0);
    opacity: 1;
    box-shadow:
      0 0 0 0 hsla(var(--ny-hue), 100%, 80%, 0.9),
      0 0 0 0 hsla(var(--ny-hue), 100%, 70%, 0.85);
  }
  55% {
    transform: scale(1.2);
    opacity: 1;
    box-shadow:
      0 0 0 10px hsla(var(--ny-hue), 100%, 80%, 0.14),
      0 0 0 18px hsla(var(--ny-hue), 100%, 70%, 0.12);
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
    box-shadow:
      0 0 0 24px hsla(var(--ny-hue), 100%, 80%, 0),
      0 0 0 32px hsla(var(--ny-hue), 100%, 70%, 0);
  }
}

@keyframes newYearFireworkComet {
  0% {
    transform: translate3d(0, 20px, 0) scale(0.2);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    transform: translate3d(0, -50px, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate3d(0, -70px, 0) scale(0.9);
    opacity: 0;
  }
}

.new-year-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-out;
  z-index: 30;
}

.new-year-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.new-year-modal-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top,
    rgba(15, 23, 42, 0.9),
    rgba(15, 23, 42, 0.98)
  );
  backdrop-filter: blur(10px);
}

.new-year-modal-card {
  position: relative;
  max-width: 360px;
  width: 100%;
  margin: 0 20px;
  padding: 22px 20px 18px;
  border-radius: 18px;
  background: radial-gradient(circle at top left, #020617, #020617);
  border: 1px solid rgba(55, 65, 81, 0.95);
  box-shadow:
    0 24px 55px rgba(15, 23, 42, 0.98),
    0 0 0 1px rgba(15, 23, 42, 1);
  text-align: center;
}

.new-year-modal-title {
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.new-year-modal-text {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.new-year-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.post-title {
  font-size: clamp(1.8rem, 3vw, 2.25rem);
  line-height: 1.2;
  margin-bottom: 12px;
}

.post-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.post-body {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-main);
}

.post-body p + p {
  margin-top: 14px;
}

.post-highlight {
  background: linear-gradient(120deg, #22d3ee, #a855f7, #fb7185);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 600;
}

.post-inline-note {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(129, 140, 248, 0.9);
  font-size: 0.8rem;
  color: var(--accent);
}

.site-footer {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 10px 20px 22px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.site-footer span {
  color: var(--accent-strong);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-button {
  appearance: none;
  border: 1px solid rgba(129, 140, 248, 0.9);
  background: radial-gradient(circle at top left, #4f46e5, #1d4ed8);
  color: #e5e7eb;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 8px 20px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(15, 23, 42, 0.9);
  transition:
    transform 0.12s ease-out,
    box-shadow 0.12s ease-out,
    background 0.18s ease-out,
    border-color 0.18s ease-out;
}

.nav-button:hover {
  transform: translateY(-1px);
  box-shadow:
    0 14px 28px rgba(15, 23, 42, 0.95),
    0 0 0 1px rgba(15, 23, 42, 1);
  background: radial-gradient(circle at top left, #6366f1, #2563eb);
}

.nav-button:active {
  transform: translateY(0);
  box-shadow:
    0 6px 14px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(15, 23, 42, 0.9);
}

.nav-button--ghost {
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(148, 163, 184, 0.9);
  color: var(--text-main);
}

.nav-button--ghost:hover {
  background: rgba(30, 64, 175, 0.55);
}

.page--game {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 40px;
}

.game {
  background: radial-gradient(circle at top left, #0b1120, #020617);
  border-radius: 18px;
  padding: 24px 20px 20px;
  box-shadow:
    0 24px 55px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(51, 65, 85, 0.9);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.game-header {
  text-align: left;
}

.game-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 6px;
}

.game-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.game-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.game-hud-item {
  min-width: 90px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: rgba(15, 23, 42, 0.95);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.game-hud-item--timer {
  flex: 1 0 130px;
  border-color: rgba(250, 204, 21, 0.95);
  background: radial-gradient(circle at top left, rgba(30, 64, 175, 0.85), rgba(15, 23, 42, 0.98));
  box-shadow:
    0 0 18px rgba(250, 204, 21, 0.45),
    0 0 0 1px rgba(15, 23, 42, 0.95);
}

.game-hud-item--timer .game-hud-label {
  color: var(--ny-gold);
}

.game-hud-item--timer .game-hud-value {
  color: var(--ny-gold);
  font-size: 1rem;
}

.game-hud-item--stat {
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.9);
  background: rgba(15, 23, 42, 0.9);
}

.game-hud-item--stat .game-hud-value {
  color: var(--ny-cyan);
}

.game-hud-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.game-hud-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9rem;
  color: var(--accent-strong);
}

.game-area {
  position: relative;
  margin-top: 10px;
  border-radius: 18px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.98));
  overflow: hidden;
  min-height: 260px;
  height: min(420px, 60vh);
  cursor: crosshair;
}

.thief {
  position: absolute;
  border: none;
  background: radial-gradient(circle at top, #0f172a, #020617);
  border-radius: 999px;
  box-shadow:
    0 10px 20px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(51, 65, 85, 0.95);
  color: #e5e7eb;
  font-size: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  cursor: pointer;
  padding: 6px;
}

.thief-money {
  margin-left: 2px;
}

.game-card-icon {
  width: 76%;
  height: auto;
  display: block;
  filter:
    drop-shadow(0 4px 10px rgba(15, 23, 42, 0.9))
    drop-shadow(0 0 6px rgba(129, 140, 248, 0.7));
}

.thief:active {
  transform: scale(0.9) translate(-50%, -50%);
}

.game-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.98));
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
}

.game-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.game-overlay-card {
  max-width: 320px;
  width: 100%;
  padding: 20px 18px 16px;
  border-radius: 16px;
  background: radial-gradient(circle at top left, #020617, #020617);
  border: 1px solid rgba(55, 65, 81, 0.95);
  box-shadow:
    0 20px 45px rgba(15, 23, 42, 0.95),
    0 0 0 1px rgba(15, 23, 42, 1);
  text-align: center;
}

.game-overlay-title {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.game-overlay-score,
.game-overlay-prev {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.game-overlay-score span,
.game-overlay-prev span {
  color: var(--accent-strong);
  font-weight: 600;
}

@keyframes navBounce {
  0% {
    transform: translateY(0) scale(1);
  }
  40% {
    transform: translateY(-4px) scale(1.04);
  }
  70% {
    transform: translateY(1px) scale(0.98);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 640px) {
  .navbar {
    padding-inline: 14px;
  }

  .navbar-animation-label {
    display: none;
  }

  .navbar-actions {
    margin-left: auto;
  }

  .page--blog {
    padding-inline: 14px;
  }

  .post {
    padding-inline: 18px;
  }

  .page--game {
    padding-inline: 14px;
  }

  .game {
    padding-inline: 18px;
  }
}

