/* ==========================================================
   全站APP · 赛事数据控制台 Site CSS
   文件：/assets/site.css
   职责：Reset、设计变量、中文排版、全局布局、基础组件、
         共享页头（侧边控制台）、共享页脚（数据底栏）
   ========================================================== */

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

/* ---------- 2. 设计变量 ---------- */
:root {
  --color-primary: #0B1F3A;
  --color-primary-light: #1B3A6B;
  --color-accent: #FF6B35;
  --color-bg: #F5F7FA;
  --color-gold: #D4AF37;
  --color-text: #1E2A38;
  --color-text-light: #FFFFFF;
  --color-success: #2ECC71;
  --color-warning: #E74C3C;
  --color-neutral: #BDC3C7;
  --color-border: #E1E6EE;

  --font-heading: "Montserrat", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-data: "Roboto Mono", "SF Mono", Consolas, monospace;

  --header-width: 284px;
  --radius-main: 16px 6px 16px 6px;
  --radius-small: 8px 3px 8px 3px;
  --shadow-card: 0 2px 10px rgba(11, 31, 58, 0.07);
}

/* ---------- 3. 基础排版 ---------- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.85;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 900;
  line-height: 1.25;
  color: var(--color-primary);
  letter-spacing: 0.01em;
  margin-bottom: 0.5em;
}

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

p {
  margin-bottom: 1rem;
}

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration: none;
}

ul, ol {
  padding-left: 1.25rem;
}

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

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

::selection {
  background: var(--color-accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ---------- 4. 主内容与版心 ---------- */
.main-content {
  min-height: 70vh;
  overflow: clip;
}

@media (min-width: 981px) {
  .main-content {
    margin-left: var(--header-width);
  }
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

@media (min-width: 981px) {
  .container {
    padding-left: 40px;
    padding-right: 40px;
  }
}

.section {
  padding: 56px 0;
}

@media (min-width: 981px) {
  .section {
    padding: 88px 0;
  }
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 32px;
}

.section-kicker {
  font-family: var(--font-data);
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 500;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 0;
}

/* ---------- 5. 栅格 ---------- */
.grid {
  display: grid;
  gap: 24px;
}

.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

@media (min-width: 641px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 981px) {
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- 6. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-small);
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-accent {
  background: var(--color-accent);
  color: #fff;
}

.btn-accent:hover {
  background: #E94F1C;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 107, 53, 0.35);
}

.btn-outline {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: transparent;
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-1px);
}

/* ---------- 7. 卡片组件 ---------- */
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-main);
  padding: 24px;
  box-shadow: var(--shadow-card);
  position: relative;
}

.data-card {
  position: relative;
  background: linear-gradient(140deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
  border-radius: var(--radius-main);
  padding: 28px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(11, 31, 58, 0.2);
}

.data-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 64px;
  height: 4px;
  background: var(--color-accent);
}

.data-card::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.data-label {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.data-value {
  font-family: var(--font-data);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.2;
  color: #fff;
}

/* ---------- 8. 状态标签 ---------- */
.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(11, 31, 58, 0.08);
  color: var(--color-text);
}

.status-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.status-tag.is-live {
  background: rgba(255, 107, 53, 0.14);
  color: #E94F1C;
}

.status-tag.is-live::before {
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.22);
}

.status-tag.is-finished {
  background: rgba(46, 204, 113, 0.13);
  color: #1E9E57;
}

/* ---------- 9. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 20px 0 8px;
  font-size: 0.875rem;
  color: #667585;
}

.breadcrumb li + li::before {
  content: "/";
  margin: 0 8px;
  color: var(--color-neutral);
}

.breadcrumb a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

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

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

/* ---------- 10. 图片框架 ---------- */
.image-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-main);
  background: linear-gradient(135deg, #E4EAF1 0%, #D3DCE7 100%);
  border: 1px solid rgba(11, 31, 58, 0.08);
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-frame[data-ratio="16/9"],
.image-frame[data-ratio="4/3"],
.image-frame[data-ratio="3/2"],
.image-frame[data-ratio="1/1"] {
  aspect-ratio: 16 / 9;
}

.image-frame[data-ratio="4/3"] { aspect-ratio: 4 / 3; }
.image-frame[data-ratio="3/2"] { aspect-ratio: 3 / 2; }
.image-frame[data-ratio="1/1"] { aspect-ratio: 1 / 1; }

/* ---------- 11. 标签与装饰 ---------- */
.tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(27, 58, 107, 0.08);
  color: var(--color-primary);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
}

.tag.is-gold {
  background: rgba(212, 175, 55, 0.18);
  color: #8A6D1D;
}

.skew-band {
  display: block;
  height: 6px;
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-gold) 60%, var(--color-primary) 100%);
  transform: skewX(-20deg);
  border-radius: 3px;
  border: 0;
}

/* ---------- 12. 滚动显现 ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

/* ---------- 13. 页头（左侧控制台） ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 2000;
  padding: 10px 18px;
  background: var(--color-accent);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 6px;
  text-decoration: none;
  transform: translateY(-220%);
  transition: transform 0.2s ease;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--header-width);
  z-index: 500;
  background:
    radial-gradient(circle at 120% 12%, rgba(27, 58, 107, 0.85) 0%, transparent 55%),
    linear-gradient(180deg, #0D2442 0%, var(--color-primary) 55%, #09172C 100%);
  color: var(--color-text-light);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent) 0%, transparent 70%);
  z-index: 1;
  pointer-events: none;
}

.header-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px 20px;
  overflow-y: auto;
}

.header-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-text-light);
}

.brand-mark {
  position: relative;
  width: 28px;
  height: 28px;
  background: var(--color-accent);
  border-radius: 7px 2px 7px 2px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.brand-mark::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 9px;
  height: 9px;
  background: var(--color-gold);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.375rem;
  line-height: 1.1;
  color: var(--color-text-light);
  white-space: nowrap;
}

.brand-dot {
  color: var(--color-accent);
}

.brand-tagline {
  margin: 4px 0 20px 38px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}

.header-utility {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.version-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  overflow: hidden;
  line-height: 1;
}

.version-chip {
  display: inline-block;
  padding: 5px 12px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.68);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.version-chip + .version-chip {
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.version-chip:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.version-chip.is-active {
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
}

.lang-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.68);
}

.login-link {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.login-link:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.site-nav {
  margin-top: 6px;
  flex: 1;
}

.nav-list {
  list-style: none;
  padding: 0;
}

.nav-list li + li {
  margin-top: 2px;
}

.nav-link {
  display: block;
  padding: 10px 12px 10px 16px;
  border-left: 3px solid transparent;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 0 6px 6px 0;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-link[aria-current="page"] {
  background: linear-gradient(90deg, rgba(255, 107, 53, 0.18) 0%, transparent 100%);
  border-left-color: var(--color-accent);
  color: #fff;
  font-weight: 700;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 14px;
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.58);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.18);
  animation: statusPulse 2.4s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.14); }
  50% { box-shadow: 0 0 0 5px rgba(46, 204, 113, 0.3); }
}

.status-text {
  letter-spacing: 0.04em;
}

/* ---------- 14. 移动导航按钮 ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-small);
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
}

.toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.site-header[data-open="true"] .toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header[data-open="true"] .toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header[data-open="true"] .toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 15. 页头移动端适配 ---------- */
@media (max-width: 980px) {
  .site-header {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    border-right: none;
    background: linear-gradient(180deg, var(--color-primary) 0%, #0C2140 100%);
  }

  .header-inner {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    height: auto;
    padding: 12px 16px;
  }

  .header-topline {
    flex: 1 1 100%;
  }

  .brand-tagline {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  html.js .header-utility {
    display: none;
    flex: 1 1 100%;
    margin: 12px 0 0;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  html.js .site-header[data-open="true"] .header-utility {
    display: flex;
  }

  html.js .site-nav {
    display: none;
    flex: 1 1 100%;
    margin-top: 12px;
  }

  html.js .site-header[data-open="true"] .site-nav {
    display: block;
  }

  .header-status {
    display: none;
  }
}

/* ---------- 16. 页脚（数据底栏） ---------- */
.site-footer {
  position: relative;
  background:
    linear-gradient(135deg, rgba(27, 58, 107, 0.25) 0%, transparent 50%),
    var(--color-primary);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.875rem;
}

.site-footer::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-gold) 45%, transparent 100%);
}

@media (min-width: 981px) {
  .site-footer {
    margin-left: var(--header-width);
  }
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 24px 32px;
}

@media (min-width: 981px) {
  .footer-inner {
    padding: 64px 40px 36px;
  }
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px 40px;
}

@media (min-width: 641px) {
  .footer-top {
    grid-template-columns: minmax(180px, 1.2fr) repeat(3, 1fr);
  }
}

.footer-brand .brand {
  font-size: 1.375rem;
}

.footer-tagline {
  margin: 10px 0 0 38px;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1.6;
}

.footer-col .footer-title {
  margin-bottom: 14px;
  font-size: 0.9375rem;
  color: #fff;
  letter-spacing: 0.06em;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li + li {
  margin-top: 8px;
}

.footer-links a {
  display: inline-block;
  color: rgba(255, 255, 255, 0.66);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-links a:hover {
  color: var(--color-accent);
  transform: translateX(2px);
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.52);
}

.footer-contact {
  margin-bottom: 12px;
  line-height: 1.7;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 8px;
}

.footer-legal p {
  margin: 0;
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.64);
}

.footer-trust {
  margin: 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.38);
}

/* ---------- 17. 无障碍与动态偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

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

  .status-dot {
    animation: none;
  }
}
