/* ================================================================
   JHALLU SMP — Neobrutalist redesign
   Flat colors · thick black borders · hard offset shadows
   ================================================================ */

/* ------------------------------ Tokens ------------------------------ */
:root {
  color-scheme: dark;
  --yellow: #FDC800;
  --blue: #7C6BF2;
  --green: #22C55E;
  --orange: #F59E0B;
  --red: #EF4444;
  --surface: #131720;
  --ink: #EDF1F7;
  --muted: #9AA6B8;
  --white: #1E2632;
  --inverse: #0E1219;
  --border-color: #8E99AB;
  --shadow-color: #05070B;
  --grid-line: rgba(237, 241, 247, 0.08);
  --navbar-shadow: 0 4px 0 rgba(0, 0, 0, 0.5);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 8px;
  --radius-sm: 6px;

  --border: 3px solid var(--border-color);
  --border-thin: 2px solid var(--border-color);

  --shadow: 6px 6px 0 var(--shadow-color);
  --shadow-lg: 8px 8px 0 var(--shadow-color);
  --shadow-sm: 3px 3px 0 var(--shadow-color);
  --shadow-xs: 2px 2px 0 var(--shadow-color);
}

[data-theme="light"] {
  color-scheme: light;
  --yellow: #FDC800;
  --blue: #432DD7;
  --green: #16A34A;
  --orange: #D97706;
  --red: #DC2626;
  --surface: #FBFBF9;
  --ink: #1C293C;
  --muted: #5A6B7F;
  --white: #FFFFFF;
  --inverse: #1C293C;
  --border-color: #1C293C;
  --shadow-color: #1C293C;
  --grid-line: rgba(28, 41, 60, 0.08);
  --navbar-shadow: 0 4px 0 rgba(28, 41, 60, 0.12);
}

/* ------------------------------ Base ------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 200ms ease-out, color 200ms ease-out;
}

/* Offset anchored sections below the fixed navbar */
section[id] {
  scroll-margin-top: 96px;
}

img,
svg {
  display: block;
  max-width: 100%;
}

svg {
  flex-shrink: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul {
  list-style: none;
}

::selection {
  background: var(--yellow);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 12px;
}
::-webkit-scrollbar-track {
  background: var(--surface);
}
::-webkit-scrollbar-thumb {
  background: var(--yellow);
  border: 2px solid var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--orange);
}

/* ------------------------------ Utilities ------------------------------ */
.font-sans {
  font-family: var(--font-sans);
}
.font-display {
  font-family: var(--font-sans);
  font-weight: 800;
}
.mono {
  font-family: var(--font-mono);
}
.w-full {
  width: 100% !important;
}

/* Icon sizes */
.ic-12 { width: 12px; height: 12px; }
.ic-14 { width: 14px; height: 14px; }
.ic-16 { width: 16px; height: 16px; }
.ic-20 { width: 20px; height: 20px; }
.ic-22 { width: 22px; height: 22px; }
.ic-24 { width: 24px; height: 24px; }
.ic-32 { width: 32px; height: 32px; }
.ic-40 { width: 40px; height: 40px; }

/* Icon color helpers */
.icon-white { color: #fff; }
.icon-ink { color: var(--ink); }
.icon-yellow { color: var(--yellow); }
.icon-blue { color: var(--blue); }
.icon-green { color: var(--green); }
.icon-red { color: var(--red); }

.rotate-180 { transform: rotate(180deg); }
.rotate-90 { transform: rotate(90deg); }
.-rotate-90 { transform: rotate(-90deg); }

/* Inline highlight marker */
.hl {
  background: var(--yellow);
  color: var(--ink);
  padding: 0 8px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Section eyebrow: mono uppercase tag */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}
.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--yellow);
  border: var(--border-thin);
}

/* Graphic grid backdrop */
.grid-pattern {
  background-image:
    linear-gradient(var(--grid-line) 2px, transparent 2px),
    linear-gradient(90deg, var(--grid-line) 2px, transparent 2px);
  background-size: 48px 48px;
}

/* ------------------------------ Buttons ------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: var(--border);
  border-radius: var(--radius);
  font-weight: 700;
  white-space: nowrap;
  user-select: none;
  transition: transform 150ms ease-out, box-shadow 150ms ease-out, background-color 150ms ease-out, color 150ms ease-out;
}
.btn:hover {
  transform: translate(calc(-2px + var(--mx, 0px)), calc(-2px + var(--my, 0px)));
  box-shadow: var(--shadow-lg);
}
.btn:active {
  transform: translate(3px, 3px);
  box-shadow: var(--shadow-xs);
}
.btn:disabled {
  filter: grayscale(0.85);
  opacity: 0.65;
  pointer-events: none;
}
.btn svg {
  flex-shrink: 0;
}

.btn-primary {
  background: var(--yellow);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.btn-blue {
  background: var(--blue);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn-dark {
  background: var(--inverse);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn-outline {
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-md { padding: 12px 24px; font-size: 15px; }
.btn-lg { padding: 16px 32px; font-size: 17px; }
.btn-wide { padding-left: 48px; padding-right: 48px; }

/* ------------------------------ Navbar ------------------------------ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: var(--border);
  transition: box-shadow 150ms ease-out;
}
.navbar:not(.scrolled) {
  padding: 16px 0;
}
.navbar.scrolled {
  padding: 8px 0;
  box-shadow: var(--navbar-shadow);
}

.navbar-inner {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.navbar-logo-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 5px;
  background: var(--yellow);
  border: var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}
.navbar-logo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.navbar-logo:hover .navbar-logo-icon {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--shadow-color);
}
.navbar-logo-text {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.navbar-logo-accent {
  background: var(--yellow);
  border: var(--border-thin);
  border-radius: 4px;
  padding: 0 6px;
}
.footer .navbar-logo-text {
  color: #fff;
}

.nav-links {
  position: relative;
  display: none;
  align-items: center;
  gap: 4px;
}
@media (min-width: 1024px) {
  .nav-links { display: flex; }
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: var(--border);
  border-color: transparent;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  transition: background-color 150ms ease-out, border-color 150ms ease-out;
}
.nav-link:hover {
  background: var(--yellow);
}
.nav-link.active {
  background: var(--yellow);
  border-color: var(--border-color);
}
.nav-ext {
  opacity: 0.5;
  transition: opacity 150ms ease-out;
}
.nav-link:hover .nav-ext {
  opacity: 1;
}

.navbar-cta {
  display: none;
  align-items: center;
  gap: 12px;
}
@media (min-width: 1024px) {
  .navbar-cta { display: flex; }
}

.menu-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--white);
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  color: var(--ink);
  transition: transform 150ms ease-out, box-shadow 150ms ease-out, background-color 200ms ease-out, color 200ms ease-out;
}

.theme-toggle:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-sm);
}

.theme-toggle:active {
  transform: translate(1px, 1px);
  box-shadow: none;
}

.drawer-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
@media (min-width: 1024px) {
  .menu-btn { display: none; }
}
.menu-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--shadow-color);
}
.menu-btn:active {
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-xs);
}

/* ------------------------------ Mobile drawer ------------------------------ */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease-out;
}
.drawer.open {
  opacity: 1;
  pointer-events: auto;
}
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: var(--inverse);
}
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 18rem;
  background: var(--surface);
  border-left: var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 250ms ease-out;
}
.drawer.open .drawer-panel {
  transform: translateX(0);
}
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-title {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}
.drawer-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--white);
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  color: var(--ink);
  transition: background-color 150ms ease-out;
}
.drawer-close:hover {
  background: var(--yellow);
}
.drawer-links {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 200ms 100ms ease-out, transform 200ms 100ms ease-out;
}
.drawer.open .drawer-links {
  opacity: 1;
  transform: none;
}
.drawer-link {
  display: flex;
  align-items: center;
  gap: 8px;
  border: var(--border);
  border-color: transparent;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  transition: background-color 150ms ease-out, border-color 150ms ease-out;
}
.drawer-link:hover {
  background: var(--yellow);
  border-color: var(--border-color);
}
.drawer-ext {
  margin-left: auto;
  color: var(--muted);
}
.drawer-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ------------------------------ Hero ------------------------------ */
main {
  position: relative;
  z-index: 10;
  overflow-x: clip;
}

.hero {
  position: relative;
  background: var(--yellow);
  border-bottom: var(--border);
  overflow: hidden;
}
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 2px, transparent 2px),
    linear-gradient(90deg, var(--grid-line) 2px, transparent 2px);
  background-size: 48px 48px;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 80rem;
  margin: 0 auto;
  display: grid;
  gap: 48px;
  align-items: center;
  padding: 144px 24px 96px;
}
@media (min-width: 1024px) {
  .hero-content {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 64px;
  }
}

.hero-copy {
  position: relative;
  text-align: center;
}
@media (min-width: 1024px) {
  .hero-copy { text-align: left; }
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--inverse);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 6px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.status-dot {
  width: 10px;
  height: 10px;
  background: var(--yellow);
  animation: dot-beat 2s ease-in-out infinite;
}

.hero-title {
  margin-top: 24px;
  font-size: clamp(44px, 9vw, 88px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -3px;
  color: var(--ink);
}
.hero-title-block {
  display: inline-block;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 4px 16px;
  transform: rotate(-2deg);
  margin-left: 8px;
}

.hero-tagline {
  margin: 24px auto 0;
  max-width: 34rem;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
}
@media (min-width: 1024px) {
  .hero-tagline { margin-left: 0; }
}

.hero-cta {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
@media (min-width: 640px) {
  .hero-cta { flex-direction: row; }
}
@media (min-width: 1024px) {
  .hero-cta { justify-content: flex-start; }
}
.hero-cta .btn {
  width: 100%;
}
@media (min-width: 640px) {
  .hero-cta .btn { width: auto; }
}

.hero-ip {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}
@media (min-width: 1024px) {
  .hero-ip { justify-content: flex-start; }
}
.ip-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}
.ip-pill:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow);
}
.ip-pill:active {
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-xs);
}
.ip-pin {
  color: var(--blue);
}
.ip-copy {
  color: var(--muted);
  transition: color 150ms ease-out;
}
.ip-pill:hover .ip-copy {
  color: var(--blue);
}

.hero-visual {
  position: relative;
}
.hero-frame {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 12px;
  transform: rotate(-2deg);
  transition: transform 200ms ease-out;
}
.hero-visual:hover .hero-frame {
  transform: rotate(0deg);
}
.hero-art {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: var(--border-thin);
  border-radius: var(--radius-sm);
}
.hero-art svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-art-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: kenburns 22s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.09); }
}
.hero-frame-caption {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.hero-frame-caption::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--yellow);
  border: var(--border-thin);
}
.hero-sticker {
  position: absolute;
  top: -16px;
  right: -12px;
  background: var(--blue);
  color: #fff;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px 16px;
  font-size: 27px;
  font-weight: 900;
  transform: rotate(3deg);
}

.hero-anim {
  opacity: 0;
  animation: hero-pop 700ms cubic-bezier(0.22, 1.4, 0.36, 1) both;
  animation-delay: var(--d, 0s);
}
@keyframes hero-pop {
  0% { opacity: 0; transform: translateY(48px) scale(0.9) rotate(-2deg); }
  60% { opacity: 1; transform: translateY(-10px) scale(1.02) rotate(1deg); }
  100% { opacity: 1; transform: none; }
}

.hero-scroll {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}
.hero-scroll:hover {
  transform: translate(-50%, -2px);
  box-shadow: var(--shadow);
}
.hero-scroll:active {
  transform: translate(-50%, 2px);
  box-shadow: var(--shadow-xs);
}

/* ------------------------------ Sections (shared) ------------------------------ */
.section {
  position: relative;
  max-width: 80rem;
  margin: 0 auto;
  background: var(--white);
  padding: 96px 24px;
}
@media (min-width: 640px) {
  .section { padding: 128px 32px; }
}
.section-surface {
  background: var(--surface);
}
.section-narrow {
  max-width: 48rem;
}

.section-heading {
  margin: 0 auto 56px;
  max-width: 42rem;
  text-align: center;
}
.section-title {
  margin-top: 16px;
  font-size: 27px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: var(--ink);
}
@media (min-width: 768px) {
  .section-title { font-size: 35px; }
}
.section-subtitle {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

/* ------------------------------ Features ------------------------------ */
.features-grid {
  display: grid;
  gap: 24px;
}
@media (min-width: 640px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .features-grid { grid-template-columns: repeat(4, 1fr); }
}
.feature-card {
  height: 100%;
}
.feature-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}
.feature-card:hover .feature-inner {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
}
.feature-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: var(--border-thin);
  border-radius: var(--radius-sm);
}
.chip-yellow { background: var(--yellow); color: var(--ink); }
.chip-blue { background: var(--blue); color: #fff; }
.chip-green { background: var(--green); color: #fff; }
.chip-red { background: var(--red); color: #fff; }
.chip-sky { background: #38bdf8; color: #fff; }
.chip-pink { background: #f472b6; color: #fff; }
.feature-inner h3 {
  margin-top: 16px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.feature-desc {
  margin-top: 8px;
  flex: 1;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

/* ------------------------------ Stats ------------------------------ */
.stats-section {
  position: relative;
  background: var(--yellow);
  border-top: var(--border);
  border-bottom: var(--border);
  padding: 64px 0;
}
.stats-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 640px) {
  .stats-inner { padding: 0 32px; }
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (min-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat-card {
  height: 100%;
}
.stat-inner {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  text-align: center;
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}
.stat-card:hover .stat-inner {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
}
.stat-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto;
  border: var(--border-thin);
  border-radius: var(--radius-sm);
}
.stat-icon-ink { background: var(--yellow); color: var(--ink); }
.stat-icon-blue { background: var(--blue); color: #fff; }
.stat-icon-green { background: var(--green); color: #fff; }
.stat-icon-red { background: var(--red); color: #fff; }
.stat-value {
  margin-top: 16px;
  font-size: 27px;
  font-weight: 900;
  color: var(--ink);
}
.stat-label {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ------------------------------ Server info ------------------------------ */
.server-grid {
  display: grid;
  gap: 24px;
}
@media (min-width: 640px) {
  .server-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .server-grid { grid-template-columns: repeat(4, 1fr); }
}
.server-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}
.server-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
}
.server-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: var(--border-thin);
  border-radius: var(--radius-sm);
}
.server-icon-ink { background: var(--yellow); color: var(--ink); }
.server-icon-blue { background: var(--blue); color: #fff; }
.server-icon-green { background: var(--green); color: #fff; }
.server-label {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.server-value {
  margin-top: 4px;
  font-size: 21px;
  font-weight: 800;
  color: var(--ink);
}
.server-value .mono {
  font-size: 17px;
}
.server-note {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}
.server-copy {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--yellow);
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  box-shadow: 3px 3px 0 var(--shadow-color);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}
.server-copy:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--shadow-color);
}
.server-copy:active {
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-xs);
}
.server-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.server-status-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: var(--green);
  border: var(--border-thin);
}
.server-cta {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.server-cta-note {
  max-width: 28rem;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ------------------------------ About ------------------------------ */
.about-section {
  background: var(--surface);
  border-top: var(--border);
  border-bottom: var(--border);
  padding: 96px 0;
}
@media (min-width: 640px) {
  .about-section { padding: 128px 0; }
}
.about-inner {
  max-width: 80rem;
  margin: 0 auto;
  display: grid;
  gap: 56px;
  padding: 0 24px;
  align-items: center;
}
@media (min-width: 640px) {
  .about-inner { padding: 0 32px; }
}
@media (min-width: 1024px) {
  .about-inner { grid-template-columns: repeat(2, 1fr); }
}
.about-title {
  margin-top: 16px;
  font-size: 27px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: var(--ink);
}
@media (min-width: 768px) {
  .about-title { font-size: 35px; }
}
.about-text {
  margin-top: 24px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}
.about-highlights {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.about-highlight {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.about-check {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  margin-top: 2px;
  background: var(--yellow);
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  color: var(--ink);
}
.about-highlight-title {
  font-weight: 700;
  color: var(--ink);
}
.about-highlight-desc {
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
}

.about-visual {
  position: relative;
}
.about-frame {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 12px;
  transform: rotate(1.5deg);
  transition: transform 200ms ease-out;
}
.about-visual:hover .about-frame {
  transform: rotate(0deg);
}
.about-art-wrap {
  position: relative;
  overflow: hidden;
  border: var(--border-thin);
  border-radius: var(--radius-sm);
}
.about-art {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}
.about-art svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.about-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.about-caption {
  background: var(--inverse);
  padding: 16px;
}
.about-caption-title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}
.about-caption-sub {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: #cfd8e6;
}
.about-badge {
  position: absolute;
  top: -16px;
  right: -12px;
  background: var(--yellow);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px 16px;
  transform: rotate(3deg);
}
.about-badge-value {
  font-size: 27px;
  font-weight: 900;
  color: var(--ink);
}
.about-badge-label {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
}

/* ------------------------------ Team ------------------------------ */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 640px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .team-grid { grid-template-columns: repeat(4, 1fr); }
}
.team-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 24px;
  text-align: center;
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}
.team-card:hover .team-inner {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
}
.team-avatar {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-size: 27px;
  font-weight: 900;
}
.avatar-yellow { background: var(--yellow); color: var(--ink); }
.avatar-blue { background: var(--blue); color: #fff; }
.avatar-green { background: var(--green); color: #fff; }
.avatar-red { background: var(--red); color: #fff; }
.team-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
  background: var(--surface);
  display: block;
}
.team-inner h3 {
  margin-top: 16px;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}
.team-role {
  margin-top: 12px;
  display: inline-block;
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.badge-yellow { background: var(--yellow); color: var(--ink); }
.badge-blue { background: var(--blue); color: #fff; }
.badge-green { background: var(--green); color: #fff; }
.badge-red { background: var(--red); color: #fff; }
.team-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

/* ------------------------------ Gallery ------------------------------ */
.gallery-grid {
  columns: 1;
  column-gap: 24px;
}
@media (min-width: 640px) {
  .gallery-grid { columns: 2; }
}
@media (min-width: 1024px) {
  .gallery-grid { columns: 3; }
}
.gallery-tile {
  position: relative;
  display: block;
  width: 100%;
  margin-bottom: 24px;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  break-inside: avoid;
  cursor: pointer;
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}
.gallery-tile:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
}
.gallery-tile svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.gallery-tile .gallery-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--inverse);
  color: #fff;
  padding: 8px 12px;
}
.gallery-caption-title {
  font-size: 15px;
  font-weight: 700;
  text-align: left;
}
.gallery-arrow {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  background: var(--yellow);
  border: var(--border-thin);
  border-radius: 4px;
  color: var(--ink);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--inverse);
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease-out;
}
@media (min-width: 640px) {
  .lightbox { padding: 32px; }
}
.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}
.lb-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}
.lb-close:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--shadow-color);
}
.lb-close:active {
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-xs);
}
.lb-nav {
  position: absolute;
  top: 50%;
  z-index: 10;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: var(--yellow);
  border: var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}
.lb-nav:hover {
  transform: translateY(calc(-50% - 1px));
  box-shadow: 5px 5px 0 var(--shadow-color);
}
.lb-nav:active {
  transform: translateY(calc(-50% + 2px));
  box-shadow: var(--shadow-xs);
}
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
@media (min-width: 640px) {
  .lb-prev { left: 32px; }
  .lb-next { right: 32px; }
}
.lb-figure {
  width: 100%;
  max-width: 56rem;
  animation: lb-in 200ms ease-out;
}
@keyframes lb-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: none; }
}
.lb-art {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.lb-art svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.lb-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.lb-caption {
  margin-top: 16px;
  text-align: center;
  font-size: 21px;
  font-weight: 800;
  color: #fff;
}
.lb-count {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  color: #cfd8e6;
}

/* ------------------------------ Community ------------------------------ */
.community-grid {
  display: grid;
  gap: 32px;
}
@media (min-width: 768px) {
  .community-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .community-grid { grid-template-columns: repeat(3, 1fr); }
}
.community-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 24px;
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}
.community-card:hover .community-inner {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-lg);
}
.community-card:nth-child(1) .community-inner {
  background: var(--blue);
  color: #fff;
}
.community-card:nth-child(2) .community-inner {
  background: var(--red);
  color: #fff;
}
.community-card:nth-child(3) .community-inner {
  background: #101418;
  color: #fff;
}
.community-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: var(--border-thin);
  border-radius: var(--radius-sm);
}
.community-icon-discord {
  background: #fff;
  color: var(--blue);
}
.community-icon-youtube {
  background: #fff;
  color: var(--red);
}
.community-icon-tiktok {
  background: #fff;
  color: #010101;
}
.community-title {
  margin-top: 16px;
  font-size: 27px;
  font-weight: 800;
}
.community-desc {
  margin-top: 8px;
  flex: 1;
  font-size: 15px;
  line-height: 1.6;
}
.community-card:nth-child(1) .community-desc {
  color: #dfe6f5;
}
.community-card:nth-child(2) .community-desc {
  color: #fbe3e3;
}
.community-card:nth-child(3) .community-desc {
  color: #dbe3ef;
}
.community-btn {
  margin-top: 32px;
}
.community-btn .btn {
  width: 100%;
}
@media (min-width: 640px) {
  .community-btn .btn { width: auto; }
}
.external-icon {
  display: inline-flex;
}

/* ------------------------------ Shop ------------------------------ */
.shop-category + .shop-category {
  margin-top: 56px;
}
.shop-category-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.shop-cat-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.shop-category-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
}
.shop-row {
  display: grid;
  gap: 24px;
}
@media (min-width: 640px) {
  .shop-row { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .shop-row { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
}
.shop-card {
  position: relative;
  height: 100%;
}
.shop-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 24px 24px;
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}
.shop-card:hover .shop-inner {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
}
.shop-featured .shop-inner {
  background: var(--yellow);
}
.shop-flag {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  background: var(--ink);
  color: var(--yellow);
  border-radius: 4px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
}
.shop-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: var(--border-thin);
  border-radius: var(--radius-sm);
}
.shop-name {
  margin-top: 16px;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}
.shop-price {
  margin-top: 6px;
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  color: var(--ink);
}
.shop-price-sale {
  color: var(--red);
  animation: price-pop 500ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.shop-price-old {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: line-through;
  margin-bottom: 2px;
}
.shop-off {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  background: var(--red);
  color: #fff;
  border: var(--border-thin);
  border-radius: 4px;
  box-shadow: 2px 2px 0 var(--ink);
  animation: off-pop 500ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.shop-flag {
  top: 12px;
  right: 12px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  background: var(--ink);
  color: var(--yellow);
  border-radius: 4px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
}
@keyframes price-pop {
  from { transform: scale(1.25) rotate(-2deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes off-pop {
  from { transform: rotate(-14deg) scale(2.2); opacity: 0; }
  to { transform: rotate(6deg) scale(1); opacity: 1; }
}
.shop-discount-banner {
  display: inline-block;
  padding: 10px 22px;
  background: var(--red);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-2deg);
  animation: banner-sway 3.2s ease-in-out infinite;
}
@keyframes banner-sway {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(1.5deg); }
}
.shop-tagline {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
.shop-buy {
  margin-top: 24px;
  width: 100%;
}
.shop-buy-discord {
  display: inline-flex;
}
.shop-meta {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.shop-pay-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.shop-payments {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.shop-pay-pill {
  padding: 7px 18px;
  background: var(--yellow);
  border: var(--border-thin);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}
.shop-ticket {
  max-width: 560px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
.shop-ticket a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ------------------------------ FAQ ------------------------------ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.faq-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: background-color 150ms ease-out, box-shadow 150ms ease-out;
}
.faq-card.open {
  background: var(--yellow);
  box-shadow: var(--shadow);
}
.faq-q {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  text-align: left;
}
.faq-q-text {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.faq-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background: var(--white);
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  color: var(--ink);
  transition: transform 150ms ease-out;
}
.faq-card.open .faq-icon {
  transform: rotate(180deg);
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 250ms ease-out;
}
.faq-card.open .faq-a {
  max-height: 25rem;
}
.faq-a p {
  padding: 0 24px 20px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

/* ------------------------------ CTA banner ------------------------------ */
.cta-banner {
  position: relative;
  overflow: hidden;
  background: var(--blue);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.cta-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.12) 2px, transparent 2px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 2px, transparent 2px);
  background-size: 48px 48px;
}
.cta-content {
  position: relative;
  padding: 64px 24px;
  text-align: center;
}
@media (min-width: 640px) {
  .cta-content { padding: 80px 48px; }
}
.cta-title {
  margin: 0 auto;
  max-width: 42rem;
  font-size: 27px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: #fff;
}
@media (min-width: 768px) {
  .cta-title { font-size: 35px; }
}
.cta-sub {
  margin: 12px auto 0;
  max-width: 36rem;
  font-size: 15px;
  color: #dfe6f5;
}
.cta-ip {
  font-weight: 700;
  color: var(--ink);
  background: var(--white);
  border: var(--border-thin);
  border-radius: 4px;
  padding: 2px 8px;
}
.cta-buttons {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
@media (min-width: 640px) {
  .cta-buttons { flex-direction: row; }
}
.cta-buttons .btn {
  width: 100%;
}
@media (min-width: 640px) {
  .cta-buttons .btn { width: auto; }
}

/* ------------------------------ Footer ------------------------------ */
.footer {
  position: relative;
  background: var(--inverse);
  color: #fff;
  border-top: 4px solid var(--yellow);
  padding: 64px 0 40px;
}
.footer-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 640px) {
  .footer-inner { padding: 0 32px; }
}
.footer-grid {
  display: grid;
  gap: 48px;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
.footer-about {
  margin-top: 16px;
  max-width: 24rem;
  font-size: 15px;
  line-height: 1.6;
  color: #cfd8e6;
}
.footer-ip {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: #cfd8e6;
}
.footer-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--yellow);
  border: 2px solid #fff;
}
.footer-ip-value {
  font-weight: 700;
  color: #fff;
}
.footer-copy {
  margin-left: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--yellow);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-heading {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--yellow);
}
.footer-links {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  transition: color 150ms ease-out;
}
.footer-link:hover {
  color: var(--yellow);
}
.footer-link-tiktok {
  color: #7dd3fc;
}
.footer-link svg {
  width: 16px;
  height: 16px;
}
.footer-bottom {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 2px solid #3d4a5e;
  padding-top: 24px;
}
@media (min-width: 640px) {
  .footer-bottom { flex-direction: row; }
}
.footer-copyright {
  font-size: 13px;
  color: #cfd8e6;
}
.footer-made {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #cfd8e6;
}
.footer-heart {
  display: inline-flex;
  color: var(--yellow);
}

/* ------------------------------ Overlays & chrome ------------------------------ */
/* Loader */
.loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  transition: opacity 200ms ease-out, visibility 200ms;
}
.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-logo-frame {
  display: grid;
  place-items: center;
  width: 140px;
  height: 140px;
  padding: 14px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: cube-in 350ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.loader-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: loader-logo-pulse 2.4s ease-in-out infinite;
}
@keyframes loader-logo-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}
.loader-title {
  margin-top: 24px;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.35em;
  color: var(--ink);
}
.loader-bar {
  margin-top: 24px;
  height: 10px;
  width: 240px;
  background: var(--white);
  border: var(--border-thin);
  border-radius: 4px;
  overflow: hidden;
}
.loader-bar-fill {
  height: 100%;
  background: var(--yellow);
  animation: loader-bar 1.4s ease-out forwards;
}
@keyframes loader-bar {
  from { width: 0; }
  to { width: 100%; }
}

/* Scroll progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  height: 5px;
  background: var(--yellow);
  transform-origin: left;
  transform: scaleX(0);
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 80;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: var(--yellow);
  border: var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  color: var(--ink);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 200ms ease-out, visibility 200ms, transform 200ms ease-out;
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.back-to-top:active {
  transform: translateY(2px);
  box-shadow: var(--shadow-xs);
}

/* Toasts */
.toasts {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 120;
  transform: translateX(-50%);
  display: flex;
  width: 100%;
  max-width: 24rem;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  pointer-events: none;
}
.toast {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  background: var(--yellow);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 16px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 200ms ease-out, transform 200ms ease-out;
}
.toast.show {
  opacity: 1;
  transform: none;
}
.toast-error {
  background: var(--red);
}
.toast-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  background: var(--white);
  border: var(--border-thin);
  border-radius: 4px;
  color: var(--ink);
}
.toast p {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.toast-error p {
  color: #fff;
}
.toast-error .toast-icon {
  background: var(--inverse);
  color: #fff;
}

/* ------------------------------ Ticker ------------------------------ */
.ticker {
  overflow: hidden;
  background: var(--inverse);
  border-bottom: var(--border);
}
.ticker-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: ticker-scroll 28s linear infinite;
}
.ticker:hover .ticker-track {
  animation-duration: 9s;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 32px 12px 0;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
}
.ticker-item::before {
  content: "";
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  background: var(--yellow);
  border: var(--border-thin);
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ------------------------------ Motion & polish ------------------------------ */
/* Terminal-style blinking cursor after the IP */
.ip-pill-text {
  position: relative;
  padding-right: 14px;
}
.ip-pill-text::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 16px;
  background: var(--inverse);
  animation: cursor-blink 1.1s steps(2, start) infinite;
}
@keyframes cursor-blink {
  0%, 60% { opacity: 1; }
  61%, 100% { opacity: 0; }
}

/* Hero "SMP" block stamps in */
.hero-title-block {
  animation: stamp-in 500ms cubic-bezier(0.16, 1, 0.3, 1) 200ms both;
}
@keyframes stamp-in {
  0% { transform: rotate(-10deg) scale(0.85); opacity: 0; }
  60% { transform: rotate(2deg) scale(1.04); opacity: 1; }
  100% { transform: rotate(-2deg) scale(1); opacity: 1; }
}

/* Loader logo slams in */
@keyframes cube-in {
  0% { transform: scale(0.8) rotate(-4deg); opacity: 0; }
  70% { transform: scale(1.05) rotate(1deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}

/* Sticker wiggle on hover (one quick shake) */
.hero-sticker:hover,
.about-badge:hover {
  animation: wiggle 300ms ease-out;
}
@keyframes wiggle {
  0% { transform: rotate(3deg); }
  25% { transform: rotate(-4deg); }
  60% { transform: rotate(4deg); }
  100% { transform: rotate(3deg); }
}

/* Feature icon stamps on card hover */
.feature-icon {
  transition: transform 150ms ease-out;
}
.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(4deg);
}

/* Gallery caption nudges up on hover */
.gallery-caption {
  transition: transform 150ms ease-out;
}
.gallery-tile:hover .gallery-caption {
  transform: translateY(-6px);
}

/* Logo cube tips on hover */
.navbar-logo:hover .navbar-logo-icon {
  transform: translate(-1px, -1px) rotate(-8deg);
}

/* ------------------------------ Scroll reveal ------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  transition: opacity 350ms ease-out, transform 550ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.8) rotate(-1.5deg);
  transition: opacity 350ms ease-out, transform 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.in-view .reveal,
.reveal.in-view {
  opacity: 1;
  transform: none;
}
.in-view .reveal-scale,
.reveal-scale.in-view {
  opacity: 1;
  transform: none;
}

/* ------------------------------ Insane animations ------------------------------ */

/* Navbar slides down with a bounce */
.navbar {
  animation: nav-in 650ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes nav-in {
  from { transform: translateY(-110%); }
  to { transform: translateY(0); }
}

/* Sticker bobs forever */
.hero-sticker {
  animation: sticker-bob 3.2s ease-in-out infinite;
}
@keyframes sticker-bob {
  0%, 100% { transform: rotate(3deg) translateY(0); }
  50% { transform: rotate(-4deg) translateY(-10px); }
}

/* Floating neobrutalist shapes in the hero */
.hero-shape {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  animation: shape-float 6s ease-in-out infinite;
}
.hero-shape-square {
  top: 20%;
  left: 6%;
  width: 26px;
  height: 26px;
  background: var(--ink);
  border: 3px solid var(--border-color);
  border-radius: var(--radius-sm);
  animation-duration: 5.5s;
}
.hero-shape-ring {
  bottom: 24%;
  left: 10%;
  width: 44px;
  height: 44px;
  border: 5px solid var(--blue);
  border-radius: 50%;
  animation-duration: 7s;
  animation-delay: -2s;
}
.hero-shape-plus {
  top: 28%;
  right: 7%;
  color: var(--orange);
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
  animation-duration: 4.6s;
  animation-delay: -1.2s;
}
.hero-shape-blob {
  bottom: 16%;
  right: 18%;
  width: 20px;
  height: 20px;
  background: var(--green);
  border: 3px solid var(--border-color);
  animation: blob-morph 8s ease-in-out infinite;
}
@keyframes shape-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(10deg); }
}
@keyframes blob-morph {
  0%, 100% { border-radius: var(--radius-sm); transform: translateY(0) rotate(0); }
  33% { border-radius: 50%; transform: translateY(-16px) rotate(20deg); }
  66% { border-radius: 2px; transform: translateY(-6px) rotate(90deg); }
}
@media (max-width: 640px) {
  .hero-shape { display: none; }
}

/* Section title highlight pulses */
.section-title .hl {
  display: inline-block;
  animation: hl-bounce 4.5s ease-in-out infinite;
}
@keyframes hl-bounce {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(-1.5deg) scale(1.08); }
}

/* Buttons: shine sweep + squash press */
.btn-primary,
.btn-blue {
  position: relative;
  overflow: hidden;
}
.btn-primary::after,
.btn-blue::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}
.btn-primary:hover::after,
.btn-blue:hover::after {
  animation: shine 600ms ease-out;
}
@keyframes shine {
  from { left: -80%; }
  to { left: 140%; }
}
.btn:active {
  transform: translate(3px, 3px) scale(0.94);
}

/* Feature cards: deeper tilt + icon wiggle */
.feature-card:hover .feature-inner {
  transform: translate(-4px, -4px) rotate(-0.6deg);
}
.feature-card:hover .feature-icon {
  transform: scale(1.12) rotate(4deg);
  animation: icon-wiggle 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes icon-wiggle {
  0% { transform: rotate(0) scale(1); }
  30% { transform: rotate(-10deg) scale(1.2); }
  60% { transform: rotate(7deg) scale(1.08); }
  100% { transform: rotate(0) scale(1); }
}

/* Gallery tiles tilt harder on hover */
.gallery-tile:hover {
  transform: translate(-3px, -3px) rotate(-1.2deg) scale(1.02);
}

/* Stat values pop when a live number changes */
.stat-count {
  display: inline-block;
}
.stat-pop {
  animation: stat-pop 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes stat-pop {
  0% { transform: scale(1) rotate(0); }
  40% { transform: scale(1.12) rotate(-1.5deg); }
  100% { transform: scale(1) rotate(0); }
}

/* Hero frame gets a 3D cursor tilt from initHeroTilt() */
.hero-frame {
  will-change: transform;
}

/* Online player rows pop in one by one (delay set via --i) */
.lb-row {
  animation: row-pop 420ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes row-pop {
  from { opacity: 0; transform: translateX(-18px) rotate(-1deg); }
  to { opacity: 1; transform: none; }
}

/* Status dot heartbeat */
@keyframes dot-beat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.35); }
}

/* Confetti burst squares (spawned by burstConfetti) */
.confetti-piece {
  position: fixed;
  z-index: 9999;
  width: 10px;
  height: 10px;
  pointer-events: none;
  border: 2px solid var(--ink);
  border-radius: 2px;
  animation: confetti-fall 700ms cubic-bezier(0.16, 0.84, 0.44, 1) both;
}
@keyframes confetti-fall {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) rotate(var(--tr)) scale(0.5); opacity: 0; }
}

/* ------------------------- Living Minecraft scene ------------------------- */
/* Animated layers — gated on .hero:not(.paused) so they pause off-screen */
.hero:not(.paused) svg .mc-cloud { animation: mc-cloud-drift ease-in-out infinite alternate; }
.hero:not(.paused) svg .mc-sun {
  animation: mc-sun-pulse 3.6s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.hero:not(.paused) svg .mc-tree {
  animation: mc-tree-sway 4.4s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
.hero:not(.paused) svg .mc-block { animation: mc-block-bob 3.4s ease-in-out infinite alternate; }
.hero:not(.paused) svg .mc-blade {
  animation: mc-blade-sway 2.8s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
.hero:not(.paused) svg .mc-wave { animation: mc-wave-slide 3.2s ease-in-out infinite alternate; }
.hero:not(.paused) svg .mc-star { animation: mc-star-twinkle 2.8s ease-in-out infinite; }
.hero:not(.paused) svg .mc-flower { animation: mc-flower-bob 2.6s ease-in-out infinite alternate; }

@keyframes mc-cloud-drift { from { transform: translateX(0); } to { transform: translateX(26px); } }
@keyframes mc-sun-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.09); } }
@keyframes mc-tree-sway { from { transform: rotate(-1.2deg); } to { transform: rotate(1.2deg); } }
@keyframes mc-block-bob { from { transform: translateY(0); } to { transform: translateY(-7px); } }
@keyframes mc-blade-sway { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
@keyframes mc-wave-slide { from { transform: translateX(0); } to { transform: translateX(16px); } }
@keyframes mc-star-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes mc-flower-bob { from { transform: translateY(0); } to { transform: translateY(-3px); } }

/* ------------------------- Buttons: icon wiggle on hover ------------------------- */
.btn > span > svg { transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.btn:hover > span > svg { transform: rotate(-10deg) scale(1.12); }
.btn:active > span > svg { transform: rotate(0deg) scale(0.9); }
.btn:hover .external-icon svg { transform: translate(2px, -2px) scale(1.1); }

/* ------------------------- Scroll reveal variants ------------------------- */
.reveal-left {
  opacity: 0;
  transform: translateX(-44px);
  transition: opacity 350ms ease-out, transform 550ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.reveal-right {
  opacity: 0;
  transform: translateX(44px);
  transition: opacity 350ms ease-out, transform 550ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.reveal-zoom {
  opacity: 0;
  transform: scale(1.16);
  transition: opacity 350ms ease-out, transform 550ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.reveal-fade { opacity: 0; transition: opacity 600ms ease-out; }
.in-view .reveal-left,
.reveal-left.in-view { opacity: 1; transform: none; }
.in-view .reveal-right,
.reveal-right.in-view { opacity: 1; transform: none; }
.in-view .reveal-zoom,
.reveal-zoom.in-view { opacity: 1; transform: none; }
.in-view .reveal-fade,
.reveal-fade.in-view { opacity: 1; }

/* Section headings cascade in — eyebrow, title, sub line */
.section-heading > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 400ms ease-out, transform 520ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.section-heading > :nth-child(2) { transition-delay: 90ms; }
.section-heading > :nth-child(3) { transition-delay: 180ms; }
.section-heading.in-view > * { opacity: 1; transform: none; }

/* ------------------------- Ambient background shapes ------------------------- */
.ambient-shape {
  position: fixed;
  top: -12%;
  z-index: 9985;
  pointer-events: none;
  border: 3px solid var(--ink);
  border-radius: 6px;
  animation: ambient-drift linear infinite;
}
.ambient-ring { border-radius: 50%; }
.ambient-plus { background: var(--ink); border: 0; border-radius: 2px; }
.ambient-block { background: var(--yellow); }
@keyframes ambient-drift {
  from { transform: translateY(0) rotate(0deg); }
  to { transform: translateY(130vh) rotate(90deg); }
}

/* ------------------------- Scroll progress + back to top ------------------------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
  z-index: 9995;
  pointer-events: none;
}
#scroll-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--yellow);
  border-right: 3px solid var(--ink);
}
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9996;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: var(--yellow);
  color: var(--ink);
  border: var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) rotate(2deg);
  transition: opacity 200ms ease-out, transform 200ms ease-out, visibility 200ms, box-shadow 150ms ease-out;
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.back-to-top:hover {
  transform: translate(-2px, -2px) rotate(-2deg);
  box-shadow: var(--shadow-lg);
}
.back-to-top:active {
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-xs);
}

/* ------------------------- Creeper easter egg ------------------------- */
.creeper-face {
  position: fixed;
  top: -70px;
  z-index: 9998;
  pointer-events: none;
  animation: creeper-fall linear both;
}
@keyframes creeper-fall {
  0% {
    transform: translateY(0) rotate(var(--cr, 0deg));
    opacity: 1;
  }
  100% {
    transform: translateY(115vh) rotate(calc(var(--cr, 0deg) + 360deg));
    opacity: 0.9;
  }
}

/* Logo hiss wobble */
.navbar-logo.hissing .navbar-logo-icon {
  animation: logo-hiss 400ms ease-out;
}
@keyframes logo-hiss {
  0% { transform: translateX(0); }
  25% { transform: translateX(-3px) rotate(-4deg); }
  50% { transform: translateX(3px) rotate(4deg); }
  75% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal,
  .reveal-scale {
    opacity: 1;
    transform: none;
  }
  .ticker-track {
    animation: none;
  }
  .ip-pill-text::after {
    animation: none;
  }
  .hero-title-block {
    animation: none;
    transform: rotate(-2deg);
  }
  .loader-logo-frame {
    animation: none;
  }
  .hero-sticker,
  .about-badge {
    animation: none;
  }
  .hero svg .mc-cloud,
  .hero svg .mc-sun,
  .hero svg .mc-tree,
  .hero svg .mc-block,
  .hero svg .mc-blade,
  .hero svg .mc-wave,
  .hero svg .mc-star,
  .hero svg .mc-flower {
    animation: none !important;
  }
  .ambient-shape {
    display: none;
  }
  .creeper-face {
    display: none;
  }
  .section-heading > *,
  .reveal-left,
  .reveal-right,
  .reveal-zoom,
  .reveal-fade {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   Leaderboard
   ========================================================================== */
.leaderboard {
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.leaderboard-panel {
  padding: 16px;
}
.leaderboard-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.leaderboard-meta {
  font-size: 11px;
  color: var(--muted);
}
.leaderboard-refresh {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}
.leaderboard-refresh:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-xs);
}
.leaderboard-refresh:active {
  transform: none;
  box-shadow: none;
}
.leaderboard-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.leaderboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 16px 0;
}
.lb-tab {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 16px;
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: transform 150ms ease-out, box-shadow 150ms ease-out,
    background 150ms ease-out, color 150ms ease-out;
}
.lb-tab:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-xs);
}
.lb-tab:active {
  transform: none;
  box-shadow: none;
}
.lb-tab.active {
  background: var(--inverse);
  color: var(--yellow);
  box-shadow: var(--shadow-xs);
}
.lb-rank {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 16px;
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  background: var(--inverse);
  color: #fff;
}
.lb-rank-yellow {
  background: var(--yellow);
  color: var(--ink);
}
.lb-rank-blue {
  background: var(--blue);
  color: #fff;
}
.lb-rank-green {
  background: var(--green);
  color: #fff;
}
.lb-value {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}
.lb-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}
.lb-row:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-xs);
}
.lb-row:last-child {
  margin-bottom: 0;
}
.lb-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 900;
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  background: var(--yellow);
  color: var(--ink);
  overflow: hidden;
}
.lb-head {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}
.lb-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  white-space: nowrap;
}
.lb-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}
.lb-skeleton .lb-avatar,
.lb-skeleton-name,
.lb-skeleton-value {
  background: #e4e0d5;
}
.lb-skeleton-name {
  width: 120px;
  height: 30px;
  border: var(--border-thin);
  border-radius: var(--radius-sm);
}
.lb-skeleton-value {
  width: 48px;
  height: 20px;
  border: var(--border-thin);
  border-radius: var(--radius-sm);
}
.lb-empty {
  list-style: none;
  padding: 32px 16px;
  text-align: center;
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink);
}

/* ==========================================================================
   Premium micro-interactions (Linear/Vercel-grade polish)
   ========================================================================== */

:root {
  --spotlight-color: rgba(124, 107, 242, 0.10);
  --dust-color: rgba(237, 241, 247, 0.35);
  --xp-color: rgba(34, 197, 94, 0.9);
  --grain-opacity: 0.045;
}
[data-theme="light"] {
  --spotlight-color: rgba(124, 107, 242, 0.09);
  --dust-color: rgba(28, 41, 60, 0.30);
  --grain-opacity: 0.035;
}

/* Page-in (subtle, 180ms) */
main {
  animation: page-in 180ms ease-out;
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(6px) scale(0.998); }
  to { opacity: 1; transform: none; }
}

/* -- Cursor spotlight ---------------------------------------------------- */
.spotlight-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 600ms ease;
}
.spotlight-layer.on { opacity: 1; }
.spotlight-layer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 640px;
  height: 640px;
  margin: -320px 0 0 -320px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--spotlight-color) 0%, transparent 62%);
  transform: translate3d(var(--sx, 0px), var(--sy, 0px), 0);
  will-change: transform;
}

/* -- Film grain ---------------------------------------------------------- */
.grain-layer {
  position: fixed;
  inset: -60%;
  z-index: 9997;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix type='saturate' values='0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
  animation: grain-shift 1.1s steps(4) infinite;
  will-change: transform;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 2%); }
  50% { transform: translate(2%, -1%); }
  75% { transform: translate(-1%, -2%); }
  100% { transform: translate(0, 0); }
}

/* -- Hero: drifting grid + parallax layers ------------------------------- */
.hero-grid {
  animation: grid-drift 90s linear infinite;
}
@keyframes grid-drift {
  from { background-position: 0 0; }
  to { background-position: 48px 48px; }
}
.hero-grid { translate: 0 var(--py-0, 0px); }
.hero-shape { translate: 0 var(--py-1, 0px); }
.hero-visual { translate: 0 var(--py-2, 0px); }
.hero-sticker { translate: 0 var(--py-3, 0px); }

/* -- Pixel dust (subtle drifting squares + XP orbs) ----------------------- */
.pixel-dust {
  position: absolute;
  z-index: 1;
  width: 3px;
  height: 3px;
  background: var(--dust-color);
  border-radius: 1px;
  opacity: 0;
  pointer-events: none;
  animation: dust-drift var(--dt, 12s) linear infinite;
  will-change: transform;
}
.pixel-dust-xp {
  width: 5px;
  height: 5px;
  background: var(--xp-color);
  box-shadow: 0 0 6px var(--xp-color);
}
@keyframes dust-drift {
  0% { opacity: 0; transform: translate3d(0, 0, 0); }
  8% { opacity: 0.55; }
  80% { opacity: 0.55; }
  100% { opacity: 0; transform: translate3d(var(--dx, 60px), var(--dy, -100px), 0); }
}
.hero.paused .pixel-dust,
.hero.paused .hero-shape,
.hero.paused .hero-sticker,
.hero.paused .hero-deco-sticker,
.hero.paused .beacon-beam,
.hero.paused .hero-diamond,
.hero.paused .hero-grid {
  animation-play-state: paused;
}

/* -- Ambient light sweep (every 18s) -------------------------------------- */
.hero::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -30%;
  width: 26%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  transform: translateX(0) skewX(-14deg);
  animation: light-sweep 18s ease-in-out infinite;
  animation-delay: 5s;
}
@keyframes light-sweep {
  0%, 3% { transform: translateX(0) skewX(-14deg); opacity: 0; }
  8% { opacity: 1; }
  22%, 100% { transform: translateX(1400px) skewX(-14deg); opacity: 0; }
}

/* -- Hero: beacon beam + diamond + deco stickers -------------------------- */
.beacon-beam {
  position: absolute;
  bottom: -34px;
  left: 50%;
  z-index: -1;
  width: 160px;
  height: 480px;
  transform: translateX(-50%);
  background: linear-gradient(to top, transparent, rgba(124, 107, 242, 0.30), transparent);
  clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%);
  animation: beacon-glow 4.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes beacon-glow {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.9; }
}
.hero-diamond {
  position: absolute;
  top: -16px;
  left: -16px;
  z-index: 2;
  width: 18px;
  height: 18px;
  background: var(--blue);
  border: 3px solid var(--border-color);
  border-radius: 3px;
  transform: rotate(45deg);
  animation: diamond-spin 9s linear infinite;
  pointer-events: none;
}
@keyframes diamond-spin {
  from { transform: rotate(45deg); }
  to { transform: rotate(405deg); }
}
.hero-deco-sticker {
  position: absolute;
  z-index: 3;
  top: -16px;
  right: -10px;
  font-size: 14px;
  font-weight: 900;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 4px 10px;
  box-shadow: 2px 2px 0 var(--ink);
  animation: deco-float 7s ease-in-out infinite;
  pointer-events: none;
}
.hero-deco-sticker-b {
  top: auto;
  right: auto;
  bottom: -12px;
  left: -8px;
  background: var(--blue);
  color: #fff;
  animation-delay: -2.5s;
}
.hero-deco-sticker-left {
  top: -18px;
  right: auto;
  left: -14px;
}
@keyframes deco-float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-14px) rotate(5deg); }
}

/* -- Rotating typewriter -------------------------------------------------- */
.hero-typewriter {
  margin-top: 14px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink);
  min-height: 22px;
}
.typewriter-caret {
  display: inline-block;
  width: 9px;
  height: 1.1em;
  margin-left: 3px;
  vertical-align: -2px;
  background: var(--ink);
  animation: cursor-blink 1.1s steps(2, start) infinite;
}

/* -- Letter bounce on the hero title -------------------------------------- */
.hero-title .lt {
  display: inline-block;
  will-change: transform;
}
.hero-title:hover .lt {
  animation: letter-bounce 520ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: var(--ld, 0ms);
}
@keyframes letter-bounce {
  0% { transform: translateY(0) rotate(0) scale(1); }
  35% { transform: translateY(-9px) rotate(-5deg) scale(1.1); }
  62% { transform: translateY(2px) rotate(2deg) scale(0.98); }
  100% { transform: none; }
}
.hero-title .lt:nth-child(1) { --ld: 0ms; }
.hero-title .lt:nth-child(2) { --ld: 45ms; }
.hero-title .lt:nth-child(3) { --ld: 90ms; }
.hero-title .lt:nth-child(4) { --ld: 135ms; }
.hero-title .lt:nth-child(5) { --ld: 180ms; }
.hero-title .lt:nth-child(6) { --ld: 225ms; }
.hero-title .lt:nth-child(7) { --ld: 270ms; }
.hero-title .lt:nth-child(8) { --ld: 315ms; }
.hero-title .lt:nth-child(9) { --ld: 360ms; }
.hero-title .lt:nth-child(10) { --ld: 405ms; }
.hero-title .lt:nth-child(11) { --ld: 450ms; }
.hero-title .lt:nth-child(12) { --ld: 495ms; }

/* -- Headings stretch slightly on hover ------------------------------------ */
.section-title {
  transition: letter-spacing 260ms ease;
}
.section-title:hover {
  letter-spacing: 0.03em;
}

/* -- Liquid hover fill on buttons ------------------------------------------ */
.btn-liquid {
  position: relative;
  overflow: hidden;
}
.btn-liquid::before {
  content: "";
  position: absolute;
  left: var(--bx, 50%);
  top: var(--by, 50%);
  width: 340px;
  height: 340px;
  margin: -170px 0 0 -170px;
  border-radius: 50%;
  background: var(--liquid-fill, rgba(255, 255, 255, 0.85));
  opacity: 0;
  transform: scale(0);
  transition: transform 450ms cubic-bezier(0.16, 1, 0.3, 1), opacity 220ms ease;
  pointer-events: none;
}
.btn-liquid:hover::before {
  opacity: 1;
  transform: scale(1);
}
.btn-outline.btn-liquid {
  --liquid-fill: rgba(28, 41, 60, 0.07);
}

/* -- Pixel ripple (chunky Minecraft ripple) -------------------------------- */
.pixel-ripple {
  position: absolute;
  z-index: 6;
  width: 6px;
  height: 6px;
  border: 2px solid var(--white);
  border-radius: 1px;
  pointer-events: none;
  animation: ripple-out 560ms cubic-bezier(0.16, 0.84, 0.44, 1) forwards;
}
@keyframes ripple-out {
  from { transform: translate(-50%, -50%) scale(0.3) rotate(0deg); opacity: 0.95; }
  to { transform: translate(calc(-50% + var(--rx, 0px)), calc(-50% + var(--ry, 0px))) scale(1) rotate(160deg); opacity: 0; }
}

/* -- Confetti star variant -------------------------------------------------- */
.confetti-piece.confetti-star {
  border-radius: 0;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* -- Interactive card glow (cursor-following) ------------------------------- */
.feature-inner {
  position: relative;
  overflow: hidden;
}
.feature-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  border-radius: inherit;
  background: radial-gradient(260px circle at var(--gx, 50%) var(--gy, 50%), rgba(124, 107, 242, 0.16), transparent 65%);
  transition: opacity 300ms ease;
}
.feature-card:hover .feature-inner::before {
  opacity: 1;
}
.feature-inner > * {
  position: relative;
  z-index: 1;
}

/* -- Animated border draw (stroke reveal) ----------------------------------- */
.feature-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border: 2px solid var(--border-color);
  border-radius: inherit;
  opacity: 0;
  clip-path: inset(0 100% 100% 0);
  transition: clip-path 520ms cubic-bezier(0.77, 0, 0.18, 1), opacity 150ms ease;
}
.feature-card:hover .feature-inner::after {
  opacity: 1;
  clip-path: inset(0 0 0 0);
}

/* -- Corner fold on hover ---------------------------------------------------- */
.feature-card {
  position: relative;
}
.feature-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  width: 0;
  height: 0;
  pointer-events: none;
  border-style: solid;
  border-width: 0;
  border-color: var(--yellow) transparent transparent transparent;
  transition: border-width 300ms ease;
}
.feature-card:hover::after {
  border-width: 24px 24px 0 0;
}

/* -- Ink stamps on card hover ------------------------------------------------ */
.card-stamp {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 4px;
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  opacity: 0;
  transform: scale(2.2) rotate(-14deg);
  transition: opacity 200ms ease-out, transform 380ms cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.feature-card:hover .card-stamp {
  opacity: 1;
  transform: scale(1) rotate(-8deg);
}

/* -- Magnetic feature icons (spring back) ------------------------------------- */
.feature-icon {
  transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1), scale 180ms ease-out;
  will-change: transform;
}
.feature-card:hover .feature-icon {
  transform: translate(var(--ix, 0px), var(--iy, 0px));
  scale: 1.1;
  rotate: 4deg;
}

/* -- Nav: active blob + dock hover -------------------------------------------- */
#nav-links {
  position: relative;
}
#nav-links .nav-link {
  position: relative;
  z-index: 1;
  transform: scale(var(--dock, 1));
  transition: transform 140ms ease-out, color 150ms ease-out, background-color 150ms ease-out;
}
.nav-blob {
  position: absolute;
  top: 50%;
  left: 0;
  height: 34px;
  margin-top: -17px;
  z-index: 0;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--yellow);
  box-shadow: 2px 2px 0 var(--ink);
  opacity: 0;
  transform: translateX(0);
  transition: transform 340ms cubic-bezier(0.34, 1.56, 0.64, 1), width 340ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 200ms ease;
  pointer-events: none;
}
.nav-blob.on {
  opacity: 1;
}

/* -- Nav "More" dropdown -------------------------------------------------------------- */
.nav-drop {
  position: relative;
}
.nav-more-btn {
  background: none;
  cursor: pointer;
  font-family: inherit;
}
.nav-caret {
  margin-left: 2px;
  transition: transform 180ms ease;
}
.nav-drop.open .nav-caret {
  transform: rotate(180deg);
}
.nav-drop-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 60;
  min-width: 190px;
  padding: 8px;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
}
.nav-drop.open .nav-drop-menu,
.nav-drop:hover .nav-drop-menu,
.nav-drop:focus-within .nav-drop-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.nav-drop-link {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  text-align: left;
  transition: background-color 150ms ease-out;
}
.nav-drop-link:hover {
  background: var(--yellow);
}
.nav-drop-link.active {
  background: var(--yellow);
  border: var(--border-thin);
}

/* -- Gallery polaroid fan ------------------------------------------------------- */
.gallery-tile:hover {
  transform: translate(-3px, -3px) rotate(-1.8deg) scale(1.03);
}
.gallery-tile:nth-child(even):hover {
  transform: translate(-3px, -3px) rotate(2deg) scale(1.03);
}

/* -- Skeleton shimmer ------------------------------------------------------------- */
.lb-skeleton-name,
.lb-skeleton-value,
.lb-skeleton .lb-avatar {
  position: relative;
  overflow: hidden;
}
.lb-skeleton-name::after,
.lb-skeleton-value::after,
.lb-skeleton .lb-avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.45) 50%, transparent 80%);
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

/* -- Odometer rolling numbers ------------------------------------------------------ */
.odigit {
  display: inline-block;
  height: 1em;
  overflow: hidden;
  vertical-align: bottom;
  font-variant-numeric: tabular-nums;
}
.odigit-strip {
  display: block;
  transform: translateY(0);
  transition: transform 650ms cubic-bezier(0.16, 1, 0.3, 1);
}
.odigit-strip > span {
  display: block;
  height: 1em;
  line-height: 1em;
}
.ocomma {
  font-variant-numeric: tabular-nums;
}

/* -- Leaderboard champion shine + XP bar -------------------------------------------- */
.lb-champion {
  position: relative;
  overflow: hidden;
}
.lb-champion::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.5) 48%, transparent 62%);
  transform: translateX(-120%);
  animation: champion-shine 3.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes champion-shine {
  0%, 55% { transform: translateX(-120%); }
  85%, 100% { transform: translateX(120%); }
}
.lb-xp {
  display: block;
  height: 6px;
  margin-top: 6px;
  background: var(--grid-line);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}
.lb-xp-fill {
  display: block;
  height: 100%;
  width: var(--xp-w, 50%);
  background: linear-gradient(90deg, var(--green), var(--yellow));
  border-radius: 3px;
  animation: xp-grow 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes xp-grow {
  from { width: 0; }
}

/* -- Redstone pulse on server status dot ---------------------------------------------- */
.server-status-dot {
  animation: redstone-pulse 1.6s ease-in-out infinite;
}
@keyframes redstone-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.9); }
}

/* -- Nether portal shimmer around the main CTA (removed — pink tint unwanted) */


/* -- Creeper eyes easter egg --------------------------------------------------------------- */
.creeper-eyes {
  position: fixed;
  bottom: 14px;
  right: 18px;
  z-index: 9996;
  display: flex;
  gap: 5px;
  opacity: 0.16;
  pointer-events: none;
}
.creeper-eye {
  width: 5px;
  height: 5px;
  background: var(--green);
}
.creeper-eye:nth-child(1) { animation: eye-blink 5.4s infinite; }
.creeper-eye:nth-child(2) { animation: eye-blink 5.4s infinite 0.07s; }
@keyframes eye-blink {
  0%, 90.5%, 100% { transform: scaleY(1); }
  92.5%, 97% { transform: scaleY(0.1); }
}

/* -- Premium stacked toasts ---------------------------------------------------------------- */
.toasts {
  position: fixed;
  top: 88px;
  right: 24px;
  left: auto;
  bottom: auto;
  z-index: 10000;
  display: flex;
  width: auto;
  max-width: min(360px, calc(100vw - 48px));
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  padding: 0;
  transform: none;
  pointer-events: none;
}
@media (max-width: 640px) {
  .toasts {
    top: 76px;
    right: 16px;
    max-width: calc(100vw - 32px);
  }
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 340px;
  margin-bottom: 10px;
  padding: 12px 16px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  transform: translateX(130%);
  transition: transform 380ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 300ms ease;
}
.toast.show {
  opacity: 1;
  transform: none;
}
.toast.out {
  opacity: 0;
  transform: translateX(130%);
}
.toast p {
  flex: 1;
  margin: 0;
  min-width: 0;
}
.toast-close {
  flex-shrink: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  padding: 0 0 0 6px;
}
.toast-close:hover { color: var(--ink); }
.toast-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: #fff;
}
.toast-success .toast-icon { background: var(--green); }
.toast-error .toast-icon { background: var(--red); }
.toast-warn .toast-icon { background: var(--orange); }
.toast-info .toast-icon { background: var(--blue); }

/* Blob is the highlight now � keep the link itself clean */
#nav-links .nav-link:hover,
#nav-links .nav-link.active {
  background: transparent;
  border-color: transparent;
}

/* Toasts need pointer events for their close button */
.toast {
  pointer-events: auto;
}

/* ==========================================================================
   Premium loading screen
   ========================================================================== */
.loader {
  background:
    repeating-linear-gradient(var(--grid-line) 0 2px, transparent 2px 48px),
    repeating-linear-gradient(90deg, var(--grid-line) 0 2px, transparent 2px 48px),
    radial-gradient(circle at 50% 42%, var(--white) 0%, transparent 60%),
    var(--surface);
  transition: opacity 380ms ease-out, visibility 380ms, transform 380ms ease-out;
}
.loader.hidden {
  transform: scale(1.04);
}
.loader::before,
.loader::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border: 2px solid var(--ink);
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  animation: loader-dust 5s ease-in-out infinite;
}
.loader::before {
  left: 66%;
  top: 38%;
  background: var(--yellow);
}
.loader::after {
  left: 30%;
  top: 58%;
  background: var(--blue);
  animation-delay: -2.5s;
}
@keyframes loader-dust {
  0% { opacity: 0; transform: translateY(24px) rotate(0); }
  15% { opacity: 0.85; }
  85% { opacity: 0.85; }
  100% { opacity: 0; transform: translateY(-70px) rotate(220deg); }
}

.loader-logo-frame {
  position: relative;
  width: 150px;
  height: 150px;
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 7px 7px 0 var(--ink);
  overflow: hidden;
  animation:
    cube-in 450ms cubic-bezier(0.34, 1.56, 0.64, 1) both,
    frame-bob 2.6s ease-in-out 450ms infinite;
}
@keyframes frame-bob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(1.5deg); }
}
.loader-logo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.4) 48%, transparent 62%);
  transform: translateX(-130%);
  animation: loader-shine 2.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes loader-shine {
  0%, 58% { transform: translateX(-130%); }
  84%, 100% { transform: translateX(130%); }
}

.loader-title {
  margin-top: 26px;
  text-align: center;
  padding-left: 0.35em;
  animation: loader-fade-up 500ms cubic-bezier(0.16, 1, 0.3, 1) 150ms both;
}
.loader-status {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--muted);
  animation: loader-fade-up 500ms cubic-bezier(0.16, 1, 0.3, 1) 280ms both;
}
.loader-dots span {
  display: inline-block;
  animation: loader-dot 1.2s ease-in-out infinite;
}
.loader-dots span:nth-child(2) { animation-delay: 0.15s; }
.loader-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes loader-dot {
  0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.loader-bar-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
  animation: loader-fade-up 500ms cubic-bezier(0.16, 1, 0.3, 1) 400ms both;
}
.loader-bar {
  height: 14px;
  width: 260px;
  background: var(--inverse);
  border: 2px solid var(--ink);
  border-radius: 5px;
  overflow: hidden;
  flex-shrink: 0;
}
.loader-bar-fill {
  height: 100%;
  width: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 10px, rgba(0, 0, 0, 0.28) 10px 12px),
    linear-gradient(180deg, #9ef0b2 0%, var(--green) 45%, #159a43 100%);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.55);
  animation: none;
}
.loader-percent {
  width: 48px;
  flex-shrink: 0;
  text-align: left;
  font-size: 14px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 14px;
  color: var(--ink);
}
@keyframes loader-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ==========================================================================
   Minecraft premium launcher loading screen
   ========================================================================== */
.loader {
  background:
    repeating-linear-gradient(var(--grid-line) 0 2px, transparent 2px 56px),
    repeating-linear-gradient(90deg, var(--grid-line) 0 2px, transparent 2px 56px),
    radial-gradient(circle at 50% 38%, var(--spotlight-color), transparent 55%),
    var(--surface);
  transition:
    opacity 620ms cubic-bezier(0.4, 0, 0.2, 1) 60ms,
    visibility 0s 680ms,
    transform 620ms cubic-bezier(0.4, 0, 0.2, 1) 60ms;
  will-change: opacity, transform;
}
.loader.hidden {
  opacity: 0;
  transform: scale(1.03);
  visibility: hidden;
  pointer-events: none;
}
.loader-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transition: filter 700ms ease;
}
.loader.done .loader-bg {
  filter: brightness(1.4);
}
.loader.tab-hidden .loader-bg * {
  animation-play-state: paused !important;
}
.loader::before {
  content: none;
}
.loader::after {
  content: "";
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  z-index: 5;
  border: none;
  border-radius: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(2, 6, 15, 0.68) 100%);
  opacity: 0;
  transition: opacity 520ms ease;
  pointer-events: none;
  animation: none;
}
.loader.done::after {
  opacity: 1;
}
.loader.tab-hidden .loader-logo {
  animation-play-state: paused;
}

/* Light rays */
.loader-rays {
  position: absolute;
  inset: -25%;
  pointer-events: none;
  background: conic-gradient(
    from 0deg at 50% 45%,
    transparent 0deg,
    rgba(var(--la-rgb, 124, 107, 242), 0.06) 40deg,
    transparent 90deg,
    rgba(var(--la-rgb, 124, 107, 242), 0.04) 140deg,
    transparent 190deg,
    rgba(var(--la-rgb, 124, 107, 242), 0.05) 250deg,
    transparent 300deg
  );
  animation: rays-turn 48s linear infinite;
}
@keyframes rays-turn {
  to { transform: rotate(360deg); }
}

/* Floating grass / stone / ore blocks */
.loader-blocks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.loader-block {
  position: absolute;
  bottom: -90px;
  left: var(--bx, 50%);
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  border-radius: 5px;
  opacity: 0;
  transform: scale(var(--bs, 1));
  animation: block-rise var(--bdur, 20s) linear infinite;
  animation-delay: var(--bd, 0s);
  will-change: transform;
}
.loader-block-grass {
  background:
    repeating-linear-gradient(90deg, #5db84e 0 6px, #67c65b 6px 12px) 0 0 / 100% 13px no-repeat,
    repeating-linear-gradient(0deg, #7a4f2e 0 6px, #8a5a33 6px 12px);
}
.loader-block-stone {
  background:
    linear-gradient(#97a1ae 0 40%, #7d8794 40%),
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.12) 0 4px, transparent 4px 8px);
}
.loader-block-ore {
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(34, 197, 94, 0.95) 18% 26%, transparent 26% 55%, rgba(34, 197, 94, 0.85) 55% 62%, transparent 62%),
    linear-gradient(#97a1ae 0 40%, #7d8794 40%);
}
@keyframes block-rise {
  0% { opacity: 0; transform: translateY(0) rotate(var(--br, 0deg)) scale(var(--bs, 1)); }
  8% { opacity: 0.55; }
  90% { opacity: 0.55; }
  100% { opacity: 0; transform: translateY(-115vh) rotate(calc(var(--br, 0deg) + 220deg)) scale(var(--bs, 1)); }
}

/* Floating pixel-art items */
.loader-item {
  position: absolute;
  left: var(--ix, 10%);
  top: var(--it, 35%);
  width: 40px;
  height: 40px;
  image-rendering: pixelated;
  opacity: 0.7;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.45));
  animation: item-float 9s ease-in-out infinite;
  animation-delay: var(--id, 0s);
  will-change: transform;
}
@keyframes item-float {
  0%, 100% { transform: translateY(0) rotate(var(--ir, -6deg)) scale(1); }
  50% { transform: translateY(-26px) rotate(calc(var(--ir, -6deg) + 14deg)) scale(1.06); }
}

/* Fog */
.loader-fog {
  position: absolute;
  left: -30%;
  right: -30%;
  bottom: -8%;
  height: 55%;
  pointer-events: none;
  background:
    radial-gradient(ellipse 40% 55% at 30% 80%, rgba(var(--la-rgb, 124, 107, 242), 0.10), transparent 70%),
    radial-gradient(ellipse 45% 60% at 70% 85%, rgba(var(--la-rgb, 124, 107, 242), 0.08), transparent 70%);
  filter: blur(26px);
  animation: fog-drift 24s ease-in-out infinite alternate;
}
@keyframes fog-drift {
  from { transform: translateX(-4%); }
  to { transform: translateX(4%); }
}

/* Beacon beam */
.loader-beacon {
  position: absolute;
  bottom: -30%;
  left: 50%;
  width: 240px;
  height: 135%;
  transform: translateX(-50%);
  background: linear-gradient(to top, transparent 0%, rgba(var(--la-rgb, 124, 107, 242), 0.14) 45%, transparent 70%);
  clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%);
  animation: beacon-glow 5s ease-in-out infinite;
  pointer-events: none;
}

/* Sparkles */
.loader-sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--blue);
  border-radius: 1px;
  opacity: 0;
  animation: sparkle 3.4s ease-in-out infinite;
  pointer-events: none;
}
.loader-sparkle:nth-child(1) { left: 16%; top: 20%; }
.loader-sparkle:nth-child(2) { left: 82%; top: 24%; animation-delay: -0.7s; }
.loader-sparkle:nth-child(3) { left: 24%; top: 74%; animation-delay: -1.4s; }
.loader-sparkle:nth-child(4) { left: 74%; top: 78%; animation-delay: -2.1s; }
.loader-sparkle:nth-child(5) { left: 48%; top: 12%; animation-delay: -2.8s; }
.loader-sparkle:nth-child(6) { left: 92%; top: 48%; animation-delay: -1.1s; }
@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0.4) rotate(0); }
  50% { opacity: 0.9; transform: scale(1.1) rotate(90deg); }
}

/* Content column — single centered axis via flexbox */
.loader-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  max-width: 100%;
  padding: 24px;
}

/* Logo: fade in -> overshoot -> float -> glow pulse */
.loader-logo-frame {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 132px;
  height: 132px;
  padding: 14px;
  background: linear-gradient(180deg, var(--la-a, #FDE68A) 0%, var(--la-b, #FDC800) 100%);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 0 24px var(--la-glow-soft, rgba(253, 200, 0, 0.25)), 7px 7px 0 var(--shadow-color);
  overflow: hidden;
  animation:
    loader-logo-in 700ms cubic-bezier(0.34, 1.56, 0.64, 1) both,
    loader-logo-glow 3.6s ease-in-out 700ms infinite;
}
@keyframes loader-logo-in {
  0% { opacity: 0; transform: translateY(26px) scale(0.82); }
  60% { opacity: 1; transform: translateY(-6px) scale(1.06); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes loader-logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
@keyframes loader-logo-glow {
  0%, 100% { box-shadow: 0 0 22px var(--la-glow-soft, rgba(253, 200, 0, 0.25)), 7px 7px 0 var(--shadow-color); }
  50% { box-shadow: 0 0 46px var(--la-glow-strong, rgba(253, 200, 0, 0.5)), 7px 7px 0 var(--shadow-color); }
}
.loader.done .loader-logo-frame {
  animation: loader-logo-celebrate 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes loader-logo-celebrate {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-18px) scale(1.12) rotate(-3deg); }
  60% { transform: translateY(0) scale(1); }
  100% { transform: translateY(0) scale(1); }
}

.loader-title {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.3em;
  padding-left: 0.15em;
  text-align: center;
  color: var(--ink);
  text-shadow: 0 0 24px var(--la-glow-soft, rgba(253, 200, 0, 0.3));
  animation: loader-fade-up 500ms cubic-bezier(0.16, 1, 0.3, 1) 200ms both;
}
.loader-tag {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3em;
  padding-left: 0.15em;
  text-transform: uppercase;
  text-align: center;
  color: var(--la-b, #FDC800);
  text-shadow: 0 0 14px var(--la-glow-mid, rgba(253, 200, 0, 0.5));
  animation: loader-fade-up 500ms cubic-bezier(0.16, 1, 0.3, 1) 260ms both;
}
.loader-status {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.14em;
  padding-left: 0.07em;
  text-align: center;
  color: var(--muted);
  min-height: 18px;
  animation: loader-fade-up 500ms cubic-bezier(0.16, 1, 0.3, 1) 320ms both;
}
.loader-fade-text {
  transition: opacity 240ms ease;
}
.loader-fade-text.fading {
  opacity: 0;
}

.loader-bar-wrap {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: loader-fade-up 500ms cubic-bezier(0.16, 1, 0.3, 1) 440ms both;
}
.loader-bar {
  position: relative;
  height: 16px;
  width: 280px;
  background: var(--inverse);
  border: 2px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.loader-bar-fill {
  height: 100%;
  width: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 12px, rgba(0, 0, 0, 0.3) 12px 15px),
    linear-gradient(180deg, var(--la-a, #A3F3C0) 0%, var(--la-b, #22C55E) 45%, var(--la-c, #15803D) 100%);
  box-shadow: 0 0 14px var(--la-glow-mid, rgba(34, 197, 94, 0.5));
  transition: width 60ms linear;
  animation: none;
}
.loader.done .loader-bar-fill {
  background:
    repeating-linear-gradient(90deg, transparent 0 12px, rgba(0, 0, 0, 0.3) 12px 15px),
    linear-gradient(180deg, var(--la-a, #D9FBE6) 0%, var(--la-b, #4ADE80) 45%, var(--la-c, #22C55E) 100%);
  box-shadow: 0 0 30px var(--la-glow-strong, rgba(74, 222, 128, 0.9));
  animation: bar-done-pulse 700ms ease-in-out 2;
}
@keyframes bar-done-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.4); }
}

.loader-percent {
  width: auto;
  flex-shrink: 0;
  text-align: center;
  line-height: 1;
  font-size: 14px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.loader-tip {
  margin: 0;
  min-height: 16px;
  font-size: 12px;
  letter-spacing: 0.12em;
  padding-left: 0.06em;
  text-align: center;
  color: var(--muted);
  animation: loader-fade-up 500ms cubic-bezier(0.16, 1, 0.3, 1) 560ms both;
}

/* Rising pixel particles (spawned by JS) */
.loader-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 1px;
  background: rgba(var(--la-rgb, 124, 107, 242), 0.5);
  opacity: 0;
  pointer-events: none;
  animation: loader-particle-rise var(--pd, 8s) linear infinite;
  will-change: transform;
}
@keyframes loader-particle-rise {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(0); }
  10% { opacity: 0.7; }
  90% { opacity: 0.7; }
  100% { opacity: 0; transform: translate3d(var(--px, 40px), -60vh, 0) rotate(220deg); }
}

/* Milestone expanding ping */
.loader-ping {
  position: fixed;
  z-index: 1001;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border: 2px solid var(--la-b, #4ade80);
  border-radius: 2px;
  pointer-events: none;
  animation: loader-ping 620ms ease-out forwards;
}
@keyframes loader-ping {
  from { opacity: 0.9; transform: scale(0.5) rotate(0); }
  to { opacity: 0; transform: scale(6) rotate(90deg); }
}

/* Block confetti burst on completion */
.loader-confetti {
  position: absolute;
  left: 50%;
  top: 46%;
  z-index: 6;
  width: 10px;
  height: 10px;
  border: 2px solid var(--ink);
  border-radius: 2px;
  pointer-events: none;
  animation: loader-confetti-burst 900ms cubic-bezier(0.16, 0.84, 0.44, 1) forwards;
  will-change: transform;
}
@keyframes loader-confetti-burst {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.4) rotate(0); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--tx, 0px)), calc(-50% + var(--ty, 0px))) scale(1) rotate(var(--tr, 300deg)); }
}

/* TNT block that drops in and explodes before the page appears */
.tnt-block {
  position: absolute;
  left: 50%;
  top: 54%;
  width: 88px;
  height: 88px;
  z-index: 5;
  transform: translate(-50%, -50%);
  image-rendering: pixelated;
  opacity: 0;
  animation: tnt-drop 450ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  pointer-events: none;
}
@keyframes tnt-drop {
  0% { opacity: 0; transform: translate(-50%, -300px) scale(1.2); }
  55% { opacity: 1; transform: translate(-50%, -50%) scale(0.94); }
  75% { transform: translate(-50%, -50%) scale(1.05); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.loader.boom .tnt-block {
  animation: tnt-vanish 320ms ease-out forwards;
}
@keyframes tnt-vanish {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1.3) rotate(8deg); filter: brightness(3); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.2) rotate(-14deg); filter: brightness(4); }
}
.tnt-fuse {
  position: absolute;
  left: 50%;
  top: -8px;
  width: 10px;
  height: 10px;
  transform: translateX(-50%);
  background: #fde047;
  border: 2px solid #78350f;
  border-radius: 50%;
  box-shadow: 0 0 12px #fde047;
  animation: fuse-flicker 130ms linear infinite;
}
@keyframes fuse-flicker {
  0%, 100% { opacity: 1; box-shadow: 0 0 16px #fde047; }
  50% { opacity: 0.5; box-shadow: 0 0 6px #facc15; }
}
.loader.boom {
  animation: loader-shake 520ms cubic-bezier(0.36, 0.07, 0.19, 0.97);
}
@keyframes loader-shake {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-14px, 6px) rotate(-0.6deg); }
  30% { transform: translate(12px, -8px) rotate(0.5deg); }
  45% { transform: translate(-10px, -5px); }
  60% { transform: translate(8px, 7px) rotate(0.4deg); }
  75% { transform: translate(-6px, 3px); }
  90% { transform: translate(4px, -2px); }
}
.loader.boom::after {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: 4;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, #fff 0%, rgba(255, 255, 255, 0.75) 22%, rgba(255, 255, 255, 0) 60%);
  animation: boom-flash 650ms ease-out forwards;
}
@keyframes boom-flash {
  0% { opacity: 0; transform: scale(0.3); }
  12% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.25); }
}
.boom-smoke {
  position: fixed;
  z-index: 6;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  background: radial-gradient(circle, rgba(148, 163, 184, 0.85) 0%, rgba(148, 163, 184, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: smoke-rise 1.4s ease-out forwards;
}
@keyframes smoke-rise {
  0% { opacity: 0; transform: translate(0, 0) scale(0.4); }
  15% { opacity: 0.85; }
  100% { opacity: 0; transform: translate(var(--sx, 0px), var(--sy, -90px)) scale(1.7); }
}

/* ==========================================================================
   Easter egg: living mini Minecraft world
   (wandering mobs, creeper explosions, page damage, Steve repairs)
   ========================================================================== */
.egg-stage {
  position: absolute;
  inset: 0;
  z-index: 12;
  overflow: hidden;
  pointer-events: none;
}
.egg-stage-fixed {
  position: fixed;
  inset: 0;
  z-index: 40;
}

/* --- mob entity: positioned by the engine via translate3d --- */
.egg-mob {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 12;
  pointer-events: none;
  will-change: transform;
}
.egg-mob svg {
  display: block;
  width: 100%;
  height: auto;
}
.egg-shadow {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -7px;
  height: 12px;
  background: radial-gradient(ellipse, rgba(2, 6, 23, 0.4) 0%, rgba(2, 6, 23, 0.15) 55%, transparent 75%);
}
.egg-mob-body {
  display: block;
}
.egg-mob-bob {
  display: block;
}
.egg-mob.walk .egg-mob-bob {
  animation: egg-bob var(--step, 0.7s) steps(3, end) infinite;
}
@keyframes egg-bob {
  from { transform: translateY(0); }
  to { transform: translateY(-2px); }
}
.egg-mob.idle .egg-mob-bob {
  animation: egg-breathe 2.6s ease-in-out infinite;
}
@keyframes egg-breathe {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.012); }
}

/* --- heads: blocky stepped turns driven by --ht --- */
.egg-mob .head {
  transform-box: fill-box;
  transform-origin: center bottom;
  transform: rotate(var(--ht, 0deg));
  transition: transform 160ms steps(4, jump-none);
}
.egg-chicken .head {
  transition: none;
}

/* --- limbs: Minecraft gait, blocky steps, per-mob speed --- */
.egg-mob .limb {
  transform-box: fill-box;
  transform-origin: top center;
}
.egg-mob.walk .leg-a { animation: leg-swing var(--step, 0.85s) steps(6, end) infinite alternate; }
.egg-mob.walk .leg-b { animation: leg-swing var(--step, 0.85s) steps(6, end) infinite alternate-reverse; }
.egg-mob.walk .arm-a { animation: arm-swing var(--step, 0.85s) steps(6, end) infinite alternate; }
.egg-mob.walk .arm-b { animation: arm-swing var(--step, 0.85s) steps(6, end) infinite alternate-reverse; }
.egg-mob.walk .quad-a { animation: quad-swing var(--step, 0.7s) steps(5, end) infinite alternate; }
.egg-mob.walk .quad-b { animation: quad-swing var(--step, 0.7s) steps(5, end) infinite alternate-reverse; }
.egg-mob.walk .spider-a { animation: spider-step 0.4s steps(4, end) infinite alternate; }
.egg-mob.walk .spider-b { animation: spider-step 0.4s steps(4, end) infinite alternate-reverse; }
.egg-mob.walk .arm-long-a { animation: ender-swing 1.15s steps(6, end) infinite alternate; }
.egg-mob.walk .arm-long-b { animation: ender-swing 1.15s steps(6, end) infinite alternate-reverse; }
.egg-mob.walk .stride { animation-duration: 1.15s; }
@keyframes leg-swing {
  from { transform: rotate(-18deg); }
  to { transform: rotate(18deg); }
}
@keyframes arm-swing {
  from { transform: rotate(-16deg); }
  to { transform: rotate(16deg); }
}
@keyframes quad-swing {
  from { transform: rotate(-12deg); }
  to { transform: rotate(12deg); }
}
@keyframes spider-step {
  from { transform: rotate(-5deg); }
  to { transform: rotate(5deg); }
}
@keyframes ender-swing {
  from { transform: rotate(-18deg); }
  to { transform: rotate(18deg); }
}

/* zombie arms stay forward, villager hands stay clasped */
.egg-mob.egg-zombie .arm-a,
.egg-mob.egg-villager .arm-a { animation: none; }
.egg-mob.egg-zombie .arm-b,
.egg-mob.egg-villager .arm-b { animation: none; }
.egg-zombie .arm-a { transform: rotate(14deg); }
.egg-zombie .arm-b { transform: rotate(-14deg); }

/* tails */
.egg-mob .tail {
  transform-box: fill-box;
  transform-origin: left center;
}
.egg-mob.walk .tail {
  animation: tail-wag 0.5s steps(4, end) infinite alternate;
}
@keyframes tail-wag {
  from { transform: rotate(-16deg); }
  to { transform: rotate(16deg); }
}

/* chicken head bob while walking */
.egg-mob .chick-head {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: chick-head-bob 0.5s ease-in-out infinite alternate;
}
@keyframes chick-head-bob {
  from { transform: translateY(0) rotate(0deg); }
  to { transform: translateY(-2px) rotate(4deg); }
}

/* skeleton aiming its bow */
.egg-skeleton .bow {
  transform-box: fill-box;
  transform-origin: 12% 85%;
  transition: transform 300ms steps(6, jump-none);
}
.egg-skeleton.aiming .bow {
  transform: rotate(-38deg);
}

/* --- creeper fuse: flicker + shake before the boom --- */
.egg-mob.fusing {
  animation: egg-fuse 0.22s linear infinite;
}
.egg-mob.fusing .egg-mob-bob {
  animation: egg-fuse-shake 0.16s steps(3, end) infinite;
}
@keyframes egg-fuse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(2.4); }
}
@keyframes egg-fuse-shake {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(-1px, 0); }
  66% { transform: translate(1.5px, -1px); }
}

/* --- explosion FX --- */
.egg-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  animation: egg-flash-anim 0.5s ease-out forwards;
}
@keyframes egg-flash-anim {
  0% { opacity: 0.95; }
  100% { opacity: 0; }
}
.egg-ring {
  position: absolute;
  width: 140px;
  height: 140px;
  margin: -70px 0 0 -70px;
  border-radius: 50%;
  border: 16px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 70px rgba(255, 190, 80, 0.85), 0 0 140px rgba(255, 120, 40, 0.5);
  z-index: 80;
  pointer-events: none;
  animation: egg-ring-kf 0.8s ease-out forwards;
}
@keyframes egg-ring-kf {
  0% { transform: scale(0.3); opacity: 1; border-width: 26px; }
  100% { transform: scale(5.2); opacity: 0; border-width: 2px; }
}
.egg-smoke {
  position: absolute;
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(148, 163, 184, 0.85) 0%, rgba(148, 163, 184, 0) 70%);
  animation: egg-smoke-rise 1.3s ease-out forwards;
}
@keyframes egg-smoke-rise {
  0% { opacity: 0; transform: translate(0, 0) scale(0.4); }
  20% { opacity: 0.9; }
  100% { opacity: 0; transform: translate(var(--sx, 0px), var(--sy, -60px)) scale(2.4); }
}
.egg-chicken {
  position: absolute;
  width: 44px;
  opacity: 0;
  animation: egg-launch 3.1s cubic-bezier(0.22, 0.9, 0.32, 1) forwards;
}
@keyframes egg-launch {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  7% { opacity: 1; }
  24% { transform: translate(3vw, -24vh) rotate(-560deg); opacity: 1; }
  60% { transform: translate(38vw, -26vh) rotate(-760deg); opacity: 1; }
  100% { transform: translate(80vw, -24vh) rotate(-880deg); opacity: 0; }
}
.chick-wing {
  transform-box: fill-box;
  transform-origin: right center;
  animation: wing-flap 0.32s ease-in-out infinite alternate;
}
@keyframes wing-flap {
  from { transform: rotate(-14deg); }
  to { transform: rotate(34deg); }
}
.egg-feather {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #fff;
  border: 1px solid #1C293C;
  opacity: 0;
  animation: egg-feather-fall 2.4s ease-in forwards;
}
@keyframes egg-feather-fall {
  0% { opacity: 0; transform: translate(0, 0) rotate(0deg); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translate(24px, var(--fy, 90px)) rotate(240deg); }
}

/* --- pooled particles --- */
.egg-puff {
  position: absolute;
  width: 7px;
  height: 7px;
  margin: -3px 0 0 -3px;
  background: rgba(148, 163, 184, 0.7);
  opacity: 0;
  z-index: 14;
  animation: egg-puff-fly 0.8s steps(6, end) forwards;
}
@keyframes egg-puff-fly {
  0% { opacity: 0.7; transform: translate(0, 0); }
  100% { opacity: 0; transform: translate(var(--dx, 6px), var(--dy, -14px)); }
}
.egg-puff-placed {
  background: #E8E8E8;
}
.egg-debris {
  position: absolute;
  width: 8px;
  height: 8px;
  opacity: 0;
  z-index: 14;
  animation: egg-debris-fly 0.9s steps(9, end) forwards;
}
@keyframes egg-debris-fly {
  0% { opacity: 1; transform: translate(0, 0) rotate(0deg); }
  100% { opacity: 0; transform: translate(var(--dx, 40px), var(--dy, -70px)) rotate(var(--dr, 180deg)); }
}
.egg-burn {
  position: absolute;
  width: 200px;
  height: 150px;
  margin: -75px 0 0 -100px;
  z-index: 5;
  background: radial-gradient(circle at 50% 60%, rgba(20, 16, 12, 0.85) 0%, rgba(40, 28, 18, 0.55) 45%, rgba(80, 60, 30, 0.18) 70%, transparent 85%);
  border-radius: 6px;
  image-rendering: pixelated;
  transition: opacity 0.6s;
}
.egg-burn.fading {
  opacity: 0;
}

/* screen shake */
body.egg-shake {
  animation: egg-screen-shake 0.7s steps(10, end);
}
@keyframes egg-screen-shake {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-9px, 5px); }
  30% { transform: translate(9px, -5px); }
  45% { transform: translate(-7px, -4px); }
  60% { transform: translate(7px, 4px); }
  75% { transform: translate(-4px, 3px); }
}

/* ==========================================================================
   Explosion damage on the page (persistent until Steve repairs)
   ========================================================================== */
.mob-dmg-1:not(.navbar),
.mob-dmg-2:not(.navbar),
.mob-dmg-3:not(.navbar) {
  position: relative;
}
.mob-dmg-1::after,
.mob-dmg-2::after,
.mob-dmg-3::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cg fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='square'%3E%3Cpath d='M0 10 L12 22 L8 34 L20 46 L16 64'/%3E%3Cpath d='M64 6 L52 18 L56 30 L44 42 L48 64'/%3E%3Cpath d='M30 0 L34 12 L26 18 L30 28 L24 44'/%3E%3Cpath d='M0 0 L6 6'/%3E%3Cpath d='M64 64 L56 56'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 64px 64px;
  image-rendering: pixelated;
  opacity: 0.65;
  mix-blend-mode: multiply;
}
.mob-dmg-2::after {
  opacity: 0.9;
  background-size: 48px 48px;
}
.mob-dmg-3::after {
  opacity: 1;
  background-size: 40px 40px;
}
.mob-dmg-2 {
  box-shadow: inset 0 0 0 2px rgba(15, 23, 42, 0.35);
}
.mob-dmg-3 {
  filter: saturate(0.8) brightness(0.9);
  rotate: 0.6deg;
}
.btn.mob-dmg-2 {
  rotate: -0.8deg;
}
.btn.mob-dmg-3 {
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  rotate: -1deg;
}
.card.mob-dmg-3,
.community-card.mob-dmg-3 {
  rotate: 1.1deg;
}
.mob-destroyed {
  opacity: 0;
  scale: 0.15;
  rotate: 18deg;
  transition: opacity 340ms steps(6, jump-none), scale 340ms steps(6, jump-none), rotate 340ms steps(6, jump-none);
}
.mob-replanted {
  opacity: 1;
  scale: 1;
  rotate: 0deg;
  transition: opacity 420ms steps(5, jump-none), scale 420ms steps(5, jump-none), rotate 420ms steps(5, jump-none);
}

/* --- Steve the repairman --- */
.steve-block {
  opacity: 0;
  transition: opacity 150ms steps(3, end);
}
.egg-steve.egg-repairing .steve-block {
  opacity: 1;
}
.egg-steve.placing .steve-block {
  animation: steve-place 0.5s steps(4, end) infinite;
}
@keyframes steve-place {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.egg-steve.swinging .arm-b {
  animation: steve-swing 0.6s steps(8, end);
}
@keyframes steve-swing {
  from { transform: rotate(-20deg); }
  to { transform: rotate(60deg); }
}
.egg-steve.nodding .head {
  animation: steve-nod 1.4s steps(6, end);
}
@keyframes steve-nod {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(10deg); }
  50% { transform: rotate(0deg); }
  75% { transform: rotate(10deg); }
  100% { transform: rotate(0deg); }
}

/* ==========================================================================
   Loader → page reveal choreography
   ========================================================================== */
body.loading {
  overflow: hidden;
  scrollbar-gutter: stable;
}

/* Gate page entrances until the loader is gone */
body.loading .navbar,
body.loading .hero-anim,
body.loading .hero-shape,
body.loading .ambient-shape {
  animation-play-state: paused;
}
body.loading .hero-shape {
  opacity: 0;
}
body.loaded .hero-shape {
  opacity: 1;
  transition: opacity 500ms ease 520ms;
}
body.loaded .hero-anim {
  animation-delay: calc(var(--d, 0s) + 240ms);
}

/* Inner pages: page heading rises in after the navbar */
body.loading .section-heading {
  opacity: 0;
  transform: translateY(24px);
}
body.loaded .section-heading {
  opacity: 1;
  transform: none;
  transition:
    opacity 550ms cubic-bezier(0.4, 0, 0.2, 1) 320ms,
    transform 550ms cubic-bezier(0.4, 0, 0.2, 1) 320ms;
}

/* Scroll-reveal elements already in view stay parked until the reveal */
body.loading .reveal.in-view,
body.loading .in-view .reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.97);
}
body.loading .reveal-scale.in-view,
body.loading .in-view .reveal-scale {
  opacity: 0;
  transform: scale(0.8) rotate(-1.5deg);
}
body.loading .reveal-left.in-view,
body.loading .in-view .reveal-left,
body.loading .reveal-right.in-view,
body.loading .in-view .reveal-right,
body.loading .reveal-zoom.in-view,
body.loading .in-view .reveal-zoom,
body.loading .reveal-fade.in-view,
body.loading .in-view .reveal-fade {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  body.loading .navbar,
  body.loading .hero-anim,
  body.loading .hero-shape,
  body.loading .ambient-shape {
    animation-play-state: running;
  }
  body.loading .hero-shape,
  body.loading .section-heading,
  body.loading .reveal.in-view,
  body.loading .in-view .reveal,
  body.loading .reveal-scale.in-view,
  body.loading .in-view .reveal-scale {
    opacity: 1;
    transform: none;
  }
}
