/* ==================================================
   四季体育 / Shared Site CSS
   ================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

body {
  font-family: "Noto Sans CJK SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: #E8ECF4;
  background-color: #0B132B;
  background-image:
    linear-gradient(to right, rgba(79, 209, 255, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(79, 209, 255, 0.045) 1px, transparent 1px);
  background-size: 32px 32px;
  background-attachment: fixed;
  overflow-wrap: break-word;
  word-break: break-word;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: #4FD1FF;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #FF5C28;
}

ul, ol {
  list-style: none;
}

/* ---------- 2. Design Tokens ---------- */
:root {
  --color-bg: #0B132B;
  --color-surface: #1C2541;
  --color-paper: #F5EFE6;
  --color-ink: #1A1423;
  --color-accent: #FF5C28;
  --color-accent-2: #B8FF3C;
  --color-danger: #FF3D2E;
  --color-info: #4FD1FF;
  --color-muted: #8B95A5;
  --color-star: #FBBF24;
  --color-text: #E8ECF4;
  --font-display: "Noto Sans CJK Black", "Arial Black", sans-serif;
  --font-body: "Noto Sans CJK SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Consolas, monospace;
  --container-max: 1200px;
  --container-pad: 24px;
  --radius: 4px;
  --transition: 0.2s ease;
}

/* ---------- 3. Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  line-height: 1.2;
  color: #FFFFFF;
  transform: skewX(-2deg);
}

h1 {
  font-size: 56px;
  margin-bottom: 24px;
}

h2 {
  font-size: 36px;
  margin-bottom: 20px;
}

h3 {
  font-size: 24px;
  margin-bottom: 16px;
}

p {
  margin-bottom: 12px;
}

.mono, .index-label, .nav-index, .tag-index, .trust-index,
.breadcrumbs, .brand-version, .header-coord, .footer-desc,
.footer-heading, .footer-copy, .footer-icp, .chapter-indicator {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
}

::selection {
  background: rgba(255, 92, 40, 0.6);
  color: #fff;
}

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

/* ---------- 4. Container & Grid ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-right: auto;
  margin-left: auto;
  padding-right: var(--container-pad);
  padding-left: var(--container-pad);
}

.grid {
  display: grid;
  gap: 24px;
}

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

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

#main-content {
  position: relative;
  min-height: 60vh;
  outline: none;
}

#main-content:focus {
  outline: none;
}

#main-content:focus-visible {
  outline: 2px dashed var(--color-info);
  outline-offset: -2px;
}

/* ---------- 5. Skip Link & Accessibility ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 9999;
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 0 0 4px 4px;
  transition: top 0.2s ease;
}

.skip-link:focus-visible {
  top: 0;
}

/* ---------- 6. Reading Progress ---------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 1000;
  pointer-events: none;
}

.reading-progress::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-2) 100%);
  transform: scaleX(var(--progress, 0));
  transform-origin: left center;
}

/* ---------- 7. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 19, 43, 0.96);
  border-bottom: 1px solid rgba(139, 149, 165, 0.18);
}

/* 7.1 Meta 条 */
.header-meta {
  background: var(--color-surface);
  border-bottom: 1px solid rgba(139, 149, 165, 0.15);
}

.header-meta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
  padding-top: 5px;
  padding-bottom: 5px;
}

.header-announcement {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-coord {
  color: rgba(139, 149, 165, 0.55);
  font-size: 11px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 5px 14px;
  transform: skewX(-4deg);
  transition: background 0.2s ease;
}

.header-cta > * {
  transform: skewX(4deg);
}

.header-cta:hover {
  background: var(--color-danger);
  color: #fff;
}

.header-cta-arrow {
  font-family: var(--font-mono);
  font-size: 13px;
}

/* 7.2 主头部 */
.header-main {
  position: relative;
}

.header-main::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 180px;
  height: 2px;
  background: var(--color-accent);
  z-index: 1;
  pointer-events: none;
}

.header-main-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

/* 品牌 */
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: 20px;
  line-height: 1;
  padding: 6px 10px;
  transform: skewX(-6deg);
  border-radius: 2px;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: 22px;
  letter-spacing: 0.06em;
  color: #fff;
}

.brand-version {
  display: inline-block;
  color: var(--color-accent-2);
  border: 1px solid rgba(184, 255, 60, 0.4);
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

/* 导航 */
.site-nav {
  display: flex;
  align-items: center;
}

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

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

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

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

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

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

.nav-index {
  font-size: 10px;
  color: rgba(139, 149, 165, 0.7);
  transition: color 0.2s ease;
}

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

/* 汉堡按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 12px 10px;
  background: var(--color-surface);
  border: 1px solid rgba(139, 149, 165, 0.3);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.nav-toggle:hover {
  border-color: var(--color-accent);
}

.nav-toggle-line {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-accent);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

/* ---------- 8. Footer ---------- */
.site-footer {
  margin-top: 80px;
  background: var(--color-surface);
  border-top: 3px solid var(--color-accent);
}

/* 8.1 信任声明区 */
.footer-trust {
  background: var(--color-paper);
  color: var(--color-ink);
  padding: 28px 0 40px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), 0 100%);
  margin-bottom: -20px;
}

.footer-trust-inner {
  display: flex;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
}

.trust-index {
  flex-shrink: 0;
  color: var(--color-danger);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.trust-text {
  flex: 1;
  min-width: 280px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-ink);
  max-width: 880px;
  margin-bottom: 0;
}

/* 8.2 主脚区 */
.footer-main {
  padding: 64px 0 40px;
  background:
    linear-gradient(to right, rgba(79, 209, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(79, 209, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
}

.footer-main-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr;
  gap: 40px;
}

.footer-brand-block {
  min-width: 0;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 14px;
}

.footer-desc {
  color: var(--color-muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.6;
}

.footer-heading {
  display: block;
  color: var(--color-accent-2);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-list a {
  display: inline-block;
  color: rgba(232, 236, 244, 0.8);
  font-size: 14px;
}

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

.footer-contact li {
  color: rgba(232, 236, 244, 0.65);
  font-size: 14px;
  line-height: 1.6;
}

.footer-note {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(139, 149, 165, 0.18);
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.7;
}

/* 8.3 备案行 */
.footer-bottom {
  border-top: 1px solid rgba(139, 149, 165, 0.2);
  background: rgba(11, 19, 43, 0.55);
  padding: 16px 0;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--color-muted);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.footer-copy,
.footer-icp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}

/* ---------- 9. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: 14px;
  text-decoration: none;
  background: none;
  transform: skewX(-4deg);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn > * {
  transform: skewX(4deg);
}

.btn:hover {
  transform: skewX(-4deg) translateY(-2px);
}

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

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

.btn-primary:hover {
  background: var(--color-danger);
  box-shadow: 0 6px 20px rgba(255, 92, 40, 0.35);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--color-accent-2);
  border: 1px solid var(--color-accent-2);
}

.btn-secondary:hover {
  background: rgba(184, 255, 60, 0.08);
  color: var(--color-accent-2);
}

/* ---------- 10. Data Card ---------- */
.data-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid rgba(139, 149, 165, 0.2);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.data-card:hover {
  transform: translateY(-4px) rotate(-0.5deg);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 92, 40, 0.4);
}

.data-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 36px;
  background: var(--color-accent);
  transition: height 0.2s ease;
}

.data-card:hover::before {
  height: 56px;
}

/* ---------- 11. Tags & Labels ---------- */
.tag-index {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-surface);
  border: 1px solid rgba(139, 149, 165, 0.28);
  color: var(--color-muted);
  padding: 4px 10px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  line-height: 1.4;
}

.tag-index--accent {
  color: var(--color-accent);
  border-color: rgba(255, 92, 40, 0.45);
}

.tag-index--star {
  color: var(--color-star);
  border-color: rgba(251, 191, 36, 0.4);
}

.index-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.index-label::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--color-accent);
  flex-shrink: 0;
}

/* ---------- 12. Status Dots ---------- */
.status-dot {
  display: inline-block;
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-muted);
  position: relative;
  vertical-align: middle;
}

.status-dot--live {
  background: var(--color-accent-2);
  box-shadow: 0 0 6px rgba(184, 255, 60, 0.5);
}

.status-dot--live::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--color-accent-2);
  animation: pulse-dot 2s ease-out infinite;
}

@keyframes pulse-dot {
  0% {
    transform: scale(0.7);
    opacity: 1;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

.status-dot--hot {
  background: var(--color-danger);
  box-shadow: 0 0 6px rgba(255, 61, 46, 0.5);
}

.status-dot--info {
  background: var(--color-info);
  box-shadow: 0 0 6px rgba(79, 209, 255, 0.5);
}

/* ---------- 13. Image Frame ---------- */
.image-frame {
  position: relative;
  background: var(--color-surface);
  border: 1px solid rgba(139, 149, 165, 0.15);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-frame::before {
  content: "IMAGE_REF";
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--color-muted);
}

.image-frame::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, transparent 50%, var(--color-accent) 50%);
  transition: width 0.2s ease, height 0.2s ease;
}

.image-frame:hover::after {
  width: 44px;
  height: 44px;
}

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

.image-frame--portrait {
  aspect-ratio: 4 / 5;
}

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

/* ---------- 14. Breadcrumbs ---------- */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  color: var(--color-muted);
  font-size: 12px;
  padding: 16px 0;
  letter-spacing: 0.06em;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
}

.breadcrumbs li + li::before {
  content: " / ";
  margin: 0 6px;
  color: rgba(139, 149, 165, 0.5);
}

.breadcrumbs a {
  color: var(--color-muted);
}

.breadcrumbs a:hover {
  color: var(--color-info);
}

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

/* ---------- 15. Section Head & Chapter ---------- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(139, 149, 165, 0.2);
}

[data-chapter] {
  position: relative;
}

[data-chapter][data-in-view="true"]::before {
  content: attr(data-chapter);
  position: absolute;
  top: 0;
  right: 0;
  font-family: var(--font-mono);
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  color: rgba(255, 92, 40, 0.12);
  letter-spacing: -0.04em;
  pointer-events: none;
  z-index: 0;
}

/* ---------- 16. Chapter Indicator ---------- */
.chapter-indicator {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--color-surface);
  border: 1px solid rgba(139, 149, 165, 0.25);
  border-left: 3px solid var(--color-accent);
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

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

.chapter-indicator-block {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--color-accent);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.chapter-indicator-text {
  color: #E8ECF4;
}

/* ---------- 17. Responsive ---------- */
@media (min-width: 769px) and (max-width: 1024px) {
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-main-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-brand-block {
    grid-column: 1 / -1;
  }

  h1 {
    font-size: 44px;
  }

  h2 {
    font-size: 32px;
  }
}

@media (max-width: 860px) {
  :root {
    --container-pad: 16px;
  }

  #main-content {
    scroll-margin-top: 90px;
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 28px;
  }

  h3 {
    font-size: 20px;
  }

  .header-coord {
    display: none;
  }

  .header-meta-inner {
    min-height: 34px;
  }

  .header-announcement {
    max-width: 63%;
  }

  .header-main-inner {
    min-height: 62px;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 2px solid var(--color-accent);
    border-top: 1px solid rgba(139, 149, 165, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
    z-index: 100;
  }

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

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 0;
  }

  .nav-item a {
    width: 100%;
    padding: 14px 24px;
    border-bottom: 1px solid rgba(139, 149, 165, 0.1);
    font-size: 14px;
  }

  .nav-item:last-child a {
    border-bottom: none;
  }

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

  .footer-main {
    padding: 52px 0 36px;
  }

  .footer-main-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .chapter-indicator {
    display: none;
  }
}

@media (max-width: 480px) {
  .brand-text {
    font-size: 18px;
  }

  .brand-mark {
    font-size: 17px;
    padding: 5px 8px;
  }

  .brand-version {
    font-size: 10px;
  }

  .header-cta-label {
    display: none;
  }

  .header-cta {
    padding: 5px 12px;
  }

  .header-cta-arrow {
    font-size: 15px;
  }

  .grid {
    gap: 16px;
  }

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

  .data-card {
    padding: 18px;
  }

  [data-chapter][data-in-view="true"]::before {
    font-size: 44px;
  }
}

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

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

  .chapter-indicator {
    transition: none;
  }
}
