:root {
  --orange: #FF6B00;
  --orange-d: #B84B00;
  --cyan: #1ED8D2;
  --night: #120B2E;
  --ground: #140A22;
  --panel-lo: #0C0820;
  --text: #F6EEFF;
  --muted: #CFC4E6;
  --pixel: "Pixelify Sans", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { background: var(--ground); }
body { margin: 0; color: var(--text); font-family: Rubik, system-ui, sans-serif; background: var(--ground); line-height: 1.5; }
a { color: var(--cyan); }

/* ---------- Hero: the whole first screen is an in-game view ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; overflow: hidden; }
#sky { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.hero-inner { position: relative; z-index: 1; text-align: center; padding: 0 16px; margin-top: -10vh; }
.mark { width: 132px; height: 132px; image-rendering: pixelated; filter: drop-shadow(6px 6px 0 rgba(0, 0, 0, .35)); animation: bob 3s steps(6) infinite; }
h1 { margin: 18px 0 0; line-height: 0; }
.wordmark { width: min(560px, 86vw); height: auto; image-rendering: pixelated; filter: drop-shadow(5px 5px 0 rgba(0, 0, 0, .45)); }
.tagline { font-family: var(--pixel); font-size: clamp(20px, 2.8vw, 28px); margin: 22px 0 14px; text-shadow: 3px 3px 0 #000; color: #FFE7CF; }
.badge { display: inline-block; margin: 0 0 26px; font: 600 16px var(--pixel); color: #2A1400; background: #FFAA00; padding: 4px 12px; border: 3px solid #000; box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .45), inset -2px -2px 0 rgba(0, 0, 0, .25); }
.buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* Minecraft-style button */
.mc-btn {
  --face: #7A7A7A;
  display: inline-block; font-family: var(--pixel); font-size: 20px; color: #fff; text-decoration: none; white-space: nowrap;
  padding: 12px 26px 14px; background: var(--face); text-shadow: 2px 2px 0 #3F3F3F; border: 3px solid #000;
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, .35), inset -3px -4px 0 rgba(0, 0, 0, .35);
  transition: transform .08s steps(2);
}
.mc-btn:hover { --face: #8D97C9; }
.mc-btn.primary { --face: var(--orange); text-shadow: 2px 2px 0 var(--orange-d); }
.mc-btn.primary:hover { --face: #FF8A2E; }
.mc-btn:active { transform: translateY(2px); }
.mc-btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

/* ---------- In-game chat, bottom-left like the real HUD ---------- */
.game-chat { position: absolute; z-index: 2; left: 16px; bottom: 56px; width: min(560px, 46vw); margin: 0; }
.mc-chat { list-style: none; margin: 0; padding: 0; font: 400 16px/1.35 var(--pixel); color: #FFF; text-shadow: 2px 2px 0 #3F3F3F; }
.mc-chat .line { background: rgba(0, 0, 0, .5); padding: 2px 8px; transition: opacity 1s; }
.mc-chat .line.show { animation: chat-in .2s steps(2); }
.mc-chat .line.fade { opacity: 0; }
@keyframes chat-in { from { opacity: 0; } }
.mc-chat .join { color: #FFFF55; text-shadow: 2px 2px 0 #3F3F15; }
.mc-chat .pavo { color: #FF8A2E; text-shadow: 2px 2px 0 #3F1A00; }
.mc-chat .gold { color: #FFAA00; text-shadow: 2px 2px 0 #3F2A00; }
.mc-chat .dim { color: #AAAAAA; }
.mc-chat .purple { color: #FF55FF; text-shadow: 2px 2px 0 #3F153F; }
.mc-chat .italic { font-style: italic; }
.mc-chat .ok { color: #55FF55; text-shadow: 2px 2px 0 #153F15; }
.mc-chat .no { color: #FF5555; text-shadow: 2px 2px 0 #3F1515; }
.mc-input { visibility: hidden; margin-top: 6px; min-height: 30px; background: rgba(0, 0, 0, .55); padding: 5px 8px; font: 400 16px var(--pixel); color: #FFF; text-shadow: 2px 2px 0 #3F3F3F; overflow-wrap: anywhere; }
.game-chat.typing .mc-input { visibility: visible; }
.caret { display: inline-block; width: 8px; height: 2px; margin-left: 2px; background: #FFF; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Below the fold ---------- */
.about { max-width: 640px; margin: 0 auto; padding: 56px 16px; text-align: center; color: var(--muted); font-size: 17px; }
.about b { color: #FFD9B8; }
footer { text-align: center; padding: 40px 16px 52px; color: #A99CC8; border-top: 3px solid #000; background: var(--panel-lo); }
footer img { image-rendering: pixelated; }
footer p { margin: 8px 0; }
footer small { color: #7F73A0; }
footer .fine { font-size: 13px; max-width: 60ch; margin: 8px auto 0; }

/* Where the corner chat would run into the title, stack it underneath instead. */
@media (max-width: 1360px), (max-height: 860px) {
  .hero { align-content: center; gap: 28px; padding: 48px 0 32px; }
  .hero-inner { margin-top: 0; }
  .game-chat { position: relative; left: auto; bottom: auto; width: min(560px, calc(100vw - 32px)); }
  .mc-chat { min-height: 190px; display: flex; flex-direction: column; justify-content: flex-end; }
}
@media (max-width: 760px) {
  .mc-chat, .mc-input { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .mark, .caret { animation: none; }
}
