/* ============================================================
   开博体育站 Site Kit 共享样式
   深空蓝 / 奶油底 / 竞速红 / 冠军金 / 沙漠黄 / 天山白
   ============================================================ */

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

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

body {
  font-family: "Noto Sans SC", "Source Han Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: #2B1D14;
  background: #F5EFE0;
  min-height: 100vh;
}

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

ul,
ol {
  list-style-position: inside;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Archivo Black", "Noto Sans SC Black", "Noto Sans SC", system-ui, sans-serif;
  line-height: 1.2;
  color: #0B1F3A;
}

a {
  color: #0B1F3A;
}

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

/* ---------- CSS 变量 ---------- */
:root {
  --deep-navy: #0B1F3A;
  --midnight: #061224;
  --cream: #F5EFE0;
  --paper: #E8DCC0;
  --ink: #2B1D14;
  --signal-red: #E65424;
  --champion-gold: #C9A227;
  --desert: #D8B36A;
  --white: #FFFFFF;
  --sand: #E0D8C8;
  --header-width: 280px;
  --content-max: 1120px;
  --font-heading: "Archivo Black", "Noto Sans SC Black", "Noto Sans SC", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans", system-ui, sans-serif;
  --z-header: 1000;
  --z-drawer: 990;
  --z-backtop: 950;
}

/* ---------- 焦点可见 ---------- */
:focus-visible {
  outline: 3px solid #E65424;
  outline-offset: 3px;
}

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: -120px;
  left: 24px;
  z-index: 3000;
  background: #E65424;
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 14px;
  letter-spacing: .08em;
  padding: 12px 20px;
  text-decoration: none;
  border: 2px solid #2B1D14;
  box-shadow: 4px 4px 0 0 #2B1D14;
  transition: top .2s;
}

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

/* ---------- 桌面端左右分屏 ---------- */
@media (min-width: 960px) {
  body {
    padding-left: var(--header-width);
  }
}

/* ---------- 站点页头 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--header-width);
  height: 100vh;
  padding: 24px 20px 20px;
  color: #F5EFE0;
  background:
    linear-gradient(180deg, transparent 0%, rgba(6, 18, 36, .25) 60%, rgba(6, 18, 36, .8) 100%),
    linear-gradient(135deg, #0B1F3A 0%, #061224 100%);
  border-right: 2px solid #C9A227;
  display: flex;
  flex-direction: column;
  z-index: var(--z-header);
}

.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #E65424 0%, #C9A227 55%, #D8B36A 100%);
  z-index: 5;
}

.header-inner {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* ---------- 品牌锁版 ---------- */
.brand-lockup {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(216, 179, 106, .35);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #F5EFE0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}

.brand-text {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: .02em;
  color: #F5EFE0;
}

.brand-edition {
  position: relative;
  padding-left: 18px;
  font-size: 12px;
  letter-spacing: .28em;
  color: #D8B36A;
}

.brand-edition::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 10px;
  height: 2px;
  background: #E65424;
}

/* ---------- 导航轨道 ---------- */
.nav-rail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  flex: 1;
  padding-top: 6px;
}

.nav-rail-heading {
  display: block;
  font-family: var(--font-heading);
  font-size: 12px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: #C9A227;
  padding: 8px 12px 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(216, 179, 106, .3);
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 12px;
  color: rgba(245, 239, 224, .82);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .06em;
  border-left: 4px solid transparent;
  transition: color .18s, background .18s, border-color .18s;
}

.nav-link:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, .07);
  border-left-color: #D8B36A;
}

.nav-link[aria-current="page"] {
  color: #FFFFFF;
  background: linear-gradient(90deg, rgba(230, 84, 36, .22), rgba(230, 84, 36, .08));
  border-left-color: #E65424;
  font-weight: 700;
}

.nav-link[aria-current="page"] .nav-coord {
  color: #C9A227;
  opacity: 1;
}

.nav-coord {
  min-width: 30px;
  text-align: right;
  font-family: var(--font-heading);
  font-size: 12px;
  letter-spacing: .06em;
  color: #D8B36A;
  opacity: .75;
}

.nav-label {
  flex: 1;
}

/* ---------- 快捷入口 ---------- */
.nav-shortcut {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding: 14px 16px;
  background: linear-gradient(135deg, #E65424, #C9A227);
  color: #FFFFFF;
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 15px;
  letter-spacing: .1em;
  border: 2px solid #F5EFE0;
  box-shadow: 5px 5px 0 0 rgba(6, 18, 36, .85);
  transition: transform .2s, box-shadow .2s;
}

.nav-shortcut:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 0 rgba(6, 18, 36, .9);
}

.nav-shortcut:active {
  transform: translate(0, 0);
  box-shadow: 3px 3px 0 0 rgba(6, 18, 36, .9);
}

.shortcut-signal {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #F5EFE0;
  box-shadow: 0 0 0 4px rgba(245, 239, 224, .25);
}

.shortcut-label {
  line-height: 1;
}

/* ---------- 移动导航按钮 ---------- */
.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 2px solid rgba(245, 239, 224, .8);
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  transition: border-color .2s;
}

.nav-toggle:hover {
  border-color: #D8B36A;
}

.toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: #F5EFE0;
  border-radius: 0;
  transform-origin: center;
  transition: transform .25s, opacity .2s;
}

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

/* ---------- 滚动进度 ---------- */
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  height: 4px;
  background: rgba(245, 239, 224, .1);
  pointer-events: none;
  z-index: 6;
}

.scroll-progress-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 100%;
  width: var(--scroll-progress, 0%);
  background: linear-gradient(90deg, #E65424, #C9A227 80%, #D8B36A);
  transition: none;
}

/* ---------- 移动端页头覆盖 ---------- */
@media (max-width: 959.98px) {
  body {
    padding-left: 0;
  }

  .site-header {
    position: sticky;
    top: 0;
    width: 100%;
    height: 64px;
    padding: 0 16px;
    border-right: none;
    border-bottom: 2px solid #C9A227;
    justify-content: center;
  }

  .site-header::before {
    height: 3px;
  }

  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 0;
    width: 100%;
  }

  .brand-lockup {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 0;
    border: none;
    flex: 1;
    min-width: 0;
  }

  .brand-link {
    flex-shrink: 1;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-text {
    font-size: 20px;
    white-space: nowrap;
  }

  .brand-edition {
    display: none;
  }

  .nav-rail {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    max-height: calc(100vh - 64px);
    margin: 0;
    padding: 12px 16px 20px;
    border-bottom: 2px solid #C9A227;
    border-left: none;
    background: #0B1F3A;
    box-shadow: 8px 8px 0 rgba(6, 18, 36, .3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .22s, transform .22s, visibility .22s;
    z-index: var(--z-drawer);
  }

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

  .nav-rail-heading {
    display: none;
  }

  .nav-link {
    padding: 14px 12px;
    font-size: 17px;
    border-left-width: 3px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-shortcut {
    display: none;
  }

  .scroll-progress {
    left: 0;
    right: 0;
    top: auto;
    width: auto;
    height: 4px;
  }
}

/* 桌面端垂直进度条 */
@media (min-width: 960px) {
  .scroll-progress {
    left: auto;
    top: 0;
    right: 0;
    bottom: 0;
    width: 6px;
    height: auto;
  }

  .scroll-progress-bar {
    top: 0;
    bottom: auto;
    left: 0;
    width: 100%;
    height: var(--scroll-progress, 0%);
    background: linear-gradient(180deg, #E65424, #C9A227 80%, #D8B36A);
  }
}

/* ---------- 站点页脚 ---------- */
.site-footer {
  position: relative;
  background: linear-gradient(180deg, #061224 0%, #0B1F3A 40%);
  color: rgba(245, 239, 224, .85);
  border-top: 4px solid #C9A227;
  padding-top: 48px;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 220px;
  height: 4px;
  background: #E65424;
}

.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(216, 179, 106, .28);
}

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

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  color: #FFFFFF;
}

.footer-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.footer-brand-text {
  letter-spacing: .02em;
}

.footer-note {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(245, 239, 224, .66);
  max-width: 340px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-links,
.footer-legal,
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-family: var(--font-heading);
  font-size: 14px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #D8B36A;
  line-height: 1;
}

.footer-heading::before {
  content: "";
  width: 16px;
  height: 2px;
  background: #E65424;
  flex-shrink: 0;
}

.footer-link,
.footer-contact-link {
  display: inline-block;
  padding: 5px 0;
  color: rgba(245, 239, 224, .78);
  text-decoration: none;
  font-size: 15px;
  transition: color .2s, transform .2s;
}

.footer-link:hover,
.footer-contact-link:hover {
  color: #C9A227;
  transform: translateX(4px);
}

.footer-contact-link {
  word-break: break-all;
}

.footer-address {
  margin-top: 8px;
  font-style: normal;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(245, 239, 224, .58);
  padding-top: 6px;
  border-top: 1px dashed rgba(216, 179, 106, .3);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 18px 0;
  font-size: 13px;
  letter-spacing: .03em;
  color: rgba(245, 239, 224, .48);
}

.footer-copy {
  font-family: var(--font-body);
}

.footer-icp {
  font-family: var(--font-heading);
  letter-spacing: .12em;
}

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

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

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

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- 返回顶部 ---------- */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  background: #0B1F3A;
  border: 2px solid #C9A227;
  color: #F5EFE0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-backtop);
  box-shadow: 4px 4px 0 0 rgba(0, 0, 0, .2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s, transform .25s, visibility .25s, background .2s, color .2s;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #E65424;
  color: #FFFFFF;
}

.back-to-top-arrow {
  width: 22px;
  height: 22px;
}

/* ---------- 主内容与通用容器 ---------- */
#main-content {
  display: block;
  min-height: 60vh;
  scroll-margin-top: 80px;
}

.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

/* ---------- 章节 ---------- */
.section {
  padding: clamp(36px, 6vw, 64px) 0;
  border-top: 2px solid #E0D8C8;
}

.section--dark {
  background: linear-gradient(135deg, #0B1F3A, #061224);
  color: #F5EFE0;
  border-top: none;
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: #F5EFE0;
}

.section--dark a {
  color: #C9A227;
}

.section-caption {
  display: block;
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #E65424;
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1.15;
  margin-bottom: 12px;
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 14px 0;
  margin-bottom: 28px;
  font-size: 14px;
  border-bottom: 2px solid #E0D8C8;
}

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

.breadcrumb a {
  color: #0B1F3A;
  font-weight: 600;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: #E65424;
}

.breadcrumb li + li::before {
  content: "/";
  margin: 0 8px;
  color: #C9A227;
  font-weight: 700;
}

.breadcrumb li[aria-current="page"] {
  color: rgba(43, 29, 20, .55);
  font-weight: 500;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  font-family: var(--font-heading);
  font-size: 15px;
  letter-spacing: .02em;
  color: #FFFFFF;
  background: #0B1F3A;
  border: 2px solid #2B1D14;
  box-shadow: 4px 4px 0 0 #2B1D14;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s;
}

.btn:hover {
  background: #E65424;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 0 #2B1D14;
}

.btn:active {
  transform: none;
  box-shadow: 2px 2px 0 0 #2B1D14;
}

.btn--red {
  background: #E65424;
}

.btn--gold {
  background: #C9A227;
  color: #2B1D14;
}

.btn--ghost {
  background: transparent;
  color: #0B1F3A;
}

.btn--ghost:hover {
  background: #0B1F3A;
  color: #F5EFE0;
}

/* ---------- 栅格与卡片 ---------- */
.grid {
  display: grid;
  gap: 24px;
}

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

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

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

@media (max-width: 639.98px) {
  .grid--2,
  .grid--3 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: #FFFFFF;
  border: 2px solid #2B1D14;
  box-shadow: 6px 6px 0 0 rgba(11, 31, 58, 1);
  padding: 24px;
}

.card--paper {
  background: #E8DCC0;
}

.card--dark {
  background: #0B1F3A;
  color: #F5EFE0;
  border-color: #C9A227;
}

/* ---------- 坐标徽章 ---------- */
.stamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: .08em;
  color: #E65424;
  border: 2px solid #E65424;
  background: #F5EFE0;
  padding: 6px 12px;
  transform: rotate(-2deg);
  box-shadow: 3px 3px 0 0 rgba(43, 29, 20, .25);
}

/* ---------- 图片容器 ---------- */
.img-frame {
  position: relative;
  overflow: hidden;
  background: #E8DCC0;
  border: 2px solid #2B1D14;
  box-shadow: 6px 6px 0 0 rgba(11, 31, 58, 1);
  min-height: 160px;
}

.img-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(11, 31, 58, .06) 10px 12px);
  pointer-events: none;
}

.img-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

/* ---------- 弱动效 ---------- */
@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;
  }
}
