/* ============================================
   安博体育 / 夜间赛事数据指挥中心
   /assets/site.css — 全站共享层
   ============================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(rgba(58, 63, 92, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 63, 92, 0.10) 1px, transparent 1px),
    linear-gradient(160deg, #0A0E27 0%, #0D1230 48%, #1A0A0F 100%);
  background-size: 44px 44px, 44px 44px, 100% 100%;
  color: #F5F5F5;
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

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

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

/* ---------- Design Tokens ---------- */
:root {
  --bg-base: #0A0E27;
  --bg-alt: #1A0A0F;
  --primary: #FF6A00;
  --secondary: #39FF14;
  --accent: #FFD700;
  --text-main: #F5F5F5;
  --text-alt: #8A9BAB;
  --divider: #3A3F5C;
  --font-display: Impact, 'Arial Black', 'PingFang SC', sans-serif;
  --font-body: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'Roboto Mono', 'Consolas', monospace;
  --header-h: 64px;
  --gutter: clamp(16px, 3vw, 40px);
  --max-width: 1440px;
}

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 3px;
}

/* ---------- Skip Link & Progress ---------- */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 3000;
  transform: translateY(-120%);
  background: var(--primary);
  color: #0A0E27;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 18px;
  transition: transform 150ms ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--secondary);
  outline-offset: -2px;
}

.progress-rail {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 2000;
  pointer-events: none;
}

.progress-fill {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 14, 39, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--divider);
}

.site-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--secondary) 0%, var(--primary) 40%, transparent 75%);
  opacity: 0.55;
  pointer-events: none;
}

.header-shell {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 18px;
}

/* ---------- Brand ---------- */
.brand-lockup {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-cn {
  color: var(--text-main);
}

.brand-suffix {
  color: var(--primary);
}

.brand-tag {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: var(--text-alt);
  border-left: 1px solid var(--divider);
  padding-left: 8px;
  transform: translateY(-1px);
}

/* ---------- Command Nav ---------- */
.cmd-nav {
  margin-left: auto;
  border: 1px solid var(--divider);
  background: rgba(26, 10, 15, 0.35);
  padding: 2px 4px;
}

.nav-list {
  display: flex;
  gap: 2px;
  counter-reset: nav-index;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-alt);
  white-space: nowrap;
  transition: color 150ms ease, background 150ms ease;
}

.nav-link::before {
  counter-increment: nav-index;
  content: counter(nav-index, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--primary);
  margin-right: 6px;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  background: var(--secondary);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 180ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text-main);
}

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

.nav-link[aria-current="page"] {
  color: var(--text-main);
  background: rgba(255, 106, 0, 0.10);
}

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

/* ---------- Live Status ---------- */
.live-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--divider);
  background: rgba(10, 14, 39, 0.6);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--text-alt);
  text-transform: uppercase;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--secondary);
  animation: status-pulse 2s infinite ease-in-out;
}

.status-label {
  transform: translateY(1px);
}

@keyframes status-pulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(57, 255, 20, 0.55);
  }
  50% {
    opacity: 0.65;
    box-shadow: 0 0 0 5px rgba(57, 255, 20, 0);
  }
}

/* ---------- Toggle ---------- */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 11px 10px;
  border: 1px solid var(--divider);
  background: rgba(10, 14, 39, 0.6);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-main);
  transition: transform 200ms ease, opacity 200ms ease;
}

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

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

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

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  background: linear-gradient(180deg, rgba(10, 14, 39, 0.6) 0%, var(--bg-alt) 100%);
  border-top: 1px solid var(--divider);
}

.footer-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px var(--gutter) 22px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr 1.3fr;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(58, 63, 92, 0.5);
}

.footer-brand .brand-lockup {
  font-size: 1.8rem;
}

.footer-brand .brand-suffix {
  color: var(--primary);
}

.index-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.trust-stamp {
  margin-top: 12px;
  font-size: 0.84rem;
  color: var(--text-alt);
  max-width: 26em;
}

.footer-index {
  border-left: 1px solid var(--divider);
  padding-left: 18px;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-link {
  display: inline-block;
  font-size: 0.88rem;
  color: var(--text-alt);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 150ms ease, border-color 150ms ease;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--text-main);
  border-bottom-color: var(--secondary);
}

.footer-contact {
  border-left: 1px solid var(--divider);
  padding-left: 18px;
}

.footer-contact p {
  font-size: 0.84rem;
  color: var(--text-alt);
  margin-top: 4px;
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding-top: 14px;
  font-size: 0.76rem;
  color: var(--text-alt);
  font-family: var(--font-mono);
}

/* ---------- Layout ---------- */
#main-content {
  flex: 1;
  width: 100%;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Grid System ---------- */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
}

.split-screen {
  display: grid;
  grid-template-columns: minmax(0, 5.5fr) minmax(280px, 3.5fr);
  gap: var(--gutter);
  align-items: start;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid var(--divider);
  color: var(--text-main);
  background: rgba(10, 14, 39, 0.4);
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #0A0E27;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: transparent;
  color: var(--primary);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--secondary);
  color: var(--secondary);
}

/* ---------- Breadcrumb ---------- */
.crumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  font-size: 0.8rem;
  color: var(--text-alt);
}

.crumb-link {
  color: var(--text-alt);
  transition: color 150ms ease;
}

.crumb-link:hover {
  color: var(--text-main);
}

.crumb-sep {
  color: var(--divider);
}

.crumb-current {
  color: var(--text-main);
  font-weight: 600;
}

/* ---------- Panels ---------- */
.panel {
  position: relative;
  background: linear-gradient(135deg, rgba(10, 14, 39, 0.7), rgba(26, 10, 15, 0.7));
  border: 1px solid var(--divider);
  padding: clamp(18px, 2.5vw, 30px);
}

.panel-tilt {
  transform: rotate(-0.6deg);
}

.panel-tilt-right {
  transform: rotate(0.6deg);
}

.panel:hover,
.panel:focus-within {
  border-color: rgba(57, 255, 20, 0.35);
}

/* ---------- Metrics ---------- */
.metric-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1;
  color: var(--secondary);
  font-weight: 700;
}

.metric-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-alt);
}

/* ---------- Section Headers ---------- */
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-kicker::before {
  content: '';
  width: 10px;
  height: 2px;
  background: var(--secondary);
}

.section-title {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.section-sub {
  margin-top: 12px;
  color: var(--text-alt);
  font-size: 0.92rem;
  max-width: 46em;
}

/* ---------- Expand Groups ---------- */
.expand-box {
  border: 1px solid var(--divider);
  background: rgba(10, 14, 39, 0.45);
}

.expand-box + .expand-box {
  margin-top: 8px;
}

.expand-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 15px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  transition: background 150ms ease;
}

.expand-trigger:hover {
  background: rgba(255, 106, 0, 0.06);
}

.expand-icon {
  position: relative;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  transition: transform 200ms ease;
}

.expand-icon::before,
.expand-icon::after {
  content: '';
  position: absolute;
  background: var(--secondary);
  transition: transform 200ms ease, background 200ms ease;
}

.expand-icon::before {
  top: 6px;
  left: 0;
  width: 14px;
  height: 2px;
}

.expand-icon::after {
  top: 0;
  left: 6px;
  width: 2px;
  height: 14px;
}

.expand-trigger[aria-expanded="true"] .expand-icon {
  transform: rotate(45deg);
}

.expand-trigger[aria-expanded="true"] .expand-icon::before,
.expand-trigger[aria-expanded="true"] .expand-icon::after {
  background: var(--primary);
}

.expand-content {
  max-height: 0;
  overflow: hidden;
  padding: 0 18px;
  color: var(--text-alt);
  font-size: 0.87rem;
  line-height: 1.7;
  transition: max-height 260ms ease, padding 260ms ease;
}

.expand-content[data-open],
.expand-content[data-open="true"] {
  max-height: 480px;
  padding: 0 18px 18px;
}

.expand-content p + p {
  margin-top: 8px;
}

/* ---------- Coordinate Index ---------- */
.coord-index {
  display: grid;
  grid-template-columns: 1fr;
  border-left: 1px solid var(--divider);
  border-top: 1px solid var(--divider);
}

.coord-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 14px;
  border-right: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
  font-size: 0.84rem;
  color: var(--text-alt);
  transition: background 150ms ease, color 150ms ease;
}

.coord-item:hover,
.coord-item:focus-within {
  background: rgba(57, 255, 20, 0.06);
  color: var(--text-main);
}

.coord-item a:hover {
  color: var(--secondary);
}

.coord-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--primary);
  min-width: 38px;
}

.coord-item[data-hot="true"] .coord-tag {
  color: var(--secondary);
}

/* ---------- Image Frames ---------- */
.img-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--divider);
  background: rgba(26, 10, 15, 0.45);
}

.img-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(58, 63, 92, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 63, 92, 0.28) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}

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

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

.img-frame-tall {
  aspect-ratio: 3 / 4;
}

.img-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-alt);
  text-align: center;
  background: linear-gradient(135deg, rgba(10, 14, 39, 0.7), rgba(26, 10, 15, 0.75));
}

.img-placeholder::after {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--primary);
}

/* ---------- Ticker ---------- */
.ticker {
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
  padding: 10px 0;
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
  background: rgba(26, 10, 15, 0.35);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--text-alt);
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  padding-right: 28px;
}

.ticker-item::before {
  content: '///';
  color: var(--primary);
  margin-right: 14px;
}

/* ---------- Reveal ---------- */
html.js .reveal:not([data-visible="true"]) {
  opacity: 0;
  transform: translateY(18px);
}

html.js .reveal {
  transition: opacity 420ms ease, transform 420ms ease;
}

html.js .reveal[data-visible="true"] {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .brand-tag {
    display: none;
  }

  .live-status .status-label {
    display: none;
  }

  .live-status {
    padding: 6px 8px;
  }
}

@media (max-width: 960px) {
  .grid-12 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .split-screen {
    grid-template-columns: 1fr;
  }
}

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

  .nav-toggle {
    display: inline-flex;
  }

  .cmd-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    background: rgba(10, 14, 39, 0.98);
    transition: max-height 260ms ease;
  }

  .cmd-nav[data-open],
  .cmd-nav[data-open="true"] {
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    border-bottom: 1px solid var(--divider);
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
    padding: 10px var(--gutter) 16px;
  }

  .nav-link {
    display: flex;
    align-items: baseline;
    width: 100%;
    padding: 12px 4px;
    border-bottom: 1px solid rgba(58, 63, 92, 0.45);
    font-size: 0.95rem;
  }

  .nav-link::after {
    display: none;
  }

  .nav-link[aria-current="page"] {
    background: rgba(255, 106, 0, 0.12);
    border-left: 2px solid var(--primary);
    padding-left: 8px;
  }
}

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

  .footer-index,
  .footer-contact {
    border-left: 0;
    padding-left: 0;
  }

  .footer-meta {
    flex-direction: column;
  }
}

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

  .live-status {
    display: none;
  }

  .footer-shell {
    padding-top: 36px;
  }
}

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

  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .status-dot {
    animation: none;
  }

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