/* ExtremePlay web - base: color and font tokens, page basics, game text, navigation.
   One deliberately dark world (night on the server), so there is no light theme. */

/* Layout: the page is one evening on the server. A night-sky + terrain canvas opens it with the real
   server-list entry; every section borrows a different piece of the game's own UI instead of cards:
   Edit Server Info screen (join), an inventory with item tooltips (features), the chat (first steps),
   advancement toasts (extras), item tooltips (ranks) and a written book (rules).
   Deliberately one dark world (night server), so no light theme. */
:root {
  color-scheme: dark;
  --night: #0C0A10;          /* page ground, night sky with a violet bias */
  --night-2: #15111A;        /* raised night (nav, footer) */
  --ink: #F1ECE6;            /* body text, warm off-white */
  --muted: #A49A9C;          /* secondary text */
  --red: #FF5555;            /* brand accent (Extreme), MC "red" */
  --red-deep: #8B0000;       /* brand dark red */
  /* game UI materials */
  --mc-white: #FFFFFF; --mc-gray: #AAAAAA; --mc-dgray: #555555; --mc-yellow: #FFFF55; --mc-gold: #FFAA00;
  --mc-green: #55FF55; --mc-aqua: #55FFFF; --mc-pink: #FF55FF; --mc-blue: #5555FF;
  --gui: #C6C6C6; --gui-hi: #FFFFFF; --gui-lo: #555555; --gui-text: #3F3F3F; --slot: #8B8B8B;
  --tip-bg: #100010; --tip-a: #5000FF; --tip-b: #28007F;
  --btn: #6F6F6F; --btn-hi: #A9A9A9; --btn-lo: #3B3B3B;
  --page: #E7D7AE; --page-edge: #B79A63; --page-ink: #3A2A18;
  --discord: #5865F2;

  --f-pixel: "Jersey 10", "Courier New", monospace;
  --f-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;

  --gutter: 16px;
  --maxw: 1080px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--night); color: var(--ink); font-family: var(--f-body); font-size: 17px; line-height: 1.6; }
a { color: inherit; }
img, canvas { max-width: 100%; }
:focus-visible { outline: 2px solid var(--mc-yellow); outline-offset: 2px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.px { image-rendering: pixelated; image-rendering: crisp-edges; }
.cmd { font-family: var(--f-pixel); font-size: 1.15em; letter-spacing: 0.02em; color: var(--mc-yellow); white-space: nowrap; }
/* game text: pixel font with the game's hard 1-step drop shadow */
.mc { font-family: var(--f-pixel); letter-spacing: 0.02em; text-shadow: 2px 2px 0 #3F3F3F; }
h2 { font-family: var(--f-pixel); font-weight: 400; letter-spacing: 0.02em; font-size: clamp(36px, 5.4vw, 56px); line-height: 1.1; margin: 0; text-wrap: balance; text-shadow: 3px 3px 0 #2B1D24; }
.intro { color: var(--muted); max-width: 58ch; margin: 10px 0 0; }
/* ---------- nav ---------- */
nav.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(12, 10, 16, 0.86); backdrop-filter: blur(6px); border-bottom: 2px solid #000; }
nav.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-pixel); font-size: 25px; letter-spacing: 0.02em; white-space: nowrap; }
.brand img { width: 28px; height: 28px; }
.brand .ex { color: var(--red); }
nav.top .links { display: flex; gap: 18px; margin-left: auto; font-family: var(--f-pixel); font-size: 20px; letter-spacing: 0.02em; }
nav.top .links a { text-decoration: none; color: var(--muted); }
nav.top .links a:hover { color: var(--ink); }
.lang { display: flex; gap: 4px; }
.lang button { font-family: var(--f-pixel); font-size: 18px; padding: 2px 9px; min-height: 34px; }
/* "More" dropdown: an item tooltip hanging under a game button */
.more { position: relative; }
.more-btn { min-height: 34px; padding: 2px 12px; font-size: 19px; gap: 8px; }
.more-btn .arrow { width: 8px; height: 8px; border-right: 3px solid currentColor; border-bottom: 3px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.more-btn[aria-expanded="true"] .arrow { transform: translateY(2px) rotate(225deg); }
.more-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; display: grid; padding: 8px; z-index: 30;
  background: var(--tip-bg); border: 2px solid var(--tip-a); border-bottom-color: var(--tip-b); outline: 2px solid var(--tip-bg); }
.more-menu a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; text-decoration: none; color: var(--mc-white);
  font-family: var(--f-pixel); font-size: 21px; letter-spacing: 0.02em; text-shadow: 2px 2px 0 #3F3F3F; }
.more-menu a:hover, .more-menu a:focus-visible { background: rgba(255, 255, 255, 0.12); outline: none; }
.more-menu canvas { width: 22px; height: 22px; }
.more-menu .sep { height: 2px; background: #2A1F3D; margin: 6px 4px; }
.more-menu .m-only { display: none; }
@media (max-width: 760px) {
  nav.top .links { display: none; }
  .more { margin-left: auto; }
  .more-menu .m-only { display: flex; }
  .more-menu .sep.m-only { display: block; }
}
@media (max-width: 480px) { nav.top .brand > span { display: none; } nav.top .brand img { width: 34px; height: 34px; } }
.lang button[aria-pressed="true"] { border-color: var(--mc-white); }
.brandtxt { }
.brandtxt .e { background: linear-gradient(90deg, #B01414, var(--red)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.caret { display: inline-block; width: 10px; height: 2px; background: #E0E0E0; margin-left: 2px; vertical-align: -2px; animation: blink 1.06s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .caret { animation: none !important; } }
.g { color: var(--mc-gray); }
.d { color: var(--mc-dgray); }
.w { color: var(--mc-white); }
.gr { color: var(--mc-green); }
.y { color: var(--mc-yellow); }
.gd { color: var(--mc-gold); }
.aq { color: var(--mc-aqua); }
.rd { color: var(--red); }
.pk { color: var(--mc-pink); }
