:root {
  --bg: #121712;
  --panel: #232b23;
  --panel-2: #2d382d;
  --green: #3f8f2a;
  --green-hi: #6fd13f;
  --green-dark: #1e4d12;
  --text: #e8efe4;
  --muted: #9fae9a;
  --line: #0a0d0a;
  --stone: #8b8b8b;
  --stone-hi: #b8b8b8;
  --stone-lo: #4a4a4a;
  --warn: #f0b04a;
  --bad: #e5604d;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Trebuchet MS", "Segoe UI", Verdana, sans-serif;
  line-height: 1.5;
  font-size: 16px;
}
a { color: var(--green-hi); }
code {
  background: #0d110d;
  border: 1px solid #3a463a;
  padding: 0 .3em;
  font-family: Consolas, "Courier New", monospace;
  font-size: .92em;
  word-break: break-word;
}
[hidden] { display: none !important; }

/* Hero */
.hero {
  background: linear-gradient(180deg, #5f9fd8 0%, #8cc1e8 35%, #4f8a35 36%, #2f5f1f 60%, #1b2a1b 100%);
  background-image: url("/assets/background.png"), linear-gradient(180deg, #5f9fd8 0%, #8cc1e8 35%, #4f8a35 36%, #2f5f1f 60%, #1b2a1b 100%);
  background-size: cover, auto;
  background-position: center;
  border-bottom: 6px solid var(--line);
  position: relative;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(18,23,18,.85));
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: 900px; margin: 0 auto;
  padding: 28px 16px 36px;
  text-align: center;
}
.logo {
  display: block;
  max-width: min(560px, 92%);
  height: auto;
  margin: 0 auto 8px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  filter: drop-shadow(0 4px 0 rgba(0,0,0,.45));
}
.hero-title {
  margin: 0;
  font-size: clamp(1.6rem, 6vw, 2.6rem);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-shadow: 3px 3px 0 #000;
}
.tagline { margin: 4px 0 22px; font-size: 1.1rem; text-shadow: 2px 2px 0 #000; }

/* Blade panels */
.blade {
  background: var(--panel);
  border: 4px solid var(--line);
  box-shadow: inset 0 0 0 2px #46564a, 0 4px 0 rgba(0,0,0,.5);
  margin: 0 0 22px;
  text-align: left;
}
.blade-head {
  background: linear-gradient(180deg, var(--green) 0%, var(--green-dark) 100%);
  border-bottom: 4px solid var(--line);
  padding: 8px 16px;
}
.blade-title {
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: .1em;
  text-shadow: 2px 2px 0 #000;
}
.blade-body { padding: 16px; }
.latest-card { border-color: #000; box-shadow: inset 0 0 0 2px var(--green-hi), 0 6px 0 rgba(0,0,0,.55); }
.latest-card .blade-body { background: linear-gradient(180deg, #2b382b, #1f291f); }

.wrap { max-width: 900px; margin: 0 auto; padding: 24px 12px 8px; }
.state { margin: 0; color: var(--muted); }
.state.error { color: var(--bad); }
.small { font-size: .85rem; }
.muted { color: var(--muted); }
.sub { margin: 18px 0 8px; text-transform: uppercase; letter-spacing: .06em; font-size: 1rem; }

/* Release display */
.rel-version { font-size: clamp(1.8rem, 7vw, 2.8rem); font-weight: bold; color: var(--green-hi); text-shadow: 3px 3px 0 #000; line-height: 1.1; }
.rel-title { font-size: 1.2rem; font-weight: bold; margin-top: 2px; }
.rel-date { color: var(--muted); margin-bottom: 10px; }
.badge {
  display: inline-block;
  background: var(--green-hi);
  color: #0d1a08;
  border: 2px solid #000;
  padding: 0 .5em;
  font-size: .75rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: .08em;
  vertical-align: middle;
  margin-left: .5em;
}
.notes { white-space: pre-wrap; margin: 8px 0 12px; color: #cdd8c8; overflow-wrap: anywhere; }
.release { border: 3px solid var(--line); background: var(--panel-2); padding: 14px; margin-bottom: 14px; }
.release:last-child { margin-bottom: 0; }
.release h3 { margin: 0; font-size: 1.3rem; }
.files { display: grid; gap: 10px; margin-top: 10px; }
.file-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  background: #1a211a; border: 3px solid var(--line); padding: 10px;
}
.file-info { flex: 1 1 220px; min-width: 0; }
.file-label { font-weight: bold; }
.file-name { font-family: Consolas, "Courier New", monospace; font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.file-meta { font-size: .85rem; color: var(--muted); }
.hash { margin-top: 4px; font-size: .75rem; color: var(--muted); }
.hash summary { cursor: pointer; }
.hash code { display: block; margin-top: 3px; user-select: all; word-break: break-all; }

/* Minecraft stone button */
.btn {
  display: inline-block;
  font: inherit; font-weight: bold;
  color: #fff;
  text-shadow: 2px 2px 0 #3a3a3a;
  background: var(--stone);
  background-image: linear-gradient(180deg, #a3a3a3 0%, #8b8b8b 50%, #777 100%);
  border: 3px solid #000;
  border-top-color: var(--stone-hi);
  border-left-color: var(--stone-hi);
  border-bottom-color: var(--stone-lo);
  border-right-color: var(--stone-lo);
  outline: 3px solid #000;
  outline-offset: -3px;
  outline: none;
  box-shadow: 0 0 0 3px #000;
  padding: 10px 20px;
  margin: 3px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  min-height: 44px;
}
.btn:hover, .btn:focus-visible {
  background-image: linear-gradient(180deg, #7d95d1 0%, #6a7fba 50%, #5a6ea6 100%);
  border-top-color: #a9baf0; border-left-color: #a9baf0;
  border-bottom-color: #3a4a7a; border-right-color: #3a4a7a;
}
.btn:focus-visible { box-shadow: 0 0 0 3px #000, 0 0 0 6px var(--green-hi); }
.btn:active { transform: translateY(2px); }
.btn.big { font-size: 1.15rem; padding: 14px 26px; }
.btn.green {
  background-image: linear-gradient(180deg, #5fbf37 0%, #3f8f2a 55%, #2f7020 100%);
  border-top-color: #9be873; border-left-color: #9be873;
  border-bottom-color: #1b4a10; border-right-color: #1b4a10;
}
.btn.green:hover, .btn.green:focus-visible {
  background-image: linear-gradient(180deg, #78dc4d 0%, #52a838 55%, #3f8a2a 100%);
}

/* Progress */
.dl-item { background: #1a211a; border: 3px solid var(--line); padding: 10px; margin-bottom: 10px; }
.dl-item:last-child { margin-bottom: 0; }
.dl-name { font-weight: bold; overflow-wrap: anywhere; }
.bar { height: 22px; background: #0b0f0b; border: 3px solid #000; margin: 6px 0; position: relative; }
.bar-fill {
  height: 100%; width: 0;
  background: repeating-linear-gradient(90deg, #6fd13f 0 8px, #4fa72a 8px 16px);
  transition: width .4s linear;
}
.bar-fill.w0 { width: 0; }
.dl-item.error .bar-fill { background: repeating-linear-gradient(90deg, #e5604d 0 8px, #b84434 8px 16px); }
.dl-stats { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .9rem; color: var(--muted); }
.dl-status.ok { color: var(--green-hi); font-weight: bold; }
.dl-status.bad { color: var(--warn); font-weight: bold; }

/* Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tab {
  font: inherit; font-weight: bold; color: var(--text);
  background: #333f33; border: 3px solid #000;
  padding: 8px 16px; cursor: pointer; min-height: 44px;
}
.tab.active { background: var(--green); box-shadow: inset 0 -4px 0 var(--green-hi); }
.tab:focus-visible { outline: 3px solid var(--green-hi); outline-offset: 2px; }
.steps { padding-left: 1.4em; margin: 0 0 10px; }
.steps li { margin-bottom: 8px; }
.table-wrap { overflow-x: auto; }
.controls { border-collapse: collapse; width: 100%; background: #1a211a; }
.controls th, .controls td { border: 2px solid #000; padding: 6px 10px; text-align: left; vertical-align: top; }
.controls thead th { background: var(--green-dark); }
.controls tbody th { white-space: nowrap; color: var(--green-hi); width: 1%; }

.footer { max-width: 900px; margin: 0 auto; padding: 18px 16px 36px; text-align: center; color: var(--muted); font-size: .8rem; }

@media (max-width: 520px) {
  .btn { width: 100%; margin: 0; }
  .blade-body { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .bar-fill { transition: none; }
}
