/* ============ Tokens ============ */
:root {
  --bg: #f4f3ee;
  --bg-2: #ebe9e2;
  --surface: #fbfaf7;
  --ink: #15181a;
  --ink-2: #4b5157;
  --ink-3: #8a9097;
  --line: #d9d7cf;
  --accent: #3c8527;
  --accent-ink: #ffffff;
  --sky: #dfe3e8;
  --sky-night: #2b3038;
  --sun: #15181a;
  --shadow: 0 10px 30px -12px rgb(0 0 0 / .18);
  --radius: 4px;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --pixel: "Silkscreen", monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1113; --bg-2: #15181b; --surface: #171a1d;
    --ink: #e8e7e1; --ink-2: #aeb3b8; --ink-3: #6f767d; --line: #272c31;
    --accent: #6cbf52; --accent-ink: #0f1113;
    --sky: #1c2026; --sky-night: #0a0c10; --sun: #e8e7e1;
    --shadow: 0 10px 30px -12px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; touch-action: manipulation; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  line-height: 1.6; overflow-x: hidden; touch-action: manipulation;
  transition: background-color .3s, color .3s;
}
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
code { font-family: var(--pixel); font-size: .85em; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.1; letter-spacing: -.01em; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; color: var(--ink-2); }
.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.eyebrow { font-family: var(--pixel); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: .75rem; }
section { padding: clamp(72px, 10vw, 140px) 0; position: relative; }

/* ============ Progress / ambient / toast ============ */
.progress { position: fixed; inset: 0 auto auto 0; height: 2px; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); z-index: 60; }
.ambient { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; opacity: .5; }
.toast {
  position: fixed; left: 50%; bottom: 24px; translate: -50% 20px; opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--radius); font-size: .9rem; font-weight: 600;
  transition: .3s var(--ease); z-index: 70;
}
.toast.is-on { translate: -50% 0; opacity: 1; }

/* ============ Header ============ */
.header { position: sticky; top: 0; z-index: 110; background: color-mix(in srgb, var(--bg) 94%, transparent); border-bottom: 1px solid transparent; transition: border-color .3s, padding .3s; }
.header.is-scrolled { border-color: var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 88px; transition: height .3s; }
.header.is-scrolled .header__inner { height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; font-family: var(--pixel); font-size: 1rem; font-weight: 700; letter-spacing: .02em; flex: none; }
.brand__mark { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.brand__name em { font-style: normal; color: var(--accent); }
.nav { display: flex; gap: clamp(8px, 1vw, 18px); margin-left: auto; }
.nav a { padding: 10px 4px; font-size: clamp(.9rem, 1.15vw, 1.05rem); font-weight: 700; color: var(--ink-2); border-radius: 0; position: relative; transition: color .2s; white-space: nowrap; }
.nav a::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: 1px; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav a:hover, .nav a.is-active { color: var(--ink); }
.nav a.is-active::after { transform: scaleX(1); }
.nav__contact-link { display: none; }
.nav-backdrop { display: none; }
.header__actions { display: flex; align-items: center; gap: 10px; margin-left: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); display: inline-block; flex: none; }
.dot.is-online { background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2s infinite; }
.dot.is-offline { background: var(--ink-3); }
@keyframes pulse { 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink-2); transition: .2s; }
.icon-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.nav-toggle { display: none; }
.nav-toggle .ico { grid-area: 1/1; }
.nav-toggle .ico--close { display: none; }
.nav-toggle[aria-expanded="true"] .ico--open { display: none; }
.nav-toggle[aria-expanded="true"] .ico--close { display: block; }

/* ============ Buttons ============ */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: var(--radius); font-weight: 700; font-size: .95rem; border: 1px solid transparent; position: relative; overflow: hidden; transition: transform .2s var(--ease), background-color .2s, border-color .2s, box-shadow .2s; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: inset 0 -3px 0 rgb(0 0 0 / .25); }
.btn--primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn--ghost:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.btn--sm { padding: 8px 14px; font-size: .85rem; }
.header__actions .btn { white-space: nowrap; flex: none; }
.btn--lg { padding: 15px 26px; font-size: 1rem; }
.btn.is-done .ico { animation: pop .4s var(--ease); }
@keyframes pop { 50% { transform: scale(1.35); } }

/* ============ Reveal (scroll entrance) ============ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--delay, 0s); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ============ Hero ============ */
.hero { min-height: calc(100svh - 68px); display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; text-align: center; padding: 60px 0 100px; overflow: hidden; }
.hero__blocks span {
  position: absolute; left: var(--x); top: var(--y); width: calc(28px * var(--s)); height: calc(28px * var(--s));
  border: 2px solid rgb(255 255 255 / .28); opacity: .8; pointer-events: none;
  background-size: cover; image-rendering: pixelated; box-shadow: 3px 3px 0 rgb(0 0 0 / .18);
  animation: drift 14s ease-in-out infinite; animation-delay: var(--d);
  translate: calc(var(--px, 0) * var(--s) * 1px) calc(var(--py, 0) * var(--s) * 1px);
  transition: translate .6s var(--ease);
}
.hero__blocks span:nth-child(1) { background-image: url("./assets/textures/grass_block.png"); }
.hero__blocks span:nth-child(2) { background-image: url("./assets/textures/diamond_block.png"); }
.hero__blocks span:nth-child(3) { background-image: url("./assets/textures/oak_planks.png"); }
.hero__blocks span:nth-child(4) { background-image: url("./assets/textures/glowstone.png"); }
.hero__blocks span:nth-child(5) { background-image: url("./assets/textures/stone_bricks.png"); }
.hero__blocks span:nth-child(6) { background-image: url("./assets/textures/cobblestone.png"); }
@keyframes drift { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-16px) rotate(6deg); } }
.hero__inner { position: relative; z-index: 1; max-width: 820px; }
.hero__title { font-size: clamp(2.8rem, 8vw, 6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1; margin: 0 0 24px; }
.hero__title .w { display: inline-block; overflow: hidden; vertical-align: top; padding: .2em .04em 0; margin: -.2em -.04em 0; }
.hero__title .w > span { display: inline-block; transform: translateY(110%); transition: transform .8s var(--ease); transition-delay: calc(var(--i) * 80ms); }
.hero__title.is-in .w > span { transform: none; }
.hero__lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 620px; margin: 0 auto 36px; }
.hero__cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px; }
.hero__preview { width: 100%; margin-bottom: 40px; }
.hero__frame {
  position: relative; width: 100%; aspect-ratio: 16/9; max-height: 420px;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--shadow); background: var(--surface);
}
.hero__frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.hero__frame:hover img { transform: scale(1.03); }
.hero__badge {
  position: absolute; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 85%, transparent);
  border: 1px solid var(--line); backdrop-filter: blur(8px); font-family: var(--pixel); font-size: .7rem;
  color: var(--ink); z-index: 2;
}
.hero__explore-btn {
  position: absolute; bottom: 14px; right: 14px; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 90%, transparent);
  border: 1px solid var(--line); color: var(--ink); font-weight: 700; font-size: .85rem;
  backdrop-filter: blur(8px); box-shadow: 0 4px 12px rgb(0 0 0 / .15); transition: all .2s var(--ease); z-index: 2;
}
.hero__explore-btn:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); transform: translateY(-2px); }

.server-highlights {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin: 0 0 36px; width: 100%;
}
.highlight-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); text-align: left;
  box-shadow: var(--shadow); transition: transform .2s var(--ease), border-color .2s;
}
.highlight-item:hover { transform: translateY(-2px); border-color: var(--accent); }
.highlight-badge { width: 22px; height: 22px; color: var(--accent); line-height: 1; flex: none; }
.highlight-info strong { display: block; font-size: .88rem; font-weight: 700; color: var(--ink); line-height: 1.2; }
.highlight-info span { font-size: .74rem; color: var(--ink-3); }
.scroll-hint { position: absolute; bottom: 28px; left: 50%; translate: -50%; width: 22px; height: 36px; border: 1.5px solid var(--ink-3); border-radius: 12px; display: grid; justify-items: center; padding-top: 6px; }
.scroll-hint span { width: 3px; height: 7px; background: var(--ink-3); border-radius: 2px; animation: hint 1.6s infinite; }
@keyframes hint { 0% { transform: translateY(0); opacity: 1 } 100% { transform: translateY(12px); opacity: 0 } }

/* ============ Scrollytelling ============ */
.story { background: var(--bg-2); }
.story__head { text-align: center; margin-bottom: 48px; }
.scrolly { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.scrolly__stage { position: sticky; top: 92px; }

/* ============ Minecraft Scene & In-Game Viewport ============ */
.scene {
  aspect-ratio: 4/3; border: 2px solid var(--line); border-radius: var(--radius);
  overflow: hidden; position: relative; box-shadow: var(--shadow); background: #000;
  user-select: none;
}
.scene__photos { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.scene__photo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.05); transition: opacity .9s var(--ease), transform .9s var(--ease);
  pointer-events: none;
}
.scene__photo.is-active { opacity: 1; transform: scale(1); }
.scene__tint {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgb(0 0 0 / .12) 0%, rgb(0 0 0 / .5) 100%);
  z-index: 1; pointer-events: none; transition: background .8s ease;
}
.scene.is-night .scene__tint {
  background: linear-gradient(180deg, rgb(5 10 25 / .65) 0%, rgb(3 6 15 / .85) 100%);
}

.scene__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2;
  cursor: crosshair; image-rendering: pixelated;
}

/* HUD Top bar */
.mc-hud__top {
  position: absolute; top: 10px; left: 10px; right: 10px;
  display: flex; justify-content: space-between; align-items: flex-start;
  z-index: 5; pointer-events: none; gap: 8px;
}
.mc-hud__top > * { pointer-events: auto; }
.scene__label {
  font-family: var(--pixel); font-size: .68rem; padding: 4px 8px;
  background: color-mix(in srgb, var(--surface) 90%, transparent); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--ink); backdrop-filter: blur(8px);
}
.mc-f3 {
  font-family: var(--pixel); font-size: .6rem; color: #fff;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
  display: flex; flex-direction: column; gap: 2px;
  background: rgb(0 0 0 / .45); padding: 4px 8px; border-radius: var(--radius);
  border: 1px solid rgb(255 255 255 / .15); backdrop-filter: blur(4px);
}
.mc-f3__biome { color: #55ff55; }

.mc-top-actions { display: flex; gap: 6px; }
.mc-action-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px;
  border-radius: var(--radius); background: rgb(20 20 20 / .8);
  border: 1px solid rgb(255 255 255 / .25); color: #fff; font-family: var(--pixel);
  font-size: .65rem; backdrop-filter: blur(6px); transition: all .15s;
}
.mc-action-btn:hover {
  background: var(--accent); color: #fff; border-color: var(--accent);
  transform: translateY(-1px);
}

/* In-game action bar alert */
.mc-actionbar {
  position: absolute; top: 54px; left: 50%; transform: translateX(-50%);
  background: rgb(0 0 0 / .7); border: 1px solid rgb(255 255 255 / .2);
  color: #ffff55; font-family: var(--pixel); font-size: .68rem;
  padding: 4px 12px; border-radius: 999px; text-shadow: 1px 1px 0 #000;
  z-index: 5; pointer-events: none; transition: opacity .3s, transform .3s; white-space: nowrap;
}

/* Chat overlay */
.mc-chat {
  position: absolute; bottom: 82px; left: 12px; max-width: 340px;
  display: flex; flex-direction: column; gap: 4px; z-index: 4;
  pointer-events: none; font-family: var(--pixel); font-size: .65rem;
}
.mc-chat__msg {
  background: rgb(0 0 0 / .65); padding: 4px 8px; border-radius: 2px;
  color: #fff; text-shadow: 1px 1px 0 #000; line-height: 1.35;
  border-left: 2px solid #55ff55; animation: chatIn .25s ease;
}
.mc-chat__msg--sys { color: #ffff55; border-left-color: #ffff55; }
.mc-chat__msg--hint { color: #aaffaa; border-left-color: #55ffff; }
.mc-chat__msg--claim { color: #ffaa00; border-left-color: #ffaa00; }
@keyframes chatIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }

/* Center Crosshair */
.mc-crosshair {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-family: monospace; font-size: 24px; font-weight: 300; line-height: 1;
  color: #fff; mix-blend-mode: difference; pointer-events: none; z-index: 4;
  text-shadow: 0 0 1px #000;
}

/* HUD Bottom: Stats & Hotbar */
.mc-hud__bottom {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  z-index: 5; width: max-content;
}
.mc-stats-row {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 0 4px; gap: 12px; font-size: .7rem;
}
.mc-hearts, .mc-hunger { display: flex; gap: 1px; letter-spacing: -2px; }
.mc-exp {
  position: relative; flex: 1; display: flex; align-items: center;
  justify-content: center; min-width: 60px;
}
.mc-exp__bar {
  width: 100%; height: 4px; background: #222; border-radius: 1px;
  position: relative; overflow: hidden;
}
.mc-exp__bar::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 85%;
  background: #55ff55;
}
.mc-exp__num {
  position: absolute; top: -14px; font-family: var(--pixel); font-size: .65rem;
  color: #55ff55; font-weight: 700; text-shadow: 1px 1px 0 #000;
}

/* Authentic 9-Slot Hotbar */
.mc-hotbar {
  display: flex; gap: 2px; padding: 3px;
  background: rgb(30 30 30 / .88); border: 3px solid #777;
  border-radius: 2px; box-shadow: 0 4px 0 #222, 0 8px 18px rgb(0 0 0 / .48);
  backdrop-filter: blur(4px);
}
.mc-slot {
  position: relative; width: 34px; height: 34px;
  background: rgb(50 50 50 / .75); border: 2px solid #333;
  border-radius: 2px; display: grid; place-items: center;
  padding: 0; cursor: pointer; transition: transform .1s, border-color .1s;
}
.mc-slot img {
  image-rendering: pixelated; width: 24px; height: 24px;
  transition: transform .15s;
}
.mc-slot:hover { border-color: #888; background: rgb(70 70 70 / .8); }
.mc-slot.is-selected {
  border: 2px solid #fff; box-shadow: 0 0 0 1px #fff;
  transform: translateY(-2px); background: rgb(80 80 80 / .9);
}
.mc-slot__count {
  position: absolute; right: 2px; bottom: 1px; font-family: var(--pixel);
  font-size: .52rem; color: #fff;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000; pointer-events: none;
}
.mc-slot__num {
  position: absolute; left: 2px; top: 1px; font-family: var(--pixel);
  font-size: .48rem; color: #888; pointer-events: none;
}
.mc-slot.is-selected .mc-slot__num { color: #ffff55; }

/* Tooltip */
.mc-tooltip {
  font-family: var(--pixel); font-size: .65rem; color: #fff;
  background: rgb(15 5 25 / .9); border: 1px solid #5533aa;
  padding: 3px 8px; border-radius: 2px; text-shadow: 1px 1px 0 #000;
  pointer-events: none; opacity: .9;
}

.scrolly__steps { padding: 20vh 0 30vh; }
.step { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; opacity: .3; transition: opacity .5s; padding-left: 28px; border-left: 2px solid var(--line); }
.step.is-active { opacity: 1; border-color: var(--accent); }
.step__num { font-family: var(--pixel); font-size: .75rem; color: var(--accent); }
.step h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 800; }
.step p { font-size: 1.05rem; max-width: 46ch; }

/* ============ Gallery (Thư viện hình ảnh) ============ */
.gallery { background: var(--bg); position: relative; }
.gallery__head { display: flex; flex-direction: column; gap: 24px; margin-bottom: 36px; }
.gallery__head-text { max-width: 760px; }
.gallery__filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-pill {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font-family: var(--pixel);
  font-size: .72rem; letter-spacing: .02em; transition: all .2s var(--ease);
}
.filter-pill:hover { border-color: var(--ink-3); color: var(--ink); transform: translateY(-1px); }
.filter-pill.is-active {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
  box-shadow: 0 4px 14px -2px color-mix(in srgb, var(--accent) 45%, transparent);
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.g-card {
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.g-card.is-hidden {
  display: none;
}
.g-card__btn {
  display: flex; flex-direction: column; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; padding: 0; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.g-card__btn:hover {
  transform: translateY(-4px); border-color: var(--ink-3); box-shadow: var(--shadow);
}
.g-card__media {
  position: relative; width: 100%; aspect-ratio: 16/10; overflow: hidden; background: var(--bg-2);
}
.g-card__media img {
  width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease);
}
.g-card__btn:hover .g-card__media img {
  transform: scale(1.08);
}
.g-card__tag {
  position: absolute; top: 10px; left: 10px; font-family: var(--pixel); font-size: .65rem;
  padding: 3px 8px; border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 90%, transparent);
  color: var(--ink); backdrop-filter: blur(8px); border: 1px solid var(--line); z-index: 2;
}
.g-card__icon {
  position: absolute; bottom: 10px; right: 10px; width: 32px; height: 32px;
  display: grid; place-items: center; border-radius: var(--radius);
  background: color-mix(in srgb, var(--ink) 80%, transparent); color: var(--bg);
  backdrop-filter: blur(8px); opacity: 0; transform: scale(.8); transition: all .25s var(--ease); z-index: 2;
}
.g-card__btn:hover .g-card__icon {
  opacity: 1; transform: scale(1);
}
.g-card__info { padding: 14px 16px 18px; }
.g-card__info h3 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; color: var(--ink); }
.g-card__info p {
  font-size: .85rem; color: var(--ink-2); margin: 0; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ============ Lightbox ============ */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px;
}
.lightbox[hidden] { display: none !important; }
.lightbox__backdrop {
  position: absolute; inset: 0; background: rgb(0 0 0 / .88); backdrop-filter: blur(12px); animation: fadeIn .25s ease;
}
.lightbox__content {
  position: relative; z-index: 2; width: min(1040px, 100%); max-height: 94vh;
  display: flex; flex-direction: column; animation: zoomIn .3s var(--ease);
}
.lightbox__figure {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 25px 60px -15px rgb(0 0 0 / .75); display: flex; flex-direction: column;
}
.lightbox__img-wrap {
  width: 100%; max-height: calc(85vh - 120px); background: #000;
  display: grid; place-items: center; overflow: hidden;
}
.lightbox__img {
  max-width: 100%; max-height: calc(85vh - 120px); width: auto; height: auto;
  object-fit: contain; transition: opacity .2s;
}
.lightbox__meta {
  padding: 16px 22px; background: var(--surface); border-top: 1px solid var(--line);
}
.lightbox__meta-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;
}
.lightbox__tag {
  font-family: var(--pixel); font-size: .7rem; color: var(--accent); text-transform: uppercase; letter-spacing: .06em;
}
.lightbox__counter {
  font-family: var(--pixel); font-size: .75rem; color: var(--ink-3);
}
.lightbox__title {
  font-size: 1.25rem; font-weight: 800; margin: 0 0 6px; color: var(--ink);
}
.lightbox__desc {
  font-size: .92rem; color: var(--ink-2); margin: 0; line-height: 1.5;
}
.lightbox__close {
  position: absolute; top: -46px; right: 0; width: 38px; height: 38px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); display: grid; place-items: center; transition: all .2s;
}
.lightbox__close:hover {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
}
.lightbox__nav {
  position: absolute; top: calc(50% - 60px); width: 44px; height: 44px; border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 90%, transparent); border: 1px solid var(--line);
  color: var(--ink); display: grid; place-items: center; backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgb(0 0 0 / .3); transition: all .2s var(--ease); z-index: 5;
}
.lightbox__nav--prev { left: -22px; }
.lightbox__nav--next { right: -22px; }
.lightbox__nav:hover {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent); transform: scale(1.1);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }

/* ============ Features ============ */
.grid { display: grid; gap: 20px; margin-top: 40px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.card { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-bottom: 4px solid color-mix(in srgb, var(--accent) 55%, var(--line)); border-radius: 2px; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.card:hover { transform: translateY(-4px); border-color: var(--ink-3); box-shadow: var(--shadow); }
.card__thumb {
  width: 100%; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden;
  margin-bottom: 18px; background: var(--bg-2); border: 1px solid var(--line);
}
.card__thumb img {
  width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease);
}
.card:hover .card__thumb img {
  transform: scale(1.06);
}
.card__icon { width: 30px; height: 30px; fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 14px; transition: stroke .3s; }
.card:hover .card__icon { stroke: var(--accent); }
.card p { margin: 0; font-size: .95rem; }

/* ============ Trust ============ */
.trust { background: var(--bg-2); }
.trust__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); }
.checks .ico { color: var(--accent); margin-top: 3px; }
.telemetry {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow); width: 100%;
}
.telemetry__header {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line);
  flex-wrap: wrap; gap: 8px;
}
.telemetry__status {
  display: flex; align-items: center; gap: 8px; font-family: var(--pixel);
  font-size: .72rem; font-weight: 700; color: var(--ink);
}
.telemetry__tag {
  font-family: var(--pixel); font-size: .65rem; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  padding: 3px 10px; border-radius: 999px;
}
.telemetry__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.telemetry__card {
  padding: 16px; border-radius: var(--radius);
  background: var(--bg); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px;
  transition: transform .2s var(--ease), border-color .2s;
}
.telemetry__card::before {
  content: ""; width: 28px; height: 28px; position: absolute; top: 12px; left: 12px;
  background-size: cover; image-rendering: pixelated; opacity: .9; border: 1px solid var(--line);
}
.telemetry__card { position: relative; padding-top: 48px; }
.telemetry__card:nth-child(1)::before { background-image: url("./assets/textures/glowstone.png"); }
.telemetry__card:nth-child(2)::before { background-image: url("./assets/textures/diamond_block.png"); }
.telemetry__card:nth-child(3)::before { background-image: url("./assets/textures/oak_planks.png"); }
.telemetry__card:nth-child(4)::before { background-image: url("./assets/textures/stone_bricks.png"); }
.telemetry__card:hover {
  transform: translateY(-2px); border-color: var(--accent);
}
.telemetry__top {
  display: flex; justify-content: space-between; align-items: center;
}
.telemetry__icon {
  width: 18px; height: 18px; color: var(--accent);
}
.telemetry__pill {
  font-family: var(--pixel); font-size: .62rem; color: var(--ink-3);
  text-transform: uppercase;
}
.telemetry__num {
  font-family: var(--pixel); font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  font-weight: 700; color: var(--ink); line-height: 1; margin: 4px 0;
}
.telemetry__meter {
  width: 100%; height: 5px; background: var(--bg-2);
  border-radius: 999px; overflow: hidden; margin-top: 2px;
}
.telemetry__meter-fill {
  height: 100%; background: var(--accent); border-radius: 999px;
}
.telemetry__signal {
  display: flex; align-items: center; gap: 4px; font-size: .68rem;
  color: var(--ink-3); font-family: var(--pixel);
}
.telemetry__signal .bar {
  display: inline-block; width: 3px; background: var(--accent); border-radius: 1px;
}
.telemetry__signal .bar-1 { height: 6px; }
.telemetry__signal .bar-2 { height: 10px; }
.telemetry__signal .bar-3 { height: 14px; }
.telemetry__meta-sub {
  font-size: .68rem; color: var(--accent); font-family: var(--pixel);
}
.telemetry__label {
  font-size: .78rem; color: var(--ink-2); line-height: 1.3; margin-top: auto;
}

/* ============ Rules timeline ============ */
.timeline { list-style: none; counter-reset: tl; padding: 0; margin: 40px 0 0; display: grid; gap: 0; max-width: 720px; }
.timeline li { counter-increment: tl; position: relative; padding: 0 0 40px 56px; }
.timeline li::before { content: counter(tl, decimal-leading-zero); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: var(--radius); display: grid; place-items: center; font-family: var(--pixel); font-size: .7rem; background: var(--surface); }
.timeline li::after { content: ""; position: absolute; left: 18px; top: 44px; bottom: 8px; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.is-in::before { border-color: var(--accent); color: var(--accent); }
.timeline p { margin: 0; }

/* ============ CTA ============ */
.cta { padding-top: 0; }
.cta__box { text-align: center; padding: clamp(48px, 7vw, 88px) 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); position: relative; overflow: hidden; }
.cta__box::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 40px), repeating-linear-gradient(0deg, var(--line) 0 1px, transparent 1px 40px); opacity: .35; mask: radial-gradient(ellipse at center, transparent 20%, #000 100%); }
.cta__box > * { position: relative; }
.cta__icon { width: 40px; height: 40px; margin: 0 auto 20px; fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.cta p { max-width: 54ch; margin: 0 auto 32px; }
.cta__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============ Hướng dẫn đăng nhập ============ */
.guide { background: var(--bg-2); }
.guide__head { max-width: 700px; margin-bottom: 32px; }
.guide__head > p:last-child { margin-bottom: 0; }
.guide__panel { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); padding: clamp(20px, 4vw, 34px); margin-top: 16px; box-shadow: var(--shadow); }
.guide__title { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.guide__title .ico { color: var(--accent); width: 22px; height: 22px; }
.guide__title h3 { margin: 0; font-size: 1.2rem; }
.guide__steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; list-style: none; padding: 0; margin: 0; }
.guide__steps li { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.guide__step { display: grid; place-items: center; width: 32px; height: 32px; flex: none; background: var(--bg-2); color: var(--accent); font: 700 .75rem var(--pixel); }
.guide__steps strong { display: block; margin: 2px 0 6px; }
.guide__steps p { margin-bottom: 8px; }
.guide__steps code { display: inline-block; max-width: 100%; overflow-wrap: anywhere; padding: 8px 10px; background: var(--bg-2); border: 1px solid var(--line); color: var(--ink); font: 600 .85rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.guide__steps kbd { padding: 1px 6px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); font: 600 .85em var(--font); }
.guide__note { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0 0; font-size: .9rem; }
.guide__note .ico { color: var(--accent); margin-top: 2px; }
.guide__topics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.guide-card { --guide-accent: #39843b; --guide-tint: #e7f4e5; min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.guide-card--claim { --guide-accent: #1680a6; --guide-tint: #e3f3f8; }
.guide-card--shop { --guide-accent: #8a54a3; --guide-tint: #f3eaf7; }
.guide-card__art { height: 112px; display: flex; justify-content: center; align-items: center; gap: 20px; background: var(--guide-tint); border-bottom: 3px solid var(--guide-accent); }
.guide-card__art img { width: 58px; height: 58px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 5px 0 rgb(0 0 0 / .12)); }
.guide-card__art img + img { width: 46px; height: 46px; }
.guide-card__body { padding: 20px; }
.guide-card__eyebrow { margin: 0 0 6px; color: var(--guide-accent); font: 700 .62rem var(--pixel); letter-spacing: .06em; text-transform: uppercase; }
.guide-card__body h3 { margin-bottom: 16px; font-size: 1.15rem; }
.guide-card__commands { display: grid; gap: 10px; list-style: none; padding: 0; margin: 0; }
.guide-card__commands li { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 5px 8px; }
.guide-card__commands li > span { color: var(--ink-2); font-size: .87rem; align-self: center; }
.guide-card__commands code, .guide-card__steps code, .guide-card__more code { padding: 4px 7px; background: var(--guide-accent); border: 1px solid var(--guide-accent); border-radius: 3px; color: #fff; font: 700 .76rem ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.guide-card__steps { display: grid; gap: 12px; padding-left: 20px; margin: 0; color: var(--ink-2); font-size: .9rem; }
.guide-card__more { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.guide-card__more summary { color: var(--guide-accent); font-weight: 700; font-size: .87rem; cursor: pointer; }
.guide-card__more p { margin: 10px 0 0; font-size: .84rem; line-height: 2.1; }

/* ============ FAQ ============ */
.faq__inner { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; }
.accordion details { border-top: 1px solid var(--line); }
.accordion details:last-child { border-bottom: 1px solid var(--line); }
.accordion summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 4px; font-weight: 700; cursor: pointer; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary .ico { color: var(--ink-3); transition: transform .3s var(--ease); }
.accordion details[open] summary .ico { transform: rotate(180deg); color: var(--accent); }
.accordion__body { overflow: hidden; }
.accordion__body p { padding: 0 4px 20px; margin: 0; }

/* ============ Footer ============ */
.footer { border-top: 1px solid var(--line); padding: 48px 0 28px; background: var(--bg-2); }
.footer__inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer__note { margin: 12px 0 0; font-size: .9rem; }
.footer__links { display: flex; gap: 20px; flex-wrap: wrap; font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.footer__links a:hover { color: var(--ink); }
.footer__legal { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .78rem; color: var(--ink-3); display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer__legal p { margin: 0; color: inherit; max-width: 72ch; }

/* ============ Responsive ============ */
@media (max-width: 960px) {
  .grid--3 { grid-template-columns: 1fr 1fr; }
  .trust__inner, .faq__inner { grid-template-columns: 1fr; gap: 32px; }
  .guide__steps { grid-template-columns: 1fr; }
  .guide__topics { grid-template-columns: 1fr; }
  .scrolly { grid-template-columns: 1fr; gap: 24px; }
  .scrolly__stage { top: 68px; z-index: 10; }
  .scene { aspect-ratio: 16/10; }
  .scrolly__steps { padding: 4vh 0 16vh; }
  .step { min-height: 50vh; }
  .server-highlights { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .header__inner { height: 60px; }
  .brand { font-size: .9rem; gap: 8px; }
  .brand__mark { width: 22px; height: 22px; }
  .header__actions { gap: 8px; margin-left: auto; }
  .header__actions .btn { display: none; }
  
  /* Mobile Navigation Drawer */
  .nav-toggle { display: grid; width: 36px; height: 36px; flex: none; }
  .nav-backdrop {
    position: fixed; inset: 60px 0 0; background: rgb(0 0 0 / .6);
    backdrop-filter: blur(4px); z-index: 95; opacity: 0; pointer-events: none;
    transition: opacity .3s var(--ease); display: block;
  }
  .nav-backdrop.is-open { opacity: 1; pointer-events: auto; }
  
  .nav {
    position: fixed; top: 60px; left: 0; right: 0; max-height: calc(100dvh - 60px); overflow-y: auto;
    flex-direction: column; background: var(--surface);
    border-bottom: 2px solid var(--line);
    padding: 16px 18px 24px; margin: 0;
    transform: translateY(-130%); transition: transform .35s var(--ease);
    z-index: 100; box-shadow: 0 16px 36px rgb(0 0 0 / .25);
    gap: 6px;
  }
  .nav.is-open { transform: translateY(0); }
  .nav a {
    padding: 12px 14px; font-size: .95rem; border-radius: var(--radius);
    background: var(--bg); border: 1px solid var(--line);
    display: flex; align-items: center; justify-content: space-between;
  }
  .nav a::after { display: none; }
  .nav a:hover, .nav a.is-active {
    border-color: var(--accent); color: var(--accent); font-weight: 700;
  }
  .nav a.nav__contact-link {
    display: flex; background: var(--accent); color: var(--accent-ink);
    justify-content: center; font-weight: 700; margin-top: 6px;
  }
  
  .server-highlights { grid-template-columns: 1fr; gap: 8px; }
  .telemetry { padding: 16px; }
  .telemetry__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .telemetry__card { padding: 46px 10px 12px; min-width: 0; }
  .telemetry__num { font-size: clamp(1rem, 5vw, 1.4rem); }
  .telemetry__label { font-size: .7rem; }
  .grid--3 { grid-template-columns: 1fr; }
  .step { padding-left: 14px; min-height: 40vh; }
  .gallery__grid { grid-template-columns: 1fr; gap: 14px; }
  .lightbox { padding: 10px; }
  .lightbox__content { max-height: 96vh; }
  .lightbox__img-wrap { max-height: calc(70vh - 100px); }
  .lightbox__img { max-height: calc(70vh - 100px); }
  .lightbox__nav { width: 34px; height: 34px; top: calc(50% - 40px); }
  .lightbox__nav--prev { left: 4px; }
  .lightbox__nav--next { right: 4px; }
  .lightbox__close { top: -40px; width: 34px; height: 34px; }
  .lightbox__meta { padding: 12px 16px; }
  .lightbox__title { font-size: 1.05rem; }
  .hero__frame { aspect-ratio: 16/10; }
  .hero__badge { font-size: .6rem; padding: 4px 10px; }
  .hero__explore-btn { font-size: .75rem; padding: 6px 10px; }
  
  /* In-game Minecraft HUD on mobile */
  .mc-hud__top { top: 6px; left: 6px; right: 6px; }
  .mc-slot { width: 28px; height: 28px; }
  .mc-slot img { width: 18px; height: 18px; }
}
@media (min-width: 721px) and (max-width: 1040px) {
  .header__inner { gap: 10px; }
  .nav { gap: 0; }
  .nav a { padding-inline: 7px; font-size: .78rem; }
  .header__actions { margin-left: 4px; }
  .header__actions .btn { padding-inline: 9px; }
}
@media (max-width: 380px) {
  .telemetry__grid { grid-template-columns: 1fr; }
}

/* Giữ khung cảnh thoáng; hotbar là chi tiết Minecraft chính. */
.mc-f3, .mc-top-actions, .mc-actionbar, .mc-chat, .mc-crosshair, .mc-stats-row, .mc-tooltip { display: none; }
.scene__label { font-size: .62rem; }
