/* ============================================================
   澳门电玩城牌局 — /assets/site.css
   共享外壳：reset、变量、中文排版、头部、页脚、通用组件
   ============================================================ */

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

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

body {
  margin: 0;
  min-height: 100vh;
}

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

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

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

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

h1, h2, h3, h4, h5, h6, p, figure, blockquote { margin: 0; }

table { border-collapse: collapse; width: 100%; }

:focus-visible {
  outline: 2px solid #39E0C8;
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 2. 变量 ---------- */
:root {
  --ink-night: #05130F;
  --panel-green: #0A211A;
  --panel-lift: #12352B;
  --grid-green: #1C4A3C;
  --gold: #D8B45A;
  --gold-bright: #F0DFA8;
  --neon-cyan: #39E0C8;
  --neon-violet: #A46BFF;
  --poker-red: #F0464E;
  --text-bright: #E8F3EE;
  --text-dim: #7C9C92;
  --zone-teal: #0F2A3A;

  --line: rgba(28, 74, 60, 0.85);
  --line-soft: rgba(28, 74, 60, 0.45);
  --gold-line: rgba(216, 180, 90, 0.42);

  --font-display: "Noto Sans SC", "HarmonyOS Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: var(--font-display);
  --font-mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;

  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --gutter: clamp(16px, 3vw, 32px);
  --shell: 1240px;
  --rail-h: 34px;
  --bar-h: 70px;
  --reveal-delay: 0ms;
}

/* ---------- 3. 页面基底 + 蓝图网格 ---------- */
body {
  background-color: var(--ink-night);
  background-image:
    radial-gradient(120% 70% at 50% -8%, rgba(18, 53, 43, 0.9), rgba(5, 19, 15, 0) 62%),
    linear-gradient(rgba(28, 74, 60, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 74, 60, 0.2) 1px, transparent 1px);
  background-size: auto, 72px 72px, 72px 72px;
  background-position: center top, center top, center top;
  color: var(--text-bright);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  letter-spacing: 0.008em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#main-content { scroll-margin-top: calc(var(--bar-h) + 44px); }

.mono { font-family: var(--font-mono); letter-spacing: 0.08em; }
.muted { color: var(--text-dim); }

/* ---------- 4. 排版层级 ---------- */
.title-xl {
  font-size: clamp(2.125rem, 5.2vw, 3.5rem);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0;
}

.title-lg {
  font-size: clamp(1.625rem, 3.2vw, 2.125rem);
  line-height: 1.22;
  font-weight: 900;
  letter-spacing: -0.015em;
  margin: 0;
}

.title-md {
  font-size: clamp(1.25rem, 1.8vw, 1.375rem);
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
}

.lead {
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.8;
  color: var(--text-dim);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

.annot {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  line-height: 1;
}

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

.section {
  position: relative;
  padding-block: clamp(48px, 7vw, 96px);
}

.section--panel {
  background: linear-gradient(180deg, rgba(10, 33, 26, 0.94), rgba(10, 33, 26, 0.5));
  border-block: 1px solid var(--line);
}

.section--teal {
  background: linear-gradient(180deg, rgba(15, 42, 58, 0.8), rgba(15, 42, 58, 0.3));
  border-block: 1px solid rgba(57, 224, 200, 0.2);
}

.blueprint-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
}

/* ---------- 6. Skip link ---------- */
.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 400;
  padding: 11px 20px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: linear-gradient(120deg, var(--gold-bright), var(--gold));
  color: #06140F;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.9);
  transition: top 0.24s ease;
}

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

/* ---------- 7. 头部外壳 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: linear-gradient(180deg, rgba(5, 19, 15, 0.98), rgba(10, 33, 26, 0.95));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.header-rail {
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--rail-h);
  padding-inline: var(--gutter);
  border-bottom: 1px dashed var(--line-soft);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}

.rail-mark b { color: var(--gold); font-weight: 700; }

.rail-quick {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.rail-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--text-dim);
}

.rail-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 9px var(--neon-cyan);
  animation: dot-pulse 2.4s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--bar-h);
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  padding-block: 6px;
}

.brand-glyph {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: linear-gradient(150deg, var(--gold-bright), #8A6A21);
  color: #05130F;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
  transform: rotate(-4deg);
  box-shadow: 0 0 0 1px rgba(240, 223, 168, 0.45), 0 10px 22px -12px rgba(216, 180, 90, 0.95);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--text-bright);
  white-space: nowrap;
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  white-space: nowrap;
}

/* 导航 */
.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

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

.nav-link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 9px 12px;
  border-radius: var(--radius-pill);
  color: var(--text-dim);
  font-size: clamp(13.5px, 1.05vw, 15px);
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-idx {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: rgba(124, 156, 146, 0.75);
}

.nav-link:hover {
  color: var(--text-bright);
  background: rgba(18, 53, 43, 0.9);
}

.nav-link[aria-current="page"] {
  color: #06140F;
  background: linear-gradient(120deg, var(--gold), var(--gold-bright));
  box-shadow: 0 10px 24px -16px rgba(216, 180, 90, 1);
}

.nav-link[aria-current="page"] .nav-idx { color: rgba(6, 20, 15, 0.62); }

.nav-cta { margin-left: 6px; }

/* 移动端开关 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 9px 15px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(10, 33, 26, 0.9);
  color: var(--text-bright);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.nav-toggle:hover { border-color: var(--gold-line); color: var(--gold-bright); }

.nav-toggle-bars {
  display: grid;
  gap: 3px;
  width: 16px;
}

.nav-toggle-bars i {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

/* 阅读进度刻度 */
.header-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  overflow: hidden;
  background: rgba(28, 74, 60, 0.6);
}

.header-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--gold), var(--neon-cyan));
  box-shadow: 0 0 12px rgba(57, 224, 200, 0.7);
}

/* ---------- 8. 按钮 / 胶囊 / 标签 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: linear-gradient(120deg, var(--gold-bright), var(--gold));
  color: #06140F;
  box-shadow: 0 14px 30px -18px rgba(216, 180, 90, 1);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px -18px rgba(216, 180, 90, 1);
}

.btn-ghost {
  background: rgba(18, 53, 43, 0.6);
  border-color: var(--line);
  color: var(--text-bright);
}

.btn-ghost:hover {
  border-color: var(--gold-line);
  color: var(--gold-bright);
  transform: translateY(-2px);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--gold-line);
  background: rgba(216, 180, 90, 0.08);
  color: var(--gold-bright);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.chip:hover {
  border-color: var(--gold);
  background: rgba(216, 180, 90, 0.18);
  transform: translateY(-1px);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(18, 53, 43, 0.72);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.tag--gold { border-color: var(--gold-line); background: rgba(216, 180, 90, 0.1); color: var(--gold-bright); }
.tag--cyan { border-color: rgba(57, 224, 200, 0.45); background: rgba(57, 224, 200, 0.1); color: var(--neon-cyan); }
.tag--violet { border-color: rgba(164, 107, 255, 0.45); background: rgba(164, 107, 255, 0.1); color: var(--neon-violet); }
.tag--red { border-color: rgba(240, 70, 78, 0.45); background: rgba(240, 70, 78, 0.1); color: var(--poker-red); }

/* ---------- 9. 卡片 / 图片容器 ---------- */
.card {
  position: relative;
  padding: clamp(20px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, var(--panel-green), rgba(5, 19, 15, 0.92));
}

.card--lift {
  background: linear-gradient(165deg, var(--panel-lift), var(--panel-green));
  box-shadow: 0 26px 60px -34px rgba(0, 0, 0, 0.95);
}

.card--interactive {
  transition: transform 0.26s ease, border-color 0.26s ease, box-shadow 0.26s ease;
}

.card--interactive:hover {
  transform: translateY(-6px);
  border-color: var(--gold-line);
  box-shadow: 0 30px 60px -34px rgba(216, 180, 90, 0.55);
}

.frame-media {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--panel-lift), var(--panel-green));
}

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

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

.frame-media__cap {
  position: absolute;
  left: 16px;
  bottom: 14px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(5, 19, 15, 0.82);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--text-dim);
}

/* ---------- 10. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 18px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
}

.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li::after { content: "/"; color: var(--grid-green); }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a { color: var(--text-dim); transition: color 0.18s ease; }
.breadcrumb a:hover { color: var(--gold-bright); }
.breadcrumb [aria-current="page"] { color: var(--gold); }

/* ---------- 11. 胶囊标签切换 ---------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab {
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(10, 33, 26, 0.8);
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.tab:hover { color: var(--text-bright); border-color: var(--gold-line); }

.tab[aria-selected="true"] {
  border-color: var(--gold);
  background: rgba(216, 180, 90, 0.14);
  color: var(--gold-bright);
}

[data-panel][hidden] { display: none !important; }

/* ---------- 12. 滚动显现 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.42s ease, transform 0.42s cubic-bezier(0.2, 0.7, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

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

/* ---------- 13. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(64px, 9vw, 120px);
  padding: clamp(40px, 6vw, 72px) var(--gutter) 28px;
  background: linear-gradient(180deg, rgba(10, 33, 26, 0.62), rgba(5, 19, 15, 0.99));
  border-top: 1px solid var(--line);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.65;
}

.site-footer .brand-glyph { width: 38px; height: 38px; font-size: 18px; }
.site-footer .brand-name { font-size: 17px; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
  gap: clamp(28px, 4vw, 48px);
  max-width: var(--shell);
  margin-inline: auto;
}

.footer-brand { display: flex; flex-direction: column; gap: 16px; }

.footer-note {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-dim);
  max-width: 34ch;
}

.footer-col-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.footer-col li + li { margin-top: 9px; }

.footer-col a {
  font-size: 15px;
  color: var(--text-dim);
  transition: color 0.18s ease;
}

.footer-col a:hover { color: var(--gold-bright); }

.footer-contact li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 14px;
  color: var(--text-bright);
  line-height: 1.6;
}

.footer-key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  min-width: 56px;
}

.footer-val { word-break: break-all; }

.footer-contact .footer-note { margin-top: 14px; }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  max-width: var(--shell);
  margin: clamp(32px, 5vw, 56px) auto 0;
  padding-top: 20px;
  border-top: 1px dashed var(--line-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

.footer-copy { color: var(--text-dim); }
.footer-icp { color: var(--gold); }
.footer-mark { color: rgba(124, 156, 146, 0.7); }

/* ---------- 14. 平板 ---------- */
@media (max-width: 1180px) {
  .rail-quick { display: none; }
}

@media (max-width: 1040px) {
  .header-rail { display: none; }

  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-left: 0;
    padding: 18px var(--gutter) 24px;
    max-height: calc(100vh - var(--bar-h));
    overflow-y: auto;
    background: linear-gradient(180deg, rgba(8, 26, 20, 0.99), rgba(5, 19, 15, 0.99));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 34px 60px -32px rgba(0, 0, 0, 0.95);
  }

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

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

  .nav-link {
    justify-content: space-between;
    padding: 14px 16px;
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    background: rgba(10, 33, 26, 0.72);
    font-size: 17px;
  }

  .nav-link[aria-current="page"] { border-color: transparent; }

  .nav-cta { width: 100%; margin-left: 0; }

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

/* ---------- 15. 手机 ---------- */
@media (max-width: 720px) {
  body { font-size: 16px; line-height: 1.75; }

  .brand-glyph { width: 36px; height: 36px; font-size: 17px; }
  .brand-name { font-size: 16px; }
  .brand-tag { font-size: 9.5px; letter-spacing: 0.16em; }

  .container { padding-inline: 18px; }
  .site-footer { padding-inline: 18px; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-note { max-width: none; }
  .footer-base { flex-direction: column; align-items: flex-start; }

  .annot { writing-mode: horizontal-tb; }
}

@media (max-width: 900px) and (min-width: 721px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- 16. 降低动态效果 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  [data-reveal] {
    transform: none;
    transition: opacity 0.2s linear;
    transition-delay: 0ms !important;
  }

  .card--interactive:hover,
  .btn:hover,
  .chip:hover { transform: none; }

  .skip-link { transition: none; }
}
