/* ==========================================================
   博喜体育2026 · 全站共享样式 /assets/site.css
   创意基因：赛事直播控制台 × 数据导航台
   ========================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h, 115px) + 20px);
}

body {
  background-color: var(--primary-bg);
  background-image:
    linear-gradient(rgba(46, 66, 100, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 66, 100, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--text-silver);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

ul, ol {
  list-style: none;
}

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

button {
  cursor: pointer;
}

strong, b {
  color: var(--text-white);
  font-weight: 700;
}

::selection {
  background: var(--accent-green);
  color: #06210F;
}

/* ---------- 2. Design Tokens ---------- */
:root {
  --primary-bg: #0B1B3A;
  --secondary-bg: #12264D;
  --accent-green: #00FFA3;
  --accent-orange: #FF6B35;
  --text-white: #FFFFFF;
  --text-silver: #C0C8D6;
  --card-bg: #16294D;
  --line: #2E4264;
  --highlight-yellow: #E8FF5C;
  --muted: #70809A;
  --header-h: 115px;
  --content-w: 1360px;
  --font-head: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Cascadia Code", Consolas, monospace;
  --shadow-hard: 6px 6px 0 rgba(0, 0, 0, 0.25);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 3. Focus & Typography ---------- */
:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 900;
  color: var(--text-white);
  line-height: 1.2;
}

h1 { font-size: clamp(34px, 5vw, 64px); }
h2 { font-size: clamp(26px, 3vw, 40px); }
h3 { font-size: clamp(18px, 2vw, 24px); }

p {
  margin-bottom: 1em;
}

/* ---------- 4. Skip Link ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 16px;
  z-index: 3000;
  padding: 10px 18px;
  background: var(--accent-green);
  color: #06210F;
  font-weight: 700;
  font-size: 14px;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.skip-link:focus {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ---------- 5. Reading Progress ---------- */
.reading-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-green) 0%, var(--highlight-yellow) 60%, var(--accent-orange) 100%);
  z-index: 10;
  pointer-events: none;
}

/* ---------- 6. Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(11, 27, 58, 0.96);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-orange);
  z-index: 1;
}

.header-shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--content-w);
  margin-inline: auto;
  padding: 8px 24px;
  height: 76px;
}

.header-rule {
  flex: 1;
  min-width: 32px;
  height: 2px;
  margin: 0 16px;
  background: repeating-linear-gradient(90deg, var(--line) 0 5px, transparent 5px 10px);
  opacity: 0.7;
}

/* ---------- 7. Brand ---------- */
.brand-block {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--accent-green);
  color: #06210F;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 22px;
  line-height: 1;
  border-radius: 4px 0 4px 0;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35);
}

.brand-words {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 20px;
  line-height: 1.15;
  color: var(--text-white);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-name em {
  font-style: normal;
  color: var(--accent-green);
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 2px;
  padding: 3px 10px;
  background: var(--highlight-yellow);
  color: #1B2408;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  border-radius: 2px;
  transform: rotate(-3deg);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

/* ---------- 8. Nav Toggle ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--secondary-bg);
  flex-shrink: 0;
}

.nav-toggle-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-white);
  border-radius: 1px;
  transition: transform 0.25s var(--ease-out), opacity 0.2s ease-out;
}

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

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

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

/* ---------- 9. Nav Desktop ---------- */
.site-nav {
  flex-shrink: 0;
}

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

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-silver);
  white-space: nowrap;
  position: relative;
  transition: color 0.2s ease-out;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  background: var(--accent-green);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s var(--ease-out);
}

.nav-link:hover {
  color: var(--text-white);
}

.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-link[aria-current="page"] {
  color: var(--accent-green);
}

.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-link.is-spied {
  color: var(--accent-green);
}

.nav-link.is-spied::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-orange);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ---------- 10. Ticker ---------- */
.ticker-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: var(--content-w);
  margin-inline: auto;
  padding: 5px 24px;
  border-top: 1px solid rgba(46, 66, 100, 0.6);
  height: 36px;
  overflow: hidden;
}

.ticker-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 14px 2px 10px;
  background: var(--accent-green);
  color: #06210F;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  flex-shrink: 0;
}

.ticker-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--accent-orange);
  border-radius: 50%;
  animation: ticker-pulse 1.4s ease-in-out infinite;
}

@keyframes ticker-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.65); opacity: 0.65; }
}

.ticker-text {
  font-size: 13px;
  color: var(--text-silver);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 11. Mobile Layout ---------- */
@media (max-width: 1200px) {
  .header-rule { display: none; }
}

@media (max-width: 900px) {
  :root {
    --header-h: 67px;
  }

  .header-shell {
    height: 64px;
    padding: 0 16px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }

  .brand-name { font-size: 17px; }
  .brand-tag { display: none; }
  .version-badge { font-size: 11px; padding: 2px 8px; }
  .nav-toggle { display: inline-flex; }
  .ticker-bar { display: none; }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 12px;
    right: 12px;
    z-index: 1001;
    max-height: calc(100vh - var(--header-h) - 24px);
    overflow-y: auto;
    background: var(--secondary-bg);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.25s ease-out, transform 0.25s ease-out, visibility 0.25s;
  }

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

  .nav-list {
    flex-direction: column;
    gap: 0;
    padding: 6px;
  }

  .nav-item { width: 100%; }
  .nav-item + .nav-item { border-top: 1px solid rgba(46, 66, 100, 0.45); }
  .nav-link { display: flex; align-items: center; padding: 13px 14px; font-size: 15px; }
  .nav-link::after { display: none; }
}

/* ---------- 12. Footer ---------- */
.site-footer {
  margin-top: 80px;
  background: #081229;
  border-top: 4px solid var(--accent-green);
  position: relative;
}

.footer-shell {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 56px;
  max-width: var(--content-w);
  margin-inline: auto;
  padding: 56px 24px 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 0;
  max-width: 36ch;
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-silver);
  background: var(--secondary-bg);
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: color 0.2s ease-out, border-color 0.2s ease-out;
}

.footer-status:hover {
  color: var(--accent-green);
  border-color: var(--accent-green);
}

.footer-status-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: ticker-pulse 1.4s ease-in-out infinite;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-orange);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-silver);
  transition: color 0.2s ease-out, padding-left 0.2s ease-out;
}

.footer-links a:hover {
  color: var(--accent-green);
  padding-left: 4px;
}

.footer-address {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-style: normal;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

.footer-address a {
  color: var(--accent-green);
}

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

.footer-note-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-orange);
  margin-bottom: 2px;
}

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

.footer-bottom-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: var(--content-w);
  margin-inline: auto;
  padding: 16px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}

.footer-copy,
.footer-icp {
  margin: 0;
}

@media (max-width: 900px) {
  .site-footer { margin-top: 56px; }
  .footer-shell { grid-template-columns: 1fr; gap: 36px; padding: 40px 20px 32px; }
  .footer-columns { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom-shell { flex-direction: column; text-align: center; justify-content: center; padding: 14px 20px; }
}

/* ---------- 13. Content Containers ---------- */
.site-main {
  min-height: 70vh;
  padding-top: var(--header-h);
}

.page-container {
  width: 100%;
  max-width: var(--content-w);
  margin-inline: auto;
  padding-inline: 24px;
}

@media (min-width: 1200px) {
  .page-container { padding-inline: 32px; }
}

/* ---------- 14. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  border-radius: 2px;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out),
              background-color 0.2s ease-out, color 0.2s ease-out, border-color 0.2s ease-out;
}

.btn-primary {
  background: var(--accent-green);
  color: #06210F;
  border: 2px solid var(--accent-green);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 255, 163, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--text-white);
  border: 2px solid var(--line);
}

.btn-ghost:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
  transform: translateY(-2px);
}

/* ---------- 15. Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--text-silver);
  transition: color 0.2s ease-out;
}

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

.breadcrumb-sep {
  margin-inline: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ---------- 16. Components ---------- */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent-green);
  background: var(--secondary-bg);
  border: 1px solid var(--line);
  border-radius: 0;
  text-transform: uppercase;
}

.section-tag::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent-orange);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.panel {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: var(--shadow-hard);
  padding: 28px;
}

.angle-cut {
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  position: relative;
}

/* ---------- 17. Image Frames ---------- */
.img-frame {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, transparent 0%, rgba(0, 255, 163, 0.04) 50%, transparent 100%),
    var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.img-frame::before {
  content: '';
  display: block;
  padding-bottom: 56.25%;
}

.img-frame--tall::before { padding-bottom: 75%; }
.img-frame--square::before { padding-bottom: 100%; }

.img-frame--motion {
  background:
    linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.05) 40%, rgba(255, 255, 255, 0.08) 42%, transparent 52%),
    linear-gradient(135deg, var(--card-bg) 0%, var(--secondary-bg) 100%);
  background-size: 200% 100%, 100% 100%;
}

.img-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 18. Reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  will-change: opacity, transform;
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 19. Utility ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .ticker-dot,
  .footer-status-dot {
    animation: none;
  }
}
