/* ============================================================
   365体坛在线 Shared Site CSS
   视觉主题：数字赛场数据舱 / Bento Dashboard
   ============================================================ */

/* ---------- 1. Design Tokens ---------- */
:root {
  --c-dark: #0B1D3A;
  --c-dark-glass: rgba(11, 29, 58, 0.88);
  --c-dark-soft: rgba(11, 29, 58, 0.55);
  --c-paper: #F5F0E6;
  --c-green: #00FF87;
  --c-orange: #FF6B35;
  --c-ink: #171717;
  --c-steel: #1E3A8A;
  --c-slate: #64748B;
  --c-white: #FFFFFF;

  --font-head: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Noto Sans SC', 'Source Han Sans SC', sans-serif;
  --font-mono: 'Roboto Mono', 'SFMono-Regular', monospace;

  --container-max: 1280px;
  --header-h: 72px;
  --gutter: 32px;
  --section-gap: 80px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 0.2s;
  --dur-normal: 0.45s;

  /* Contextual color tokens (flip inside paper sections) */
  --c-text: rgba(255, 255, 255, 0.82);
  --c-text-strong: var(--c-white);
  --c-text-subtle: var(--c-slate);
  --c-divider: rgba(255, 255, 255, 0.08);
  --c-surface: rgba(255, 255, 255, 0.04);
}

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

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  background-color: var(--c-dark);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 40px 40px;
  color: var(--c-text);
  min-height: 100vh;
}

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

ul,
ol {
  list-style: none;
}

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

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

input,
textarea,
select {
  font: inherit;
}

/* ---------- 3. Typography ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-head);
  font-weight: 900;
  line-height: 1.2;
  color: var(--c-text-strong);
}

p {
  color: var(--c-text);
}

strong {
  font-weight: 700;
}

em {
  font-style: italic;
}

::selection {
  background: var(--c-green);
  color: var(--c-dark);
}

:focus-visible {
  outline: 2px solid var(--c-green);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- 4. Layout Helpers ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  width: 100%;
}

.section {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
}

.section--dark {
  background: var(--c-dark);
  color: var(--c-text);
}

.section--paper {
  --c-text: rgba(23, 23, 23, 0.78);
  --c-text-strong: var(--c-ink);
  --c-text-subtle: var(--c-slate);
  --c-divider: rgba(23, 23, 23, 0.1);
  --c-surface: rgba(23, 23, 23, 0.03);
  background: var(--c-paper);
  color: var(--c-text);
}

.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;
}

/* ---------- 5. Skip Link ---------- */
.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 999;
  background: var(--c-green);
  color: var(--c-dark);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 24px;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  transition: top 0.3s var(--ease-out);
}

.skip-link:focus {
  top: 12px;
}

/* ---------- 6. Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background-color var(--dur-normal) var(--ease-out),
    box-shadow var(--dur-normal) var(--ease-out);
}

.site-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--c-green), var(--c-orange) 55%, transparent 90%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}

.site-header.is-scrolled::before {
  transform: scaleX(1);
}

.site-header.is-scrolled {
  background: var(--c-dark-glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

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

.site-header__brand {
  display: inline-flex;
  align-items: baseline;
  flex-shrink: 0;
}

.site-header__logo {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -1px;
  color: var(--c-white);
}

.site-header__logo-mark {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 24px;
  color: var(--c-green);
  margin-right: 3px;
}

.site-header__cta {
  margin-left: auto;
  flex-shrink: 0;
}

/* ---------- 7. Navigation ---------- */
.site-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav__item {
  position: relative;
}

.site-nav__link {
  position: relative;
  display: inline-block;
  padding: 10px 18px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
  background: transparent;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  transition: background-color var(--dur-fast), color var(--dur-fast);
}

.site-nav__link::after {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 6px;
  height: 2px;
  background: var(--c-green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-normal) var(--ease-out);
}

.site-nav__link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--c-white);
}

.site-nav__link:hover::after {
  transform: scaleX(1);
}

.site-nav__link[aria-current="page"] {
  color: var(--c-white);
  background: rgba(255, 255, 255, 0.06);
}

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

/* ---------- 8. Mobile Nav Toggle ---------- */
.site-header__toggle {
  display: none;
  flex-shrink: 0;
  width: 44px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: background-color var(--dur-fast);
}

.site-header__toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.site-header__toggle-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--c-white);
  transition: transform 0.3s var(--ease-out), opacity 0.2s;
}

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

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

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

/* ---------- 9. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  padding: 10px 28px;
  background: transparent;
  border: 2px solid transparent;
  clip-path: polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  cursor: pointer;
  transition: background-color var(--dur-fast), color var(--dur-fast),
    border-color var(--dur-fast), transform 0.1s;
  text-align: center;
}

.btn:active {
  transform: translateY(1px);
}

.btn--accent {
  background: var(--c-green);
  border-color: var(--c-green);
  color: var(--c-dark);
}

.btn--accent:hover {
  background: transparent;
  border-color: var(--c-green);
  color: var(--c-green);
}

.btn--ghost {
  border-color: var(--c-steel);
  color: var(--c-white);
}

.btn--ghost:hover {
  border-color: var(--c-green);
  color: var(--c-green);
}

.btn--orange {
  background: var(--c-orange);
  border-color: var(--c-orange);
  color: var(--c-dark);
}

.btn--orange:hover {
  background: transparent;
  border-color: var(--c-orange);
  color: var(--c-orange);
}

/* ---------- 10. Cards ---------- */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-divider);
  padding: 28px;
  position: relative;
}

.card--paper {
  background: var(--c-paper);
  border-color: rgba(23, 23, 23, 0.08);
  color: var(--c-ink);
  --c-text: rgba(23, 23, 23, 0.78);
  --c-text-strong: var(--c-ink);
  --c-text-subtle: var(--c-slate);
}

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

.card--accent-border {
  border-left: 4px solid var(--c-green);
}

/* ---------- 11. Bento Grid ---------- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.bento-col-3 { grid-column: span 3; }
.bento-col-4 { grid-column: span 4; }
.bento-col-5 { grid-column: span 5; }
.bento-col-6 { grid-column: span 6; }
.bento-col-7 { grid-column: span 7; }
.bento-col-8 { grid-column: span 8; }
.bento-col-12 { grid-column: span 12; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* ---------- 12. Section Head ---------- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--c-divider);
  padding-bottom: 20px;
}

.section-head__index {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.12em;
  color: var(--c-green);
  display: block;
  margin-bottom: 6px;
}

.section-head__title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--c-text-strong);
}

.section-head__desc {
  max-width: 420px;
  font-size: 14px;
  color: var(--c-text-subtle);
}

/* ---------- 13. Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--c-text-subtle);
  margin-bottom: 24px;
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumb__item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb__item + .breadcrumb__item::before {
  content: '/';
  font-family: var(--font-mono);
  color: var(--c-text-subtle);
  opacity: 0.6;
}

.breadcrumb__link {
  color: var(--c-text-subtle);
  transition: color var(--dur-fast);
}

.breadcrumb__link:hover {
  color: var(--c-green);
}

.breadcrumb [aria-current="page"] {
  color: var(--c-text-strong);
  font-weight: 600;
}

/* ---------- 14. Tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 6px 12px;
  background: var(--c-surface);
  border: 1px solid var(--c-divider);
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  color: var(--c-text);
  letter-spacing: 0.04em;
}

.tag--live {
  background: var(--c-green);
  border-color: var(--c-green);
  color: var(--c-dark);
}

.tag--live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-dark);
  animation: tag-pulse 1.5s infinite;
}

@keyframes tag-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.75); }
}

.tag--hot {
  background: var(--c-orange);
  border-color: var(--c-orange);
  color: var(--c-dark);
}

/* ---------- 15. Data Display ---------- */
.data-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--c-divider);
}

.data-row:last-child {
  border-bottom: none;
}

.data-row__label {
  font-size: 13px;
  color: var(--c-text-subtle);
}

.data-row__value {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 16px;
  color: var(--c-text-strong);
  white-space: nowrap;
}

.data-score {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -2px;
  color: var(--c-text-strong);
}

/* ---------- 16. Image Frame ---------- */
.img-frame {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.35), rgba(11, 29, 58, 0.85));
  clip-path: polygon(20px 0, 100% 0, calc(100% - 20px) 100%, 0 100%);
}

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

.img-frame > img,
.img-frame > picture img,
.img-frame > .img-frame__content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-frame--portrait::before {
  padding-top: 125%;
}

.img-frame--square::before {
  padding-top: 100%;
}

/* ---------- 17. Decorative Utilities ---------- */
.diagonal-divider {
  height: 3px;
  background: linear-gradient(90deg, var(--c-green), var(--c-steel) 40%, transparent 80%);
  border: none;
  position: relative;
}

.deco-stripes {
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.03) 0 6px,
    transparent 6px 12px
  );
}

.deco-stripes--orange {
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255, 107, 53, 0.12) 0 6px,
    transparent 6px 12px
  );
}

/* ---------- 18. Footer ---------- */
.site-footer {
  position: relative;
  background: var(--c-dark);
  color: rgba(255, 255, 255, 0.7);
  border-top: 1px solid rgba(30, 58, 138, 0.4);
  padding-top: 72px;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-green) 0%, rgba(0, 255, 135, 0.2) 25%, transparent 50%, rgba(255, 107, 53, 0.3) 75%, var(--c-orange) 100%);
}

.site-footer__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 64px;
}

.site-footer__logo {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 24px;
  color: var(--c-white);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.site-footer__logo em {
  font-family: var(--font-mono);
  font-style: normal;
  color: var(--c-green);
}

.site-footer__trust {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.6);
  max-width: 420px;
  margin-bottom: 16px;
}

.site-footer__mail {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--c-green);
  border-bottom: 1px solid rgba(0, 255, 135, 0.35);
  padding-bottom: 2px;
  transition: border-color var(--dur-fast);
}

.site-footer__mail:hover {
  border-color: var(--c-green);
}

.site-footer__heading {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-white);
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 12px;
}

.site-footer__heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--c-green);
}

.site-footer__list {
  display: grid;
  gap: 10px;
}

.site-footer__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  transition: color var(--dur-fast), padding-left var(--dur-fast);
}

.site-footer__link::before {
  content: '→';
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--c-orange);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--dur-fast), transform var(--dur-fast);
}

.site-footer__link:hover {
  color: var(--c-white);
  padding-left: 6px;
}

.site-footer__link:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.site-footer__bottom {
  margin-top: 64px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 20px 0;
  background: rgba(0, 0, 0, 0.15);
}

.site-footer__bottom-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  font-size: 13px;
  font-family: var(--font-mono);
  color: rgba(255, 255, 255, 0.45);
}

.site-footer__address {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  font-family: var(--font-body);
}

/* ---------- 19. Progress Bar ---------- */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 200;
  pointer-events: none;
}

.progress-bar__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--c-green), var(--c-orange));
}

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

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

/* ---------- 21. Responsive ---------- */
@media (max-width: 960px) {
  .site-header__toggle {
    display: inline-flex;
    margin-left: 4px;
  }

  .site-nav {
    position: absolute;
    top: calc(var(--header-h) - 1px);
    left: 0;
    right: 0;
    margin: 0;
    background: var(--c-dark-glass);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 255, 135, 0.2);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease-out);
  }

  .site-nav[data-open] {
    max-height: 420px;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    padding: 8px var(--gutter) 20px;
    gap: 2px;
  }

  .site-nav__link {
    display: block;
    padding: 14px 20px;
    font-size: 16px;
  }

  .site-nav__link:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  body.nav-open {
    overflow: hidden;
  }
}

@media (max-width: 768px) {
  :root {
    --gutter: 20px;
    --section-gap: 56px;
    --header-h: 64px;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-col-3,
  .bento-col-4,
  .bento-col-5,
  .bento-col-6,
  .bento-col-7,
  .bento-col-8,
  .bento-col-12 {
    grid-column: span 1;
  }

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

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 28px;
  }

  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }

  .card {
    padding: 20px;
  }
}

@media (max-width: 600px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .site-footer__bottom-inner {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .site-header__inner {
    gap: 8px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-header__logo {
    font-size: 20px;
  }

  .site-header__logo-mark {
    font-size: 20px;
  }

  .site-header__cta.btn {
    padding: 8px 14px;
    font-size: 13px;
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  }
}

/* ---------- 22. Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

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