/* =====================================================
   63棋牌（财神棋牌）· 全站共享样式层
   File: assets/site.css
   ===================================================== */

/* ---------- 01. 变量与 Reset ---------- */
:root {
  --gold: #FFD700;
  --gold-light: #FFE44D;
  --gold-deep: #DAA520;
  --gold-dark: #B8860B;
  --red: #DC143C;
  --red-dark: #9B0E2D;
  --black: #1A1A1A;
  --black-soft: #242424;
  --black-mute: #2E2E2E;
  --green: #50C878;
  --cream: #F5F5DC;
  --gray: #7A7A7A;
  --olive: #6B8E23;
  --terra: #D2691E;
  --white: #FFFFFF;

  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", Georgia, serif;
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "SF Mono", "Cascadia Code", Consolas, "Courier New", monospace;

  --container-w: 1240px;
  --container-pad: clamp(16px, 3vw, 32px);
  --radius-s: 4px;
  --radius-m: 8px;
  --radius-l: 16px;
  --radius-pill: 999px;

  --shadow-s: 0 2px 8px rgba(0, 0, 0, 0.12);
  --shadow-m: 0 4px 20px rgba(0, 0, 0, 0.18);
  --shadow-l: 0 16px 48px rgba(0, 0, 0, 0.30);
  --shadow-gold: 0 4px 24px rgba(255, 215, 0, 0.22);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.32s;
  --dur-slow: 0.6s;
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  color: #343434;
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

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

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.25;
  color: var(--black);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* ---------- 02. 可访问性 ---------- */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  left: -9999px;
  top: 12px;
  z-index: 3000;
  background: var(--gold);
  color: var(--black);
  font-weight: 700;
  font-size: 15px;
  padding: 10px 22px;
  border-radius: var(--radius-s);
  box-shadow: var(--shadow-l);
  transition: left 0s;
}
.skip-link:focus {
  left: 12px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 03. 布局容器 ---------- */
.container {
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.container-narrow {
  max-width: 880px;
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: clamp(56px, 8vw, 96px);
}

.section-dark {
  background: var(--black);
  color: var(--cream);
}
.section-dark .section-title {
  color: var(--gold);
}

.section-title {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 900;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--gray);
  max-width: 640px;
  margin-bottom: 36px;
}
.section-dark .section-subtitle {
  color: #A8A8A8;
}

/* 技术蓝图坐标标签 */
.coord-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dark);
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.32);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  line-height: 1.4;
}
.coord-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* ---------- 04. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  padding: 14px 28px;
  border-radius: var(--radius-s);
  border: 2px solid transparent;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
  white-space: nowrap;
  user-select: none;
}
.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: var(--black);
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}
.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  box-shadow: 0 6px 30px rgba(255, 215, 0, 0.32);
  color: var(--black);
}

.btn-red {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  box-shadow: 0 4px 16px rgba(220, 20, 60, 0.24);
}
.btn-red:hover {
  background: var(--red-dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border-color: rgba(255, 215, 0, 0.5);
}
.btn-outline:hover {
  border-color: var(--gold);
  background: rgba(255, 215, 0, 0.06);
}

.btn-outline-dark {
  background: transparent;
  color: var(--black);
  border-color: rgba(26, 26, 26, 0.3);
}
.btn-outline-dark:hover {
  border-color: var(--black);
  background: rgba(26, 26, 26, 0.04);
}

/* ---------- 05. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 215, 0, 0.12);
  color: var(--gold-dark);
  border: 1px solid rgba(255, 215, 0, 0.3);
}
.tag-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--black);
  border: none;
}
.tag-olive {
  background: rgba(107, 142, 35, 0.12);
  color: var(--olive);
  border-color: rgba(107, 142, 35, 0.3);
}
.tag-red {
  background: rgba(220, 20, 60, 0.1);
  color: var(--red);
  border-color: rgba(220, 20, 60, 0.3);
}

/* ---------- 06. 卡片 ---------- */
.card {
  background: #fff;
  border-radius: var(--radius-l);
  border: 1px solid rgba(26, 26, 26, 0.08);
  box-shadow: var(--shadow-s);
  padding: 28px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-m);
}

.card-glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-l);
  color: var(--cream);
  padding: 28px;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.card-glass:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}
.card-glass .card-title {
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 22px;
  margin-bottom: 10px;
}

/* ---------- 07. 响应式栅格 ---------- */
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: clamp(20px, 3vw, 32px);
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ---------- 08. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--gray);
  padding-block: 16px 0;
}
.breadcrumb a {
  color: var(--gray);
  transition: color var(--dur) var(--ease);
}
.breadcrumb a:hover {
  color: var(--gold-dark);
}
.breadcrumb [aria-current="page"] {
  color: var(--black);
  font-weight: 600;
}
.breadcrumb-sep {
  color: rgba(0, 0, 0, 0.25);
  user-select: none;
}

/* ---------- 09. 图片占位容器 ---------- */
.image-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-l);
  background: var(--black-mute);
  border: 1px solid rgba(255, 215, 0, 0.22);
  box-shadow: var(--shadow-m);
  aspect-ratio: 4 / 3;
}
.image-frame::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 215, 0, 0.14);
  border-radius: calc(var(--radius-l) - 6px);
  pointer-events: none;
}
.image-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-frame-wide {
  aspect-ratio: 16 / 9;
}
.image-frame-cover {
  aspect-ratio: 1 / 1;
}

/* ---------- 10. 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background:
    linear-gradient(rgba(255, 215, 0, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 215, 0, 0.045) 1px, transparent 1px),
    var(--black);
  background-size: 24px 24px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.22);
  box-shadow: var(--shadow-m);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 3000;
  pointer-events: none;
  background: rgba(255, 215, 0, 0.08);
}
.scroll-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--red) 0%, var(--gold) 55%, var(--gold-light) 100%);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}

.header-inner {
  display: flex;
  flex-direction: column;
}

.header-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px 10px;
  border-bottom: 1px dashed rgba(255, 215, 0, 0.18);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 46px;
  padding-inline: 6px;
  border-radius: var(--radius-s);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: var(--black);
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 24px;
  line-height: 1;
  box-shadow: var(--shadow-gold);
  letter-spacing: -0.02em;
}
.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.brand-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--gold);
  line-height: 1.2;
}
.brand-version {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #8e8e8e;
  line-height: 1.3;
  white-space: nowrap;
}

.header-coord {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #A0A0A0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  white-space: nowrap;
}
.coord-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(80, 200, 120, 0.7);
  flex-shrink: 0;
}

.header-navbar {
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  padding-block: 10px 12px;
}

/* ---------- 11. 主导航 ---------- */
.main-nav {
  flex: 1;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-item {
  margin: 0;
}
.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: #D6D6D6;
  border-radius: var(--radius-s);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
  transition: width var(--dur) var(--ease);
}
.nav-link:hover {
  color: var(--gold);
  background: rgba(255, 215, 0, 0.05);
}
.nav-link:hover::after {
  width: calc(100% - 24px);
}
.nav-link[aria-current="page"] {
  color: var(--gold);
  font-weight: 700;
}
.nav-link[aria-current="page"]::after {
  width: calc(100% - 24px);
}

.header-cta {
  flex-shrink: 0;
}

/* ---------- 12. 移动端导航按钮 ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-s);
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.26);
  color: var(--gold);
  flex-shrink: 0;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.nav-toggle:hover {
  background: rgba(255, 215, 0, 0.16);
  border-color: rgba(255, 215, 0, 0.5);
}
.nav-toggle-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle-line {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- 13. 页脚 ---------- */
.site-footer {
  position: relative;
  background:
    linear-gradient(rgba(255, 215, 0, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 215, 0, 0.035) 1px, transparent 1px),
    #101010;
  background-size: 28px 28px;
  color: #B0B0B0;
  border-top: 3px solid var(--gold);
  overflow: hidden;
}

.footer-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.footer-coin {
  position: absolute;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.05;
  border: 2px solid var(--gold);
  box-shadow: inset 0 0 0 6px #101010;
}
.footer-coin::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32%;
  height: 32%;
  transform: translate(-50%, -50%);
  background: #101010;
  border-radius: 2px;
}
.footer-coin-1 {
  width: 140px;
  height: 140px;
  top: 40px;
  left: -50px;
}
.footer-coin-2 {
  width: 90px;
  height: 90px;
  right: 12%;
  top: 30px;
}
.footer-coin-3 {
  width: 60px;
  height: 60px;
  right: 5%;
  bottom: 120px;
}
.footer-coin-4 {
  width: 120px;
  height: 120px;
  bottom: -40px;
  left: 22%;
}

.footer-inner {
  position: relative;
  z-index: 1;
  padding-block: 56px 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: clamp(24px, 4vw, 48px);
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.14);
}

.footer-brand {
  margin-bottom: 18px;
}
.footer-brand .brand-name {
  color: var(--gold);
  font-size: 20px;
}
.footer-brand .brand-version {
  color: var(--gray);
}

.footer-about-text {
  font-size: 14px;
  line-height: 1.9;
  color: #A0A0A0;
  margin-bottom: 12px;
}
.footer-trust {
  font-size: 13px;
  line-height: 1.8;
  color: #6E6E6E;
  padding-left: 14px;
  border-left: 3px solid rgba(255, 215, 0, 0.35);
}

.footer-col-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 2px;
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(255, 215, 0, 0.2);
}

.footer-nav-list li {
  margin-bottom: 10px;
}
.footer-nav-list a {
  font-size: 14px;
  color: #9A9A9A;
  transition: color var(--dur) var(--ease), padding-left var(--dur) var(--ease);
}
.footer-nav-list a:hover {
  color: var(--gold);
  padding-left: 6px;
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 12px;
  border-left: 2px solid rgba(255, 215, 0, 0.18);
}
.contact-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
}
.contact-value {
  font-size: 14px;
  color: #C8C8C8;
  word-break: break-all;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 24px;
}
.footer-copyright {
  font-size: 13px;
  color: var(--gray);
}
.footer-icp {
  font-size: 13px;
  color: var(--gray);
  letter-spacing: 0.06em;
}

/* ---------- 14. 粒子层 ---------- */
.particle-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.particle {
  position: absolute;
  bottom: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-light) 0%, var(--gold) 60%, rgba(255, 215, 0, 0) 100%);
  opacity: 0.5;
  animation-name: particle-rise;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform, opacity;
}
@keyframes particle-rise {
  0% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.5;
  }
  60% {
    opacity: 0.25;
  }
  100% {
    transform: translateY(calc(-100vh - 40px)) translateX(20px) scale(0.4);
    opacity: 0;
  }
}

/* ---------- 15. 滚动显现 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 16. 响应式调整 ---------- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 28px;
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 991px) {
  .nav-toggle {
    display: inline-flex;
  }
  .header-cta {
    margin-left: auto;
  }
  .main-nav {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: min(340px, 100%);
    background: #161616;
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-top: 2px solid var(--gold);
    border-radius: 0 0 0 var(--radius-l);
    box-shadow: var(--shadow-l);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
    z-index: 1200;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }
  .main-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .main-nav .nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 0;
  }
  .main-nav .nav-link {
    min-height: 48px;
    padding: 0 20px;
    border-left: 3px solid transparent;
    border-radius: 0;
    color: #D0D0D0;
  }
  .main-nav .nav-link::after {
    display: none;
  }
  .main-nav .nav-link:hover,
  .main-nav .nav-link[aria-current="page"] {
    background: rgba(255, 215, 0, 0.06);
    color: var(--gold);
    border-left-color: var(--gold);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767px) {
  .header-cta {
    display: none;
  }
  .header-topbar {
    padding-block: 12px 8px;
  }
  .brand-mark {
    min-width: 40px;
    height: 40px;
    font-size: 20px;
  }
  .brand-name {
    font-size: 17px;
    letter-spacing: 1px;
  }
  .header-coord {
    font-size: 10px;
    padding: 5px 10px;
  }
  .nav-toggle {
    width: 40px;
    height: 40px;
  }
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 420px) {
  .brand-version {
    display: none;
  }
  .header-coord .coord-text {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* ---------- 17. 减少动态（无障碍） ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .particle-layer {
    display: none;
  }
  .scroll-progress-bar {
    transition: none;
  }
}
