/* AlphaMC website - the in-game GUI: night purple, framed panels, gold selection. */
:root {
  --night: #140c1c;
  --night-2: #1b1027;
  --panel: #281738;
  --panel-hi: #3a1f4d;
  --frame: #5e3a70;
  --frame-dark: #1a0e24;
  --gold: #ffc94a;
  --gold-dark: #8a5d10;
  --pink: #ff75fb;
  --text: #efe6f7;
  --muted: #c3b2d2;
  --chat-green: #55ff55;
  --pixel: "Tiny5", "Inter", sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --hotbar-h: 92px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; scrollbar-color: var(--frame) var(--night); }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
  padding-bottom: calc(var(--hotbar-h) + 32px);
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;   /* Tiny5 has one weight: never fake bold it */
}
::selection { background: var(--gold); color: var(--night); }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--night); }
::-webkit-scrollbar-thumb { background: var(--frame); border: 3px solid var(--night); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
a { color: var(--pink); text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--gold); color: var(--night); padding: 8px 14px; font-weight: 700; }
.skip:focus { left: 8px; }

/* ---------------------------------------------------------------- first screen */
.screen {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 48px;
  padding: 64px clamp(20px, 6vw, 112px) calc(var(--hotbar-h) + 120px);
  background: linear-gradient(#1c0e2a 0%, #33183f 52%, #4f2556 100%);
}
.hills { position: absolute; inset: auto 0 0 0; width: 100%; height: 46%; }
/* stars: each twinkles in pixel steps, the whole sky drifts slowly sideways (wider than the screen, so no gap) */
.stars { position: absolute; inset: 0 -120px 50% 0; pointer-events: none; animation: drift 240s linear infinite alternate; }
.stars i { position: absolute; width: 3px; height: 3px; background: #f3d9ff; opacity: .55; animation: twinkle var(--t, 4s) steps(4, end) var(--d, 0s) infinite; }
.stars i.big { width: 4px; height: 4px; opacity: .8; }
@keyframes drift { to { transform: translateX(-120px); } }
@keyframes twinkle { 50% { opacity: .12; } }

.title { position: relative; z-index: 1; max-width: 46rem; }
.wordmark {
  font: 400 clamp(4rem, 13vw, 9rem)/.85 var(--pixel);
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 .06em 0 var(--frame-dark), 0 .12em .3em rgba(10, 4, 16, .5);
}
.wordmark span { color: var(--gold); }
/* the drawn logotype replaces the text (kept for screen readers and if scripts fail) */
[data-wordmark].drawn .wm-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[data-wordmark] svg { display: block; height: auto; filter: drop-shadow(0 18px 24px rgba(10, 4, 16, .45)); }
.wordmark svg { width: clamp(17rem, 46vw, 40rem); }
.scoreboard [data-wordmark] svg { width: 9.5rem; margin: 0 auto; filter: none; }
.hook { margin-top: 28px; font: 400 clamp(1.25rem, 2.2vw, 1.7rem)/1.35 var(--pixel); color: #f6e3ff; max-width: 34ch; text-wrap: balance; }
.ip-line { margin-top: 36px; }
.ip-button {
  display: inline-grid;
  grid-template-columns: auto auto;
  grid-template-areas: "label label" "ip action";
  align-items: center;
  column-gap: 20px;
  background: rgba(20, 12, 28, .85);
  border: 4px solid var(--gold);
  box-shadow: inset 0 0 0 3px var(--frame-dark), 0 10px 30px rgba(10, 4, 16, .45);
  padding: 12px 12px 12px 22px;
  text-align: left;
}
.ip-label { grid-area: label; font-size: .8rem; color: var(--muted); }
.ip-text { grid-area: ip; font: 700 clamp(1.35rem, 2.8vw, 2rem)/1.2 var(--body); letter-spacing: -0.01em; color: #fff; }
.ip-action { grid-area: action; background: var(--gold); color: var(--night); font: 400 1.15rem/1 var(--pixel); padding: 14px 18px; box-shadow: inset 0 -5px 0 var(--gold-dark); }
.ip-button:hover .ip-action { background: #ffd970; }
.ip-button:active .ip-action { box-shadow: inset 0 3px 0 var(--gold-dark); }
.java { margin-top: 14px; color: var(--muted); font-size: .95rem; }

.scoreboard {
  position: relative;
  z-index: 1;
  align-self: start;
  margin-top: 6vh;
  background: rgba(20, 12, 28, .82);
  border: 4px solid var(--frame);
  box-shadow: inset 0 0 0 3px var(--panel), 0 14px 40px rgba(10, 4, 16, .4);
  padding: 20px 24px;
  font-family: var(--pixel);
}
.scoreboard h2 { text-align: center; font: 400 1.6rem/1 var(--pixel); color: var(--gold); margin-bottom: 14px; }
.scoreboard dl { margin: 0; }
.scoreboard dl div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; font-size: 1.2rem; }
.scoreboard dt { color: var(--muted); white-space: nowrap; }
.scoreboard dd { margin: 0; color: #fff; font-variant-numeric: tabular-nums; }
.scoreboard .max { color: var(--muted); }
.scoreboard [data-status].on { color: var(--chat-green); }
.scoreboard [data-status].off { color: #ff8a8a; }
.count .digit { display: inline-block; }
.count .digit.tick { animation: tick .45s cubic-bezier(.16, 1, .3, 1); }
@keyframes tick { from { transform: translateY(-60%); opacity: 0; filter: blur(2px); } }
.board-ip { margin-top: 14px; text-align: center; color: var(--gold); font: 700 1.05rem/1.2 var(--body); }

/* ---------------------------------------------------------------- sections */
.band { max-width: 1180px; margin: 0 auto; padding: 120px clamp(20px, 5vw, 48px) 0; }
.section-title { font: 400 clamp(2rem, 4.5vw, 3.2rem)/1.05 var(--pixel); color: #fff; text-wrap: balance; }
.section-lead { margin-top: 16px; max-width: 62ch; color: var(--muted); font-size: 1.1rem; }

/* features: item slot + its tooltip, like hovering an item in the inventory */
.items { list-style: none; margin: 48px 0 0; padding: 0; columns: 2 380px; column-gap: 40px; }
.item { break-inside: avoid; display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: start; margin-bottom: 34px; }
.slot {
  width: 76px; height: 76px;
  display: grid; place-items: center;
  background: var(--night-2);
  border: 4px solid;
  border-color: #0d0714 var(--frame) var(--frame) #0d0714;
  box-shadow: inset 0 0 0 2px var(--panel);
}
.slot svg, .hb svg { width: 75%; height: 75%; image-rendering: pixelated; }
/* Minecraft's item tooltip: near-black plate, purple gradient inner border */
.tooltip { position: relative; background: rgba(16, 2, 16, .94); padding: 18px 22px 20px; box-shadow: 0 12px 28px rgba(5, 2, 10, .45); }
.tooltip::before { content: ""; position: absolute; inset: 4px; border: 3px solid; border-image: linear-gradient(#6a2cd0, #2e0f66) 1; pointer-events: none; }
.t-name { font: 400 1.35rem/1.2 var(--pixel); margin-bottom: 8px; }
.t-red { color: #ff6b6b; } .t-pink { color: var(--pink); } .t-aqua { color: #55ffff; }
.t-green { color: var(--chat-green); } .t-gold { color: var(--gold); }
.tooltip p { color: #ded2ea; }
.tooltip .t-lore { margin-top: 8px; color: #a99abb; font-style: italic; font-size: .95rem; }

/* join */
.join { margin-top: 44px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 56px; align-items: center; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 18px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: center; font-size: 1.15rem; }
.steps li::before {
  content: counter(s);
  width: 52px; height: 52px; display: grid; place-items: center;
  font: 400 1.5rem/1 var(--pixel); color: var(--night);
  background: var(--gold); box-shadow: inset 0 -5px 0 var(--gold-dark);
}
.steps b { color: #fff; }
.window {
  background: #1e1e1e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Crect width='32' height='32' fill='%23241634'/%3E%3Crect width='16' height='16' fill='%23281a39'/%3E%3Crect x='16' y='16' width='16' height='16' fill='%23281a39'/%3E%3C/svg%3E");
  border: 4px solid var(--frame);
  padding: 26px 30px 30px;
  font-family: var(--pixel);
}
.w-title { text-align: center; font-size: 1.3rem; color: #fff; margin-bottom: 18px; }
.w-label { color: #a0a0a0; font-size: 1rem; margin: 12px 0 6px; }
.w-field { display: flex; width: 100%; justify-content: space-between; align-items: center; background: #000; border: 2px solid #a0a0a0; padding: 10px 12px; font: 600 1.1rem/1.2 var(--body); color: #e0e0e0; text-align: left; }
.w-copy { border-color: var(--gold); color: #fff; }
.w-copy span { color: var(--gold); font-size: 1rem; }
.w-copy:hover { background: #120a18; }
.w-done { margin-top: 22px; text-align: center; padding: 12px; background: var(--panel); border: 3px solid var(--frame); box-shadow: inset 0 -5px 0 var(--frame-dark); color: #fff; }

/* ranks: a scoreboard-like ladder, tags in the chat colours */
.ladder { list-style: none; margin: 44px 0 0; padding: 0; border: 4px solid var(--frame); background: rgba(40, 23, 56, .55); }
.ladder li { display: grid; grid-template-columns: 150px 150px 1fr; gap: 20px; align-items: center; padding: 16px 22px; }
.ladder li + li { border-top: 2px solid #3a2550; }
.tag { font: 400 1.3rem/1 var(--pixel); color: var(--c); }
.tag::before { content: "["; color: #6f5a82; } .tag::after { content: "]"; color: #6f5a82; }
.price { font: 400 1.15rem/1 var(--pixel); color: #fff; }
.perks { color: var(--muted); }
.row-links { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; }
.note { color: var(--muted); }
.note b { color: #fff; }

.mc-button {
  display: inline-block; text-decoration: none;
  font: 400 1.25rem/1 var(--pixel); color: #fff;
  background: var(--panel); border: 4px solid var(--frame);
  box-shadow: inset 0 -6px 0 var(--frame-dark);
  padding: 16px 26px 20px;
}
.mc-button:hover { background: var(--panel-hi); border-color: var(--gold); }
.mc-button.gold { background: var(--gold); color: var(--night); border-color: #ffe08a; box-shadow: inset 0 -6px 0 var(--gold-dark); }
.mc-button.gold:hover { background: #ffd970; }

/* vote */
.vote-list { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.vote-list a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 18px; text-decoration: none; color: #fff;
  background: var(--panel); border: 3px solid var(--frame);
  font: 400 1.1rem/1.2 var(--pixel);
}
.vote-list a span { color: var(--gold); font-size: .95rem; white-space: nowrap; }
.vote-list a:hover { border-color: var(--gold); background: var(--panel-hi); }

/* rules: a written book */
.book { margin-top: 40px; max-width: 760px; background: #e9dcc1; color: #3b2a1a; padding: 34px 40px; border: 4px solid #6b4a2b; box-shadow: inset 0 0 0 4px #d5c39f, 0 14px 34px rgba(5, 2, 10, .45); }
.rules { margin: 0; padding-left: 1.6em; display: grid; gap: 10px; font-size: 1.05rem; }
.rules li::marker { font-family: var(--pixel); font-weight: 700; color: #7a4f9a; }
.rules b { color: #22150b; }

/* questions: the same framed panels, open / closed like a book's pages */
.faq { margin-top: 36px; max-width: 820px; display: grid; gap: 10px; }
.faq details { background: var(--panel); border: 3px solid var(--frame); }
.faq details[open] { border-color: #7a4f9a; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 16px 20px; font: 400 1.2rem/1.3 var(--pixel); color: #fff; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); }
.faq details[open] summary::after { content: "-"; }
.faq summary:hover { color: var(--gold); }
.faq details p { padding: 0 20px 18px; color: var(--muted); max-width: 70ch; }
.faq details p b { color: #fff; }

.discord { text-align: center; padding-bottom: 40px; }
.discord .section-lead { margin: 16px auto 28px; }

.footer { margin: 120px auto 0; max-width: 1180px; padding: 28px clamp(20px, 5vw, 48px); border-top: 2px solid #2c1b3c; color: #9d8bb0; font-size: .9rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* ---------------------------------------------------------------- HUD: chat + hotbar (fixed) */
.chat {
  position: fixed; left: 16px; bottom: calc(var(--hotbar-h) + 36px); z-index: 30;
  display: grid; gap: 2px; max-width: min(520px, calc(100vw - 32px));
  font: 400 1.05rem/1.35 var(--pixel); pointer-events: none;
}
.chat p { background: rgba(0, 0, 0, .55); padding: 4px 10px; color: var(--pink); transition: opacity 1s ease, filter 1s ease; }
.chat p.join { color: var(--chat-green); }
.chat p.err { color: #ff8a8a; }
.chat p.old { opacity: 0; filter: blur(2px); }

.hud { position: fixed; left: 0; right: 0; bottom: 14px; z-index: 40; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.held { min-height: 1.6em; margin-bottom: 6px; font: 400 1.15rem/1.4 var(--pixel); color: #fff; text-shadow: 0 2px 0 #000; transition: opacity .6s ease; }
.held.fade { opacity: 0; }
.hotbar {
  pointer-events: auto;
  list-style: none; margin: 0; padding: 5px; display: flex; gap: 5px;
  background: rgba(20, 12, 28, .92); border: 4px solid var(--frame);
  box-shadow: 0 10px 30px rgba(5, 2, 10, .55);
  max-width: calc(100vw - 16px); overflow-x: auto; scrollbar-width: none;
}
.hotbar::-webkit-scrollbar { display: none; }
.hb {
  position: relative; display: grid; grid-template-rows: 1fr auto; place-items: center;
  width: 84px; height: 76px; padding: 6px 4px 5px;
  background: var(--night-2); border: 3px solid #3d2650; color: var(--muted); text-decoration: none;
  font: 400 .85rem/1 var(--pixel);
}
.hb svg { width: 36px; height: 36px; }
.hb::after { content: attr(data-key); position: absolute; left: 4px; top: 2px; font: 400 .75rem/1 var(--pixel); color: #8f7aa4; }
.hb:hover { color: #fff; border-color: var(--frame); }
.hb.sel { border: 4px solid var(--gold); background: var(--panel-hi); color: #fff; box-shadow: 0 0 0 2px var(--frame-dark); }
.hb[data-copy] { width: 110px; }
.hb-label { white-space: nowrap; }

/* load sequence: hotbar rises, scoreboard lines fill in */
.hud { animation: rise .9s cubic-bezier(.16, 1, .3, 1) .2s both; }
.scoreboard dl div { animation: fill .5s cubic-bezier(.16, 1, .3, 1) both; }
.scoreboard dl div:nth-child(1) { animation-delay: .5s; }
.scoreboard dl div:nth-child(2) { animation-delay: .6s; }
.scoreboard dl div:nth-child(3) { animation-delay: .7s; }
.scoreboard dl div:nth-child(4) { animation-delay: .8s; }
@keyframes rise { from { transform: translateY(140%); } }
@keyframes fill { from { opacity: 0; clip-path: inset(0 100% 0 0); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  /* nothing moves; stars still twinkle (brightness only, no motion) */
  .stars i { animation: twinkle var(--t, 4s) steps(4, end) var(--d, 0s) infinite !important; }
}

/* ---------------------------------------------------------------- phones + tablets */
@media (max-width: 900px) {
  :root { --hotbar-h: 74px; }
  .screen { grid-template-columns: 1fr; align-content: start; gap: 28px; padding-top: 28px; }
  .scoreboard { order: -1; margin-top: 0; padding: 10px 14px; }
  .scoreboard h2 { display: none; }
  .scoreboard dl { display: flex; flex-wrap: wrap; gap: 4px 18px; }
  .scoreboard dl div { font-size: 1rem; padding: 2px 0; gap: 8px; }
  .board-ip { display: none; }
  .title { margin-top: 4vh; }
  .ip-button { width: 100%; }
  .join { grid-template-columns: 1fr; gap: 36px; }
  .ladder li { grid-template-columns: 1fr auto; gap: 6px 16px; }
  .ladder .perks { grid-column: 1 / -1; }
  .band { padding-top: 88px; }
  .hb { width: 66px; height: 62px; font-size: .72rem; }
  .hb svg { width: 28px; height: 28px; }
  .hb[data-copy] { width: 84px; }
  .chat { font-size: .95rem; }
}
/* small phones: all seven slots fit on screen (no hidden Discord / Store), no key numbers */
@media (max-width: 560px) {
  :root { --hotbar-h: 66px; }
  .hud { bottom: 8px; }
  .hotbar { width: calc(100vw - 12px); gap: 3px; padding: 3px; }
  .hotbar li { flex: 1 1 0; min-width: 0; }
  .hotbar li:first-child { flex-grow: 1.35; }
  .hb, .hb[data-copy] { width: 100%; height: 58px; padding: 4px 1px 3px; font-size: .72rem; border-width: 2px; }
  .hb.sel { border-width: 3px; }
  .hb svg { width: 24px; height: 24px; }
  .hb::after { display: none; }
}
@media (max-width: 420px) {
  .item { grid-template-columns: 56px 1fr; gap: 10px; }
  .slot { width: 56px; height: 56px; }
  .book { padding: 24px 22px; }
}
