/* ==========================================================================
   华体会 HTH 数据台 — 共享站点样式 /assets/site.css
   夜场数据控制室：深墨绿底 · 荧光青绿高亮 · 琥珀金标注
   ========================================================================== */

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

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

ul, ol { padding: 0; list-style: none; }

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

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

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

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

/* ---------- tokens ---------- */
:root {
  --hth-bg: #061C16;
  --hth-panel: #0B2B22;
  --hth-line: #1E4A3C;
  --hth-accent: #55FFB8;
  --hth-ink: #D8FFF0;
  --hth-muted: #A9C9BB;
  --hth-gold: #FFC857;
  --hth-gold-deep: #B77A15;
  --hth-white: #F7FFFB;
  --hth-danger: #FF7A6B;

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

  --hth-gutter: 24px;
  --hth-max: 1440px;
  --hth-radius-pill: 999px;
  --hth-focus: #55FFB8;
}

/* ---------- base ---------- */
body {
  font-family: var(--hth-font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--hth-ink);
  background-color: var(--hth-bg);
  background-image:
    linear-gradient(to right, rgba(30, 74, 60, 0.28) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 74, 60, 0.28) 1px, transparent 1px);
  background-size: 96px 96px;
  background-position: 50% 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--hth-font-display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--hth-white);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.65rem, 2.6vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 1.6vw, 1.5rem); }

p { text-wrap: pretty; }

a { color: var(--hth-accent); text-underline-offset: 3px; }

strong { color: var(--hth-white); font-weight: 700; }

::selection {
  background: var(--hth-accent);
  color: #04150F;
}

:where(a, button, [tabindex], summary, input, select, textarea):focus-visible {
  outline: 2px solid var(--hth-focus);
  outline-offset: 3px;
  border-radius: 4px;
}

#main-content { scroll-margin-top: 104px; }

/* ---------- skip link ---------- */
.hth-skip {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--hth-radius-pill);
  background: var(--hth-accent);
  color: #04150F;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

.hth-skip:focus,
.hth-skip:focus-visible { transform: translateY(0); }

/* ---------- header ---------- */
.hth-header {
  position: sticky;
  top: 0;
  z-index: 90;
  padding: 14px var(--hth-gutter) 0;
}

.hth-header__inner {
  max-width: var(--hth-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 9px 10px 9px 16px;
  border: 1px solid var(--hth-line);
  border-radius: var(--hth-radius-pill);
  background: rgba(11, 43, 34, 0.9);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow:
    0 22px 50px -34px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(85, 255, 184, 0.1);
}

/* brand */
.hth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--hth-ink);
}

.hth-brand__mark {
  position: relative;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(85, 255, 184, 0.75);
  border-radius: 6px;
}

.hth-brand__mark::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 1px;
  background: var(--hth-accent);
}

.hth-brand__mark::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px dashed rgba(85, 255, 184, 0.28);
  border-radius: 9px;
}

.hth-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.hth-brand__name {
  font-family: var(--hth-font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--hth-white);
  white-space: nowrap;
}

.hth-brand__tag {
  margin-top: 3px;
  font-family: var(--hth-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.09em;
  color: var(--hth-muted);
  white-space: nowrap;
}

.hth-brand--footer .hth-brand__name { font-size: 18px; }

/* nav */
.hth-nav { margin-left: auto; }

.hth-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.hth-nav__link {
  display: block;
  padding: 9px 13px;
  border-radius: var(--hth-radius-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--hth-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.hth-nav__link:hover {
  color: var(--hth-ink);
  background: rgba(85, 255, 184, 0.08);
}

.hth-nav__link[aria-current="page"] {
  color: var(--hth-accent);
  font-weight: 700;
  background: rgba(85, 255, 184, 0.12);
  box-shadow: inset 0 0 0 1px rgba(85, 255, 184, 0.45);
}

/* header actions */
.hth-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.hth-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 200, 87, 0.35);
  border-radius: var(--hth-radius-pill);
  background: rgba(183, 122, 21, 0.1);
  color: var(--hth-gold);
  font-family: var(--hth-font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.hth-status__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hth-gold);
  box-shadow: 0 0 0 3px rgba(255, 200, 87, 0.16);
}

/* buttons */
.hth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--hth-radius-pill);
  font-family: var(--hth-font-body);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 120ms ease, color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.hth-btn--primary {
  background: var(--hth-accent);
  color: #04150F;
  box-shadow: 0 14px 28px -20px rgba(85, 255, 184, 0.95);
}

.hth-btn--primary:hover { background: #8CFFD1; }

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

/* mobile toggle */
.hth-nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border: 1px solid var(--hth-line);
  border-radius: var(--hth-radius-pill);
  background: rgba(6, 28, 22, 0.72);
  color: var(--hth-ink);
  font-size: 13px;
  font-weight: 600;
}

.hth-nav-toggle__label { line-height: 1; }

.hth-nav-toggle__bars,
.hth-nav-toggle__bars::before,
.hth-nav-toggle__bars::after {
  display: block;
  width: 16px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--hth-accent);
  transition: transform 180ms ease, background-color 180ms ease;
}

.hth-nav-toggle__bars {
  position: relative;
  flex: 0 0 auto;
}

.hth-nav-toggle__bars::before,
.hth-nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.hth-nav-toggle__bars::before { top: -5px; }
.hth-nav-toggle__bars::after { top: 5px; }

.hth-nav-toggle[aria-expanded="true"] .hth-nav-toggle__bars { background-color: transparent; }
.hth-nav-toggle[aria-expanded="true"] .hth-nav-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
.hth-nav-toggle[aria-expanded="true"] .hth-nav-toggle__bars::after { transform: translateY(-5px) rotate(-45deg); }

/* ---------- layout utilities ---------- */
.hth-container {
  width: 100%;
  max-width: var(--hth-max);
  margin-inline: auto;
  padding-inline: var(--hth-gutter);
}

.hth-section { padding-block: 80px; }

.hth-section + .hth-section { border-top: 1px solid rgba(30, 74, 60, 0.6); }

.hth-grid {
  display: grid;
  gap: var(--hth-gutter);
}

.hth-grid--12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

.hth-mono {
  font-family: var(--hth-font-mono);
  letter-spacing: 0.02em;
}

/* breadcrumb */
.hth-breadcrumb {
  font-family: var(--hth-font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--hth-muted);
}

.hth-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hth-breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: rgba(30, 74, 60, 1);
}

.hth-breadcrumb a {
  color: var(--hth-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 120ms ease, border-color 120ms ease;
}

.hth-breadcrumb a:hover {
  color: var(--hth-accent);
  border-bottom-color: rgba(85, 255, 184, 0.5);
}

.hth-breadcrumb [aria-current="page"] { color: var(--hth-ink); }

/* image container base — 页面阶段直接放置 img / picture */
.hth-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--hth-line);
  border-radius: 8px;
  background-color: var(--hth-panel);
  background-image:
    linear-gradient(to right, rgba(30, 74, 60, 0.7) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 74, 60, 0.7) 1px, transparent 1px);
  background-size: 32px 32px;
}

.hth-media img,
.hth-media picture,
.hth-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hth-media--wide { aspect-ratio: 21 / 9; }
.hth-media--tall { aspect-ratio: 4 / 5; }

.hth-media__label {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  padding: 4px 10px;
  border: 1px solid rgba(85, 255, 184, 0.5);
  border-radius: var(--hth-radius-pill);
  background: rgba(4, 18, 14, 0.82);
  color: var(--hth-accent);
  font-family: var(--hth-font-mono);
  font-size: 10.5px;
  line-height: 1.6;
  letter-spacing: 0.1em;
}

/* ---------- footer ---------- */
.hth-footer {
  position: relative;
  margin-top: 120px;
  border-top: 1px solid var(--hth-line);
  background: linear-gradient(180deg, rgba(11, 43, 34, 0.96) 0%, #04120E 100%);
  color: var(--hth-muted);
}

.hth-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--hth-accent) 30%,
    rgba(255, 200, 87, 0.65) 68%,
    transparent 100%);
  opacity: 0.7;
}

.hth-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 48px;
  padding: 64px 0 48px;
}

.hth-footer__brand { min-width: 0; }

.hth-footer__summary {
  margin-top: 22px;
  max-width: 46ch;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--hth-muted);
}

.hth-footer__note {
  margin-top: 16px;
  padding-left: 12px;
  border-left: 2px solid var(--hth-gold-deep);
  font-family: var(--hth-font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: rgba(169, 201, 187, 0.85);
}

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

.hth-footer__col { min-width: 0; }

.hth-footer__title {
  margin-bottom: 16px;
  font-family: var(--hth-font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--hth-gold);
  text-transform: uppercase;
}

.hth-footer__list {
  display: grid;
  gap: 10px;
}

.hth-footer__link {
  display: inline-block;
  font-size: 14px;
  color: var(--hth-ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 120ms ease, border-color 120ms ease;
}

.hth-footer__link:hover {
  color: var(--hth-accent);
  border-bottom-color: rgba(85, 255, 184, 0.55);
}

.hth-footer__contact {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px dashed rgba(30, 74, 60, 0.95);
  display: grid;
  gap: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--hth-muted);
  word-break: break-word;
}

.hth-footer__contact-row {
  font-family: var(--hth-font-mono);
  letter-spacing: 0.01em;
}

.hth-footer__label {
  display: block;
  margin-bottom: 3px;
  font-family: var(--hth-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: rgba(169, 201, 187, 0.65);
}

.hth-footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  padding: 20px 0 32px;
  border-top: 1px solid rgba(30, 74, 60, 0.85);
}

.hth-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.hth-footer__legal .hth-footer__link { font-size: 13px; }

.hth-footer__copy {
  font-family: var(--hth-font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: rgba(169, 201, 187, 0.75);
}

/* ---------- reading progress (injected by JS) ---------- */
.hth-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 120;
  background: rgba(30, 74, 60, 0.45);
  pointer-events: none;
}

.hth-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--hth-accent), var(--hth-gold));
  transition: transform 90ms linear;
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .hth-header { padding: 10px 16px 0; }

  .hth-header__inner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 20px;
  }

  .hth-brand { order: 1; }
  .hth-nav-toggle { order: 2; display: inline-flex; margin-left: auto; }

  .hth-nav {
    order: 3;
    display: none;
    flex: 0 0 100%;
    margin: 4px 0 0;
    padding-top: 10px;
    border-top: 1px solid var(--hth-line);
  }

  .hth-header__actions {
    order: 4;
    display: none;
    flex: 0 0 100%;
    flex-wrap: wrap;
    padding: 12px 0 4px;
  }

  .hth-header__inner[data-open] .hth-nav { display: block; }
  .hth-header__inner[data-open] .hth-header__actions { display: flex; }

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

  .hth-nav__link {
    padding: 12px;
    border-radius: 10px;
    font-size: 15px;
  }
}

@media (max-width: 900px) {
  .hth-footer__grid {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 52px 0 40px;
  }

  .hth-grid--12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

  .hth-section { padding-block: 64px; }
}

@media (max-width: 640px) {
  :root { --hth-gutter: 16px; }

  .hth-brand { gap: 10px; }
  .hth-brand__mark { width: 24px; height: 24px; }
  .hth-brand__mark::before { inset: 6px; }
  .hth-brand__mark::after { inset: -4px; }
  .hth-brand__name { font-size: 15px; }
  .hth-brand__tag { display: none; }

  .hth-nav-toggle { padding: 8px 12px; }
  .hth-nav-toggle__label { display: none; }

  .hth-status { font-size: 11px; }
  .hth-btn { padding: 10px 16px; }

  .hth-footer { margin-top: 72px; }
  .hth-footer__cols { grid-template-columns: 1fr; gap: 28px; }
  .hth-footer__meta { flex-direction: column; align-items: flex-start; gap: 14px; }

  .hth-grid--12 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hth-section { padding-block: 52px; }
}

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

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

  .hth-progress__bar { transition: none; }
}
