﻿/* Hollow SMP */

:root {
  --bg: #0f1115;
  --bg-2: #161a21;
  --surface: #1a1f28;
  --line: #2a3140;
  --text: #e6e8ee;
  --muted: #9aa3b5;
  --faint: #6d7689;
  --accent: #c9a227;
  --link: #d4b84a;
  --code-bg: #0c0e12;
  --max: 920px;
  --wide: 1080px;
  --font: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

/* Welcome background */
.page-welcome {
  position: relative;
  background: #0a0c10;
}

.welcome-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(10, 12, 16, 0.72) 0%, rgba(10, 12, 16, 0.82) 45%, rgba(10, 12, 16, 0.94) 100%),
    url("/assets/spawn-aerial.png") center / cover no-repeat;
  pointer-events: none;
}

.page-welcome .site-header,
.page-welcome .page,
.page-welcome .site-footer {
  position: relative;
  z-index: 1;
}

.page-welcome .site-header {
  background: rgba(10, 12, 16, 0.72);
}

.page-welcome .site-footer {
  background: rgba(10, 12, 16, 0.55);
  border-top-color: rgba(42, 49, 64, 0.7);
}

.welcome-panel {
  padding: 1.35rem 1.4rem 1.5rem;
  border: 1px solid rgba(42, 49, 64, 0.9);
  background: rgba(15, 17, 21, 0.78);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.welcome-panel h1 {
  margin: 0 0 0.85rem;
}

.welcome-panel .intro {
  margin-bottom: 1.5rem;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  word-break: break-word;
}

.wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.wrap.narrow {
  width: min(720px, calc(100% - 2rem));
}

.wrap.wide {
  width: min(var(--wide), calc(100% - 2rem));
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(15, 17, 21, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.header-inner {
  position: relative;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
}

.logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--bg-2);
  flex-shrink: 0;
}

.logo-text {
  line-height: 1;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
}

.nav a[aria-current="page"] {
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.1rem;
}

.nav-external {
  color: var(--accent) !important;
  border-bottom: 0 !important;
}

.menu-btn {
  display: none;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  border-radius: 6px;
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Page shell */
.page {
  flex: 1;
  padding: 2.75rem 0 3.5rem;
}

.page h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.85rem, 4vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.intro {
  margin: 0 0 2rem;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.05rem;
}

/* Welcome */
.welcome-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 2rem;
  align-items: start;
}

.prose p {
  margin: 0 0 1.1rem;
  color: var(--muted);
  max-width: 65ch;
}

.prose p:last-child {
  margin-bottom: 0;
}

.media-slot {
  min-height: 240px;
  border: 1px solid var(--line);
  background: rgba(12, 14, 18, 0.55);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 1.25rem;
}

.media-slot img {
  width: min(100%, 200px);
  height: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  display: block;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.footer-brand p {
  margin: 0;
}

/* Rules */
.rules-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin: 0 0 1.35rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.rules-toc a {
  color: var(--muted);
  font-size: 0.86rem;
  text-decoration: none;
}

.rules-toc a:hover {
  color: var(--text);
}

.rules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.rule-section {
  margin: 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  background: var(--bg-2);
}

.rule-section h2 {
  margin: 0 0 0.5rem;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.rule-section .tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(201, 162, 39, 0.35);
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
}

.rule-list {
  margin: 0;
  padding-left: 1.05rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.rule-list li {
  margin-bottom: 0.28rem;
}

.rule-list li:last-child {
  margin-bottom: 0;
}

.rule-list strong {
  color: var(--text);
  font-weight: 600;
}

.notice {
  border-left: 3px solid var(--accent);
  background: rgba(201, 162, 39, 0.06);
  padding: 0.75rem 0.9rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.notice strong {
  color: var(--text);
}

@media (max-width: 720px) {
  .rules-grid {
    grid-template-columns: 1fr;
  }
}

/* Wiki */
.wiki-layout {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.wiki-toc {
  position: sticky;
  top: 78px;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.toc-title {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.wiki-toc a {
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
  padding: 0.2rem 0;
}

.wiki-toc a:hover,
.wiki-toc a.active {
  color: var(--text);
}

.wiki-content {
  min-width: 0;
  border-left: 1px solid var(--line);
  padding-left: 1.75rem;
}

.wiki-block {
  padding: 0 0 2rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--line);
}

.wiki-block:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.wiki-block h2 {
  margin: 0 0 0.65rem;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.wiki-block h3 {
  margin: 1.2rem 0 0.45rem;
  font-size: 0.98rem;
  font-weight: 600;
}

.wiki-block p,
.wiki-block li {
  color: var(--muted);
}

.wiki-block p {
  margin: 0 0 0.85rem;
}

.wiki-block ol,
.wiki-block ul {
  margin: 0 0 0.85rem;
  padding-left: 1.2rem;
}

.wiki-block li {
  margin-bottom: 0.35rem;
}

.wiki-block strong {
  color: var(--text);
  font-weight: 600;
}

.address-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0 0 1.35rem;
}

.address-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  background: var(--bg-2);
}

.address-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
  min-width: 0;
}

.address-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--faint);
  min-width: 4.5rem;
}

.address-value {
  font-size: 0.95rem;
  color: var(--text);
}

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

.copy-btn {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.copy-btn.copied {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 520px) {
  .address-row {
    flex-direction: column;
    align-items: stretch;
  }

  .copy-btn {
    width: 100%;
  }
}

.plain-list {
  list-style: none;
  padding-left: 0 !important;
}

.plain-list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
}

.plain-list span {
  color: var(--faint);
  font-size: 0.9em;
}

.two-col {
  columns: 2;
  column-gap: 2rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cmd-table {
  width: 100%;
  min-width: 320px;
  border-collapse: collapse;
  margin: 0.5rem 0 1rem;
  font-size: 0.95rem;
}

.cmd-table th,
.cmd-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.75rem 0.65rem 0;
  border-bottom: 1px solid var(--line);
}

.cmd-table th {
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cmd-table td {
  color: var(--muted);
}

.muted {
  color: var(--faint) !important;
  font-size: 0.92rem;
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 1.25rem 0 1.5rem;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-inner p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Responsive */
@media (max-width: 860px) {
  .welcome-layout,
  .wiki-layout {
    grid-template-columns: 1fr;
  }

  .welcome-panel {
    padding: 1.1rem 1rem 1.2rem;
  }

  .media-slot {
    min-height: 200px;
    order: -1;
  }

  .wiki-toc {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.45rem 0.9rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
  }

  .wiki-content {
    border-left: 0;
    padding-left: 0;
  }

  .two-col {
    columns: 1;
  }
}

@media (max-width: 640px) {
  .menu-btn {
    display: inline-block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 58px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 0.75rem 0.85rem;
  }

  .nav a[aria-current="page"] {
    border-bottom: 0;
    background: rgba(201, 162, 39, 0.08);
  }

  .page {
    padding: 2rem 0 2.5rem;
  }

  .rule {
    padding: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
