/* =========================================================
   MANBETX 中文站 · 共享样式 /assets/site.css
   夜间球场指挥台 · 深墨绿底 + 荧光青柠 + 暖橙
   ========================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--header-offset, 104px);
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}

ul, ol { padding: 0; }

img, svg, video, canvas {
  max-width: 100%;
  display: block;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

a { color: inherit; }

table {
  border-collapse: collapse;
  width: 100%;
}

/* ---------- tokens ---------- */
:root {
  --ink: #0A2A22;
  --panel: #123A2E;
  --cream: #F3EADA;
  --brown: #17120F;
  --lime: #C8F24B;
  --lime-dim: #6E8F2A;
  --orange: #FF7B33;
  --orange-deep: #B4471F;
  --steel: #7E94A6;
  --mist: #E8F1EA;

  --font-display: "Barlow Condensed", "Oswald", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;

  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-base: 17px;
  --fs-md: 21px;
  --fs-lg: 28px;
  --fs-xl: 40px;
  --fs-2xl: 64px;
  --fs-3xl: 120px;

  --cut: 18px;
  --header-offset: 104px;
  --radius: 4px;
}

/* ---------- base ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink);
  background-image:
    repeating-linear-gradient(90deg, rgba(126, 148, 166, 0.055) 0 1px, transparent 1px 120px),
    repeating-linear-gradient(0deg, rgba(126, 148, 166, 0.042) 0 1px, transparent 1px 120px);
  color: var(--mist);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--mist);
  text-wrap: balance;
}

h1 { font-size: clamp(40px, 7vw, 84px); }
h2 { font-size: clamp(28px, 4.4vw, 52px); }
h3 { font-size: clamp(21px, 2.6vw, 32px); }
h4 { font-size: var(--fs-md); letter-spacing: 0; }

p { max-width: 68ch; }

a { text-decoration-thickness: 1px; }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 2px;
}

.btn:focus-visible,
.panel:focus-visible,
.media:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--orange);
}

::selection {
  background: var(--lime);
  color: var(--ink);
}

/* ---------- utilities ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  padding-block: 72px;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.lead {
  font-size: var(--fs-md);
  line-height: 1.7;
  color: var(--mist);
}

.rule-diag {
  height: 6px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, var(--steel) 0 38%, var(--orange) 38% 56%, var(--lime) 56% 100%);
  transform: skewY(-0.6deg);
  transform-origin: left center;
}

/* ---------- eyebrow / chapter ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--steel);
}

.eyebrow::before {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--orange);
}

.chapter-num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(48px, 8vw, var(--fs-3xl));
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--lime);
  opacity: 0.35;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 0;
  border-radius: 0;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

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

.btn--lime {
  background: var(--lime);
  color: #08231B;
}
.btn--lime:hover {
  background: #D8FF6A;
  color: #08231B;
}

.btn--ghost {
  background: transparent;
  color: var(--mist);
  box-shadow: inset 0 0 0 1px rgba(126, 148, 166, 0.45);
}
.btn--ghost:hover {
  color: var(--lime);
  box-shadow: inset 0 0 0 1px var(--lime);
}

.btn--orange {
  background: var(--orange);
  color: #20100A;
}
.btn--orange:hover {
  background: #FF9055;
  color: #20100A;
}

/* ---------- panel / media ---------- */
.panel {
  position: relative;
  background: var(--panel);
  padding: 26px 30px 26px 26px;
  border-radius: var(--radius);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.panel:hover {
  background: #16473A;
  transform: translateY(-2px);
}

.media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(200, 242, 75, 0.14), transparent 60%),
    linear-gradient(150deg, #123A2E 0%, #0A2A22 55%, #0B231C 100%);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(45deg, rgba(200, 242, 75, 0.08) 0 2px, transparent 2px 14px);
  opacity: 0.4;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--wide { aspect-ratio: 21 / 9; }

.media__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--mist);
  background: linear-gradient(transparent, rgba(7, 22, 17, 0.9));
}

/* ---------- tags / links / grid ---------- */
.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  background: rgba(126, 148, 166, 0.18);
  color: var(--mist);
}

.tag--lime {
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
}

.tag--orange {
  background: var(--orange);
  color: var(--brown);
  font-weight: 700;
}

.link-slide {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
  color: var(--lime);
  font-weight: 600;
  text-decoration: none;
}

.link-slide::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.18s ease;
}

.link-slide:hover::after,
.link-slide:focus-visible::after { transform: scaleX(1); }

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

/* ---------- breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--steel);
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li + li::before {
  content: "/";
  color: rgba(126, 148, 166, 0.6);
}

.breadcrumb a {
  color: var(--steel);
  text-decoration: none;
  transition: color 0.18s ease;
}

.breadcrumb a:hover { color: var(--lime); }

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 50%;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--radius);
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
  font-size: var(--fs-sm);
  text-decoration: none;
  transform: translate(-50%, -160%);
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

/* =========================================================
   头部
   ========================================================= */
.site-header {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 100;
  padding-inline: 16px;
  pointer-events: none;
}

.nav-shell {
  position: relative;
  pointer-events: auto;
  max-width: 1280px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 10px 12px 14px 20px;
  border-radius: 999px;
  background: rgba(18, 58, 46, 0.92);
  box-shadow:
    0 0 0 1px rgba(126, 148, 166, 0.28),
    0 20px 44px -26px rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  min-width: 0;
}

.brand__mark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--lime);
  transition: color 0.18s ease;
}

.brand__suffix {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--steel);
}

.brand:hover .brand__mark { color: #D8FF6A; }

.nav {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  position: relative;
  display: inline-block;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--mist);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.18s ease;
}

.nav__link:hover { color: var(--lime); }
.nav__link:hover::after { transform: scaleX(1); }

.nav__link[aria-current="page"] {
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
}

.nav__link[aria-current="page"]::after { display: none; }

.nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(200, 242, 75, 0.1);
  box-shadow: inset 0 0 0 1px rgba(200, 242, 75, 0.35);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  cursor: pointer;
}

.nav__toggle-bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: background-color 0.18s ease;
}

.nav__toggle-bars::before,
.nav__toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: transform 0.18s ease, top 0.18s ease;
}

.nav__toggle-bars::before { top: -5px; }
.nav__toggle-bars::after { top: 5px; }

[data-open] .nav__toggle-bars { background: transparent; }
[data-open] .nav__toggle-bars::before { top: 0; transform: rotate(45deg); }
[data-open] .nav__toggle-bars::after { top: 0; transform: rotate(-45deg); }

.nav__progress {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 5px;
  height: 2px;
  border-radius: 2px;
  overflow: hidden;
  background: rgba(126, 148, 166, 0.18);
  pointer-events: none;
}

.nav__progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--lime), var(--orange));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.1s linear;
}

/* =========================================================
   页脚折叠工具条
   ========================================================= */
.site-footer {
  margin-top: 96px;
  background: #05160F;
  border-top: 1px solid rgba(126, 148, 166, 0.24);
  color: var(--mist);
  font-size: var(--fs-sm);
}

.footer-bar__inner {
  max-width: 1200px;
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
}

.footer-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
}

.footer-brand__mark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--mist);
}

.footer-brand__suffix {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--steel);
}

.footer-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.footer-quick a {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--mist);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(126, 148, 166, 0.32);
  transition: color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.footer-quick a:hover {
  color: var(--lime);
  background: rgba(200, 242, 75, 0.08);
  box-shadow: inset 0 0 0 1px var(--lime);
}

.footer-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border: 0;
  background: transparent;
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.18s ease;
}

.footer-toggle:hover { color: #D8FF6A; }

.footer-toggle__icon {
  display: block;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.2s ease;
}

.footer-toggle[aria-expanded="true"] .footer-toggle__icon {
  transform: translateY(1px) rotate(-135deg);
}

.footer-panel {
  display: none;
  border-top: 1px solid rgba(126, 148, 166, 0.2);
  background: rgba(10, 42, 34, 0.55);
}

.footer-panel[data-open] { display: block; }

.footer-panel__inner {
  max-width: 1200px;
  margin-inline: auto;
  padding: 30px 24px 34px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}

.footer-col { min-width: 0; }

.footer-col__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--steel);
}

.footer-col__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.footer-link {
  display: inline-block;
  padding-bottom: 1px;
  color: var(--mist);
  font-size: var(--fs-sm);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.footer-link:hover {
  color: var(--lime);
  border-bottom-color: var(--lime);
}

.footer-meta {
  border-top: 1px solid rgba(126, 148, 166, 0.2);
  padding: 22px 24px 30px;
}

.footer-meta__inner {
  max-width: 1200px;
  margin-inline: auto;
  display: grid;
  gap: 8px;
}

.footer-meta__utility {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  max-width: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--steel);
}

.footer-meta__note {
  max-width: none;
  font-size: 13px;
  color: rgba(232, 241, 234, 0.72);
}

.footer-meta__legal {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: rgba(126, 148, 166, 0.85);
}

.footer-meta__legal a {
  color: rgba(232, 241, 234, 0.78);
  text-decoration: none;
  border-bottom: 1px solid rgba(126, 148, 166, 0.4);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.footer-meta__legal a:hover {
  color: var(--lime);
  border-bottom-color: var(--lime);
}

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1180px) {
  .nav__actions .btn--ghost { display: none; }
  .nav__link { padding-inline: 11px; }
}

@media (max-width: 1000px) {
  :root { --header-offset: 92px; }

  .nav-shell {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0;
    padding: 10px 12px 12px 18px;
    border-radius: 22px;
  }

  .brand { grid-column: 1; grid-row: 1; }
  .brand__suffix { display: none; }

  .nav__toggle {
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    margin-bottom: 4px;
  }

  .nav {
    display: none;
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(126, 148, 166, 0.28);
  }

  .nav-shell[data-open] .nav { display: block; }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav__link {
    display: block;
    padding: 11px 12px;
    border-radius: 6px;
    font-size: 15px;
  }

  .nav__link::after { display: none; }

  .nav__link[aria-current="page"] { border-radius: 6px; }

  .nav__actions {
    display: none;
    grid-column: 1 / -1;
    grid-row: 3;
    flex-direction: column;
    gap: 8px;
    padding: 10px 0 2px;
  }

  .nav-shell[data-open] .nav__actions { display: flex; }

  .nav__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .nav__actions .btn--ghost { display: inline-flex; }

  .nav__progress { left: 22px; right: 22px; bottom: 4px; }

  .footer-panel__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}

@media (max-width: 768px) {
  body { font-size: 16px; }

  .container { padding-inline: 18px; }
  .section { padding-block: 48px; }

  .site-header { top: 10px; padding-inline: 10px; }

  .grid-bento { gap: 16px; }

  .panel { padding: 20px 22px 20px 20px; }

  .footer-bar__inner {
    padding: 16px 18px;
    gap: 12px;
  }

  .footer-quick {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .footer-toggle { margin-left: auto; }

  .footer-panel__inner {
    grid-template-columns: minmax(0, 1fr);
    padding: 24px 18px 28px;
  }

  .footer-meta { padding: 20px 18px 26px; }

  .footer-meta__utility { font-size: 11.5px; gap: 4px 14px; }
}

@media (max-width: 480px) {
  .nav__toggle-text { display: none; }
  .btn { padding: 10px 15px; font-size: 13.5px; }
  .footer-quick a { padding: 6px 11px; font-size: 12.5px; }
}

/* ---------- 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .panel:hover,
  .btn:hover { transform: none; }
}
