:root {
  --bg: #0b0c0e;
  --panel: #15171a;
  --panel-2: #1b1e22;
  --line: #2b3036;
  --line-strong: #3a4149;
  --text: #f3f1ec;
  --muted: #a1a6ad;
  --muted-2: #777e87;
  --red: #d4382c;
  --red-hover: #ed493b;
  --amber: #e2a43b;
  --green: #51b979;
  --radius: 8px;
  --max-width: 1240px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  padding: 0 28px;
  background: rgba(11, 12, 14, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: max-content;
  font-weight: 800;
}

.brand-mark {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 5px;
  object-fit: cover;
}

.brand-text {
  font-size: 20px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #c9ccd1;
  font-size: 14px;
}

.nav-links a {
  position: relative;
  padding: 22px 0;
  transition: color 180ms ease;
}

.nav-links a:hover {
  color: #fff;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 14px;
  height: 2px;
  background: var(--red);
  transition: right 180ms ease;
}

.nav-links a:hover::after {
  right: 0;
}

.server-status {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #777;
  border-radius: 50%;
}

.server-status.online .status-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(81, 185, 121, 0.13);
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(750px, 88vh);
  margin-top: 68px;
  padding: 96px 28px 120px;
  overflow: hidden;
  background-image: url("/assets/ra2-lobby-screenshot.png");
  background-position: center;
  background-size: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: rgba(8, 9, 11, 0.76);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, var(--max-width));
  margin: 0 auto;
  transform: translateX(min(0px, calc((100vw - var(--max-width)) / 2)));
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--amber);
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.hero h1 {
  margin: 0;
  font-family: "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: clamp(54px, 8vw, 102px);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 650px;
  margin: 24px 0 0;
  color: #d8dade;
  font-size: clamp(17px, 2vw, 21px);
}

.hero-actions,
.release-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.button svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--red);
  color: #fff;
}

.button-primary:hover {
  background: var(--red-hover);
}

.button-secondary {
  color: #f1f1ee;
  background: rgba(18, 20, 23, 0.82);
  border-color: var(--line-strong);
}

.button-secondary:hover {
  border-color: #6c747d;
  background: #20242a;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 28px;
  color: #bfc3c9;
  font-size: 14px;
}

.hero-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-meta svg {
  width: 16px;
  height: 16px;
  color: var(--amber);
}

.hero-peek {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 13px;
}

.hero-peek strong {
  color: #fff;
  font-size: 16px;
}

.hero-peek span:first-child {
  color: var(--red-hover);
  font-weight: 800;
}

.section {
  width: min(var(--max-width), calc(100% - 56px));
  margin: 0 auto;
  padding: 86px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.section h2 {
  margin: 0;
  font-family: "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
}

.section-desc {
  margin: 0 0 8px;
  color: var(--muted);
}

.latest-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  color: #fff;
  background: var(--red);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 800;
}

.latest-badge.inline {
  min-height: 24px;
  font-size: 12px;
}

.release-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 34px;
  padding: 30px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.release-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.release-title-row h3 {
  margin: 0;
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 36px;
}

.release-notes {
  max-width: 680px;
  color: #c9ccd1;
}

.release-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.release-meta div {
  padding: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.release-meta dt {
  color: var(--muted);
  font-size: 12px;
}

.release-meta dd {
  margin: 3px 0 0;
  font-weight: 800;
}

.hash-line {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.hash-line code {
  overflow-wrap: anywhere;
  color: #d8dade;
}

.release-visual {
  position: relative;
  align-self: stretch;
  min-height: 280px;
  overflow: hidden;
  background: #090a0c;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.release-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.visual-caption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 8px;
  color: #e8e8e4;
  background: rgba(8, 9, 11, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  font-size: 12px;
}

.notice-bar {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
  padding: 16px 18px;
  color: #d0d2d6;
  background: #121416;
  border-left: 4px solid var(--amber);
  border-radius: 4px;
}

.notice-bar svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--amber);
}

.notice-bar p {
  margin: 0;
}

.versions-section {
  padding-top: 52px;
}

.version-list {
  display: grid;
  gap: 12px;
}

.version-row {
  display: grid;
  grid-template-columns: 140px 140px 110px minmax(180px, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 180ms ease, background-color 180ms ease;
}

.version-row:hover {
  background: #181b1f;
  border-color: var(--line-strong);
}

.version-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 20px;
}

.version-meta {
  color: var(--muted);
  font-size: 13px;
}

.version-notes {
  color: #cbcdd1;
  font-size: 14px;
}

.version-actions {
  display: flex;
  gap: 8px;
}

.version-actions .button {
  min-height: 40px;
  padding: 0 13px;
  font-size: 13px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.guide-item {
  position: relative;
  min-height: 210px;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.guide-item > svg {
  width: 28px;
  height: 28px;
  color: var(--red-hover);
}

.guide-item h3 {
  margin: 18px 0 8px;
  font-size: 19px;
}

.guide-item p {
  margin: 0;
  color: var(--muted);
}

.guide-index {
  position: absolute;
  top: 16px;
  right: 18px;
  color: #41464d;
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 28px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 28px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.site-footer div {
  display: flex;
  gap: 12px;
}

.site-footer strong {
  color: #fff;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
    padding: 0 18px;
  }

  .nav-links {
    display: none;
  }

  .release-panel {
    grid-template-columns: 1fr;
  }

  .release-visual {
    min-height: 240px;
  }

  .version-row {
    grid-template-columns: 1fr auto;
  }

  .version-meta,
  .version-notes {
    grid-column: 1 / -1;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .brand-text {
    font-size: 17px;
  }

  .status-text {
    display: none;
  }

  .server-status {
    min-height: 34px;
    padding: 0 10px;
  }

  .hero {
    min-height: 720px;
    padding: 92px 20px 105px;
    background-position: 58% center;
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero-actions,
  .release-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .section {
    width: min(100% - 32px, var(--max-width));
    padding: 62px 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .release-panel {
    padding: 20px;
  }

  .release-meta {
    grid-template-columns: 1fr;
  }

  .version-row {
    padding: 16px;
  }

  .version-actions {
    width: 100%;
    flex-direction: column;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
