:root {
  --bg: #17171a; --bg2: #1d1d21;
  --gui: #c6c6c6; --gui-dark: #555555; --slot: #8b8b8b; --slot-dark: #373737; --ink: #3a3a3a;
  --green: #4f9a2a; --green-hi: #62b834; --red: #d6402c; --red-hi: #f0553e;
  --yellow: #ffff55; --aqua: #55ffff; --pink: #ff55ff; --text: #f2f2f2;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 30px; }
body {
  margin: 0; color: var(--text); font-family: "Pixelify", "Silkscreen", monospace; font-size: 18px; line-height: 1.45; overflow-x: hidden;
  background-color: var(--bg);
  background-image:
    linear-gradient(45deg, rgba(255,255,255,0.025) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.025) 75%),
    linear-gradient(45deg, rgba(255,255,255,0.025) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.025) 75%);
  background-size: 64px 64px; background-position: 0 0, 32px 32px;
  image-rendering: pixelated; font-variant-ligatures: none; font-feature-settings: "liga" 0, "clig" 0;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
::selection { background: var(--red); color: #fff; }
h1, h2, h3, p { margin: 0; }

.wrap { width: min(1120px, 100% - 36px); margin-inline: auto; }
.wrap.narrow { width: min(820px, 100% - 36px); }

/* ---------- Minecraft-style pieces ---------- */
.mc-btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 240px; padding: 13px 22px; cursor: pointer; text-decoration: none; text-align: center;
  font: 600 19px/1.1 "Pixelify", monospace; color: #fff; text-shadow: 2px 2px 0 #3f3f3f;
  background: #707070; border: 2px solid #000;
  box-shadow: inset 2px 2px 0 #b4b4b4, inset -2px -4px 0 #3c3c3c;
  transition: none;
}
.mc-btn:hover { background: #7b83c9; box-shadow: inset 2px 2px 0 #b9bdf0, inset -2px -4px 0 #454a85; text-shadow: 2px 2px 0 #1f2250; color: #ffffa0; }
.mc-btn:active { transform: translateY(2px); }
.mc-btn.green { background: var(--green); box-shadow: inset 2px 2px 0 #92d36a, inset -2px -4px 0 #2d5c15; }
.mc-btn.green:hover { background: var(--green-hi); box-shadow: inset 2px 2px 0 #b4ec8c, inset -2px -4px 0 #356f19; color: #fff; text-shadow: 2px 2px 0 #1f4a0c; }
.mc-btn.small { min-width: 0; padding: 9px 18px; font-size: 16px; }
.mc-btn.big { min-width: 300px; padding: 17px 28px; font-size: 22px; }

.slot { position: relative; display: block; padding: 3px; background: var(--slot); box-shadow: inset 3px 3px 0 var(--slot-dark), inset -3px -3px 0 #fff; border: 0; cursor: default; }
button.slot { cursor: zoom-in; }
.slot img { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; aspect-ratio: 16 / 9; }
button.slot:hover::after, button.slot:focus-visible::after { content: ""; position: absolute; inset: 3px; background: rgba(255, 255, 255, 0.45); pointer-events: none; }

.gui { position: relative; padding: 20px 22px 22px; background: var(--gui); color: var(--ink); border: 4px solid #000; box-shadow: inset 4px 4px 0 #fff, inset -4px -4px 0 var(--gui-dark), 8px 8px 0 rgba(0, 0, 0, 0.45); }
.gui-title { margin-bottom: 14px; font: 700 20px/1.1 "Pixelify", monospace; color: var(--ink); }
.gui-foot { display: flex; justify-content: center; margin-top: 18px; }
.gui-note { margin-top: 18px; font-size: 17px; color: var(--ink); }

.mc-title { margin: 0 0 22px; font: 700 clamp(28px, 4.4vw, 44px)/1.05 "Pixelify", monospace; color: #fff; text-shadow: 3px 3px 0 #3f3f3f; letter-spacing: 0.02em; }
.section-sub { margin: -8px 0 26px; color: #c9c9c9; max-width: 640px; }

/* ---------- top bar ---------- */
.topbar { position: fixed; top: 14px; right: 14px; z-index: 120; }
.lang { display: inline-flex; border: 2px solid #000; }
.lang button { all: unset; cursor: pointer; padding: 7px 12px; font: 700 14px/1 "Silkscreen", monospace; color: #fff; background: #5d5d5d; box-shadow: inset 2px 2px 0 #9a9a9a, inset -2px -2px 0 #333; }
.lang button[aria-pressed="true"] { background: var(--green); box-shadow: inset 2px 2px 0 #92d36a, inset -2px -2px 0 #2d5c15; }
.demo-pill { top: 14px; bottom: auto; left: 14px; border-radius: 0; font-family: "Pixelify", monospace; font-size: 15px; background: #1b1b1b; border: 2px solid #000; box-shadow: inset 2px 2px 0 #6e6e6e, inset -2px -2px 0 #2a2a2a; }

/* ---------- title screen ---------- */
.title-screen { position: relative; min-height: 100svh; display: grid; place-items: center; overflow: hidden; padding: 90px 0 130px; isolation: isolate; }
.pano { position: absolute; inset: 0; z-index: -2; display: flex; align-items: center; overflow: hidden; }
.marquee-track { display: flex; width: max-content; gap: 0; animation: pan 120s linear infinite; }
.marquee-track img { height: 100svh; min-height: 520px; width: auto; max-width: none; flex-shrink: 0; filter: blur(3px) brightness(0.5) saturate(1.15); }
@keyframes pan { to { transform: translateX(-50%); } }
.vignette { position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 80% 70% at 50% 45%, transparent 0%, rgba(10, 10, 12, 0.55) 70%, rgba(10, 10, 12, 0.92) 100%), linear-gradient(180deg, transparent 60%, var(--bg) 100%); }
.title-inner { width: min(780px, 100% - 36px); text-align: center; }
.logo-wrap { position: relative; display: inline-block; }
.logo {
  font: 700 clamp(70px, 15vw, 150px)/1 "Silkscreen", monospace; letter-spacing: 0.04em; color: var(--red-hi);
  text-shadow: 0 1px 0 #a82c1c, 0 2px 0 #a82c1c, 0 3px 0 #a82c1c, 0 4px 0 #8f2316, 0 5px 0 #8f2316, 0 6px 0 #8f2316, 0 7px 0 #741a10, 0 8px 0 #741a10, 0 9px 0 #741a10, 0 10px 0 #5a120a, 0 20px 30px rgba(0, 0, 0, 0.55);
}
.splash { position: absolute; right: -17%; bottom: 13%; transform: rotate(-16deg); transform-origin: center; white-space: nowrap; font: 700 clamp(15px, 2.2vw, 24px)/1 "Pixelify", monospace; color: var(--yellow); text-shadow: 3px 3px 0 #3f3f00; animation: splash 0.9s ease-in-out infinite alternate; }
@keyframes splash { from { transform: rotate(-16deg) scale(1); } to { transform: rotate(-16deg) scale(1.1); } }
.logo-sub { margin: 22px 0 26px; font: 700 clamp(14px, 2vw, 20px)/1 "Silkscreen", monospace; letter-spacing: 0.5em; color: #fff; text-shadow: 3px 3px 0 #3f3f3f; padding-left: 0.5em; }
.lead { margin: 0 auto 30px; max-width: 560px; font-size: clamp(17px, 2vw, 21px); color: #ececec; text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.7); }
.menu { display: grid; gap: 10px; justify-items: center; }
.pay-line { margin-top: 26px; font-size: 15px; color: #cfcfcf; text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.7); }

/* ---------- sections ---------- */
.section { padding: clamp(56px, 8vw, 100px) 0; }
.section.tight { padding-top: 0; }

/* inventory */
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.slot.sq { aspect-ratio: 1; display: grid; place-items: center; }
.slot.item span { font: 700 12px/1 "Silkscreen", monospace; color: #1f1f1f; text-align: center; padding: 0 2px; }
.slot.item { background: #a7a7a7; }

/* crafting */
.craft-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 34px; align-items: center; }
.craft-row { display: flex; align-items: center; gap: 18px; flex-wrap: nowrap; }
.craft-grid { display: grid; grid-template-columns: repeat(3, 64px); gap: 0; }
.arrow { width: 58px; height: 38px; flex-shrink: 0; background: #7c7c7c; clip-path: polygon(0 28%, 58% 28%, 58% 0, 100% 50%, 58% 100%, 58% 72%, 0 72%); }
.slot.result { width: 104px; height: 104px; flex-shrink: 0; padding: 4px; }
.slot.result img { height: 100%; aspect-ratio: 1; }
.count { position: absolute; right: 8px; bottom: 6px; font: 700 20px/1 "Pixelify", monospace; color: #fff; text-shadow: 2px 2px 0 #3f3f3f; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 16px; align-items: flex-start; padding: 14px 16px; background: rgba(0, 0, 0, 0.5); border: 2px solid #000; box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.14); }
.steps .n { flex: 0 0 38px; height: 38px; display: grid; place-items: center; font: 700 20px/1 "Pixelify", monospace; color: #fff; background: var(--green); box-shadow: inset 2px 2px 0 #92d36a, inset -2px -2px 0 #2d5c15; border: 2px solid #000; }
.steps h3 { font: 700 20px/1.1 "Pixelify", monospace; color: var(--yellow); text-shadow: 2px 2px 0 #3f3f00; margin-bottom: 4px; }
.steps p { font-size: 16.5px; color: #dedede; }

/* tooltips */
.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.tip { display: flex; flex-direction: column; padding: 14px 16px 16px; background: #100010; border: 2px solid #28007f; outline: 2px solid #100010; outline-offset: 0; box-shadow: inset 0 0 0 2px #1a0845, 8px 8px 0 rgba(0, 0, 0, 0.5); }
.tip.epic { border-color: #5a29d6; box-shadow: inset 0 0 0 2px #2a0f6e, 8px 8px 0 rgba(0, 0, 0, 0.5), 0 0 40px rgba(120, 60, 255, 0.35); }
.tip h3 { font: 700 26px/1.1 "Pixelify", monospace; margin-bottom: 6px; }
.t-aqua { color: var(--aqua); } .t-yellow { color: var(--yellow); } .t-pink { color: var(--pink); }
.tip .lore { font-style: italic; color: #a8a8d8; font-size: 16.5px; margin-bottom: 12px; }
.tip .when { color: #a8a8a8; font-size: 16px; margin-bottom: 2px; }
.tip ul { list-style: none; margin: 0 0 14px; padding: 0; color: #5555ff; font-size: 17px; flex: 1; }
.tip .price { color: #ffaa00; font-size: 16px; margin-bottom: 14px; }
.tip .mc-btn { align-self: stretch; }

/* advancements */
.advs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.adv { display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 12px; background: #202020; border: 2px solid #000; box-shadow: inset 0 0 0 2px #5d5d5d; }
.adv-icon { width: 54px; height: 54px; flex-shrink: 0; display: grid; place-items: center; background: #c4a000; border: 2px solid #000; box-shadow: inset 2px 2px 0 #fff0a0, inset -2px -2px 0 #7a6200; }
.adv-icon svg { width: 34px; height: 34px; }
.adv-h { font-size: 15px; color: var(--yellow); text-shadow: 2px 2px 0 #3f3f00; }
.adv-t { font: 600 19px/1.2 "Pixelify", monospace; color: #fff; }

/* chat */
.chat { padding: 14px 18px; background: rgba(0, 0, 0, 0.62); border: 2px solid #000; display: grid; gap: 4px; font-size: 18px; }
.chat p { text-shadow: 2px 2px 0 #1a1a1a; }
.chat .who { color: #ffaa00; }
.chat .who.you { color: #aaaaaa; }
.chat p:nth-child(even) { margin-bottom: 10px; }

/* cta */
.cta .gui.center { text-align: center; padding: 38px 28px 34px; }
.gui-big { font: 700 clamp(26px, 4.4vw, 42px)/1.1 "Pixelify", monospace; margin-bottom: 10px; }
.cta p { margin-bottom: 22px; color: var(--ink); }
.cta .handle { margin: 18px 0 0; font: 700 15px/1 "Silkscreen", monospace; color: #6b6b6b; letter-spacing: 0.08em; }
.footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; padding: 30px 18px 120px; color: #8a8a8a; font-size: 15px; }

/* hotbar */
.hotbar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 110; display: flex; padding: 4px; background: rgba(0, 0, 0, 0.55); border: 2px solid #000; box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.18), 6px 6px 0 rgba(0, 0, 0, 0.35); }
.hb { position: relative; width: 52px; height: 52px; display: grid; place-items: center; background: #8b8b8b; box-shadow: inset 3px 3px 0 #373737, inset -3px -3px 0 #fff; margin: 0 2px; text-decoration: none; }
.hb svg { width: 30px; height: 30px; }
.hb.sel { outline: 4px solid #fff; outline-offset: -1px; z-index: 1; }
.hb::after { content: attr(data-title); position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%); padding: 4px 9px; white-space: nowrap; background: #100010; border: 2px solid #28007f; color: #fff; font: 600 15px/1 "Pixelify", monospace; opacity: 0; pointer-events: none; }
html[lang="en"] .hb::after { content: attr(data-title-en); }
.hb:hover::after, .hb:focus-visible::after { opacity: 1; }

/* reveal */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s steps(6) var(--d, 0s), transform 0.5s steps(6) var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .slots { grid-template-columns: repeat(3, 1fr); }
  .craft-layout { grid-template-columns: 1fr; }
  .tips { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .advs { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .slots { grid-template-columns: repeat(2, 1fr); }
  .craft-grid { grid-template-columns: repeat(3, 52px); }
  .arrow { width: 40px; }
  .slot.result { width: 84px; height: 84px; }
  .craft-row { gap: 10px; }
  .mc-btn { min-width: min(260px, 100%); }
  .hb { width: 44px; height: 44px; margin: 0 1px; }
  .hb svg { width: 26px; height: 26px; }
  .splash { right: -4%; bottom: auto; top: -16%; }
  .gui { padding: 16px 14px 18px; }
  .demo-pill { font-size: 13px; padding: 7px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track, .splash { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
