/* ==================================================
   完美体育平台 / SITE KIT 共享基础样式
   ================================================== */

/* ---------- 设计变量 ---------- */
:root {
  --bg-default: #0B1020;
  --bg-panel: #131A2B;
  --bg-layer: #1A2340;
  --accent-blue: #00B3FF;
  --accent-green: #B6FF00;
  --accent-orange: #FF4D2E;
  --text-primary: #F2F5FF;
  --text-secondary: #A0AAC0;
  --text-data: #8CE0FF;
  --border-line: rgba(255, 255, 255, 0.16);
  --border-strong: rgba(255, 255, 255, 0.32);
  --gradient-bridge: linear-gradient(90deg, #00B3FF, #B6FF00);
  --shadow-hard: 4px 4px 0 rgba(0, 0, 0, 0.5);
  --font-head: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-data: "JetBrains Mono", "Roboto Mono", "SF Mono", "Cascadia Code", Consolas, monospace;
  --content-max: 1400px;
  --header-h: 70px;
  --radius: 2px;
  --space-section: clamp(64px, 10vw, 120px);
}

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

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

body {
  background: var(--bg-default);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  display: block;
}

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

a {
  color: var(--accent-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul, ol {
  list-style: none;
}

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

input {
  font: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 900;
  line-height: 1.25;
  color: var(--text-primary);
  text-rendering: optimizeLegibility;
}

h1 { font-size: clamp(36px, 5.5vw, 60px); }
h2 { font-size: clamp(28px, 4vw, 44px); }
h3 { font-size: 22px; }
h4 { font-size: 18px; }

p {
  max-width: 75ch;
}

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

::selection {
  background: rgba(0, 179, 255, 0.3);
  color: var(--text-primary);
}

/* ---------- 工具类 ---------- */
.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;
}

.container,
.container-narrow {
  width: 100%;
  margin: 0 auto;
  padding-left: clamp(20px, 4vw, 40px);
  padding-right: clamp(20px, 4vw, 40px);
}

.container { max-width: var(--content-max); }
.container-narrow { max-width: 960px; }

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

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(16px, 2.5vw, 32px);
}

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

@media (max-width: 1023px) {
  .col-3, .col-4 { grid-column: span 6; }
  .col-8 { grid-column: span 12; }
}

@media (max-width: 767px) {
  .col-3, .col-4, .col-6, .col-8, .col-12 { grid-column: span 12; }
}

/* ---------- 跳转到主内容 ---------- */
.skip-link {
  position: fixed;
  top: -48px;
  left: 16px;
  z-index: 300;
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  background: var(--accent-green);
  color: #0B1020;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 14px;
  line-height: 1;
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  text-decoration: none;
  transition: top 0.18s ease;
}

.skip-link:hover {
  text-decoration: none;
  filter: brightness(1.08);
}

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

/* ---------- 头部命令栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-default);
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 28px,
    rgba(255, 255, 255, 0.012) 28px,
    rgba(255, 255, 255, 0.012) 29px
  );
  border-bottom: 1px solid var(--border-line);
}

.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-line);
}

.scroll-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--gradient-bridge);
  pointer-events: none;
  z-index: 120;
}

.cmdbar {
  position: relative;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 clamp(20px, 3vw, 40px);
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}

/* 品牌区 */
.cmdbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-symbol {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 32px;
  padding: 0 10px;
  background: var(--bg-panel);
  border: 1px solid var(--accent-blue);
  border-radius: var(--radius);
  color: var(--accent-blue);
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  overflow: hidden;
  text-decoration: none;
}

.brand-symbol::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  border-top: 8px solid var(--accent-green);
  border-left: 8px solid transparent;
}

.brand-names {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-cn {
  color: var(--text-primary);
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.05em;
  text-decoration: none;
}

.brand-cn:hover {
  color: var(--accent-blue);
}

.brand-sub {
  color: var(--text-secondary);
  font-size: 11px;
  letter-spacing: 0.14em;
}

/* 导航 */
.cmdbar-nav {
  display: flex;
  align-items: stretch;
  gap: 4px;
  height: var(--header-h);
}

.cmdbar-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.cmdbar-link .link-index {
  font-family: var(--font-data);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-data);
  opacity: 0.7;
}

.cmdbar-link:hover,
.cmdbar-link:focus-visible {
  color: var(--accent-blue);
  background: rgba(0, 179, 255, 0.06);
}

.cmdbar-link[aria-current="page"] {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-green);
}

/* 右侧搜索与状态 */
.cmdbar-side {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.cmd-search {
  display: flex;
  align-items: center;
  height: 32px;
  background: var(--bg-panel);
  border: 1px solid var(--border-line);
  border-radius: var(--radius);
  transition: border-color 0.15s ease;
}

.cmd-search:focus-within {
  border-color: var(--accent-blue);
}

.cmd-search-mark {
  font-family: var(--font-data);
  font-size: 13px;
  color: var(--accent-green);
  padding: 0 4px 0 10px;
  user-select: none;
}

.cmd-search-input {
  width: 170px;
  height: 100%;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-body);
}

.cmd-search-input::placeholder {
  color: var(--text-secondary);
}

.cmd-search-input::-webkit-search-cancel-button {
  opacity: 0.5;
}

/* 状态灯 */
.cmd-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.cmd-status-dot {
  width: 7px;
  height: 7px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(182, 255, 0, 0.55);
  animation: status-pulse 2.4s ease-in-out infinite;
}

.cmd-status-text {
  font-family: var(--font-data);
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

@keyframes status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* 移动端导航按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  background: var(--bg-panel);
  border: 1px solid var(--border-line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

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

.toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* 搜索过滤态 */
.cmdbar-nav.is-filtering .cmdbar-link {
  opacity: 0.35;
}

.cmdbar-nav.is-filtering .cmdbar-link:not(.is-filtered) {
  opacity: 1;
  border-bottom-color: var(--accent-blue);
}

.cmdbar-nav.is-filtering .cmdbar-link.is-filtered {
  pointer-events: none;
}

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  background-color: var(--bg-default);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  border-top: 1px solid var(--border-line);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-bridge);
  z-index: 1;
}

.site-footer::after {
  content: "WMP";
  position: absolute;
  right: 24px;
  bottom: 56px;
  z-index: 0;
  font-family: var(--font-data);
  font-weight: 700;
  font-size: clamp(120px, 18vw, 260px);
  line-height: 1;
  color: rgba(255, 255, 255, 0.025);
  pointer-events: none;
}

.footer-core {
  position: relative;
  z-index: 1;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 64px clamp(20px, 4vw, 40px) 48px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: 40px;
}

/* 品牌简报 */
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  text-decoration: none;
}

.footer-brand:hover {
  text-decoration: none;
}

.footer-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 32px;
  padding: 0 10px;
  background: var(--bg-panel);
  border: 1px solid var(--accent-blue);
  border-radius: var(--radius);
  color: var(--accent-blue);
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 13px;
}

.footer-brand-name {
  color: var(--text-primary);
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.1em;
}

.footer-note {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 16px;
  max-width: 42ch;
}

.footer-trust {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
  border-left: 2px solid var(--accent-blue);
  padding-left: 12px;
  max-width: 46ch;
}

/* 链接列 */
.footer-section {
  min-width: 0;
}

.footer-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  padding-bottom: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-line);
}

.footer-heading::before {
  content: "";
  width: 16px;
  height: 3px;
  background: var(--gradient-bridge);
  flex-shrink: 0;
}

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

.footer-links a {
  display: inline-block;
  color: var(--text-secondary);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.15s ease, padding-left 0.15s ease;
}

.footer-links a:hover {
  color: var(--accent-blue);
  padding-left: 4px;
}

/* 联系块 */
.footer-contact-block p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.footer-contact-block .footer-contact-email,
.footer-contact-block .footer-contact-phone {
  font-family: var(--font-data);
  color: var(--text-data);
  word-break: break-all;
}

.footer-contact-block .footer-contact-address {
  margin-top: 12px;
  line-height: 1.6;
}

.footer-contact-block .footer-contact-note {
  margin-top: 12px;
  font-size: 13px;
  border-left: 2px solid var(--accent-orange);
  padding-left: 10px;
  max-width: 36ch;
}

/* 版权行 */
.footer-meta {
  position: relative;
  z-index: 1;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 18px clamp(20px, 4vw, 40px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--border-line);
  font-family: var(--font-data);
  font-size: 12px;
  color: var(--text-secondary);
}

/* ---------- 共享组件 ---------- */
.section-head {
  margin-bottom: 40px;
}

.section-index {
  display: block;
  font-family: var(--font-data);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-blue);
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.2;
  margin-bottom: 8px;
}

.section-sub {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 60ch;
}

.gradient-rule {
  display: block;
  width: 72px;
  height: 3px;
  background: var(--gradient-bridge);
  margin: 16px 0 24px;
}

.block-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border-line);
  border-radius: var(--radius);
  font-family: var(--font-data);
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
}

.block-label::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent-blue);
  flex-shrink: 0;
}

/* 面板 */
.brick {
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 24px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #0B1020;
}

.btn-primary:hover {
  background: transparent;
  color: var(--accent-blue);
}

.btn-outline {
  border-color: rgba(0, 179, 255, 0.45);
  color: var(--accent-blue);
}

.btn-outline:hover {
  background: rgba(0, 179, 255, 0.08);
  border-color: var(--accent-blue);
}

/* 数据展示 */
.data-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-line);
}

.data-key {
  font-size: 14px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.data-number {
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 18px;
  color: var(--text-data);
  word-break: break-all;
}

.data-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-family: var(--font-data);
  font-size: 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-secondary);
  white-space: nowrap;
}

/* 图片容器占位 */
.figure-frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 12px,
      rgba(255, 255, 255, 0.02) 12px,
      rgba(255, 255, 255, 0.02) 13px
    ),
    var(--bg-panel);
  border: 1px solid var(--border-line);
  border-radius: var(--radius);
  overflow: hidden;
}

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

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

.figure-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-line);
  font-family: var(--font-data);
  font-size: 12px;
  color: var(--text-secondary);
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-data);
  font-size: 13px;
  color: var(--text-secondary);
  padding: 14px 0;
}

.breadcrumb-item {
  color: var(--accent-blue);
  text-decoration: none;
}

.breadcrumb-item:hover {
  text-decoration: underline;
}

.breadcrumb-sep {
  color: var(--border-strong);
}

.breadcrumb-current {
  color: var(--text-secondary);
}

/* 提示条 */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--border-line);
  border-left-width: 4px;
  border-radius: var(--radius);
  background: var(--bg-panel);
  color: var(--text-primary);
  font-size: 14px;
}

.alert-info    { border-left-color: var(--accent-blue); }
.alert-success { border-left-color: var(--accent-green); }
.alert-warning { border-left-color: var(--accent-orange); }

/* ---------- 响应式 ---------- */
@media (max-width: 1199px) {
  .cmd-search-input { width: 130px; }
  .cmd-status-text { display: none; }
}

@media (max-width: 991px) {
  .cmdbar-side { display: none; }
  .cmdbar-nav { margin-left: auto; }
}

@media (max-width: 767px) {
  :root {
    --header-h: 56px;
  }

  .cmdbar {
    gap: 12px;
  }

  .cmdbar-brand { gap: 8px; }

  .brand-symbol {
    min-width: 40px;
    height: 28px;
    font-size: 12px;
    padding: 0 8px;
  }

  .brand-cn { font-size: 16px; }
  .brand-sub { display: none; }

  .cmdbar-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    height: auto;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-line);
    padding: 8px 16px 16px;
    margin-left: 0;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
  }

  .cmdbar-nav[data-open] {
    display: flex;
  }

  .cmdbar-link {
    height: 44px;
    padding: 0 12px;
    border-bottom: 1px solid var(--border-line);
    font-size: 15px;
  }

  .cmdbar-link[aria-current="page"] {
    background: rgba(0, 179, 255, 0.06);
  }

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

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

  .footer-core {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

@media (max-width: 599px) {
  .footer-core {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 40px;
  }

  .footer-meta {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

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

  .cmd-status-dot {
    animation: none;
  }
}
