:root {
  --bg: #1e1f22;
  --panel: #2b2d31;
  --panel-2: #313338;
  --panel-3: #232428;
  --line: #3f4147;
  --text: #f2f3f5;
  --muted: #b5bac1;
  --muted-2: #949ba4;
  --blurple: #5865f2;
  --blurple-hover: #4752c4;
  --green: #23a55a;
  --green-soft: #57f287;
  --yellow: #fee75c;
  --red: #ed4245;
  --radius: 12px;
  --sidebar: 264px;
  font-family: "Inter", "Segoe UI", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

button, a.button {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 16px;
  border-bottom: 1px solid var(--line);
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  image-rendering: pixelated;
  background: #2b2d31;
}

.brand strong { display: block; font-size: 16px; letter-spacing: .2px; }
.brand span { display: block; font-size: 12px; color: var(--muted-2); margin-top: 2px; }

.nav-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted-2);
  padding: 0 10px;
  margin: 2px 0 6px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
}

.nav a:hover { background: var(--panel-3); color: var(--text); }
.nav a.active { background: #404249; color: #fff; }
.nav .icon { width: 20px; text-align: center; opacity: .9; }

.sidebar-foot {
  margin-top: auto;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.6;
  padding: 12px 10px 4px;
  border-top: 1px solid var(--line);
}

.main {
  min-width: 0;
  background:
    radial-gradient(900px 420px at 60% -10%, rgba(88, 101, 242, .16), transparent 70%),
    var(--panel-2);
}

.topbar {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(49, 51, 56, .92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar .crumb { color: var(--muted); font-size: 14px; }
.topbar .crumb strong { color: var(--text); font-weight: 600; }
.topbar .status { color: var(--green-soft); font-size: 12px; display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-soft); box-shadow: 0 0 12px rgba(87, 242, 135, .8); }

.content {
  max-width: 1120px;
  margin: 0 auto;
  padding: 42px 34px 60px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
  gap: 34px;
  align-items: center;
  padding: 8px 0 34px;
}

.eyebrow {
  color: var(--green-soft);
  font-family: "Consolas", monospace;
  font-size: 12px;
  letter-spacing: .09em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

h1 {
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.02;
  margin: 0 0 14px;
  letter-spacing: -.03em;
}

.gradient {
  background: linear-gradient(90deg, #fff 10%, #aab4ff 55%, #57f287 115%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
  max-width: 620px;
  margin: 0 0 26px;
}

.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--blurple); color: #fff; }
.button.primary:hover { background: var(--blurple-hover); }
.button.green { background: var(--green); color: #fff; }
.button.green:hover { background: #1e8f4e; }
.button.ghost { background: var(--panel); border-color: var(--line); color: var(--text); }
.button.ghost:hover { background: var(--panel-3); border-color: #5c5e66; }
.button.small { min-height: 34px; padding: 0 12px; font-size: 13px; }

.cover-wrap {
  display: flex;
  justify-content: center;
  position: relative;
}

.cover-wrap::before {
  content: "";
  position: absolute;
  inset: 10% 8%;
  background: rgba(88, 101, 242, .28);
  filter: blur(55px);
  border-radius: 50%;
}

.cover {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 1;
  border-radius: 26px;
  border: 1px solid #4b4e57;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .38);
  image-rendering: pixelated;
  background: #232428;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 26px 0 14px;
}

.section-title h2 { margin: 0; font-size: 18px; }
.section-title span { color: var(--muted-2); font-size: 12px; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.feature {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
}

.feature .icon { font-size: 22px; margin-bottom: 10px; }
.feature h3 { margin: 0 0 7px; font-size: 15px; }
.feature p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }

.latest-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin-top: 14px;
}

.version-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green-soft);
  font-family: "Consolas", monospace;
  font-size: 12px;
  letter-spacing: .04em;
  margin-bottom: 8px;
}

.version-number { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.version-meta { color: var(--muted-2); font-size: 13px; margin-top: 6px; line-height: 1.6; }

.download-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.platform-note { color: var(--muted-2); font-size: 12px; margin-top: 10px; }

.notice {
  border: 1px solid #5b4a20;
  background: rgba(254, 231, 92, .08);
  color: #f4e7a2;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  margin: 16px 0;
}

.notice.error { border-color: #6b3034; background: rgba(237, 66, 69, .1); color: #ffb2b4; }
.notice.info { border-color: #3d4f92; background: rgba(88, 101, 242, .12); color: #c7cdff; }

.release-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }

.release-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.release-version { font-size: 18px; font-weight: 700; }
.release-date { font-size: 12px; color: var(--muted-2); margin-top: 4px; }
.release-files { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.release-source { color: var(--muted); font-size: 12px; margin-top: 5px; }
.release-source a { color: #aab4ff; }
.release-source a:hover { text-decoration: underline; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-3);
  color: var(--muted);
  font-size: 11px;
}

.chip.github { color: #e6edf3; }
.chip.modrinth { color: #c7ffd8; border-color: #28613b; background: rgba(35, 165, 90, .1); }

.page-title { margin: 0 0 10px; font-size: 34px; letter-spacing: -.02em; }
.page-sub { color: var(--muted); margin: 0 0 22px; line-height: 1.7; font-size: 14px; }

.download-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.asset-meta { color: var(--muted-2); font-size: 12px; margin-top: 8px; word-break: break-all; }

.footer {
  border-top: 1px solid var(--line);
  margin-top: 42px;
  padding-top: 18px;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.8;
}

.footer a { color: #aab4ff; }
.footer a:hover { text-decoration: underline; }

.loading { color: var(--muted-2); font-size: 13px; }
.hidden { display: none !important; }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand { border-bottom: 0; padding-bottom: 8px; }
  .sidebar .nav-label, .sidebar-foot { display: none; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav a { padding: 7px 10px; }
  .topbar { padding: 0 18px; }
  .content { padding: 28px 18px 44px; }
  .hero { grid-template-columns: 1fr; }
  .cover-wrap { order: -1; }
  .cover { width: min(72vw, 300px); }
  .feature-grid { grid-template-columns: 1fr; }
  .latest-card, .download-hero { grid-template-columns: 1fr; }
  .release-row { grid-template-columns: 1fr; gap: 10px; }
  .release-files { justify-content: flex-start; }
}

@media (max-width: 520px) {
  .topbar .status { display: none; }
  .actions .button { flex: 1 1 auto; }
  .version-number { font-size: 26px; }
}
