/* ===== 99棋牌电玩 · 共享样式 /assets/site.css ===== */

:root {
  --paper: #F6EFE3;
  --paper-2: #FBF6EC;
  --ink: #14101F;
  --felt: #2A1B54;
  --neon: #4B2BA8;
  --cyan: #12E0D2;
  --gold: #FFC24B;
  --rose: #E8368F;
  --green: #1FBF7A;
  --lilac: #C9BEE6;
  --warm: #7A6F63;
  --line: rgba(20, 16, 31, 0.14);
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --shell: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 14px;
  --radius-lg: 26px;
  --scroll-progress: 0;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 450;
  letter-spacing: 0.01em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
  background: repeating-linear-gradient(180deg, rgba(20, 16, 31, 0.035) 0 1px, transparent 1px 5px);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.02em;
}

p { max-width: 68ch; }

[hidden] { display: none !important; }

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

/* ---------- 跳过链接 ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 300;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--gold);
  color: #241408;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus-visible { transform: translateY(0); }

/* ---------- 容器 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  color: var(--paper);
  background: var(--ink);
}

.status-strip {
  background: linear-gradient(90deg, rgba(75, 43, 168, 0.45), rgba(18, 224, 210, 0.12) 70%, rgba(232, 54, 143, 0.16));
  border-bottom: 1px solid rgba(201, 190, 230, 0.18);
}

.status-strip__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.09em;
  color: rgba(246, 239, 227, 0.74);
}

.status-strip__note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  max-width: none;
}

.status-strip__chip {
  margin: 0;
  padding: 2px 10px;
  border: 1px solid rgba(31, 191, 122, 0.55);
  border-radius: 999px;
  background: rgba(31, 191, 122, 0.12);
  color: var(--green);
  white-space: nowrap;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(31, 191, 122, 0.6);
  animation: dot-pulse 1.8s ease-out infinite;
}

@keyframes dot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(31, 191, 122, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(31, 191, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 191, 122, 0); }
}

.command-bar {
  position: relative;
  border-bottom: 1px solid rgba(18, 224, 210, 0.3);
  background:
    radial-gradient(120% 190% at 10% -30%, #4B2BA8 0%, #2A1B54 44%, #14101F 80%);
}

.command-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(246, 239, 227, 0.05) 0 1px, transparent 1px 4px);
}

.command-bar__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.6vw, 36px);
  padding-block: 13px 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--paper);
  flex: 0 0 auto;
}

.brand__mark {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  padding: 3px 8px;
  border-radius: 6px;
  background: linear-gradient(130deg, #FFD98A, var(--gold) 60%, #E8A32B);
  color: #1C1305;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  transform: rotate(-4deg);
  box-shadow: 0 0 0 1px rgba(20, 16, 31, 0.5), 0 6px 14px -8px rgba(255, 194, 75, 0.9);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.2;
}

.brand__name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.brand__line {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: rgba(201, 190, 230, 0.82);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 8px 14px;
  border: 1px solid rgba(18, 224, 210, 0.45);
  border-radius: 999px;
  background: rgba(18, 224, 210, 0.1);
  color: var(--paper);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.nav-toggle:hover { background: rgba(18, 224, 210, 0.2); border-color: var(--cyan); }

.nav-toggle__bars {
  display: grid;
  gap: 4px;
  width: 16px;
}

.nav-toggle__bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.site-header[data-open] .nav-toggle__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header[data-open] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.site-header[data-open] .nav-toggle__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.4vw, 20px);
  margin-left: auto;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(2px, 0.7vw, 12px);
  list-style: none;
}

.site-nav__item { min-width: 0; }

.site-nav__link {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  padding: 7px 10px;
  border-radius: 7px;
  color: rgba(246, 239, 227, 0.84);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.site-nav__index {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: rgba(201, 190, 230, 0.6);
  transition: color 0.2s ease;
}

.site-nav__link:hover {
  color: var(--cyan);
  background: rgba(18, 224, 210, 0.1);
}

.site-nav__link:hover .site-nav__index { color: var(--cyan); }

.site-nav__link[aria-current="page"] { color: var(--gold); }

.site-nav__link[aria-current="page"] .site-nav__index { color: var(--gold); }

.site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 1px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--cyan));
}

.site-nav__cta {
  margin-left: 6px;
  padding: 9px 16px;
  font-size: 13px;
  white-space: nowrap;
}

.scroll-meter {
  position: relative;
  height: 3px;
  background: rgba(201, 190, 230, 0.18);
  overflow: hidden;
}

.scroll-meter__bar {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 0 50%;
  transform: scaleX(var(--scroll-progress, 0));
  background: linear-gradient(90deg, var(--cyan), var(--gold) 55%, var(--rose));
  transition: transform 0.12s linear;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

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

.btn--primary {
  background: linear-gradient(100deg, #FFD98A, var(--gold) 62%, #F0AC34);
  color: #241408;
  box-shadow: 0 10px 22px -16px rgba(255, 194, 75, 0.95);
}

.btn--primary:hover { box-shadow: 0 14px 26px -14px rgba(255, 194, 75, 0.8); }

.btn--ghost {
  border-color: rgba(18, 224, 210, 0.6);
  background: rgba(18, 224, 210, 0.08);
  color: var(--cyan);
}

.btn--ghost:hover { background: rgba(18, 224, 210, 0.18); }

.btn--dark {
  background: var(--ink);
  color: var(--paper);
}

.btn--dark:hover { background: var(--neon); }

/* ---------- 章节与文字 ---------- */
.section { padding-block: clamp(40px, 6vw, 88px); }

.section__head {
  display: grid;
  gap: 10px;
  max-width: 66ch;
  margin-bottom: clamp(20px, 3vw, 36px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--neon);
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--cyan);
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  color: var(--ink);
}

.lede {
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.8;
  color: #3B3346;
  max-width: 68ch;
}

.mono {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--warm);
}

.rule {
  height: 1px;
  border: 0;
  margin-block: clamp(24px, 3vw, 40px);
  background: repeating-linear-gradient(90deg, var(--line) 0 18px, transparent 18px 26px);
}

/* ---------- 网架与卡片 ---------- */
.grid { display: grid; gap: clamp(16px, 2.4vw, 30px); }

.grid--split {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.card {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(18, 224, 210, 0.75);
  box-shadow: 0 20px 34px -26px rgba(20, 16, 31, 0.7);
}

/* ---------- 框景 ---------- */
.frame {
  position: relative;
  padding: clamp(20px, 3vw, 44px);
  border: 1px solid rgba(201, 190, 230, 0.32);
  border-radius: var(--radius-lg);
  color: var(--paper);
  background:
    radial-gradient(130% 150% at 88% -20%, #4B2BA8 0%, #2A1B54 46%, #14101F 84%);
  overflow: hidden;
}

.frame::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(201, 190, 230, 0.26);
  border-radius: calc(var(--radius-lg) - 8px);
  pointer-events: none;
}

/* ---------- 标签与状态 ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--warm);
  background: rgba(122, 111, 99, 0.08);
}

.chip--cyan { color: #0B7C76; background: rgba(18, 224, 210, 0.14); }
.chip--rose { color: var(--rose); background: rgba(232, 54, 143, 0.1); }
.chip--green { color: #0E8A57; background: rgba(31, 191, 122, 0.12); }

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: clamp(16px, 2vw, 24px);
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--warm);
}

.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }

.breadcrumb li::after { content: "/"; color: rgba(122, 111, 99, 0.5); }

.breadcrumb li:last-child::after { content: none; }

.breadcrumb a {
  text-decoration: none;
  border-bottom: 1px solid rgba(18, 224, 210, 0.55);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.breadcrumb a:hover { color: var(--ink); border-color: var(--neon); }

/* ---------- 图片容器 ---------- */
.media-frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(20, 16, 31, 0.16);
  border-radius: var(--radius);
  background: radial-gradient(120% 120% at 18% 0%, #3A2470 0%, #241845 46%, #14101F 78%);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(246, 239, 227, 0.07) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
}

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

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

.media-frame--tall { aspect-ratio: 3 / 4; }

.media-frame--tilt { transform: rotate(-2.5deg); }

/* ---------- 横向主题带 ---------- */
.rail {
  display: flex;
  gap: clamp(12px, 1.6vw, 20px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 14px;
  scrollbar-color: var(--neon) transparent;
  scrollbar-width: thin;
}

.rail > * {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

/* ---------- 筛选协议 ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: clamp(18px, 2.4vw, 28px);
}

.filter-btn {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: #3B3346;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-btn:hover { border-color: var(--cyan); }

.filter-btn[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--gold);
}

.filter-status {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--warm);
}

/* ---------- 滚动显现 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 12px, 0) rotate(var(--reveal-tilt, -1.2deg));
  transition: opacity 0.32s ease, transform 0.32s ease;
}

[data-reveal][data-revealed] {
  opacity: 1;
  transform: translate3d(0, 0, 0) rotate(0deg);
}

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: clamp(40px, 6vw, 80px);
  padding-block: clamp(40px, 6vw, 76px) 24px;
  color: rgba(246, 239, 227, 0.82);
  background: radial-gradient(110% 130% at 86% -10%, #2A1B54 0%, #191330 46%, #14101F 78%);
}

.site-footer::after {
  content: "99";
  position: absolute;
  right: clamp(-10px, 2vw, 30px);
  bottom: -4vw;
  font-family: var(--font-mono);
  font-size: clamp(140px, 22vw, 300px);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.8;
  color: rgba(201, 190, 230, 0.07);
  pointer-events: none;
}

.footer-glow {
  position: absolute;
  top: -140px;
  left: -80px;
  width: min(520px, 70vw);
  height: min(520px, 70vw);
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(18, 224, 210, 0.16) 0%, rgba(18, 224, 210, 0) 68%);
}

.footer__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.35fr);
  gap: clamp(26px, 4vw, 64px);
}

.footer__lead { display: grid; gap: 12px; align-content: start; }

.footer__brand {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--paper);
  text-decoration: none;
  justify-self: start;
}

.footer__brand:hover { color: var(--gold); }

.footer__tagline {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  color: var(--cyan);
  max-width: none;
}

.footer__contact {
  margin-top: 6px;
  padding-left: 14px;
  border-left: 2px solid var(--gold);
  display: grid;
  gap: 4px;
}

.footer__contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 0;
  max-width: none;
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(246, 239, 227, 0.78);
}

.footer__contact-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--lilac);
  min-width: 56px;
}

.footer__contact .mono { color: var(--gold); }

.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
}

.footer__col { min-width: 0; }

.footer__col-title {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer__list {
  display: grid;
  gap: 9px;
  list-style: none;
}

.footer__link {
  display: inline-block;
  font-size: 14px;
  color: rgba(246, 239, 227, 0.76);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.footer__link:hover {
  color: var(--gold);
  border-color: rgba(255, 194, 75, 0.6);
  transform: translateX(2px);
}

.footer__base {
  position: relative;
  display: grid;
  gap: 6px;
  margin-top: clamp(28px, 4vw, 48px);
  padding-top: 18px;
  border-top: 1px solid rgba(201, 190, 230, 0.2);
  font-size: 12.5px;
  color: rgba(246, 239, 227, 0.6);
}

.footer__note,
.footer__legal,
.footer__meta { margin: 0; max-width: 84ch; }

.footer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

.footer__meta .mono { color: var(--lilac); }

/* ---------- 平板 ---------- */
@media (max-width: 1080px) {
  .site-nav__link { font-size: 13px; padding: 7px 8px; }
  .site-nav__index { display: none; }
  .footer__inner { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 移动导航 ---------- */
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 2;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding: 12px var(--gutter) 22px;
    background: linear-gradient(180deg, #1E1638 0%, #14101F 100%);
    border-bottom: 1px solid rgba(18, 224, 210, 0.32);
    box-shadow: 0 26px 50px -20px rgba(0, 0, 0, 0.7);
  }

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

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__link {
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
    padding: 13px 4px;
    font-size: 16px;
    border-radius: 0;
    border-bottom: 1px solid rgba(201, 190, 230, 0.14);
  }

  .site-nav__index { display: inline; font-size: 11px; }

  .site-nav__link:hover { background: transparent; }

  .site-nav__link[aria-current="page"]::after {
    left: 4px;
    right: 4px;
    bottom: 4px;
  }

  .site-nav__cta {
    width: 100%;
    margin: 16px 0 0;
    padding: 12px 18px;
    font-size: 15px;
  }

  .status-strip__note { font-size: 11px; }
  .status-strip__chip { font-size: 10.5px; }
}

@media (max-width: 720px) {
  .brand__name { font-size: 15px; }
  .brand__line { font-size: 9.5px; letter-spacing: 0.1em; }
  .brand__mark { min-width: 40px; font-size: 19px; }
  .nav-toggle__label { display: none; }
  .nav-toggle { padding: 9px 12px; }
  .status-strip__inner { flex-wrap: wrap; justify-content: flex-start; gap: 6px 12px; }
  .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__contact-label { min-width: 48px; }
  .media-frame--tilt { transform: none; }
}

@media (max-width: 420px) {
  .footer__cols { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 减弱动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

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

  .btn:hover,
  .card:hover,
  .footer__link:hover { transform: none; }
}
