/* Blokker.no – shared styles. The look borrows from Minecraft's own menus: a dark dirt background,
   grey GUI panels with pixel bevels, pixel-font headings with a hard text shadow. */

:root {
  --blue: #2e9ac4;
  --blue-dark: #1f6f93;
  --gui: #c6c6c6;
  --ink: #262626;
  --ink-soft: #4b4b4b;
  --text-shadow: #3f3f3f;
  --pixel: "Pixelify Sans", ui-monospace, monospace;
  --body: Montserrat, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  color: #efe7dc;
  background-color: #2b2017;
  /* --tex-dirt is a generated pixel texture (site.js) */
  background-image: linear-gradient(rgba(22, 14, 8, .66), rgba(22, 14, 8, .66)), var(--tex-dirt, none);
  background-size: auto, 64px 64px;
  image-rendering: pixelated;
}
img { max-width: 100%; }
p { margin: 0 0 14px; }
a { color: #ffe066; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }

/* ---------- pixel icons (rendered by site.js into [data-px]) */
[data-px] { display: inline-block; line-height: 0; }
[data-px] svg { width: 100%; height: 100%; display: block; }

/* ---------- headings in the Minecraft style */
.mc-title, h2 {
  font-family: var(--pixel);
  font-weight: 600;
  color: #fff;
  letter-spacing: .02em;
}
h2 {
  margin: 0 0 14px;
  font-size: 2rem;
  line-height: 1.2;
  text-shadow: 3px 3px 0 var(--text-shadow);
}

/* ---------- header */
.site-header { background: var(--blue); }
.brand { display: block; width: fit-content; margin: 0 auto; }
.brand img {
  display: block;
  width: min(400px, 78vw);
  height: auto;
  padding: 24px 0 6px;
}
.sub .brand img { width: min(280px, 66vw); padding-top: 18px; }
.site-header nav ul {
  list-style: none;
  margin: 0 auto;
  padding: 0 16px 4px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 26px;
}
.site-header nav a {
  display: block;
  padding: 8px 0;
  font-family: var(--pixel);
  font-size: 1.15rem;
  color: #fff;
  text-decoration: none;
  text-shadow: 2px 2px 0 rgba(23, 59, 77, .55);
}
.site-header nav a:hover { color: #ffe066; }
.site-header nav a[aria-current="page"] { color: #ffe066; }

/* ---------- pixel landscape (canvas behind the top of the page) */
.world-host { position: relative; overflow: hidden; background: linear-gradient(var(--blue) 0%, #58b4da 50%, #93d2eb 100%); }
.world-host > canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.world-host > .wrap { position: relative; }

.hero { padding: 28px 0 310px; }
.page-hero { padding: 24px 0 140px; }
.mc-title {
  margin: 0 0 6px;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  line-height: 1.1;
  text-shadow: 4px 4px 0 var(--blue-dark);
}
.page-hero .mc-title { font-size: clamp(2rem, 5vw, 2.8rem); }
.lead { margin: 0 0 22px; max-width: 36em; font-size: 1.12rem; color: #fff; text-shadow: 1px 1px 0 rgba(23, 59, 77, .4); }
.page-hero .lead { margin: 0; }

/* The server as it looks in Minecraft's multiplayer list */
.serverlist {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 4px 12px;
  max-width: 640px;
  padding: 6px;
  background: rgba(0, 0, 0, .62);
  border: 2px solid #9a9a9a;
  font-family: var(--pixel);
  font-size: 1.05rem;
  line-height: 1.35;
  color: #fff;
}
.srv-icon { width: 64px; height: 64px; }
.srv-name { margin-top: 2px; }
.motd .r { color: #ff5555; }
.motd .g { color: #aaa; }
.motd .d { color: #8a8a8a; }
.srv-side { display: flex; align-items: flex-start; gap: 8px; margin-top: 2px; color: #aaa; white-space: nowrap; }
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; }
.bars i { width: 3px; background: #4a4a4a; }
.bars i:nth-child(1) { height: 4px; }
.bars i:nth-child(2) { height: 7px; }
.bars i:nth-child(3) { height: 10px; }
.bars i:nth-child(4) { height: 13px; }
.bars i:nth-child(5) { height: 16px; }
[data-state="on"] .bars i { background: #55ff55; box-shadow: 1px 1px 0 #157215; }
[data-state="off"] .bars i { background: #ff5555; height: 4px; }

.addr {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 14px;
  color: #fff;
  font-family: var(--pixel);
  font-size: 1.1rem;
  text-shadow: 2px 2px 0 rgba(23, 59, 77, .5);
}
.addr code {
  font-family: var(--pixel);
  font-size: 1.25rem;
  background: rgba(0, 0, 0, .4);
  padding: 2px 10px;
  text-shadow: none;
}

/* ---------- Minecraft buttons */
.mc-btn {
  display: inline-block;
  padding: 7px 18px 9px;
  border: 2px solid #111;
  background: #727272;
  box-shadow: inset 2px 2px 0 #a9a9a9, inset -2px -3px 0 #4a4a4a;
  color: #fff;
  font-family: var(--pixel);
  font-size: 1.1rem;
  line-height: 1.2;
  text-decoration: none;
  text-shadow: 2px 2px 0 var(--text-shadow);
  cursor: pointer;
}
.mc-btn:hover { background: #7e8cc8; box-shadow: inset 2px 2px 0 #c0caf7, inset -2px -3px 0 #4d5b96; color: #ffffa0; }
.mc-btn.small { padding: 3px 12px 5px; font-size: .95rem; }

/* ---------- sections and GUI panels */
section { padding-top: 44px; }
.panel {
  background: var(--gui);
  color: var(--ink);
  border: 3px solid #111;
  box-shadow: inset 3px 3px 0 #fff, inset -3px -3px 0 #555;
  padding: 24px 28px;
}
.panel a { color: #17577a; font-weight: 600; }
.panel h3 {
  margin: 0 0 6px;
  font-family: var(--pixel);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
  color: #3f3f3f;
}
.panel p:last-child, .panel ul:last-child, .panel ol:last-child { margin-bottom: 0; }
.panel code { background: #a9a9a9; color: #1e1e1e; padding: 1px 5px; font-size: .9em; white-space: nowrap; }
.panel + .panel { margin-top: 16px; }
.cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; align-items: start; }
.note { color: var(--ink-soft); font-size: .9rem; }
.on-dirt { color: #d9cfc2; max-width: 44em; }

/* square bullets */
.bullets { list-style: none; padding: 0; margin: 0 0 14px; }
.bullets li { position: relative; padding-left: 22px; margin-bottom: 8px; }
.bullets li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 8px; height: 8px; background: #3f8a2c; box-shadow: 2px 2px 0 #24552a; }

/* numbered steps */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 16px; }
.steps li { counter-increment: step; position: relative; padding-left: 46px; margin-bottom: 14px; min-height: 32px; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: #8b8b8b;
  box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #fff;
  color: #fff;
  font-family: var(--pixel);
  font-size: 1.1rem;
  text-shadow: 2px 2px 0 var(--text-shadow);
}

/* inventory slots with an item beside them */
.slot {
  flex: none;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: #8b8b8b;
  box-shadow: inset 3px 3px 0 #373737, inset -3px -3px 0 #fff;
}
.slot [data-px] { width: 32px; height: 32px; }
.items { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 32px; }
.item { display: flex; gap: 14px; align-items: flex-start; }
.item h3 { font-size: 1.15rem; margin-bottom: 2px; }
.item p { margin: 0; font-size: .95rem; color: var(--ink-soft); }

/* chat lines as in the game */
.mc-line {
  display: block;
  padding: 3px 8px;
  background: rgba(0, 0, 0, .78);
  color: #fff;
  font-family: var(--pixel);
  font-size: 1rem;
  white-space: nowrap;
}
.roles { width: 100%; border-collapse: collapse; }
.roles td { padding: 10px 0; vertical-align: middle; border-top: 2px solid #a9a9a9; }
.roles tr:first-child td { border-top: 0; }
.roles td:first-child { width: 270px; padding-right: 20px; }
.roles b { font-family: var(--pixel); font-size: 1.15rem; font-weight: 600; color: #3f3f3f; margin-right: 6px; }

/* ---------- Discord example */
.bridge { display: grid; grid-template-columns: 1fr 40px 1fr; }
.pane { display: flex; flex-direction: column; border: 3px solid #111; }
.pane-title { padding: 6px 12px; font-size: .82rem; font-weight: 600; letter-spacing: .04em; }
.pane .log { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; }
.pane.game {
  background:
    linear-gradient(rgba(0, 0, 0, .25), rgba(0, 0, 0, .25)),
    repeating-conic-gradient(#5a8f3a 0 25%, #4f8233 0 50%) 0 0 / 24px 24px;
}
.pane.game .pane-title { background: rgba(0, 0, 0, .55); color: #fff; font-family: var(--pixel); font-size: .95rem; }
.pane.game .log { padding: 10px; gap: 3px; }
.pane.game .msg, .filter-chat .msg { background: rgba(0, 0, 0, .55); color: #fff; font-family: var(--pixel); font-size: 1rem; padding: 2px 8px; }
.pane.game .msg.join { color: #ffff55; }
.badge-discord { color: #8c96ff; }
.sep { color: #777; }
.pane.dc { background: #313338; color: #dbdee1; }
.pane.dc .pane-title { background: #2b2d31; color: #f2f3f5; }
.pane.dc .log { padding: 12px 14px; gap: 12px; }
.dc-msg { display: flex; gap: 10px; font-size: .92rem; }
.dc-msg .av { width: 36px; height: 36px; flex: none; border-radius: 50%; overflow: hidden; background: #1e1f22; }
.dc-msg .av [data-px] { width: 100%; height: 100%; }
.dc-msg .who { font-weight: 600; color: #f2f3f5; }
.dc-msg .tag { margin-left: 4px; padding: 0 4px; border-radius: 3px; background: #5865f2; color: #fff; font-size: .62rem; font-weight: 700; vertical-align: 2px; }
.dc-msg .body { line-height: 1.45; }
.arrows { display: grid; place-items: center; color: #d9cfc2; font-family: var(--pixel); font-size: 1.6rem; }
.caption { margin-top: 8px; font-size: .85rem; color: #b3a898; }

.cmds { width: 100%; border-collapse: collapse; }
.cmds td { padding: 8px 0; border-top: 2px solid #a9a9a9; vertical-align: top; }
.cmds tr:first-child td { border-top: 0; }
.cmds td:first-child { width: 90px; }

/* ---------- Trygghet */
.terms { margin: 0; }
.terms dt { font-family: var(--pixel); font-size: 1.15rem; font-weight: 600; color: #3f3f3f; }
.terms dd { margin: 0 0 14px; }
.terms dd:last-child { margin-bottom: 0; }
.filter-chat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px;
  border: 3px solid #111;
  background:
    linear-gradient(rgba(0, 0, 0, .3), rgba(0, 0, 0, .3)),
    repeating-conic-gradient(#7d7d7d 0 25%, #737373 0 50%) 0 0 / 24px 24px;
}
.filter-chat .msg.block { color: #ff5555; }
.filter-chat .msg.flag { color: #ffff55; }
.contact { background: #b5b5b5; box-shadow: inset 2px 2px 0 #8b8b8b, inset -2px -2px 0 #e0e0e0; padding: 16px 18px; }
.faq details { border-top: 2px solid #a9a9a9; }
.faq details:first-of-type { border-top: 0; }
.faq summary { cursor: pointer; padding: 12px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--pixel); font-size: 1.4rem; line-height: 1; color: #3f3f3f; }
.faq details[open] summary::after { content: "-"; }
.faq details > p { margin: 0 0 14px; color: var(--ink-soft); }

/* ---------- Regler: an open Minecraft book */
.book {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 10px;
  background: #6b4220;
  border: 3px solid #111;
  box-shadow: inset 3px 3px 0 #8b5a2b, inset -3px -3px 0 #4a2c14;
}
.page {
  position: relative;
  padding: 34px 30px 26px;
  background: #fbf3df;
  color: #3b2a14;
  box-shadow: inset -3px -3px 0 #e6d6b0;
}
.page-no { position: absolute; top: 10px; right: 16px; font-family: var(--pixel); font-size: .9rem; color: #9b8a6a; }
.page ol { margin: 0; padding: 0; list-style: none; }
.page li { display: flex; gap: 12px; margin-bottom: 16px; }
.page li:last-child { margin-bottom: 0; }
.page .n { flex: none; width: 22px; font-family: var(--pixel); font-size: 1.3rem; line-height: 1.3; color: #a0522d; }
.page code { background: #eadfc2; padding: 1px 5px; font-size: .9em; }

/* ---------- footer */
.site-footer {
  margin-top: 64px;
  background-color: #1a1a1a;
  background-image: linear-gradient(rgba(0, 0, 0, .45), rgba(0, 0, 0, .45)), var(--tex-bedrock, none);
  background-size: auto, 64px 64px;
  border-top: 3px solid #111;
  color: #bdbdbd;
  font-size: .9rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-top: 26px; padding-bottom: 26px; }
.site-footer img { width: 120px; height: auto; display: block; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-family: var(--pixel); font-size: 1.05rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: #ffe066; }
.site-footer .legal { margin: 0 0 0 auto; }

/* ---------- smaller screens */
@media (max-width: 760px) {
  .cols, .items, .book { grid-template-columns: 1fr; }
  .roles td { display: block; width: auto !important; padding: 4px 0; border: 0; }
  .roles tr { display: block; padding: 10px 0; border-top: 2px solid #a9a9a9; }
  .roles tr:first-child { border-top: 0; }
  .site-footer .legal { margin-left: 0; }
}
@media (max-width: 640px) {
  .site-header nav ul { gap: 0 12px; padding: 0 8px 4px; }
  .site-header nav a { font-size: .98rem; }
  .panel { padding: 20px 18px; }
  .bridge { grid-template-columns: 1fr; }
  .arrows { padding: 4px 0; transform: rotate(90deg); }
  .serverlist { grid-template-columns: 48px 1fr; font-size: .95rem; }
  .srv-icon { width: 48px; height: 48px; }
  .srv-side { grid-column: 2; }
  .page { padding: 30px 20px 22px; }
  h2 { font-size: 1.7rem; }
}
