@font-face {
  font-family: "Minecraft";
  src: url("assets/fonts/Minecraft-Regular.otf") format("opentype");
  font-display: swap;
}

@font-face {
  font-family: "Minecraft";
  src: url("assets/fonts/Minecraft-Bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --white: #f8ffff;
  --glass: #a9f6f5;
  --cyan: #50e2e8;
  --ui: #c6c6c6;
  --ui-dark: #373737;
  --ui-mid: #8b8b8b;
  --ink: #171717;
  --shadow: #070707;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; background: #111; }
body { margin: 0; overflow-x: hidden; color: var(--white); background: #111; font-family: "Minecraft", monospace; }
button, a { font: inherit; -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { image-rendering: pixelated; }
::selection { color: #111; background: var(--glass); }
:focus-visible { outline: 3px solid #fff; outline-offset: 5px; }

.boot {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-content: center;
  justify-items: center;
  background: #161616 url("assets/blocks/dirt.png") center / 96px repeat;
  text-shadow: 2px 2px #222;
  transition: opacity .35s ease, visibility .35s ease;
}
.boot::after { content: ""; position: absolute; inset: 0; background: #0005; }
.boot > * { position: relative; z-index: 1; }
.boot.is-gone { opacity: 0; visibility: hidden; }
.boot p { margin: 0 0 22px; font-size: 21px; }
.boot__bar { width: min(440px, 76vw); height: 22px; padding: 4px; border: 2px solid #fff; background: #111; }
.boot__bar i { display: block; width: 0; height: 100%; background: #78d55b; box-shadow: inset 0 3px #a8ed84; }
.boot > span { margin-top: 10px; font-size: 13px; }

.game-header {
  position: fixed;
  z-index: 80;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  min-height: 70px;
  padding: 0 clamp(18px, 4vw, 70px);
  border-bottom: 3px solid #0009;
  background: #141414c9 url("assets/blocks/deepslate.png") center / 64px repeat;
  box-shadow: 0 4px 0 #ffffff12;
  backdrop-filter: blur(5px);
}
.game-brand { display: inline-flex; align-items: center; gap: 12px; width: max-content; font-size: 16px; text-shadow: 2px 2px #000; }
.game-brand img { width: 42px; height: 42px; object-fit: contain; }
.server-status { display: flex; align-items: center; gap: 8px; color: #c8d2ce; font-size: 11px; text-shadow: 2px 2px #000; }
.server-status i { width: 8px; height: 8px; background: #62d35d; box-shadow: 0 0 12px #62d35d; }
.server-status b { color: var(--glass); font-weight: 400; }
.game-header nav { justify-self: end; display: flex; gap: 25px; font-size: 12px; text-shadow: 2px 2px #000; }
.game-header nav a:hover { color: var(--glass); }

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100svh;
  overflow: hidden;
  padding: 105px 4vw 150px;
  background: #26384b url("assets/background/panorama.png") center 52% / cover no-repeat;
}
.hero__shade { position: absolute; inset: 0; z-index: 0; background: linear-gradient(#07102070 0%, #07102018 43%, #05090bd4 100%), linear-gradient(90deg, #02050682, transparent 25%, transparent 75%, #02050682); }
.hero__mist { position: absolute; z-index: 1; width: 500px; height: 500px; border-radius: 50%; filter: blur(90px); opacity: .28; pointer-events: none; }
.hero__mist--one { left: -180px; top: 22%; background: #63c7cd; }
.hero__mist--two { right: -160px; bottom: -120px; background: #b86841; }

.hero__title { position: relative; z-index: 5; display: grid; justify-items: center; text-align: center; text-shadow: 4px 4px 0 #1d2527, 7px 7px 0 #000b; }
.hero__kicker { margin-bottom: 10px; color: #d9fbfa; font-size: 12px; letter-spacing: .13em; }
h1 { margin: 0; font-size: clamp(72px, 9.2vw, 150px); line-height: .9; letter-spacing: -.04em; white-space: nowrap; }
h1 span:last-child { color: var(--glass); }
.hero__ticker { margin-top: 12px; padding: 9px 16px 7px; border: 3px solid #111; background: #d7d7d7; box-shadow: inset 3px 3px #fff, inset -3px -3px #6d6d6d, 4px 4px #111; color: #202020; font-size: 16px; text-shadow: none; }

.shrine { position: relative; z-index: 3; display: grid; place-items: center; width: min(680px, 54vw); height: clamp(360px, 48vh, 540px); margin-top: -5px; perspective: 900px; }
.shrine__glow { position: absolute; bottom: 112px; width: 52%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #aafcff60 0%, #63e5ed20 45%, transparent 70%); filter: blur(16px); animation: glow 2.6s ease-in-out infinite; }
.mine-pons { position: absolute; z-index: 4; left: 50%; bottom: clamp(105px, 24%, 142px); width: min(340px, 30vw); max-height: 70%; object-fit: contain; filter: drop-shadow(0 18px 8px #0009) drop-shadow(0 0 17px #79e9ec62); transform: translateX(-50%) rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)); transition: transform .14s ease-out; animation: item-float 4.5s ease-in-out infinite; will-change: transform; }
.shrine__blocks { position: absolute; z-index: 2; bottom: -8px; display: flex; align-items: end; justify-content: center; gap: 3px; width: 100%; filter: drop-shadow(0 14px 8px #0008); }
.world-block { width: 104px; aspect-ratio: 1; background-position: center; background-size: cover; image-rendering: pixelated; box-shadow: inset 8px 8px #ffffff1a, inset -9px -9px #0006; }
.world-block--glass { background-image: url("assets/blocks/glass.png"); }
.world-block--craft { width: 126px; background-image: url("assets/blocks/crafting_table_front.png"); }

.hero__copy { position: absolute; z-index: 5; left: clamp(24px, 5vw, 90px); bottom: 160px; margin: 0; font-size: clamp(15px, 1.4vw, 21px); line-height: 1.5; text-shadow: 3px 3px #000; }
.menu { position: absolute; z-index: 8; right: clamp(24px, 5vw, 90px); top: 34%; display: grid; gap: 9px; width: min(270px, 24vw); }
.mc-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 18px;
  border: 0;
  border-image: url("assets/ui/button.png") 3 fill / 6px / 0 stretch;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  text-align: center;
  text-shadow: 2px 2px #333;
  image-rendering: pixelated;
  transition: transform .08s ease;
}
.mc-button:hover, .mc-button:focus-visible { border-image-source: url("assets/ui/button_highlighted.png"); color: #ffffa0; transform: translateY(-2px); }
.mc-button:active { transform: translateY(2px); }
.craft-cue { position: absolute; z-index: 7; left: 50%; bottom: 112px; display: flex; align-items: center; gap: 10px; padding: 8px 11px; background: #111b; font-size: 11px; text-shadow: 2px 2px #000; transform: translateX(-50%); }
.craft-cue img { width: 24px; height: 24px; }
.craft-cue span { color: var(--glass); }

.hud { position: absolute; z-index: 10; left: 50%; bottom: 22px; display: grid; justify-items: center; transform: translateX(-50%); }
.hud__xp { position: relative; width: 364px; height: 12px; margin-bottom: 7px; border: 2px solid #111; background: #1b1b1b; box-shadow: 2px 2px #000; }
.hud__xp i { display: block; width: 74%; height: 100%; background: #69d047; box-shadow: inset 0 2px #9af36f; }
.hud__xp span { position: absolute; left: 50%; bottom: -2px; color: #8df05b; font-size: 14px; text-shadow: 2px 2px #000; transform: translate(-50%, 100%); }
.hotbar { display: grid; grid-template-columns: repeat(9, 40px); width: 364px; height: 44px; padding: 2px; background: url("assets/ui/hotbar.png") center / 100% 100% no-repeat; image-rendering: pixelated; }
.hotbar__slot { position: relative; display: grid; place-items: center; width: 40px; height: 40px; padding: 5px; border: 0; background: transparent; cursor: pointer; }
.hotbar__slot.is-selected::after { content: ""; position: absolute; inset: -2px; background: url("assets/ui/hotbar_selection.png") center / 100% 100% no-repeat; image-rendering: pixelated; }
.hotbar__slot img { position: relative; z-index: 1; max-width: 100%; max-height: 100%; }
.hotbar__slot b, .inventory-slot b, .result-slot b { position: absolute; z-index: 2; right: 2px; bottom: 0; color: #fff; font-size: 10px; font-weight: 400; text-shadow: 2px 2px #222; }

.block-divider { position: relative; z-index: 12; height: 72px; margin-top: -3px; border-top: 4px solid #10150d; border-bottom: 4px solid #0d0d0d; background: url("assets/blocks/dirt.png") center / 72px repeat; box-shadow: inset 0 8px #ffffff0d, inset 0 -10px #0005; image-rendering: pixelated; }
.block-divider--stone { background-image: url("assets/blocks/stone.png"); }

.craft-section { position: relative; min-height: 1000px; overflow: hidden; padding: 110px 5vw 130px; color: #fff; background: linear-gradient(#050708b5, #090b0cd6), url("assets/blocks/deepslate.png") center / 80px repeat; image-rendering: pixelated; }
.craft-section::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, #569da145, transparent 34%); }
.section-title { position: relative; z-index: 3; max-width: 860px; margin: 0 auto 58px; text-align: center; text-shadow: 3px 3px #000; }
.section-title > span { color: var(--glass); font-size: 12px; letter-spacing: .12em; }
.section-title h2 { margin: 16px 0 14px; font-size: clamp(46px, 6.6vw, 100px); line-height: .95; }
.section-title p { margin: 0; color: #d4ddda; font-size: 15px; line-height: 1.6; }
.craft-scene { position: absolute; inset: 0; pointer-events: none; }
.voxel { position: absolute; width: 150px; height: 150px; transform-style: preserve-3d; transform: rotateX(-21deg) rotateY(35deg); filter: drop-shadow(24px 28px 10px #0008); }
.voxel i, .voxel b, .voxel span { position: absolute; display: block; width: 150px; height: 150px; background-size: cover; image-rendering: pixelated; }
.voxel i { transform: translateZ(75px); }
.voxel b { transform: rotateY(90deg) translateZ(75px); }
.voxel span { transform: rotateX(90deg) translateZ(75px); }
.voxel--craft { left: -25px; top: 33%; }
.voxel--craft i { background-image: url("assets/blocks/crafting_table_front.png"); }
.voxel--craft b { background-image: url("assets/blocks/crafting_table_side.png"); }
.voxel--craft span { background-image: url("assets/blocks/crafting_table_top.png"); }
.voxel--furnace { right: -15px; bottom: 13%; transform: rotateX(-21deg) rotateY(-35deg); }
.voxel--furnace i { background-image: url("assets/blocks/furnace_front_on.png"); }
.voxel--furnace b { background-image: url("assets/blocks/furnace_side.png"); }
.voxel--furnace span { background-image: url("assets/blocks/furnace_top.png"); }

.crafting-window {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 90px 180px;
  grid-template-areas:
    "title title title"
    "recipe arrow result"
    "inventory-label inventory-label inventory-label"
    "inventory inventory inventory"
    "craft craft craft";
  align-items: center;
  gap: 18px 24px;
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 28px 32px 34px;
  border: 4px solid #111;
  border-radius: 4px;
  background: var(--ui);
  box-shadow: inset 5px 5px #fff, inset -6px -6px #555, 14px 16px 0 #0009;
  color: #3b3b3b;
  text-shadow: none;
}
.crafting-window__title { grid-area: title; font-size: 22px; }
.recipe-grid { grid-area: recipe; justify-self: end; display: grid; grid-template-columns: repeat(3, 76px); gap: 5px; }
.recipe-arrow { grid-area: arrow; color: #777; font-size: 58px; text-align: center; text-shadow: 3px 3px #fff; }
.result-slot { grid-area: result; position: relative; display: grid; place-items: center; width: 132px; height: 132px; padding: 8px; border: 0; background: #8b8b8b; box-shadow: inset 4px 4px #373737, inset -4px -4px #fff; cursor: pointer; }
.result-slot img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(4px 6px #0005); transition: transform .12s steps(2), filter .12s; }
.result-slot:hover img { transform: scale(1.09) rotate(-2deg); filter: drop-shadow(4px 6px #0005) brightness(1.15); }
.inventory-label { grid-area: inventory-label; margin-top: 4px; font-size: 18px; }
.inventory-grid { grid-area: inventory; display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
.inventory-slot { position: relative; display: grid; place-items: center; aspect-ratio: 1; min-width: 0; padding: 7px; border: 0; background: #8b8b8b; box-shadow: inset 3px 3px #373737, inset -3px -3px #fff; cursor: default; }
.recipe-grid .inventory-slot { width: 76px; }
.inventory-slot img { max-width: 92%; max-height: 92%; object-fit: contain; filter: drop-shadow(2px 3px #0005); }
.inventory-slot--pons { background: #71979a; box-shadow: inset 3px 3px #284b4d, inset -3px -3px #d9ffff; }
.craft-button { grid-area: craft; justify-self: center; width: min(320px, 80%); margin-top: 8px; }
.crafting-window.is-crafting .recipe-grid img { animation: ingredient-pulse .45s steps(2) 2; }
.crafting-window.is-crafting .result-slot img { animation: craft-pop .72s steps(4); }

.dex-section { position: relative; padding: 110px 5vw 130px; background: linear-gradient(#071012c7, #071012e8), url("assets/background/panorama.png") center 58% / cover fixed no-repeat; }
.section-title--light { max-width: 940px; }
.section-title code { padding: 3px 5px; background: #1119; color: var(--glass); font-family: inherit; }
.dex-window { position: relative; z-index: 3; width: min(1260px, 100%); margin: 0 auto; padding: 14px; border: 4px solid #111; background: var(--ui); box-shadow: inset 4px 4px #fff, inset -5px -5px #555, 14px 15px #0009; color: #333; }
.dex-window__top { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 48px; padding: 5px 10px 12px; font-size: 13px; }
.dex-window__top a { padding: 8px 12px; border: 2px solid #555; background: #818181; box-shadow: inset 2px 2px #aaa, inset -2px -2px #444; color: #fff; text-shadow: 2px 2px #333; }
.dex-window__screen { position: relative; height: min(640px, 68vh); min-height: 430px; overflow: hidden; border: 4px solid #333; background: #091113; box-shadow: inset 3px 3px #000, inset -3px -3px #fff; }
.dex-window iframe { display: none; width: 100%; height: 100%; border: 0; }
.dex-window.has-pair iframe { display: block; }
.dex-window.has-pair .map-placeholder { display: none; }
.map-placeholder { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 18px; background: linear-gradient(#0711129c, #071112da), url("assets/blocks/deepslate.png") center / 64px repeat; color: var(--glass); text-shadow: 2px 2px #000; }
.map-placeholder img { width: 150px; animation: block-float 4s ease-in-out infinite; }
.map-placeholder p { margin: 0; font-size: 18px; }
.dex-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; padding-top: 12px; }
.dex-stats > div { min-width: 0; padding: 15px; background: #8d8d8d; box-shadow: inset 3px 3px #555, inset -3px -3px #eaeaea; }
.dex-stats span { display: block; margin-bottom: 8px; color: #313131; font-size: 10px; }
.dex-stats b { display: block; overflow: hidden; color: #fff; font-size: 13px; font-weight: 400; text-overflow: ellipsis; text-shadow: 2px 2px #333; white-space: nowrap; }

footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; min-height: 90px; padding: 20px 4vw; border-top: 4px solid #000; background: #171717 url("assets/blocks/deepslate.png") center / 64px repeat; text-shadow: 2px 2px #000; }
footer > div { display: flex; align-items: center; gap: 10px; }
footer img { width: 34px; height: 34px; object-fit: contain; }
footer p { margin: 0; color: #aeb8b4; font-size: 11px; }
footer nav { justify-self: end; display: flex; gap: 20px; }
footer nav a, footer nav button { padding: 0; border: 0; background: none; color: #fff; cursor: pointer; font-size: 11px; text-shadow: 2px 2px #000; }

.toast { position: fixed; z-index: 200; left: 50%; bottom: 32px; min-width: 220px; padding: 15px 20px; border: 3px solid #111; background: var(--ui); box-shadow: inset 3px 3px #fff, inset -3px -3px #555, 5px 5px #0009; color: #222; font-size: 13px; text-align: center; transform: translate(-50%, 180%); transition: transform .22s steps(3); }
.toast.is-visible { transform: translate(-50%, 0); }

@keyframes item-float {
  0%,100% { transform: translateX(-50%) rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)) translateY(0); }
  50% { transform: translateX(-50%) rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)) translateY(-13px); }
}
@keyframes glow { 50% { opacity: .58; transform: scale(1.08); } }
@keyframes block-float { 50% { transform: translateY(-13px); } }
@keyframes ingredient-pulse { 50% { transform: scale(.72); filter: brightness(1.5); } }
@keyframes craft-pop { 0% { transform: scale(.25) rotate(-12deg); opacity: .2; } 60% { transform: scale(1.25) rotate(4deg); opacity: 1; } 100% { transform: scale(1); } }

@media (max-width: 1040px) {
  .menu { width: 220px; right: 28px; }
  .mc-button { font-size: 12px; }
  .hero__copy { left: 28px; font-size: 15px; }
  .shrine { width: 58vw; }
  .mine-pons { width: 50vw; }
  .voxel { opacity: .45; }
}

@media (max-width: 920px) {
  .game-header { grid-template-columns: 1fr auto; min-height: 62px; padding-inline: 14px; }
  .game-brand { font-size: 13px; }
  .game-brand img { width: 34px; height: 34px; }
  .server-status { display: none; }
  .game-header nav { gap: 15px; font-size: 10px; }
  .game-header nav a:first-child { display: none; }
  .hero { min-height: 1040px; padding: 94px 16px 138px; background-position: 58% 50%; }
  .hero__kicker { font-size: 9px; }
  h1 { font-size: clamp(62px, 20vw, 100px); white-space: normal; }
  .shrine { width: min(520px, 112vw); height: 390px; margin-top: 8px; }
  .mine-pons { width: min(300px, 68vw); }
  .shrine__blocks { bottom: 8px; }
  .world-block { width: 74px; }
  .world-block--craft { width: 90px; }
  .hero__copy { position: relative; left: auto; bottom: auto; z-index: 6; margin: 4px 0 22px; text-align: center; }
  .menu { position: relative; top: auto; right: auto; width: min(440px, 100%); }
  .craft-cue { bottom: 100px; width: max-content; }
  .hud { bottom: 22px; transform: translateX(-50%) scale(.88); transform-origin: bottom center; }
  .block-divider { height: 54px; background-size: 54px; }
  .craft-section, .dex-section { padding: 80px 16px 90px; }
  .section-title { margin-bottom: 36px; }
  .section-title > span { font-size: 9px; }
  .section-title h2 { font-size: clamp(42px, 13vw, 72px); }
  .section-title p { font-size: 13px; }
  .voxel { display: none; }
  .crafting-window { grid-template-columns: 1fr 54px 100px; gap: 14px 8px; padding: 22px 15px 26px; }
  .recipe-grid { grid-template-columns: repeat(3, 54px); gap: 3px; }
  .recipe-grid .inventory-slot { width: 54px; padding: 5px; }
  .recipe-arrow { font-size: 34px; }
  .result-slot { width: 90px; height: 90px; }
  .inventory-grid { gap: 2px; }
  .inventory-slot { padding: 3px; }
  .inventory-label { font-size: 15px; }
  .craft-button { width: 85%; }
  .dex-window { padding: 9px; }
  .dex-window__screen { min-height: 390px; height: 58vh; }
  .dex-stats { grid-template-columns: 1fr 1fr; }
  footer { grid-template-columns: 1fr auto; }
  footer p { display: none; }
}

@media (max-width: 430px) {
  .game-header nav a:nth-child(2) { display: none; }
  .hero { min-height: 990px; }
  .shrine { height: 340px; }
  .hud { transform: translateX(-50%) scale(.76); }
  .crafting-window { grid-template-columns: 1fr 34px 74px; }
  .recipe-grid { grid-template-columns: repeat(3, 45px); }
  .recipe-grid .inventory-slot { width: 45px; }
  .result-slot { width: 70px; height: 70px; }
  .crafting-window__title { font-size: 18px; }
  .dex-window__top { font-size: 10px; }
  .dex-window__top a { padding: 7px 8px; }
  footer nav { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
