/* ============================================================
   开元棋盘娱乐官网中文站 · Site Kit 共享样式
   File: /assets/site.css
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --bg-void: #0B0E14;
  --bg-panel: #151A26;
  --gold: #D4AF37;
  --red: #C42B1D;
  --blue-neon: #4DE3FF;
  --purple-neon: #A855F7;
  --text-primary: #F5F2E9;
  --text-secondary: #B8BEC9;
  --text-on-gold: #111827;
  --status-online: #2ECC71;

  --font-display: 'Noto Serif SC', 'Songti SC', 'SimSun', Georgia, serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  --font-numeric: 'DIN Alternate', 'Roboto Mono', 'SFMono-Regular', Monaco, 'Courier New', monospace;

  --container-max: 1280px;
  --header-z: 100;
  --progress-z: 300;
  --skip-z: 400;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
  background-color: var(--bg-void);
  min-height: 100vh;
}

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

a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--gold);
}

ul,
ol {
  list-style: none;
}

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

/* ---------- Focus & Reduced Motion ---------- */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

@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;
  }
}

/* ---------- 主内容 ---------- */
#main-content {
  outline: none;
  min-height: 60vh;
}

/* ---------- 通用布局容器 ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 64px 0;
}

.content-wrap {
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.9;
  color: var(--text-primary);
}

/* ---------- 标题编排 ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(248, 242, 233, 0.08);
}

.section-index {
  font-family: var(--font-numeric);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--gold);
  white-space: nowrap;
  padding: 2px 8px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 2px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 200;
  letter-spacing: 0.08em;
  line-height: 1.3;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

/* ---------- 栅格 ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1.4;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.btn-gold {
  background: linear-gradient(135deg, #D4AF37, #B8962E);
  color: var(--text-on-gold);
  box-shadow: 0 2px 12px rgba(212, 175, 55, 0.18);
}

.btn-gold:hover {
  color: var(--text-on-gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.5);
}

.btn-outline:hover {
  color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
  border-color: var(--gold);
  transform: translateY(-2px);
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.breadcrumb li + li::before {
  content: '／';
  margin: 0 10px;
  color: rgba(248, 242, 233, 0.3);
}

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

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

.breadcrumb .is-active {
  color: var(--text-primary);
}

/* ---------- 标签与状态 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  border-radius: 2px;
  color: var(--text-secondary);
  background: rgba(248, 242, 233, 0.06);
  border: 1px solid rgba(248, 242, 233, 0.1);
}

.tag-red {
  color: #FF7062;
  background: rgba(196, 43, 29, 0.12);
  border-color: rgba(196, 43, 29, 0.35);
}

.tag-gold {
  color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
  border-color: rgba(212, 175, 55, 0.3);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--status-online);
  background: rgba(46, 204, 113, 0.08);
  border: 1px solid rgba(46, 204, 113, 0.25);
  border-radius: 999px;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--status-online);
  box-shadow: 0 0 8px rgba(46, 204, 113, 0.6);
}

/* ---------- 装饰组件 ---------- */
.rule-line {
  position: relative;
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.rule-line::before {
  content: '◆';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 8px;
  color: var(--gold);
  background: var(--bg-void);
  padding: 0 8px;
}

.chess-pattern {
  background-color: var(--bg-panel);
  background-image:
    linear-gradient(45deg, rgba(212, 175, 55, 0.05) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(212, 175, 55, 0.05) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(212, 175, 55, 0.05) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(212, 175, 55, 0.05) 75%);
  background-size: 32px 32px;
  background-position: 0 0, 0 16px, 16px -16px, -16px 0;
}

.panel-cut {
  background: var(--bg-panel);
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
  padding: 32px;
}

/* ---------- 图像容器 ---------- */
.image-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background-color: var(--bg-panel);
  background-image:
    linear-gradient(45deg, rgba(212, 175, 55, 0.04) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(212, 175, 55, 0.04) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(212, 175, 55, 0.04) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(212, 175, 55, 0.04) 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  border: 1px solid rgba(212, 175, 55, 0.12);
}

.image-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(11, 14, 20, 0.55));
  pointer-events: none;
}

.image-frame--wide {
  aspect-ratio: 16 / 9;
}

.image-frame--portrait {
  aspect-ratio: 3 / 4;
}

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

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: relative;
  z-index: var(--header-z);
  background:
    linear-gradient(180deg, rgba(212, 175, 55, 0.04), transparent 220px),
    var(--bg-void);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--blue-neon));
  z-index: var(--progress-z);
  pointer-events: none;
}

.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: var(--skip-z);
  padding: 10px 22px;
  background: var(--gold);
  color: var(--text-on-gold);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  border-radius: 2px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
  color: var(--text-on-gold);
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- 工具条 ---- */
.header-utilitybar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  padding: 10px 0 8px;
  border-bottom: 1px solid rgba(248, 242, 233, 0.07);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.utility-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
}

.utility-item {
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

a.utility-item:hover {
  color: var(--gold);
}

.utility-sep {
  color: rgba(248, 242, 233, 0.25);
}

.header-login-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 2px;
  padding: 3px 12px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.header-login-link:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.06);
}

.login-icon {
  font-size: 14px;
  color: var(--gold);
}

/* ---- 品牌刊头 ---- */
.brand-masthead {
  display: block;
  text-align: center;
  padding: 30px 0 24px;
  text-decoration: none;
  position: relative;
}

.brand-masthead::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.brand-masthead::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.6), transparent);
}

.brand-main {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 54px);
  font-weight: 200;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  line-height: 1.25;
  color: var(--gold);
  text-shadow: 0 0 48px rgba(212, 175, 55, 0.15);
  transition: text-shadow 0.3s ease;
}

.brand-masthead:hover .brand-main {
  text-shadow: 0 0 64px rgba(212, 175, 55, 0.3);
}

.brand-sub {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(11px, 1.4vw, 14px);
  font-weight: 400;
  letter-spacing: 0.55em;
  text-indent: 0.55em;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ---- 导航栏 ---- */
.header-navbar {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: 1px solid rgba(212, 175, 55, 0.28);
  border-bottom: 1px solid rgba(248, 242, 233, 0.06);
}

.site-nav {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 0;
}

.nav-link {
  position: relative;
  display: block;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--blue-neon));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-link[aria-current='page'] {
  color: var(--gold);
}

.nav-link[aria-current='page']::after {
  transform: scaleX(1);
}

/* ---- 移动端导航按钮 ---- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: 2px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.nav-toggle:hover {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.06);
}

.nav-toggle[aria-expanded='true'] {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
}

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

.nav-toggle[aria-expanded='true'] .toggle-bar:nth-child(1) {
  transform: translateY(7px) 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(-7px) rotate(-45deg);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background:
    linear-gradient(180deg, transparent, rgba(212, 175, 55, 0.03) 300px),
    var(--bg-void);
  border-top: 1px solid rgba(212, 175, 55, 0.25);
  margin-top: 80px;
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 56px 24px 0;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
  gap: 48px;
}

.footer-brand-main {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 200;
  letter-spacing: 0.3em;
  color: var(--gold);
  line-height: 1.3;
}

.footer-brand-sub {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.45em;
  color: var(--text-secondary);
  margin-top: 2px;
}

.footer-service-note {
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(248, 242, 233, 0.07);
}

.footer-col-title {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.footer-link {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-link:hover {
  color: var(--gold);
  padding-left: 4px;
}

.footer-contact-item {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.footer-contact-note {
  font-size: 12px;
  line-height: 1.7;
  color: rgba(248, 242, 233, 0.45);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(248, 242, 233, 0.06);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 24px;
  margin-top: 48px;
  padding: 20px 0 24px;
  border-top: 1px solid rgba(248, 242, 233, 0.07);
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-copy {
  letter-spacing: 0.04em;
}

.footer-icp {
  font-family: var(--font-numeric);
  letter-spacing: 0.08em;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .nav-link {
    padding: 14px 16px;
    font-size: 14px;
  }
}

@media (max-width: 820px) {
  .section {
    padding: 40px 0;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .header-inner {
    padding: 0 20px;
  }

  .header-utilitybar {
    font-size: 11px;
    padding: 8px 0 6px;
  }

  .utility-item {
    letter-spacing: 0.02em;
  }

  .header-login-link {
    font-size: 11px;
    padding: 2px 8px;
  }

  .brand-masthead {
    padding: 20px 0 16px;
  }

  .brand-main {
    font-size: 28px;
    letter-spacing: 0.22em;
    text-indent: 0.22em;
  }

  .brand-sub {
    font-size: 10px;
    letter-spacing: 0.38em;
    text-indent: 0.38em;
  }

  .header-navbar {
    justify-content: flex-end;
    padding: 8px 0;
    border-top: 1px solid rgba(212, 175, 55, 0.28);
    border-bottom: none;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: -20px;
    right: -20px;
    flex-direction: column;
    background: rgba(11, 14, 20, 0.98);
    padding: 8px 24px 16px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: 0 20px 32px rgba(0, 0, 0, 0.5);
    z-index: calc(var(--header-z) - 1);
  }

  .site-nav[data-open='true'] {
    display: flex;
  }

  .nav-link {
    padding: 14px 0;
    font-size: 15px;
    border-bottom: 1px solid rgba(248, 242, 233, 0.05);
  }

  .nav-link::after {
    left: 0;
    right: auto;
    width: 0;
    height: 2px;
  }

  .nav-link:hover::after,
  .nav-link[aria-current='page']::after {
    width: 32px;
  }

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

  .footer-inner {
    padding: 40px 20px 0;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    margin-top: 32px;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .header-utilitybar {
    justify-content: center;
  }

  .utility-group {
    justify-content: center;
  }

  .header-login-link {
    margin-top: 4px;
  }

  .brand-main {
    font-size: 24px;
  }

  .brand-sub {
    font-size: 9px;
  }

  .skip-link {
    left: 8px;
    font-size: 13px;
    padding: 8px 16px;
  }

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