/* Nexar-Life — Sci-Fi / Nexar Gaming */

:root {
  --bg-0: #04060a;
  --bg-1: #0a1018;
  --bg-2: #111c2a;
  --surface: rgba(10, 18, 30, 0.75);
  --border: rgba(56, 189, 248, 0.15);
  --border-bright: rgba(56, 189, 248, 0.4);
  --text: #e8f2fc;
  --text-muted: #7f9bb8;
  --accent: #38bdf8;
  --accent-2: #0ea5e9;
  --accent-glow: rgba(56, 189, 248, 0.35);
  --danger: #f87171;
  --success: #4ade80;
  --font-display: "Orbitron", system-ui, sans-serif;
  --font-body: "Rajdhani", system-ui, sans-serif;
  --mono: "Consolas", "Courier New", monospace;
  --radius: 6px;
  --radius-lg: 12px;
  --nav-h: 64px;
  --max-w: 1140px;
  --ease: 0.2s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
}

body {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-0);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 50% -5%, rgba(14, 165, 233, 0.18), transparent 55%),
    radial-gradient(ellipse 40% 30% at 100% 60%, rgba(2, 132, 199, 0.08), transparent),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 40%, var(--bg-0));
  pointer-events: none;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 55% at 50% 20%, black 20%, transparent 75%);
  pointer-events: none;
  z-index: -1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--ease);
}

a:hover {
  color: #7dd3fc;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.container {
  width: min(100% - 2rem, var(--max-w));
  margin-inline: auto;
}

/* —— Nav —— */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(4, 6, 10, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
  color: var(--text);
}

.brand img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 10px var(--accent-glow));
}

.brand span {
  background: linear-gradient(90deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.15rem;
}

.nav-links a {
  padding: 0.45rem 0.9rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius);
  transition: color var(--ease), background var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: rgba(56, 189, 248, 0.08);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.45rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--accent);
}

/* —— Buttons —— */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease);
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  color: #041018;
  background: linear-gradient(135deg, #7dd3fc, var(--accent-2));
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  color: #041018;
  box-shadow: 0 6px 28px var(--accent-glow);
}

.btn-outline {
  color: var(--accent);
  background: transparent;
  border-color: var(--border-bright);
}

.btn-outline:hover {
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.68rem;
}

/* —— Main —— */

main {
  padding-top: var(--nav-h);
}

/* —— Hero —— */

.hero {
  padding: 3.5rem 0 4rem;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}

.hero-meta {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.3rem 0.75rem;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.06);
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  margin-bottom: 0.75rem;
}

.hero-lead {
  color: var(--text-muted);
  max-width: 38ch;
  margin-bottom: 1.5rem;
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-logo {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-logo::before {
  content: "";
  position: absolute;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  filter: blur(28px);
  opacity: 0.7;
}

.hero-logo img {
  position: relative;
  width: min(260px, 42vw);
  filter: drop-shadow(0 12px 40px rgba(14, 165, 233, 0.35));
}

/* —— Sections —— */

.section {
  padding: 3.5rem 0;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section-header {
  margin-bottom: 1.75rem;
}

.section-header h2 {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

.section-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

/* —— Link list (sci-fi panels) —— */

.link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.link-list li {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(8px);
  transition: border-color var(--ease), box-shadow var(--ease);
}

.link-list li:hover {
  border-color: var(--border-bright);
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.08);
}

.link-list a {
  display: block;
  padding: 1rem 1.2rem 1rem 1.35rem;
  color: var(--text);
  text-decoration: none;
  border-left: 3px solid transparent;
  border-radius: var(--radius-lg);
  transition: border-color var(--ease);
}

.link-list a:hover {
  border-left-color: var(--accent);
  text-decoration: none;
  color: var(--text);
}

.link-list strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.link-list span {
  display: block;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* —— Cards (wiki grid fallback) —— */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.card {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  transition: border-color var(--ease), box-shadow var(--ease);
}

.card:hover {
  border-color: var(--border-bright);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.1);
}

.card h3 {
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.65rem;
}

.card-link {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* —— Server panel —— */

.server-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 1.5rem 1.75rem;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(4, 6, 10, 0.5));
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}

.server-panel h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.server-panel > div > p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.server-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.server-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  font-family: var(--mono);
  font-size: 0.88rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.server-chip button {
  padding: 0.15rem 0.45rem;
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.12);
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

.server-chip button:hover {
  background: rgba(56, 189, 248, 0.25);
}

.restart-label {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.restart-times {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.restart-times span {
  padding: 0.2rem 0.55rem;
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* —— Info boxes —— */

.info-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.info-box {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
}

.info-box h3 {
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.info-box p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

/* —— Page hero —— */

.page-hero {
  padding: 2.75rem 0 1.5rem;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: 0.5rem;
}

.page-hero p {
  color: var(--text-muted);
  max-width: 48ch;
  font-size: 1.05rem;
}

/* —— Regelwerk —— */

.rules-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  padding-bottom: 3.5rem;
  align-items: start;
}

.rules-toc {
  position: sticky;
  top: calc(var(--nav-h) + 1.25rem);
  max-height: calc(100vh - var(--nav-h) - 2.5rem);
  overflow-y: auto;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}

.rules-toc h2 {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.rules-toc ol {
  list-style: none;
}

.rules-toc li {
  margin-bottom: 0.2rem;
}

.rules-toc a {
  display: block;
  padding: 0.35rem 0.55rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  border-radius: 4px;
  transition: var(--ease);
}

.rules-toc a:hover,
.rules-toc a.active {
  color: var(--text);
  background: rgba(56, 189, 248, 0.08);
  border-left-color: var(--accent);
  text-decoration: none;
}

.rules-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 0.85rem 1.1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.rules-meta strong {
  color: var(--accent);
}

.rule-section {
  margin-bottom: 2.25rem;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: calc(var(--nav-h) + 12px);
}

.rule-section:last-child {
  border-bottom: none;
}

.rule-section h2 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.rule-section h3 {
  font-size: 0.95rem;
  margin: 1rem 0 0.4rem;
  color: var(--accent);
}

.rule-section p,
.rule-section li {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.rule-section ul,
.rule-section ol.rule-sublist {
  margin: 0.35rem 0 0.75rem 1.2rem;
}

.rule-section ol.rule-sublist li {
  margin-bottom: 0.45rem;
}

.rules-footer-note {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.rule-section strong {
  color: var(--text);
}

.rule-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
  font-size: 0.92rem;
}

.rule-table th,
.rule-table td {
  padding: 0.55rem 0.8rem;
  text-align: left;
  border: 1px solid var(--border);
}

.rule-table th {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.08);
}

.rule-table td {
  color: var(--text-muted);
}

.tag-allowed { color: var(--success); }
.tag-forbidden { color: var(--danger); }

.callout {
  padding: 0.9rem 1.1rem;
  margin: 1rem 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}

/* —— Wiki —— */

.wiki-search-wrap {
  max-width: 420px;
  margin-bottom: 1.5rem;
}

.wiki-search {
  width: 100%;
  padding: 0.65rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
}

.wiki-search:focus {
  border-color: var(--border-bright);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.wiki-search::placeholder {
  color: var(--text-muted);
}

.wiki-card-wrap.hidden {
  display: none;
}

.wiki-article {
  padding-bottom: 3.5rem;
}

.wiki-article .prose {
  max-width: 740px;
}

.wiki-article h2 {
  font-size: 1.15rem;
  margin: 1.75rem 0 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.wiki-article h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.wiki-article p,
.wiki-article li {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.wiki-article ul,
.wiki-article ol {
  margin: 0.35rem 0 0.75rem 1.2rem;
}

.wiki-article kbd {
  padding: 0.12rem 0.4rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid var(--border);
  border-radius: 3px;
}

.heist-block {
  margin: 1.5rem 0;
  padding: 1.35rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  scroll-margin-top: calc(var(--nav-h) + 12px);
}

.heist-block h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  font-size: 1.15rem;
}

.heist-tag {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.heist-block ol {
  margin: 0.35rem 0 0.75rem 1.2rem;
}

.heist-overview a {
  font-weight: 600;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

/* —— Footer —— */

.site-footer {
  margin-top: 1rem;
  padding: 2.5rem 0 1.5rem;
  border-top: 1px solid var(--border);
  background: rgba(4, 6, 10, 0.6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.footer-brand img {
  width: 48px;
  margin-bottom: 0.6rem;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.footer-brand p {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 28ch;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col a {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* —— Toast —— */

.toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  padding: 0.65rem 1.1rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.25s;
  z-index: 2000;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
}

/* —— Responsive —— */

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-lead {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-logo {
    order: -1;
  }

  .hero-logo img {
    width: 180px;
  }

  .server-panel {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .server-meta {
    justify-content: center;
  }

  .rules-layout {
    grid-template-columns: 1fr;
  }

  .rules-toc {
    position: static;
    max-height: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand p {
    margin-inline: auto;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 0.75rem;
    background: rgba(4, 6, 10, 0.97);
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s, opacity 0.25s;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    padding: 0.75rem;
    text-align: center;
  }
}
