/* ============================================================
   Semantium CI — "Blockwerk"
   Minecraft-Stil: Pixel-Schrift, eckige Bevel-Rahmen, Hotbar-Navigation.
   Schriften: Pixelify Sans (Überschriften), System-Sans (Fließtext), System-Mono (Code).
   Farben: Deepslate (dunkel, Standard) und Daylight (hell). Akzent: Emerald.
   ============================================================ */

@font-face {
  font-family: "Pixelify Sans";
  src: url("fonts/PixelifySans-latin-ext.woff2") format("woff2");
  font-weight: 400 700; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Pixelify Sans";
  src: url("fonts/PixelifySans.woff2") format("woff2");
  font-weight: 400 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Erzfarben (in beiden Themes gleich) */
  --emerald: #3ddc84;
  --gold: #f2b632;
  --diamond: #4ee1e4;
  --redstone: #e5484d;
  --amethyst: #9b6dff;
  --px: 4px;                    /* ein "Pixel" der Oberfläche */
  --font-pixel: "Pixelify Sans", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

/* Deepslate (dunkel) */
#app[data-theme="dark"] {
  --bg: #14161a;
  --bg-2: #1a1d22;
  --surface: #242830;
  --surface-2: #2e333d;
  --text: #e8ecef;
  --muted: #a0aab6;
  --outline: #07080a;
  --bevel-light: #4a5160;
  --bevel-dark: #181b21;
  --accent: #3ddc84;
  --accent-strong: #1f9f57;
  --accent-light: #8ff0b8;
  --accent-ink: #07210f;
  --link: #6ff0a8;
  --code-bg: #0d0f12;
  --warn: #f2b632;
  --danger: #ff6b6f;
  --grid: rgba(255,255,255,.035);
}
/* Daylight (hell) */
#app[data-theme="light"] {
  --bg: #e8eee0;
  --bg-2: #dfe7d4;
  --surface: #f6f3e7;
  --surface-2: #ebe6d3;
  --text: #1c2a1f;
  --muted: #55665a;
  --outline: #2a2f26;
  --bevel-light: #ffffff;
  --bevel-dark: #b9b49c;
  --accent: #2f9a56;
  --accent-strong: #1f7a3e;
  --accent-light: #a9e3bd;
  --accent-ink: #ffffff;
  --link: #1b7a41;
  --code-bg: #e2ddc8;
  --warn: #a8700a;
  --danger: #b3282d;
  --grid: rgba(0,0,0,.04);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { max-width: 100%; overflow-x: hidden; }
body { margin: 0; font: 16px/1.65 var(--font-body); }
#app {
  min-height: 100vh; background: var(--bg); color: var(--text);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  padding-bottom: 120px;                      /* Platz für die Hotbar */
}
a { color: var(--link); text-decoration: none; border-bottom: 2px solid transparent; }
a:hover { border-bottom-color: currentColor; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Kopfzeile ---------- */
.top {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px clamp(16px, 5vw, 64px);
  background: var(--bg-2);
  border-bottom: 4px solid var(--outline);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); border: 0; }
.brand:hover { border: 0; color: var(--text); }
.brand img { width: 36px; height: 36px; image-rendering: pixelated; display: block; }
.brand b { font: 700 22px/1 var(--font-pixel); letter-spacing: .06em; text-transform: uppercase; }
.brand b i { font-style: normal; color: var(--accent); }
.top .spacer { flex: 1; }

/* ---------- Bevel-Elemente ---------- */
.bevel {
  background: var(--surface);
  box-shadow:
    inset 4px 4px 0 var(--bevel-light),
    inset -4px -4px 0 var(--bevel-dark),
    0 0 0 4px var(--outline);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px/1 var(--font-pixel); letter-spacing: .04em; text-transform: uppercase;
  padding: 12px 18px; cursor: pointer; color: var(--text); border: 0;
  background: var(--surface-2);
  box-shadow: inset 3px 3px 0 var(--bevel-light), inset -3px -3px 0 var(--bevel-dark), 0 0 0 3px var(--outline);
  margin: 3px;
}
.btn:hover { background: var(--bg-2); color: var(--text); border: 0; }
.btn:active { box-shadow: inset 3px 3px 0 var(--bevel-dark), inset -3px -3px 0 var(--bevel-light), 0 0 0 3px var(--outline); transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink);
  box-shadow: inset 3px 3px 0 var(--accent-light), inset -3px -3px 0 var(--accent-strong), 0 0 0 3px var(--outline); }
.btn-primary:hover { background: var(--accent-light); color: var(--accent-ink); }
.btn-small { padding: 9px 12px; font-size: 13px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 84px) clamp(16px, 5vw, 64px) 0; max-width: 1040px; margin: 0 auto; }
.eyebrow { font: 600 13px/1 var(--font-pixel); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin: 0 0 18px; }
h1 { font: 700 clamp(34px, 6vw, 60px)/1.05 var(--font-pixel); letter-spacing: .01em; margin: 0 0 22px; text-wrap: balance; }
h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: clamp(17px, 2vw, 19px); color: var(--muted); max-width: 62ch; margin: 0 0 28px; }
.ores { display: flex; gap: 10px; margin: 0 0 28px; }
.ores span { width: 24px; height: 24px; display: block;
  box-shadow: inset 4px 4px 0 rgba(255,255,255,.35), inset -4px -4px 0 rgba(0,0,0,.35), 0 0 0 3px var(--outline); }
.ores .e { background: var(--emerald); } .ores .g { background: var(--gold); } .ores .d { background: var(--diamond); }
.ores .r { background: var(--redstone); } .ores .a { background: var(--amethyst); }

/* Rasen-Kante unter dem Hero */
.grass { height: 32px; margin: 56px 0 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='32' shape-rendering='crispEdges'%3E%3Crect width='64' height='32' fill='%238b5a2b'/%3E%3Crect width='64' height='12' fill='%235aa83b'/%3E%3Crect y='12' width='64' height='4' fill='%234a8c30'/%3E%3Cg fill='%2376c24f'%3E%3Crect x='4' y='0' width='8' height='4'/%3E%3Crect x='28' y='4' width='8' height='4'/%3E%3Crect x='48' y='0' width='8' height='4'/%3E%3C/g%3E%3Cg fill='%236b4423'%3E%3Crect x='8' y='20' width='8' height='4'/%3E%3Crect x='36' y='24' width='8' height='4'/%3E%3Crect x='52' y='18' width='4' height='4'/%3E%3C/g%3E%3Cg fill='%239c6a38'%3E%3Crect x='24' y='20' width='4' height='4'/%3E%3Crect x='44' y='16' width='4' height='4'/%3E%3Crect x='4' y='26' width='4' height='4'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 64px 32px; image-rendering: pixelated; border-top: 4px solid var(--outline); border-bottom: 4px solid var(--outline); }

/* ---------- Inhalt ---------- */
.wrap { max-width: 820px; margin: 0 auto; padding: 48px clamp(16px, 5vw, 40px) 40px; }
section { scroll-margin-top: 24px; margin: 0 0 56px; }
h2 { font: 700 clamp(24px, 3.4vw, 32px)/1.15 var(--font-pixel); margin: 0 0 18px; display: flex; align-items: center; gap: 14px; }
h2 .n { flex: none; display: inline-grid; place-items: center; width: 42px; height: 42px; font-size: 22px;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: inset 4px 4px 0 var(--accent-light), inset -4px -4px 0 var(--accent-strong), 0 0 0 3px var(--outline); }
h3 { font: 700 18px/1.2 var(--font-pixel); letter-spacing: .02em; margin: 26px 0 8px; color: var(--accent); }
p { margin: 0 0 14px; }
ul, ol { padding-left: 22px; margin: 0 0 14px; }
li { margin-bottom: 8px; }
li::marker { color: var(--accent); font-weight: 700; }
strong { color: var(--text); }
code, kbd { font: 14px var(--font-mono); background: var(--code-bg); padding: 2px 7px; box-shadow: 0 0 0 2px var(--outline); margin: 0 2px; word-break: break-word; }
kbd { display: inline-block; min-width: 26px; text-align: center; padding: 3px 8px; background: var(--surface-2);
  box-shadow: inset 2px 2px 0 var(--bevel-light), inset -2px -2px 0 var(--bevel-dark), 0 0 0 2px var(--outline); font-weight: 700; }

/* Adress-Karte */
.box { padding: 22px 24px; margin: 8px 4px 22px; }
.box .row { margin: 0 0 10px; }
.box .row:last-child { margin: 0; }
.copy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 12px; }
.copy code { flex: 1 1 260px; padding: 12px 14px; font-size: 17px; background: var(--code-bg); }
.copy code.big { font: 700 clamp(22px, 4vw, 30px)/1.2 var(--font-pixel); color: var(--accent); letter-spacing: .03em; }
.k { color: var(--muted); }

/* Hinweis-Boxen als "Advancement-Toast" */
.toast { display: flex; gap: 14px; padding: 14px 18px; margin: 18px 4px; background: var(--surface-2);
  box-shadow: inset 4px 4px 0 var(--bevel-light), inset -4px -4px 0 var(--bevel-dark), 0 0 0 4px var(--outline); }
.toast::before { content: ""; flex: none; width: 28px; height: 28px; margin-top: 2px; background: var(--gold);
  box-shadow: inset 4px 4px 0 rgba(255,255,255,.45), inset -4px -4px 0 rgba(0,0,0,.3), 0 0 0 3px var(--outline); }
.toast.info::before { background: var(--diamond); }
.toast.warn::before { background: var(--redstone); }
.toast p { margin: 0; } .toast p + p { margin-top: 8px; }

/* Tabellen (Tasten) */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; margin: 8px 0 18px; }
.tbl th, .tbl td { text-align: left; padding: 10px 14px; vertical-align: top; }
.tbl thead th { font: 700 13px var(--font-pixel); letter-spacing: .1em; text-transform: uppercase; background: var(--surface-2); color: var(--accent); }
.tbl tbody tr { background: var(--surface); }
.tbl tbody tr:nth-child(even) { background: var(--bg-2); }
.tbl { box-shadow: 0 0 0 4px var(--outline); }
.scroll-x { overflow-x: auto; padding: 4px; margin: 0 -4px; }

/* Mod-Karten */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin: 12px 4px 20px; }
.card { padding: 16px 16px 14px; }
.card h4 { font: 700 16px/1.2 var(--font-pixel); margin: 0 0 6px; color: var(--text); }
.card p { font-size: 14px; color: var(--muted); margin: 0; }
.tag { display: inline-block; font: 600 11px/1 var(--font-pixel); letter-spacing: .12em; text-transform: uppercase; padding: 4px 6px; margin: 0 0 8px; color: #07080a; }
.tag.perf { background: var(--emerald); } .tag.look { background: var(--diamond); }
.tag.qol { background: var(--gold); } .tag.lib { background: #9aa4b0; } .tag.srv { background: var(--amethyst); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 14px; color: var(--muted); margin: 0 0 8px; }

/* Resource-Pack-Reihenfolge (Stapel) */
.stack { list-style: none; padding: 0; margin: 12px 4px 20px; display: grid; gap: 8px; counter-reset: s; }
.stack li { counter-increment: s; margin: 0; padding: 10px 14px; display: flex; gap: 12px; align-items: baseline;
  background: var(--surface); box-shadow: inset 3px 3px 0 var(--bevel-light), inset -3px -3px 0 var(--bevel-dark), 0 0 0 3px var(--outline); }
.stack li::before { content: counter(s); font: 700 15px var(--font-pixel); color: var(--accent); min-width: 18px; }
.stack li small { color: var(--muted); }

/* ---------- Hotbar-Navigation ---------- */
.hotbar { position: fixed; z-index: 50; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: grid; grid-template-columns: repeat(9, 1fr); gap: 0; width: min(630px, calc(100vw - 20px));
  background: #3a3a3a; padding: 4px; box-shadow: inset 0 0 0 3px #1b1b1b, 0 0 0 4px #000, 0 10px 30px rgba(0,0,0,.5); }
.slot { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; margin: 0; padding: 0;
  background: #8b8b8b; color: #fff; border: 0; text-align: center;
  box-shadow: inset 3px 3px 0 #373737, inset -3px -3px 0 #ffffff; }
.slot:hover { background: #a8a8a8; border: 0; color: #fff; }
.slot .no { position: absolute; top: 3px; left: 5px; font: 700 11px/1 var(--font-pixel); color: #fff; text-shadow: 1px 1px 0 #3f3f3f; }
.slot .ic { width: 55%; height: 55%; image-rendering: pixelated; }
.slot .lb { position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  font: 600 13px/1 var(--font-pixel); background: #100010; color: #fff; padding: 7px 10px; opacity: 0;
  box-shadow: 0 0 0 2px #2d0a63, inset 0 0 0 1px #5000aa; }
.slot:hover .lb, .slot:focus-visible .lb { opacity: 1; }
.slot.active { z-index: 2; box-shadow: inset 3px 3px 0 #373737, inset -3px -3px 0 #fff, 0 0 0 4px #fff, 0 0 0 7px #000; }
@media (max-width: 520px) { .slot .no { font-size: 9px; top: 2px; left: 3px; } .hotbar { bottom: 8px; } }

footer { max-width: 820px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 40px) 24px; text-align: center; color: var(--muted); font-size: 14px; }
footer b { font-family: var(--font-pixel); letter-spacing: .08em; text-transform: uppercase; color: var(--text); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn:active { transform: none; } }
@media (max-width: 640px) {
  .box { padding: 18px 16px; }
  .tbl th, .tbl td { padding: 9px 10px; }
  h2 .n { width: 36px; height: 36px; font-size: 19px; }
}
