/* =========================================================
   大发彩票中心 · /assets/site.css
   共享外壳：reset / 变量 / 中文排版 / 头部 / 页脚 / 通用组件
   ========================================================= */

*,
*::before,
*::after { box-sizing: border-box; }

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

:where(ul, ol) { margin: 0; padding: 0; list-style: none; }

body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }

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

button, input, select, textarea { font: inherit; color: inherit; }

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

:root {
  /* —— 色彩系统 —— */
  --navy: #071A33;
  --navy-deep: #05142A;
  --navy-soft: #08203D;
  --panel: #0E2747;
  --red: #E63B4F;
  --red-bright: #F25063;
  --mint: #35F2C0;
  --mint-bright: #5CFFD8;
  --mint-deep: #0B7F6B;
  --gold: #F4B84A;
  --paper: #F5F7FB;
  --ink: #162337;
  --muted: #9FB2C9;
  --muted-ink: #5C7392;
  --edge: #28405F;
  --edge-soft: rgba(40, 64, 95, 0.5);
  --edge-line: rgba(40, 64, 95, 0.14);
  --dot: #1B6B66;

  /* —— 尺度 —— */
  --rail-w: 252px;
  --topbar-h: 66px;
  --gutter: clamp(18px, 3.6vw, 48px);
  --radius: 14px;
  --radius-sm: 10px;

  /* —— 字体 —— */
  --font-display: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(0.22, 0.68, 0.24, 1);
}

/* —— 基础排版 —— */
body {
  min-height: 100vh;
  padding-left: var(--rail-w);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0.008em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: inherit;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 6.2vw, 5.4rem); font-weight: 900; }
h2 { font-size: clamp(1.7rem, 3.1vw, 2.9rem); }
h3 { font-size: clamp(1.15rem, 1.7vw, 1.45rem); line-height: 1.28; letter-spacing: -0.015em; }
h4 { font-size: 1.05rem; line-height: 1.4; letter-spacing: -0.01em; }

p { text-wrap: pretty; }

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

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

/* =========================================================
   跳过链接
   ========================================================= */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 0.62rem 1rem;
  border-radius: 8px;
  background: var(--mint);
  color: #04231B;
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transform: translateY(-180%);
  transition: transform 0.18s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

/* =========================================================
   头部：桌面侧边轨道
   ========================================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 60;
  display: flex;
  background: linear-gradient(175deg, #08203D 0%, #05142A 62%, #06182F 100%);
  border-right: 1px solid var(--edge-soft);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(53, 242, 192, 0.16) 1px, transparent 1.4px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 58%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 58%);
  pointer-events: none;
}

.rail {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 3vh, 34px);
  width: 100%;
  height: 100%;
  padding: 26px 18px 22px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* —— 品牌 —— */
.site-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: none;
  min-width: 0;
  color: #fff;
}

.site-brand__mark {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(53, 242, 192, 0.32);
  background-color: rgba(53, 242, 192, 0.06);
  background-image: radial-gradient(circle, rgba(53, 242, 192, 0.45) 1px, transparent 1.3px);
  background-size: 7px 7px;
  background-position: center;
  overflow: hidden;
}

.site-brand__mark::after {
  content: "";
  position: absolute;
  inset: 7px;
  background: var(--mint);
  clip-path: polygon(0% 72%, 26% 44%, 52% 62%, 78% 20%, 100% 36%, 100% 52%, 78% 36%, 52% 78%, 26% 60%, 0% 88%);
}

.site-brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  line-height: 1.15;
}

.site-brand__name {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  white-space: nowrap;
}

.site-brand__sig {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

/* —— 移动菜单按钮 —— */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--edge);
  background: rgba(53, 242, 192, 0.07);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.nav-toggle:hover { border-color: var(--mint); background: rgba(53, 242, 192, 0.14); }

.nav-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #E8F1FF;
  transition: transform 0.22s var(--ease), opacity 0.16s linear;
}

.site-header[data-open] .nav-toggle__bar:first-child { transform: translateY(3.5px) rotate(45deg); }
.site-header[data-open] .nav-toggle__bar:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* —— 导航 —— */
.site-nav { flex: 1 1 auto; min-height: 0; }

.site-nav__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-nav__item { display: block; }

.site-nav__link {
  position: relative;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.35rem;
  padding: 10px 10px 10px 12px;
  border-radius: var(--radius-sm);
  color: #C4D3E6;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}

.site-nav__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 2px;
  border-radius: 2px;
  background: transparent;
  transition: background 0.18s var(--ease);
}

.site-nav__link:hover { background: rgba(53, 242, 192, 0.08); color: #fff; }

.site-nav__idx {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #6E8AAB;
  font-variant-numeric: tabular-nums;
}

.site-nav__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.site-nav__link[aria-current="page"] {
  color: #fff;
  background: linear-gradient(90deg, rgba(230, 59, 79, 0.24), rgba(230, 59, 79, 0) 80%);
}

.site-nav__link[aria-current="page"]::before { background: var(--red); }
.site-nav__link[aria-current="page"] .site-nav__idx { color: var(--mint); }

/* —— 轨道底部 —— */
.rail__foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--edge-soft);
}

.rail__status {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.74rem;
  line-height: 1.55;
  color: var(--muted);
}

.rail__dot {
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: 0.42em;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(53, 242, 192, 0.14);
}

/* =========================================================
   按钮
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.68rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-align: center;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

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

.btn--mint { background: var(--mint); border-color: var(--mint); color: #04231B; }
.btn--mint:hover { background: var(--mint-bright); border-color: var(--mint-bright); }

.btn--primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-bright); border-color: var(--red-bright); }

.btn--ghost { background: transparent; border-color: var(--edge); color: #E8F1FF; }
.btn--ghost:hover { border-color: var(--mint); color: var(--mint); }

.btn--outline { background: transparent; border-color: rgba(40, 64, 95, 0.32); color: var(--ink); }
.btn--outline:hover { border-color: var(--navy); background: rgba(7, 26, 51, 0.05); }

.btn--sm { padding: 0.5rem 0.85rem; font-size: 0.8rem; }
.btn--block { width: 100%; }

/* =========================================================
   页脚
   ========================================================= */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 110px);
  background: var(--navy);
  color: #D5E1F0;
  border-top: 1px solid var(--edge-soft);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(53, 242, 192, 0.1) 1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(120% 90% at 15% 0%, #000, transparent 72%);
  mask-image: radial-gradient(120% 90% at 15% 0%, #000, transparent 72%);
  pointer-events: none;
}

.footer__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.7fr) minmax(0, 0.72fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(40px, 6vw, 76px) clamp(20px, 3vw, 30px);
}

.footer__brand { min-width: 0; }

.footer__wordmark {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6.4vw, 5rem);
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(53, 242, 192, 0.28);
  margin-bottom: 18px;
}

.footer__summary {
  max-width: 34ch;
  margin-top: 16px;
  font-size: 0.9rem;
  line-height: 1.78;
  color: #A9BCD3;
}

.footer__col { min-width: 0; }

.footer__col-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer__links a {
  display: inline-block;
  font-size: 0.92rem;
  font-weight: 500;
  color: #C9D9EC;
  transition: color 0.16s var(--ease), transform 0.16s var(--ease);
}

.footer__links a:hover { color: var(--mint); transform: translateX(2px); }

.footer__contact-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.86rem;
  line-height: 1.75;
  color: #C9D9EC;
  word-break: break-word;
}

.footer__contact-line + .footer__contact-line { margin-top: 4px; }

.footer__contact-line .k {
  flex: none;
  min-width: 42px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer__note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--edge-soft);
  font-size: 0.76rem;
  line-height: 1.75;
  color: #7E97B4;
}

.footer__legal {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 22px;
  padding-top: 20px;
  border-top: 1px solid var(--edge);
  font-size: 0.78rem;
  color: #7E97B4;
}

.footer__icp {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: #93A9C4;
}

/* =========================================================
   通用布局与内容组件
   ========================================================= */
.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--wide { max-width: 1400px; }

.section { padding-block: clamp(40px, 6vw, 84px); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(20px, 3vw, 34px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mint-deep);
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: currentColor;
}

.eyebrow--onDark { color: var(--mint); }

.lede {
  max-width: 62ch;
  font-size: clamp(1rem, 1.3vw, 1.12rem);
  line-height: 1.8;
  color: var(--muted-ink);
}

.lede--onDark { color: #B7C8DC; }

.rule {
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--edge-soft);
}

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}

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

.panel {
  padding: clamp(16px, 2.4vw, 28px);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--panel);
  color: #DCE7F5;
}

.card {
  padding: clamp(16px, 2.2vw, 26px);
  border: 1px solid var(--edge-line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 1px 0 rgba(7, 26, 51, 0.03), 0 14px 30px -26px rgba(7, 26, 51, 0.55);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--mint);
  color: #04231B;
}

.tag--old { background: var(--gold); color: #2A1C00; }
.tag--live { background: var(--red); color: #fff; }
.tag--quiet { background: rgba(40, 64, 95, 0.14); color: var(--muted-ink); }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: clamp(16px, 2.4vw, 26px);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted-ink);
}

.breadcrumb li { display: flex; align-items: center; gap: 0.5rem; }
.breadcrumb li + li::before { content: "/"; color: #B9C6D6; }
.breadcrumb a { transition: color 0.16s var(--ease); }
.breadcrumb a:hover { color: var(--red); }

.prose {
  max-width: 68ch;
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--ink);
}

.prose p + p { margin-top: 1.05em; }
.prose h2 { margin-top: 2.2em; margin-bottom: 0.6em; }
.prose h3 { margin-top: 1.7em; margin-bottom: 0.5em; }

.prose ul,
.prose ol {
  margin-block: 1em;
  padding-left: 1.25em;
  list-style: disc;
}

.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }

.prose a {
  color: var(--mint-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* =========================================================
   图片容器基础（页面阶段使用）
   ========================================================= */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--panel);
}

.media::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(53, 242, 192, 0.22) 1px, transparent 1.4px);
  background-size: 14px 14px;
  opacity: 0.55;
  pointer-events: none;
}

.media__img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--wide { aspect-ratio: 21 / 9; }

.media__caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted-ink);
}

/* =========================================================
   滚动显现
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.42s var(--ease), transform 0.42s var(--ease);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
  }

  .reveal.is-visible {
    opacity: 1;
    transform: none;
    will-change: auto;
  }
}

/* =========================================================
   响应式：≤1023px 轨道塌缩为顶部条 + 抽屉
   ========================================================= */
@media (max-width: 1023px) {
  body {
    padding-left: 0;
    padding-top: var(--topbar-h);
  }

  .site-header {
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: var(--topbar-h);
    border-right: 0;
    border-bottom: 1px solid var(--edge-soft);
  }

  .site-header::before {
    -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.9), transparent 70%);
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.9), transparent 70%);
  }

  .rail {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: var(--topbar-h);
    padding: 0 16px;
    overflow: visible;
  }

  .site-brand__mark { width: 30px; height: 30px; }
  .site-brand__name { font-size: 0.94rem; }
  .site-brand__sig { display: none; }

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

  .site-nav {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    right: 0;
    max-height: calc(100dvh - var(--topbar-h));
    overflow-y: auto;
    padding: 14px 16px 22px;
    background: #06172E;
    border-bottom: 1px solid var(--edge);
    box-shadow: 0 28px 48px -26px rgba(0, 0, 0, 0.75);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s var(--ease), transform 0.24s var(--ease), visibility 0.24s;
  }

  .site-header[data-open] .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .site-nav__list { gap: 4px; }

  .site-nav__link {
    grid-template-columns: 2.4rem minmax(0, 1fr);
    padding: 13px 12px 13px 14px;
    font-size: 1rem;
    border-radius: 12px;
  }

  .rail__foot { display: none; }

  .footer__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
  .footer__wordmark { font-size: clamp(2.6rem, 9vw, 4rem); }
  .footer__summary { max-width: 46ch; }

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

@media (max-width: 640px) {
  .footer__inner { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .footer__legal { flex-direction: column; align-items: flex-start; gap: 6px; }
  .grid--2,
  .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .prose { font-size: 1rem; }
}

/* =========================================================
   减少动态
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .btn:hover,
  .footer__links a:hover {
    transform: none;
  }
}
