/* ===== 米博体育官网 · 共享样式 /assets/site.css ===== */

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, picture, svg, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
table { border-collapse: collapse; width: 100%; }

/* --- Tokens --- */
:root {
  --ink: #0A0F1F;
  --ink-2: #111827;
  --slate: #1E293B;
  --lime: #B6FF3C;
  --orange: #FF8A2A;
  --ice: #7DD3FC;
  --paper: #F8FAFC;
  --muted: #94A3B8;
  --line: rgba(148, 163, 184, 0.22);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --pill: 999px;
  --maxw: 1240px;
  --gutter: clamp(16px, 4vw, 34px);
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shadow-card: 0 22px 48px -34px rgba(0, 0, 0, 0.95);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --- Base --- */
body {
  min-height: 100vh;
  background:
    radial-gradient(880px 520px at 88% -10%, rgba(125, 211, 252, 0.10), transparent 62%),
    radial-gradient(720px 460px at 2% 8%, rgba(182, 255, 60, 0.07), transparent 64%),
    var(--ink);
  background-attachment: fixed;
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.62;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { line-height: 1.16; font-weight: 800; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(32px, 6vw, 76px); font-weight: 900; letter-spacing: -0.03em; }
h2 { font-size: clamp(24px, 3.4vw, 40px); }
h3 { font-size: clamp(18px, 2vw, 24px); }
p { font-size: clamp(15px, 1.05vw, 17px); color: #DCE3EE; }
strong { color: var(--paper); font-weight: 800; }
.muted, .note { color: var(--muted); font-size: 13px; }
#main-content { display: block; scroll-margin-top: 128px; }
:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 6px;
}
::selection { background: var(--lime); color: #08131F; }

/* --- Layout helpers --- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(40px, 6vw, 84px); }
.section--narrow { max-width: 860px; margin-inline: auto; }
.section--flush { padding-block: 0; }
.grid { display: grid; gap: clamp(14px, 2vw, 24px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack > * + * { margin-top: 14px; }
.stack-lg > * + * { margin-top: 26px; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn-primary {
  background: var(--lime);
  color: #071120;
  box-shadow: 0 14px 30px -18px rgba(182, 255, 60, 0.9);
}
.btn-primary:hover { background: #D6FF86; transform: translateY(-2px); }
.btn-ghost {
  background: rgba(30, 41, 59, 0.45);
  border-color: var(--slate);
  color: var(--paper);
}
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); transform: translateY(-2px); }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }

/* --- Chips / tags / numerals --- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--slate);
  border-radius: 6px;
  background: rgba(125, 211, 252, 0.08);
  color: var(--ice);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.tag--live {
  color: var(--orange);
  border-color: rgba(255, 138, 42, 0.42);
  background: rgba(255, 138, 42, 0.13);
}
.tag--score {
  color: var(--lime);
  border-color: rgba(182, 255, 60, 0.42);
  background: rgba(182, 255, 60, 0.10);
}
.num, .score {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.score { font-size: clamp(26px, 4vw, 42px); color: var(--lime); line-height: 1; }

/* --- Card / panel / fold --- */
.card {
  position: relative;
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid var(--slate);
  border-radius: var(--radius-lg);
  padding: clamp(16px, 2.4vw, 26px);
  box-shadow: var(--shadow-card);
}
.card--edge::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  background: linear-gradient(180deg, var(--lime), var(--orange));
}
.panel {
  border: 1px solid var(--slate);
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.34);
  overflow: hidden;
}
.panel-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
}
.panel-body { padding: 16px 18px; }
.fold {
  border: 1px solid var(--slate);
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.32);
}
.fold + .fold { margin-top: 10px; }
.fold summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after {
  content: "+";
  flex: none;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--lime);
}
.fold[open] summary::after { content: "–"; }
.fold-body { padding: 0 18px 16px; color: var(--muted); font-size: 14.5px; }

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb-item { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb-item + .breadcrumb-item::before { content: "/"; color: var(--slate); }
.breadcrumb-item a { color: var(--ice); text-decoration: none; }
.breadcrumb-item a:hover { text-decoration: underline; }

/* --- Image frame (page stage places media here) --- */
.img-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--slate);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 15% 0%, rgba(125, 211, 252, 0.16), transparent 60%),
    radial-gradient(90% 70% at 100% 100%, rgba(182, 255, 60, 0.12), transparent 62%),
    linear-gradient(150deg, #0A0F1F 0%, #1E293B 100%);
}
.img-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(148, 163, 184, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.09) 1px, transparent 1px);
  background-size: 42px 42px;
  pointer-events: none;
}
.img-frame > img,
.img-frame > picture > img,
.img-frame > video {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.img-frame--wide { aspect-ratio: 21 / 9; }
.img-frame--tall { aspect-ratio: 4 / 5; }
.img-frame--square { aspect-ratio: 1 / 1; }
.img-frame__label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(10, 15, 31, 0.78);
  border: 1px solid var(--slate);
  color: var(--ice);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
}
.img-caption { margin-top: 8px; font-size: 12.5px; color: var(--muted); }

/* --- Scroll spy links --- */
.spy-link {
  display: block;
  padding: 8px 12px;
  border-left: 2px solid var(--slate);
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.spy-link:hover { color: var(--paper); }
.spy-link.is-active { color: var(--lime); border-left-color: var(--lime); }

/* --- Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* --- Skip link & progress --- */
.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 300;
  padding: 12px 20px;
  border-radius: 0 0 12px 12px;
  background: var(--lime);
  color: #071120;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0; }
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 200;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--lime), var(--orange) 70%, var(--ice));
  pointer-events: none;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  padding: 10px var(--gutter) 0;
  background: linear-gradient(180deg, rgba(10, 15, 31, 0.97) 58%, rgba(10, 15, 31, 0));
}
.header-shell { position: relative; max-width: var(--maxw); margin-inline: auto; }
.header-inner {
  position: relative;
  z-index: 95;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 10px 8px 16px;
  border: 1px solid var(--slate);
  border-radius: var(--pill);
  background: rgba(17, 24, 39, 0.88);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 44px -30px rgba(0, 0, 0, 0.98);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--lime);
  color: #071120;
  font-weight: 900;
  font-size: 18px;
  transform: rotate(-4deg);
  box-shadow: 0 10px 20px -12px rgba(182, 255, 60, 0.85);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 16px; font-weight: 900; letter-spacing: 0.02em; color: var(--paper); }
.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}
.nav-capsule { margin-inline: auto; }
.nav-list { display: flex; align-items: center; gap: 2px; }
.nav-item { flex: none; }
.nav-link {
  display: block;
  padding: 9px 14px;
  border-radius: var(--pill);
  color: #C7D2E1;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.nav-link:hover { color: var(--lime); background: rgba(182, 255, 60, 0.09); }
.nav-link[aria-current="page"] {
  background: var(--lime);
  color: #071120;
  box-shadow: 0 10px 22px -14px rgba(182, 255, 60, 0.9);
}
.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  border: 1px solid var(--slate);
  border-radius: 50%;
  background: rgba(10, 15, 31, 0.85);
  cursor: pointer;
}
.nav-toggle-bars {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  background: var(--lime);
  transform: translate(-50%, -50%);
  transition: background 0.2s var(--ease);
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--lime);
  transition: transform 0.24s var(--ease), top 0.24s var(--ease);
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.site-header[data-open="true"] .nav-toggle-bars { background: transparent; }
.site-header[data-open="true"] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.site-header[data-open="true"] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

/* League rail */
.league-rail {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding-inline: 14px;
}
.league-rail-label {
  flex: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  padding-right: 10px;
  border-right: 1px solid var(--slate);
  line-height: 1;
}
.league-list { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.league-list::-webkit-scrollbar { display: none; }
.league-chip {
  display: block;
  padding: 5px 11px;
  border: 1px solid var(--slate);
  border-radius: var(--radius-sm);
  background: rgba(125, 211, 252, 0.06);
  color: var(--ice);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}
.league-chip:hover { border-color: var(--lime); color: var(--lime); background: rgba(182, 255, 60, 0.10); }

/* ===== Footer ===== */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 110px);
  padding: clamp(38px, 5vw, 68px) var(--gutter) 26px;
  border-top: 1px solid var(--slate);
  background: linear-gradient(180deg, #0A0F1F 0%, #111827 62%, #0B1120 100%);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--lime) 0 42px, transparent 42px 58px, var(--orange) 58px 100px, transparent 100px 116px);
  opacity: 0.85;
}
.footer-shell { max-width: var(--maxw); margin-inline: auto; }
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: clamp(26px, 4vw, 60px);
}
.footer-brandline {
  font-size: clamp(17px, 1.9vw, 22px);
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.footer-note { margin-top: 10px; max-width: 42ch; font-size: 13.5px; color: var(--muted); }
.footer-contact { margin-top: 20px; display: grid; gap: 9px; }
.footer-contact-item { display: flex; gap: 12px; align-items: baseline; font-size: 13px; }
.footer-contact-key {
  flex: none;
  width: 5.2em;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.footer-contact-value { color: var(--ice); font-family: var(--font-mono); font-size: 12.5px; word-break: break-word; }
.footer-directory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.dir-link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid var(--slate);
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.34);
  color: var(--paper);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}
.dir-link:hover { border-color: var(--lime); background: rgba(182, 255, 60, 0.09); transform: translateY(-2px); }
.dir-num { font-family: var(--font-mono); font-size: 11.5px; color: var(--lime); letter-spacing: 0.08em; }
.dir-name { flex: 1; }
.footer-bottom {
  margin-top: clamp(26px, 4vw, 44px);
  padding-top: 18px;
  border-top: 1px dashed var(--slate);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.footer-legal { font-size: 12.5px; color: var(--muted); font-family: var(--font-mono); }
.footer-legal-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-legal-links a {
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.footer-legal-links a:hover { color: var(--ice); border-bottom-color: var(--ice); }
.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 30px);
  bottom: clamp(14px, 3vw, 30px);
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--slate);
  border-radius: var(--pill);
  background: rgba(17, 24, 39, 0.92);
  color: var(--paper);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  backdrop-filter: blur(10px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.to-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: var(--lime); color: var(--lime); }

/* ===== Responsive ===== */
@media (max-width: 1140px) {
  .brand-sub { display: none; }
  .nav-link { padding: 8px 11px; font-size: 13.5px; }
}
@media (max-width: 900px) {
  .site-header { padding-inline: clamp(12px, 4vw, 20px); }
  .header-inner { border-radius: 20px; padding: 8px 12px; }
  .nav-toggle { display: block; }
  .nav-capsule {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(330px, 88vw);
    margin: 0;
    padding: 84px 18px 32px;
    background: var(--ink-2);
    border-left: 1px solid var(--slate);
    overflow-y: auto;
    transform: translateX(104%);
    transition: transform 0.3s var(--ease);
    z-index: 90;
  }
  .site-header[data-open="true"] .nav-capsule { transform: translateX(0); }
  .site-header[data-open="true"] .header-shell::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(4, 8, 18, 0.7);
    z-index: 88;
  }
  .nav-list { flex-direction: column; align-items: stretch; gap: 6px; }
  .nav-link {
    padding: 14px 16px;
    border: 1px solid var(--slate);
    border-radius: 12px;
    font-size: 15.5px;
  }
  .nav-link[aria-current="page"] { border-color: var(--lime); }
  .league-rail { padding-inline: 4px; }
  .league-rail-label { display: none; }
  .footer-top { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .header-cta { display: none; }
  .brand-mark { width: 32px; height: 32px; font-size: 16px; }
  .footer-directory { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .section { padding-block: clamp(32px, 9vw, 56px); }
}

/* ===== 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;
  }
  .reveal { opacity: 1; transform: none; }
  .to-top { transition: none; }
}
