/* ==========================================================
   火博体育 · HB THE SPORTS HUB
   Site Kit · 技术蓝图 / 数据控制中心
   ========================================================== */

/* ---------- 1. Design Tokens ---------- */
:root {
  --x-deep-blue: #0A192F;
  --x-blue: #112240;
  --x-card: #1E293B;
  --x-bg-dark: #0B1120;
  --x-shadow-muted: #0F172A;
  --x-text-light: #E2E8F0;
  --x-line-grid: #1E293B;
  --x-neon-green: #64FFDA;
  --x-orange: #FF7A00;
  --x-warning-yellow: #FBBF24;

  --x-font-body: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;
  --x-font-mono: "SF Mono", "Cascadia Code", "Roboto Mono", Consolas, monospace;

  --x-container-w: 1280px;
  --x-radius: 12px;
  --x-gutter: 24px;
}

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

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

body {
  font-family: var(--x-font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--x-text-light);
  background-color: var(--x-bg-dark);
  background-image:
    radial-gradient(circle at 85% 8%, rgba(100, 255, 218, 0.07), transparent 32%),
    radial-gradient(circle at 12% 88%, rgba(255, 122, 0, 0.05), transparent 28%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

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

ul,
ol {
  list-style: none;
}

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

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

/* ---------- 3. 基础排版 ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--x-text-light);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

strong {
  font-weight: 700;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

@media (min-width: 768px) {
  h1 { font-size: 3rem; }
}

/* ---------- 4. 容器与区块 ---------- */
.hb-container {
  width: min(100% - var(--x-gutter) * 2, var(--x-container-w));
  margin-inline: auto;
}

.hb-section {
  padding: 5rem 0;
}

.hb-section--tight {
  padding: 3rem 0;
}

@media (min-width: 768px) {
  .hb-section {
    padding: 6.5rem 0;
  }
}

.hb-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.hb-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, var(--x-orange), var(--x-neon-green), transparent);
  opacity: 0.45;
  margin: 2rem 0;
}

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

/* ---------- 5. 区块标题 ---------- */
.hb-sec-head {
  margin-bottom: 2.5rem;
  max-width: 900px;
}

.hb-sec-label {
  display: inline-block;
  font-family: var(--x-font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--x-neon-green);
  padding-left: 1rem;
  border-left: 3px solid var(--x-orange);
  margin-bottom: 0.75rem;
}

.hb-sec-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: 0.75rem;
}

.hb-sec-desc {
  color: rgba(226, 232, 240, 0.64);
  font-size: 1.0625rem;
  max-width: 60ch;
}

/* ---------- 6. 按钮 ---------- */
.hb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.04em;
  line-height: 1;
  border: none;
  background: var(--x-neon-green);
  color: var(--x-deep-blue);
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  text-decoration: none;
}

.hb-btn:hover:not(:disabled) {
  background: var(--x-orange);
  transform: translateY(-2px);
}

.hb-btn:active:not(:disabled) {
  transform: translateY(0);
}

.hb-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hb-btn--outline {
  background: transparent;
  color: var(--x-neon-green);
  box-shadow: inset 0 0 0 2px var(--x-neon-green);
}

.hb-btn--outline:hover:not(:disabled) {
  background: rgba(100, 255, 218, 0.08);
  box-shadow: inset 0 0 0 2px var(--x-orange);
  color: var(--x-orange);
}

.hb-btn--block {
  width: 100%;
}

/* ---------- 7. 卡片与面板 ---------- */
.hb-card {
  background: var(--x-card);
  border: 1px solid var(--x-line-grid);
  border-radius: var(--x-radius);
  padding: 1.75rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.hb-card:hover {
  border-color: rgba(100, 255, 218, 0.4);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.hb-panel {
  position: relative;
  background: var(--x-blue);
  border: 1px solid var(--x-line-grid);
  padding: 2rem;
  clip-path: polygon(0% 0%, calc(100% - 24px) 0%, 100% 24px, 100% 100%, 24px 100%, 0% calc(100% - 24px));
}

.hb-panel__title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.hb-panel__desc {
  color: rgba(226, 232, 240, 0.7);
  font-size: 0.9375rem;
}

/* ---------- 8. 数据统计 ---------- */
.hb-stat {
  background: linear-gradient(135deg, var(--x-deep-blue), var(--x-blue));
  border: 1px solid var(--x-line-grid);
  border-radius: var(--x-radius);
  padding: 1.5rem 1.75rem;
}

.hb-stat__value {
  font-family: var(--x-font-mono);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--x-neon-green);
}

.hb-stat__label {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.6);
}

/* ---------- 9. 坐标标签 ---------- */
.hb-coord {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--x-font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  color: var(--x-neon-green);
  background: rgba(100, 255, 218, 0.08);
  border: 1px solid rgba(100, 255, 218, 0.18);
  padding: 0.25rem 0.75rem;
}

/* ---------- 10. 面包屑 ---------- */
.hb-breadcrumb {
  margin-bottom: 2rem;
}

.hb-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: rgba(226, 232, 240, 0.55);
}

.hb-breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hb-breadcrumb__item + .hb-breadcrumb__item::before {
  content: "→";
  color: var(--x-orange);
}

.hb-breadcrumb__link {
  transition: color 0.2s ease;
}

.hb-breadcrumb__link:hover {
  color: var(--x-neon-green);
}

.hb-breadcrumb__current {
  color: var(--x-text-light);
  font-weight: 600;
}

/* ---------- 11. 正文容器 ---------- */
.hb-prose {
  max-width: 720px;
  color: rgba(226, 232, 240, 0.82);
  line-height: 1.9;
}

.hb-prose > * + * {
  margin-top: 1.25rem;
}

.hb-prose h2 {
  margin-top: 2rem;
  font-size: 1.75rem;
}

.hb-prose h3 {
  margin-top: 1.5rem;
  font-size: 1.25rem;
}

.hb-prose ul,
.hb-prose ol {
  list-style: disc;
  padding-left: 1.25rem;
}

.hb-prose a {
  color: var(--x-neon-green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 12. 图片框架 ---------- */
.hb-img-frame {
  position: relative;
  overflow: hidden;
  background: var(--x-blue);
  border: 1px solid var(--x-line-grid);
  aspect-ratio: 16 / 10;
}

.hb-img-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--x-line-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--x-line-grid) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.4;
  z-index: 1;
  pointer-events: none;
}

.hb-img-frame::after {
  content: "IMG";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--x-font-mono);
  font-size: 1.125rem;
  letter-spacing: 0.24em;
  color: rgba(226, 232, 240, 0.22);
  z-index: 1;
  pointer-events: none;
}

.hb-img-frame img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hb-img-frame:hover img {
  transform: scale(1.035);
}

.hb-img-frame--wide { aspect-ratio: 21 / 9; }
.hb-img-frame--16-10 { aspect-ratio: 16 / 10; }
.hb-img-frame--portrait { aspect-ratio: 3 / 4; }
.hb-img-frame--square { aspect-ratio: 1 / 1; }

.hb-img-frame--cut {
  clip-path: polygon(0% 0%, calc(100% - 24px) 0%, 100% 24px, 100% 100%, 24px 100%, 0% calc(100% - 24px));
}

/* ---------- 13. 章节目录链接 ---------- */
.hb-chapter-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-left: 3px solid var(--x-line-grid);
  color: rgba(226, 232, 240, 0.65);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.hb-chapter-link:hover {
  color: var(--x-text-light);
  border-color: var(--x-neon-green);
}

.hb-chapter-link.is-current {
  color: var(--x-neon-green);
  border-color: var(--x-orange);
  background: rgba(100, 255, 218, 0.06);
}

/* ---------- 14. 焦点可见 ---------- */
:focus-visible {
  outline: 2px solid var(--x-neon-green);
  outline-offset: 3px;
}

/* ---------- 15. Skip Link ---------- */
.hb-skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 5000;
  padding: 0.75rem 1.25rem;
  background: var(--x-neon-green);
  color: var(--x-deep-blue);
  font-weight: 800;
  font-size: 0.9375rem;
  border-radius: 6px;
  transform: translateY(-250%);
  transition: transform 0.2s ease;
}

.hb-skip-link:focus-visible {
  transform: translateY(0);
}

/* ---------- 16. Topbar ---------- */
.hb-topbar {
  background: var(--x-bg-dark);
  border-bottom: 1px solid var(--x-line-grid);
  font-family: var(--x-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: rgba(226, 232, 240, 0.65);
  overflow: hidden;
}

.hb-topbar__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 36px;
}

.hb-topbar__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.hb-topbar__item--coord {
  color: var(--x-neon-green);
  opacity: 0.9;
}

.hb-topbar__link {
  margin-left: auto;
  color: var(--x-text-light);
  font-weight: 700;
  transition: color 0.2s ease;
}

.hb-topbar__link:hover {
  color: var(--x-orange);
}

.hb-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--x-warning-yellow);
  flex-shrink: 0;
}

.hb-dot--green {
  background: var(--x-neon-green);
  box-shadow: 0 0 8px rgba(100, 255, 218, 0.8);
}

/* ---------- 17. 主 Header ---------- */
.hb-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 25, 47, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.hb-header.is-scrolled {
  background: rgba(11, 17, 32, 0.96);
  border-bottom-color: var(--x-line-grid);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.hb-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 72px;
}

.hb-header__progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--x-orange), var(--x-neon-green));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.1s linear;
}

/* ---------- 18. Brand ---------- */
.hb-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.hb-brand__logo {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 40px;
  background: var(--x-deep-blue);
  border: 2px solid var(--x-neon-green);
  border-radius: 6px 14px 6px 14px;
  transform: skewX(-12deg);
  transition: transform 0.25s ease;
}

.hb-brand:hover .hb-brand__logo {
  transform: skewX(-12deg) scale(1.06);
}

.hb-brand__tail {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 14px;
  height: 14px;
  background: var(--x-orange);
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}

.hb-brand__core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  background: var(--x-neon-green);
  border-radius: 50%;
  transform: translate(-50%, -50%) skewX(12deg);
  box-shadow: 0 0 10px rgba(100, 255, 218, 0.6);
}

.hb-brand__txt {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.hb-brand__name {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--x-text-light);
}

.hb-brand__sub {
  font-family: var(--x-font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.55);
}

/* ---------- 19. Nav ---------- */
.hb-nav__list {
  display: flex;
  align-items: center;
}

.hb-nav__link {
  position: relative;
  display: block;
  padding: 0.5rem 1rem;
  font-weight: 700;
  font-size: 0.9375rem;
  color: rgba(226, 232, 240, 0.85);
  transition: color 0.2s ease;
}

.hb-nav__link:hover {
  color: var(--x-neon-green);
}

.hb-nav__link::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--x-neon-green), var(--x-orange));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
}

.hb-nav__link:hover::after,
.hb-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}

.hb-nav__link[aria-current="page"] {
  color: var(--x-neon-green);
}

/* ---------- 20. Toggle ---------- */
.hb-header__toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--x-line-grid);
  border-radius: 8px;
  background: rgba(11, 17, 32, 0.5);
  transition: border-color 0.2s ease;
}

.hb-header__toggle:hover {
  border-color: var(--x-neon-green);
}

.hb-header__toggle-line {
  width: 22px;
  height: 2px;
  background: var(--x-text-light);
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.hb-header__toggle[aria-expanded="true"] .hb-header__toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hb-header__toggle[aria-expanded="true"] .hb-header__toggle-line:nth-child(2) {
  opacity: 0;
}

.hb-header__toggle[aria-expanded="true"] .hb-header__toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 21. Footer ---------- */
.hb-footer {
  position: relative;
  background: linear-gradient(180deg, var(--x-deep-blue) 0%, var(--x-bg-dark) 100%);
  border-top: 1px solid var(--x-line-grid);
}

.hb-footer__deco {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--x-neon-green) 0%, var(--x-neon-green) 180px, var(--x-orange) 180px, var(--x-orange) 260px, var(--x-line-grid) 260px);
  opacity: 0.8;
}

.hb-footer__top {
  padding: 4rem 0 3rem;
}

.hb-footer__grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1.4fr;
  gap: 2.5rem;
}

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

.hb-footer__col--brand .hb-brand {
  margin-bottom: 1.25rem;
}

.hb-footer__col--nav,
.hb-footer__col--guide,
.hb-footer__col--contact {
  padding-top: 0.25rem;
}

.hb-footer__mission {
  color: rgba(226, 232, 240, 0.62);
  font-size: 0.9375rem;
  line-height: 1.8;
  max-width: 34ch;
}

.hb-footer__heading {
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--x-line-grid);
  position: relative;
}

.hb-footer__heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 32px;
  height: 2px;
  background: var(--x-orange);
}

.hb-footer__list li + li {
  margin-top: 0.6rem;
}

.hb-footer__link {
  display: inline-block;
  color: rgba(226, 232, 240, 0.7);
  font-size: 0.9375rem;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.hb-footer__link:hover {
  color: var(--x-neon-green);
  padding-left: 0.25rem;
}

.hb-footer__link--mono {
  font-family: var(--x-font-mono);
  font-size: 0.875rem;
}

.hb-footer__contact-list li + li {
  margin-top: 1.1rem;
}

.hb-footer__contact-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.45);
  margin-bottom: 0.2rem;
}

.hb-footer__address {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: rgba(226, 232, 240, 0.7);
}

.hb-footer__bottom {
  border-top: 1px solid var(--x-line-grid);
  background: rgba(11, 17, 32, 0.4);
}

.hb-footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  min-height: 56px;
}

.hb-footer__copyright {
  font-size: 0.875rem;
  color: rgba(226, 232, 240, 0.55);
}

.hb-footer__icp {
  font-family: var(--x-font-mono);
  font-size: 0.8125rem;
  color: rgba(226, 232, 240, 0.45);
}

/* ---------- 22. Brand Footer ---------- */
.hb-brand--footer .hb-brand__logo {
  width: 46px;
  height: 46px;
}

.hb-brand--footer .hb-brand__name {
  font-size: 1.5rem;
}

.hb-brand--footer .hb-brand__sub {
  font-size: 0.6875rem;
}

/* ---------- 23. Back Top ---------- */
.hb-back-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 900;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: var(--x-deep-blue);
  border: 1px solid var(--x-neon-green);
  border-radius: 10px;
  color: var(--x-neon-green);
  font-size: 1.375rem;
  font-weight: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background 0.2s ease, color 0.2s ease;
}

.hb-back-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hb-back-top:hover {
  background: var(--x-neon-green);
  color: var(--x-deep-blue);
  border-color: var(--x-neon-green);
}

/* ---------- 24. 响应式 ---------- */
@media (max-width: 1023px) {
  .hb-footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .hb-footer__col--brand {
    grid-column: 1 / -1;
  }

  .hb-nav__link {
    padding: 0.5rem 0.6rem;
    font-size: 0.875rem;
  }

  .hb-topbar__item--link {
    display: none;
  }
}

@media (max-width: 900px) {
  .hb-brand__sub {
    display: none;
  }
}

@media (max-width: 767px) {
  .hb-topbar__item--coord {
    display: none;
  }

  .hb-header__toggle {
    display: flex;
  }

  .hb-header__inner {
    min-height: 64px;
  }

  .hb-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--x-deep-blue);
    border-bottom: 1px solid var(--x-line-grid);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
    padding: 1rem 1.5rem 1.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  }

  .hb-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .hb-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .hb-nav__link {
    padding: 0.9rem 0.5rem;
    font-size: 1.0625rem;
    border-bottom: 1px solid rgba(30, 41, 59, 0.7);
  }

  .hb-nav__link::after {
    display: none;
  }

  .hb-footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hb-footer__top {
    padding: 3rem 0 2rem;
  }

  .hb-back-top {
    right: 1rem;
    bottom: 1rem;
  }
}

/* ---------- 25. 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;
  }

  .hb-back-top {
    transition: none;
  }
}
