/* Eternal Realms SMP — dark, modern, a little bit blocky. */

:root {
  --bg: #0b0f14;
  --bg-soft: #101720;
  --card: #131c27;
  --card-edge: #1f2c3b;
  --text: #e8eef4;
  --muted: #8fa1b3;
  --accent: #4ade80;
  --accent-strong: #22c55e;
  --accent-dim: rgba(74, 222, 128, 0.12);
  --danger: #f87171;
  --gold: #fbbf24;
  --radius: 8px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-pixel: 'Press Start 2P', monospace;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.bg-grid { display: none; }

.container {
  width: min(1100px, 100% - 2.5rem);
  margin-inline: auto;
}

main.container { flex: 1; padding-bottom: 4rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  background: var(--bg-soft);
  border: 1px solid var(--card-edge);
  padding: 0.1em 0.45em;
  border-radius: 6px;
  font-size: 0.9em;
}

.muted { color: var(--muted); font-size: 0.9rem; }

/* ---------------------------------------------------------------- nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--card-edge);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.7rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  color: var(--text);
  font-size: 1.05rem;
}
.brand:hover { text-decoration: none; }

.brand-block {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: linear-gradient(to bottom, #58b14c 0 45%, #6b4a2f 45% 100%);
  image-rendering: pixelated;
}
.brand-block-sm { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 6px; }

.nav-links { display: flex; gap: 0.25rem; flex: 1; }

.nav-links a {
  color: var(--muted);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.nav-links a.on { color: var(--accent); background: var(--accent-dim); }

.nav-user { display: flex; align-items: center; gap: 0.6rem; }
.username { font-weight: 600; font-size: 0.9rem; }
.inline-form { display: inline; }

/* ---------------------------------------------------------------- status pill */

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--card-edge);
  background: var(--bg-soft);
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}
.dot.online { background: var(--accent); }
.dot.offline { background: var(--danger); }
.dot-lg { width: 13px; height: 13px; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font: 600 0.95rem var(--font);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent-strong);
  color: #06130a;
}
.btn-primary:hover { background: var(--accent); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--card-edge);
}
.btn-ghost:hover { border-color: var(--muted); background: var(--bg-soft); }

.btn-danger { background: transparent; color: var(--danger); border-color: rgba(248, 113, 113, 0.35); }
.btn-danger:hover { background: rgba(248, 113, 113, 0.12); }

.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.85rem; }
.btn-block { width: 100%; }

.link-danger {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--danger); font: inherit; font-size: 0.85rem;
}
.link-danger:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- hero */

.hero { text-align: center; padding: 5rem 0 3rem; }

.hero-kicker {
  color: var(--accent);
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin: 0 0 1.2rem;
}

.hero-title {
  font-family: var(--font-pixel);
  font-size: clamp(1.6rem, 5.5vw, 3rem);
  margin: 0 0 1rem;
  line-height: 1.3;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.6);
}

.hero-tagline { color: var(--muted); font-size: 1.15rem; margin: 0 0 2.2rem; }

.hero-actions {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.ip-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.2rem;
  border-radius: 10px;
  border: 1px dashed rgba(74, 222, 128, 0.5);
  background: var(--accent-dim);
  color: var(--accent);
  font: 600 1rem 'Consolas', monospace;
  cursor: pointer;
  transition: all 0.15s;
}
.ip-chip:hover { border-style: solid; }

.ip-copied {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--accent-strong);
  color: #06130a;
  border-radius: 9px;
  font-family: var(--font);
}
.ip-chip.copied .ip-copied { display: flex; }

/* ---------------------------------------------------------------- cards & sections */

.card {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  padding: 1.4rem;
}

.card-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.7rem;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

.status-line { display: flex; align-items: center; gap: 0.6rem; }
.status-big { font-size: 1.5rem; font-weight: 800; }
.motd { font-size: 1.05rem; white-space: pre-wrap; }
.motd-row { display: flex; align-items: center; gap: 0.9rem; }
.server-icon {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  image-rendering: pixelated;
  flex-shrink: 0;
  border: 1px solid var(--card-edge);
}

.player-heads { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.7rem; }
.player-heads img { width: 32px; height: 32px; border-radius: 6px; image-rendering: pixelated; }
.player-heads .head-wrap { position: relative; }

.section { margin: 3.5rem 0; }
.section-title { font-size: 1.5rem; font-weight: 800; margin: 0 0 1.2rem; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-head .section-title { margin: 0; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 0.7rem;
}

.feature {
  transition: border-color 0.15s;
  color: var(--text);
  display: block;
  padding: 1rem 1.1rem;
}
.feature:hover { border-color: var(--accent); text-decoration: none; }
.feature-icon-img { image-rendering: pixelated; margin-bottom: 0.35rem; display: block; }
.feature h3 { font-size: 0.98rem; margin: 0 0 0.3rem; }
.feature p { font-size: 0.84rem; line-height: 1.45; margin: 0; color: var(--muted); }

/* anchor targets scroll clear of the sticky nav */
[id] { scroll-margin-top: 80px; }
.feature-icon { font-size: 1.8rem; margin-bottom: 0.4rem; }
.feature h3 { margin: 0 0 0.3rem; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.empty { text-align: center; color: var(--muted); padding: 2.2rem; }
.center-note { text-align: center; margin-top: 1.2rem; }
.center { text-align: center; }

/* ---------------------------------------------------------------- lists (forum) */

.list { padding: 0.4rem; }

.list-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  color: var(--text);
}
.list-row:hover { background: var(--bg-soft); text-decoration: none; }
.list-row + .list-row { border-top: 1px solid var(--card-edge); }

.list-main { flex: 1; min-width: 0; }
.list-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.list-side { text-align: right; font-size: 0.85rem; flex-shrink: 0; }

.avatar { width: 40px; height: 40px; border-radius: 8px; image-rendering: pixelated; flex-shrink: 0; }
.avatar-sm { width: 26px; height: 26px; border-radius: 6px; }
.avatar-lg { width: 56px; height: 56px; border-radius: 10px; }

.cat-icon { font-size: 1.6rem; width: 40px; text-align: center; flex-shrink: 0; }

.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  vertical-align: 2px;
}
.tag-admin { background: rgba(251, 191, 36, 0.15); color: var(--gold); }
.tag-pin { background: var(--accent-dim); color: var(--accent); }
.tag-lock { background: rgba(248, 113, 113, 0.14); color: var(--danger); }

/* ---------------------------------------------------------------- pages & forms */

.page-head { padding: 2.5rem 0 1.5rem; }
.page-head h1 { margin: 0 0 0.3rem; font-size: 2rem; }
.page-head p { margin: 0; }
.breadcrumb { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.8rem; }

.rules ol { margin: 0; padding-left: 1.4rem; display: grid; gap: 0.9rem; }

.map-frame { padding: 0.5rem; overflow: hidden; }
.map-frame iframe {
  display: block;
  width: 100%;
  height: min(72vh, 720px);
  border: 0;
  border-radius: 10px;
  background: var(--bg-soft);
}
.map-hint { margin-top: 0.8rem; }

.auth-wrap { display: grid; place-items: center; padding: 4rem 0; }
.auth-card { width: min(420px, 100%); padding: 2rem; }
.auth-card h1 { margin: 0 0 0.3rem; font-size: 1.5rem; }
.auth-alt { margin: 1.2rem 0 0; text-align: center; }

form label { display: block; font-weight: 600; font-size: 0.9rem; margin: 1rem 0; }

input, textarea {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--card-edge);
  background: var(--bg-soft);
  color: var(--text);
  font: 400 0.95rem var(--font);
  resize: vertical;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.alert {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: var(--danger);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
}

.form-card { max-width: 760px; }
.form-actions { display: flex; gap: 0.7rem; margin-top: 1.2rem; }

/* ---------------------------------------------------------------- thread view */

.thread-title { font-size: 1.6rem; margin: 0; }
.mod-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.posts { display: grid; gap: 0.9rem; margin-bottom: 1.5rem; }

.post { display: flex; gap: 1.2rem; }

.post-author {
  flex-shrink: 0;
  width: 90px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.post-author-name { font-weight: 700; font-size: 0.85rem; word-break: break-all; }

.post-main { flex: 1; min-width: 0; }
.post-meta { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.5rem; }
.post-delete { margin-left: auto; }
.post-body { white-space: pre-wrap; overflow-wrap: break-word; }

.reply-card { max-width: none; }

/* ---------------------------------------------------------------- getting started guide */

.guide { display: grid; gap: 1rem; max-width: 820px; }

.guide-step h2 {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.95rem;
  flex-shrink: 0;
}

.guide-step p, .guide-step ol, .guide-step ul { margin: 0.4rem 0; }
.guide-step ol, .guide-step ul { padding-left: 1.3rem; display: grid; gap: 0.35rem; }

.table-scroll { overflow-x: auto; }
.cmd-table { border-collapse: collapse; width: 100%; }
.cmd-table td { padding: 0.45rem 0.6rem; border-top: 1px solid var(--card-edge); vertical-align: top; }
.cmd-table tr:first-child td { border-top: 0; }
.cmd-table td:first-child { white-space: nowrap; }

/* ---------------------------------------------------------------- crafting guide */

.recipes { display: grid; gap: 1rem; }

.recipe {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.recipe-info { flex: 1; min-width: 240px; }
.recipe-info h2 { margin: 0 0 0.4rem; font-size: 1.2rem; }
.recipe-info p { margin: 0.3rem 0; }
.recipe-tiers { margin: 0.3rem 0; padding-left: 1.2rem; }
.recipe-tiers li { margin: 0.15rem 0; }

.recipe-board {
  position: relative;
  width: min(420px, 100%);
  flex-shrink: 0;
}
.recipe-board img {
  width: 100%;
  height: auto;
  display: block;
  image-rendering: pixelated;
  border-radius: 8px;
}

/* invisible hover zones over each slot in the recipe image */
.rslot { position: absolute; }
.rslot:hover { background: rgba(255, 255, 255, 0.45); }

/* the Minecraft item tooltip */
#mc-tooltip {
  position: fixed;
  z-index: 1000;
  display: none;
  pointer-events: none;
  background: rgba(16, 0, 16, 0.95);
  border: 2px solid;
  border-image: linear-gradient(rgba(80, 0, 255, 0.55), rgba(40, 0, 127, 0.55)) 1;
  padding: 0.4rem 0.6rem;
  font-family: var(--font-pixel);
  font-size: 10px;
  line-height: 1.6;
  color: #ffffff;
  white-space: nowrap;
}
#mc-tooltip .mc-sub {
  display: block;
  color: #7f7fff;
  font-style: italic;
  font-size: 8px;
}

/* ---------------------------------------------------------------- feature pages */

.feature-hero {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.4rem;
}
.feature-hero-icon {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 10px;
  flex-shrink: 0;
}
.feature-hero-icon img { image-rendering: pixelated; }
.feature-hero h1 { margin: 0 0 0.2rem; font-size: 1.9rem; }
.feature-hero-tagline { margin: 0; color: var(--muted); font-style: italic; font-size: 1.05rem; }

.feature-detail { display: grid; gap: 1rem; max-width: 820px; }
.feature-section h2 { margin: 0 0 0.6rem; font-size: 1.15rem; color: var(--accent); }
.feature-section p, .feature-section ul, .feature-section ol { margin: 0.4rem 0; }
.feature-section ul, .feature-section ol { padding-left: 1.3rem; display: grid; gap: 0.35rem; }
.feature-recipe-img { width: min(420px, 100%); image-rendering: pixelated; border-radius: 8px; display: block; }
.feature-related { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* ---------------------------------------------------------------- dev log */

.devlog { display: grid; gap: 0.8rem; max-width: 860px; }

.devlog-date { margin-top: 1.2rem; }
.devlog-date:first-child { margin-top: 0; }
.devlog-date-label {
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.devlog-entry { padding: 1.1rem 1.3rem; }
.devlog-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.devlog-plugin { font-size: 1.05rem; }
.devlog-version { font-size: 0.8rem; }
.devlog-title { color: var(--muted); font-style: italic; }
.devlog-changes { margin: 0.6rem 0 0; padding-left: 1.3rem; display: grid; gap: 0.3rem; }
.devlog-changes li { color: var(--text); }

.devlog-tag-new { background: var(--accent-dim); color: var(--accent); }
.devlog-tag-update { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }
.devlog-tag-fix { background: rgba(251, 191, 36, 0.15); color: var(--gold); }

/* ---------------------------------------------------------------- profiles & walls */

.nav-profile { display: flex; align-items: center; gap: 0.6rem; color: var(--text); }
.nav-profile:hover { text-decoration: none; }
.nav-profile:hover .username { color: var(--accent); }

.profile-head { display: flex; gap: 1.6rem; align-items: center; }
.profile-body { image-rendering: pixelated; height: 150px; flex-shrink: 0; }
.profile-info h1 { margin: 0 0 0.2rem; font-size: 1.7rem; }
.profile-stats { display: flex; gap: 1.6rem; margin-top: 0.8rem; }
.profile-stats strong { font-size: 1.2rem; }

.post-author-name { color: var(--text); font-weight: 700; font-size: 0.85rem; word-break: break-all; }
.post-author-name:hover { color: var(--accent); text-decoration: none; }

.profile-tagline { margin: 0 0 0.3rem; font-style: italic; color: var(--text); opacity: 0.85; }
.profile-edit { margin-top: 0.9rem; display: inline-flex; }
.profile-bio { margin-top: 1rem; }
.member-tagline { font-style: italic; font-size: 0.82rem; opacity: 0.8; margin: -0.2rem 0 0.2rem; }
.accent-row { display: flex; align-items: center; gap: 0.8rem; margin-top: 0.4rem; }
.accent-row input[type=color] {
  width: 56px; height: 38px; padding: 2px;
  border: 1px solid var(--card-edge); border-radius: 8px; background: var(--bg-soft); cursor: pointer;
}
.alert-ok {
  background: var(--accent-dim);
  border: 1px solid rgba(74, 222, 128, 0.4);
  color: var(--accent);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}

.wall { display: grid; gap: 0.7rem; margin-top: 0.8rem; }
.wall-item { display: flex; gap: 0.9rem; padding: 1rem 1.2rem; }
.wall-main { flex: 1; min-width: 0; }
.wall-form { max-width: none; margin-bottom: 0.8rem; }
.wall-form label { margin: 0; }

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.member-card { text-align: center; color: var(--text); transition: border-color 0.15s; }
.member-card:hover { border-color: var(--accent); text-decoration: none; }
.member-avatar { width: 64px; height: 64px; border-radius: 10px; image-rendering: pixelated; margin-bottom: 0.5rem; }
.member-name { font-weight: 700; }

@media (max-width: 600px) {
  .profile-head { flex-direction: column; text-align: center; }
  .profile-stats { justify-content: center; }
}

/* ---------------------------------------------------------------- arcade */

.game-wrap { padding: 0.6rem; }

#game {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  image-rendering: pixelated;
  background: #0b0f14;
  cursor: crosshair;
}

.game-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.2rem 0.1rem;
  flex-wrap: wrap;
}

.hotbar { display: flex; gap: 0.35rem; }

.hotbar-slot {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  border: 2px solid var(--card-edge);
  background: var(--bg-soft);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.hotbar-slot canvas { width: 28px; height: 28px; image-rendering: pixelated; }
.hotbar-slot.sel { border-color: var(--accent); box-shadow: 0 0 10px rgba(74, 222, 128, 0.35); }
.hotbar-slot span {
  position: absolute;
  right: 3px;
  bottom: 1px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text);
  text-shadow: 1px 1px 0 #000;
}

.game-help {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  align-items: center;
  margin-top: 1rem;
  font-size: 0.92rem;
}
.game-help kbd {
  background: var(--bg-soft);
  border: 1px solid var(--card-edge);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0.05em 0.4em;
  font-size: 0.85em;
}

/* ---------------------------------------------------------------- footer */

.footer { border-top: 1px solid var(--card-edge); background: var(--bg-soft); }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.4rem 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.footer-credit { font-size: 0.82rem; opacity: 0.75; }
.footer-links { display: flex; gap: 1.1rem; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--accent); }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 760px) {
  .nav-inner { flex-wrap: wrap; gap: 0.6rem; }
  .nav-links { order: 3; width: 100%; overflow-x: auto; }
  .nav-user { margin-left: auto; }
  .status-pill .status-text { display: none; }
  .username { display: none; }
  .hero { padding: 3rem 0 2rem; }
  .post { flex-direction: column; gap: 0.7rem; }
  .post-author { flex-direction: row; width: auto; text-align: left; }
  .post-author .avatar-lg { width: 36px; height: 36px; }
  .list-side { display: none; }
}
