/* ==========================================================
   NG赛场 全站共享样式 /assets/site.css
   设计基调：深夜球场指挥台 / 草绿近单色 + 霓虹橙 / 斜切与胶囊
   ========================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Roboto', 'PingFang SC', 'Noto Sans CJK SC', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: var(--silver-fog);
  background: var(--grass-deep);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

ul, ol {
  list-style: none;
}

a {
  color: var(--neon-orange-light);
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--neon-orange);
  color: var(--grass-deep);
}

/* ---------- Design Tokens ---------- */
:root {
  --grass-deep: #082B1F;
  --grass-mid: #114434;
  --grass-bright: #1E6B4A;
  --neon-orange: #FF5A1F;
  --neon-orange-light: #FF8C6E;
  --silver-fog: #C9D1CC;
  --silver-dim: #7E9184;
  --white-ice: #F0F5F2;
  --flag-red: #D7263D;
  --grid-line: rgba(255, 255, 255, 0.08);

  --font-title: 'Impact', 'Arial Black', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Inter', 'Roboto', 'PingFang SC', 'Noto Sans CJK SC', 'Microsoft YaHei', sans-serif;

  --header-h: 72px;
  --container-max: 1280px;
  --radius-lg: 24px;
  --radius-md: 14px;
  --radius-pill: 999px;

  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;

  --reading-progress: 0;
  --shadow-panel: 0 24px 48px rgba(0, 0, 0, 0.45);
  --shadow-lift: 0 12px 32px rgba(0, 0, 0, 0.3);
}

/* ---------- Base Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--white-ice);
  margin: 0 0 1rem;
}

h1 { font-size: clamp(2.6rem, 11vw, 8.5rem); }
h2 { font-size: clamp(2rem, 3.5vw, 3.2rem); }
h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin: 0 0 1rem;
}

.main-content {
  min-height: 70vh;
}

#main-content {
  scroll-margin-top: calc(var(--header-h) + var(--space-md));
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

@media (max-width: 640px) {
  .container {
    padding-inline: var(--space-md);
  }
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: fixed;
  top: -100px;
  left: var(--space-md);
  z-index: 1200;
  padding: 0.75rem 1.4rem;
  background: var(--neon-orange);
  color: var(--white-ice);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 6px 20px rgba(255, 90, 31, 0.4);
  transition: top 0.25s ease;
}

.skip-link:focus-visible {
  top: var(--space-md);
}

/* ---------- Reading Progress ---------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 1100;
  pointer-events: none;
}

.reading-progress::before {
  content: "";
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(var(--reading-progress));
  background: linear-gradient(90deg, var(--neon-orange), var(--neon-orange-light));
  border-radius: 0 3px 3px 0;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--neon-orange) 18%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(8, 43, 31, 0.96);
  border-bottom-color: var(--grid-line);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.site-header.is-scrolled::after {
  opacity: 1;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  height: var(--header-h);
}

/* ---------- Brand ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--white-ice);
}

.brand-badge {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--neon-orange), #ff7a3c);
  color: var(--grass-deep);
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  border-radius: 12px 12px 12px 3px;
  transform: skewX(-6deg);
  box-shadow: 0 4px 14px rgba(255, 90, 31, 0.35);
}

.brand-name {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  color: var(--white-ice);
}

.brand-sub {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--silver-dim);
  border: 1px solid var(--grid-line);
  border-radius: var(--radius-pill);
  padding: 0.15rem 0.6rem;
  margin-left: 2px;
}

/* ---------- Nav (desktop) ---------- */
.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-item {
  margin: 0;
}

.nav-link {
  position: relative;
  display: block;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--silver-fog);
  border-radius: var(--radius-pill);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
  color: var(--white-ice);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link[aria-current="page"] {
  color: var(--white-ice);
  background: rgba(30, 107, 74, 0.38);
  box-shadow: inset 0 0 0 1px rgba(30, 107, 74, 0.55);
}

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: var(--neon-orange);
  box-shadow: 0 0 8px rgba(255, 90, 31, 0.7);
}

/* ---------- Header Right / Toggle ---------- */
.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 11px;
  border: 1px solid var(--grid-line);
  border-radius: 12px;
  background: rgba(8, 43, 31, 0.5);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.nav-toggle:hover {
  border-color: rgba(255, 90, 31, 0.5);
  background: rgba(8, 43, 31, 0.85);
}

.nav-toggle-line {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--silver-fog);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:first-child {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:last-child {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-toggle[aria-expanded="true"] {
  border-color: rgba(255, 90, 31, 0.6);
}

/* ---------- Mobile Nav ---------- */
@media (max-width: 992px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: block;
    margin: 0;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    background: rgba(8, 43, 31, 0.98);
    border-bottom: 1px solid var(--grid-line);
    box-shadow: var(--shadow-panel);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  }

  .site-nav[data-open="true"],
  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: var(--space-sm);
  }

  .nav-link {
    padding: 0.95rem 1.1rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
  }

  .nav-link[aria-current="page"]::after {
    left: auto;
    right: 16px;
    transform: none;
    width: 5px;
    height: 5px;
    bottom: 50%;
    margin-bottom: -2.5px;
    border-radius: 50%;
  }
}

/* ---------- Login Button & Panel ---------- */
.btn-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--neon-orange), #ff7a3c);
  color: var(--white-ice);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(255, 90, 31, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-login:hover {
  background: var(--neon-orange-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(255, 90, 31, 0.45);
}

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

.btn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: dot-pulse 2.2s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5); }
  50% { box-shadow: 0 0 0 5px rgba(255, 255, 255, 0); }
}

.login-help {
  position: absolute;
  top: calc(var(--header-h) - 2px);
  right: 14px;
  width: min(440px, calc(100vw - 28px));
  background: var(--grass-mid);
  border: 1px solid var(--grid-line);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-panel);
  padding: var(--space-lg);
  z-index: 1001;
}

.login-help-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--white-ice);
  margin-bottom: 0.6rem;
}

.login-help-title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-orange);
  box-shadow: 0 0 12px rgba(255, 90, 31, 0.8);
}

.login-help-text {
  font-size: 0.9rem;
  color: var(--silver-fog);
  line-height: 1.7;
  margin: 0;
}

.login-help-link {
  color: var(--neon-orange-light);
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 140, 110, 0.4);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.login-help-link:hover {
  color: var(--neon-orange);
  border-color: var(--neon-orange);
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  background: linear-gradient(180deg, var(--grass-deep) 0%, #071f17 100%);
  border-top: 1px solid var(--grid-line);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -60px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30, 107, 74, 0.28), transparent 70%);
  pointer-events: none;
}

.site-footer::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--neon-orange) 0%, var(--grass-bright) 50%, transparent 100%);
  opacity: 0.5;
}

.footer-feedback {
  background: linear-gradient(90deg, var(--grass-mid), rgba(17, 68, 52, 0.6));
  border-bottom: 1px solid var(--grid-line);
}

.footer-feedback-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.footer-feedback-title {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white-ice);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.footer-feedback-title::before {
  content: "";
  width: 12px;
  height: 3px;
  border-radius: 2px;
  background: var(--neon-orange);
}

.footer-feedback-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--silver-fog);
}

.footer-feedback-item::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--neon-orange);
  opacity: 0.7;
}

.footer-feedback-address {
  color: var(--silver-dim);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--space-xl);
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
  position: relative;
}

.footer-brand .brand {
  margin-bottom: 0.25rem;
}

.footer-brand-desc {
  margin: 1rem 0 0;
  max-width: 380px;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--silver-dim);
}

.footer-col-title {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white-ice);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.footer-col-title::before {
  content: "";
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--neon-orange);
}

.footer-col-list li {
  margin-bottom: 0.55rem;
}

.footer-col-list a {
  font-size: 0.9rem;
  color: var(--silver-fog);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-col-list a:hover {
  color: var(--neon-orange-light);
  padding-left: 4px;
}

.footer-col-note {
  margin-top: 1rem;
  padding-left: 0.7rem;
  border-left: 2px solid var(--neon-orange);
  font-size: 0.8rem;
  line-height: 1.65;
  color: var(--silver-dim);
}

.footer-bottom {
  background: rgba(0, 0, 0, 0.24);
  border-top: 1px solid var(--grid-line);
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  font-size: 0.82rem;
  color: var(--silver-dim);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.4;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  background: var(--neon-orange);
  color: var(--white-ice);
  box-shadow: 0 4px 16px rgba(255, 90, 31, 0.3);
}

.btn-primary:hover {
  background: var(--neon-orange-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 90, 31, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--silver-fog);
  border-color: rgba(201, 209, 204, 0.3);
}

.btn-ghost:hover {
  border-color: var(--neon-orange);
  color: var(--neon-orange-light);
  transform: translateY(-2px);
}

/* ---------- Sections ---------- */
.section {
  padding: var(--space-2xl) 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-lg);
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

.section-title {
  margin: 0;
}

.section-desc {
  max-width: 480px;
  font-size: 1rem;
  color: var(--silver-dim);
  margin: 0;
}

/* ---------- Pill & Badge ---------- */
.pill-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  background: rgba(30, 107, 74, 0.3);
  border: 1px solid rgba(30, 107, 74, 0.5);
  color: var(--silver-fog);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pill-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-orange);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--flag-red);
  color: var(--white-ice);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

/* ---------- Card ---------- */
.card {
  background: var(--grass-mid);
  border: 1px solid var(--grid-line);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(30, 107, 74, 0.6);
}

/* ---------- Split Grid (4:8) ---------- */
.grid-split {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: var(--space-xl);
}

.grid-split-side,
.grid-split-main {
  min-width: 0;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  margin-bottom: var(--space-lg);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--silver-dim);
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: var(--silver-dim);
  opacity: 0.4;
}

.breadcrumb-link {
  color: var(--silver-fog);
  transition: color 0.2s ease;
}

.breadcrumb-link:hover {
  color: var(--neon-orange-light);
}

.breadcrumb-current {
  color: var(--white-ice);
  font-weight: 600;
}

/* ---------- Prose ---------- */
.content-prose {
  font-size: 1rem;
  color: var(--silver-fog);
  line-height: 1.75;
}

.content-prose h2,
.content-prose h3,
.content-prose h4 {
  margin-top: var(--space-lg);
}

.content-prose ul,
.content-prose ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.content-prose li {
  margin-bottom: 0.5rem;
}

.content-prose a {
  color: var(--neon-orange-light);
  border-bottom: 1px solid rgba(255, 140, 110, 0.4);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.content-prose a:hover {
  color: var(--neon-orange);
  border-color: var(--neon-orange);
}

/* ---------- Image Frames & Placeholder ---------- */
.img-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--grass-mid);
  border: 1px solid var(--grid-line);
}

.img-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(8, 43, 31, 0.25));
  pointer-events: none;
}

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

.img-frame-ratio-16x9 { aspect-ratio: 16 / 9; }
.img-frame-ratio-4x3 { aspect-ratio: 4 / 3; }
.img-frame-ratio-21x9 { aspect-ratio: 21 / 9; }

.img-placeholder {
  display: grid;
  place-items: center;
  min-height: 200px;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(201, 209, 204, 0.2);
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.02) 0 10px, transparent 10px 20px),
    radial-gradient(circle at 30% 30%, rgba(30, 107, 74, 0.4), transparent 60%),
    var(--grass-mid);
  color: var(--silver-dim);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-align: center;
  padding: var(--space-lg);
}

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--neon-orange);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Responsive: Footer & Split ---------- */
@media (max-width: 768px) {
  .grid-split {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

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

  .footer-brand {
    grid-column: auto;
  }

  .brand-sub {
    display: none;
  }

  .footer-feedback-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.4rem;
  }
}

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

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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