/* 聖域传奇 静态站样式：首页(index) 与内页(game/classes/service) 共用
   静态资源（图片/视频/CSS）的缓存版本号写在各 HTML 的 ?v= 参数上，改动资源后统一更新即可刷新缓存。 */

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

:root {
  --gold-hi: #fff2cf;
  --gold: #e2b972;
  --gold-lo: #9c6a26;
  --txt-dim: rgba(226, 206, 166, .62);
  /* 尺寸均以设计稿 1672x941 为基准换算成视口单位 */
  --pad-x: clamp(20px, 5.44vw, 130px);
  --pad-nav: clamp(20px, 8.7vw, 208px);
  --gap-feat: clamp(16px, 6.2vw, 130px);
}

html,
body { height: 100%; }

body {
  margin: 0;
  background: #0b0705;
  color: #e8d7b4;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", "Microsoft YaHei", serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* 仅供读屏软件使用的隐藏文本 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid rgba(240, 190, 100, .85);
  outline-offset: 3px;
}

/* ---------- 舞台与背景 ---------- */

.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 左侧与上下压暗，保证文案与导航可读 */
.scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(125% 95% at 50% 42%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, .6) 100%),
    linear-gradient(90deg, rgba(8, 5, 3, .8) 0%, rgba(8, 5, 3, .45) 34%, rgba(8, 5, 3, 0) 60%),
    linear-gradient(180deg, rgba(8, 5, 3, .72) 0%, rgba(8, 5, 3, 0) 20%, rgba(8, 5, 3, 0) 55%, rgba(8, 5, 3, .8) 100%);
}

/* ---------- 顶部导航 ---------- */

.nav {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: clamp(56px, 7.4vh, 88px);
  padding: 0 var(--pad-nav);
  background: linear-gradient(180deg, rgba(9, 6, 4, .8) 0%, rgba(9, 6, 4, .4) 60%, rgba(9, 6, 4, 0) 100%);
}

.nav::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 152, 74, .5) 16%, rgba(196, 152, 74, .5) 84%, transparent);
}

.logo {
  display: flex;
  align-items: center;
  gap: .5em;
  font-size: clamp(17px, 1.85vw, 34px);
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--gold-hi);
  text-shadow: 0 2px 12px rgba(0, 0, 0, .75);
}

.logo-mark {
  width: 1.6em;
  height: 1.6em;
  flex: none;
  filter: drop-shadow(0 0 8px rgba(226, 185, 114, .35));
}

.nav-body {
  scrollbar-width: none;
}

.nav-body::-webkit-scrollbar { display: none; }

.menu {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3.7vw, 78px);
}

.menu a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 6px 0;
  font-size: clamp(13px, 1.32vw, 27px);
  letter-spacing: .16em;
  color: rgba(226, 206, 166, .8);
  transition: color .25s ease, text-shadow .25s ease;
}

.menu a:hover {
  color: var(--gold-hi);
  text-shadow: 0 0 16px rgba(226, 185, 114, .6);
}

.menu .is-active > a {
  color: #fff5da;
  text-shadow: 0 0 18px rgba(240, 190, 100, .8);
}

/* 当前栏目下方的菱形标记 */
.menu .is-active > a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #fff5da, #c8963e);
  box-shadow: 0 0 12px rgba(240, 190, 100, .95);
}

/* ---------- 主视觉 ---------- */

.hero {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(16px, 3.4vh, 44px);
  padding: clamp(16px, 4vh, 48px) var(--pad-x) clamp(30px, 6.2vh, 78px);
}

.hero-title {
  display: block;
  width: clamp(250px, 37.7vw, 760px);
  height: auto;
  margin-left: clamp(0px, 4.7vw, 88px);
  filter: drop-shadow(0 16px 36px rgba(0, 0, 0, .6));
}

.downloads {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(10px, 1.32vw, 30px);
}

.dl {
  display: block;
  width: clamp(130px, 14.05vw, 290px);
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .55));
  transition: transform .28s cubic-bezier(.2, .8, .3, 1), filter .28s ease;
}

.dl img {
  display: block;
  width: 100%;
  height: auto;
}

.dl:hover {
  transform: translateY(-4px) scale(1.03);
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, .62)) brightness(1.12) saturate(1.08);
}

.dl:active {
  transform: translateY(-1px) scale(1.005);
}

/* ---------- 底部特色栏 ---------- */

.features {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 2.2vh, 24px);
  padding: 0 var(--pad-x) clamp(18px, 5.6vh, 64px);
}

.ornament {
  position: relative;
  width: clamp(140px, 18vw, 320px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 152, 74, .55), transparent);
}

.ornament span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: linear-gradient(135deg, #fff5da, #b8863b);
  box-shadow: 0 0 10px rgba(240, 190, 100, .9);
}

.feat-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-feat);
}

.feat {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(8px, .95vw, 16px);
}

/* 相邻特色项之间的竖向分隔线 */
.feat + .feat::before {
  content: "";
  position: absolute;
  left: calc(var(--gap-feat) / -2);
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: clamp(26px, 4vh, 50px);
  background: linear-gradient(180deg, transparent, rgba(196, 152, 74, .55), transparent);
}

.feat-icon {
  width: clamp(38px, 5vw, 88px);
  height: auto;
  flex: none;
  filter: drop-shadow(0 0 10px rgba(226, 185, 114, .25));
}

.frame {
  fill: rgba(14, 9, 5, .6);
  stroke: url(#gld2);
  stroke-width: 2;
  stroke-linejoin: round;
}

/* 金色渐变文字：color 为不支持 background-clip 时的回退色 */
.gold-text,
.feat-title {
  background: linear-gradient(180deg, #fff5da 0%, #e6bd74 52%, #a9762f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #e6bd74;
}

.feat-title {
  font-size: clamp(14px, 1.5vw, 29px);
  font-weight: 700;
  letter-spacing: .1em;
}

.feat-sub {
  margin-top: .3em;
  font-size: clamp(10px, 1.02vw, 19px);
  letter-spacing: .14em;
  color: var(--txt-dim);
}

/* ---------- 窄屏 ---------- */

@media (max-width: 760px) {
  .nav {
    flex-direction: column;
    align-items: center;
    height: auto;
    gap: 10px;
    padding: 14px var(--pad-x);
  }

  .nav-body {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .menu {
    min-width: max-content;
    justify-content: center;
    gap: 20px;
    padding: 0 4px 8px;
  }

  .menu a { font-size: 14px; }

  .hero {
    padding-top: 8px;
    padding-bottom: 28px;
  }

  .hero-title { width: min(80vw, 360px); }

  /* 手机端不提供 PC 客户端 */
  .dl--pc { display: none; }

  /* 剩余两个按钮改为竖排换行、居中并放大 */
  .downloads {
    width: 100%;
    flex-flow: column nowrap;
    align-items: center;
    gap: 14px;
  }

  .dl { width: min(60vw, 260px); }

  .feat-list {
    flex-wrap: wrap;
    gap: 20px 24px;
  }

  .feat + .feat::before { display: none; }

  .feat-icon { width: 44px; }
  .feat-title { font-size: 15px; }
  .feat-sub { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }

  .dl:hover { transform: none; }
}

/* ============================================================
   内页通用（游戏介绍 / 职业介绍 / 在线客服）
   ============================================================ */

/* 内页复用首页底图但固定不随内容滚动，也避免每页都加载视频 */
.stage--page .bg,
.stage--page .scrim { position: fixed; }

.scrim--page {
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(0, 0, 0, .28) 0%, rgba(0, 0, 0, .68) 55%, rgba(0, 0, 0, .88) 100%),
    linear-gradient(180deg, rgba(8, 5, 3, .72) 0%, rgba(8, 5, 3, .86) 100%);
}

.page {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding: clamp(20px, 4vh, 52px) clamp(18px, 4vw, 44px) clamp(40px, 7vh, 80px);
}

/* ---------- 页头 ---------- */

.page-hero { padding: clamp(14px, 3vh, 34px) 0 clamp(10px, 2vh, 22px); text-align: center; }
.page-kicker { font-size: clamp(10px, .92vw, 15px); letter-spacing: .42em; text-indent: .42em; color: var(--txt-dim); }
.page-title { margin-top: .45em; font-size: clamp(28px, 4.2vw, 62px); font-weight: 700; letter-spacing: .16em; text-indent: .16em; }
.page-hero .ornament { margin: clamp(14px, 2.6vh, 28px) auto; }
.page-lead { max-width: 64ch; margin-inline: auto; font-size: clamp(13px, 1.12vw, 18px); line-height: 2; color: rgba(232, 215, 180, .76); }

/* ---------- 区块 ---------- */

.section { margin-top: clamp(34px, 6vh, 76px); }

.section-title {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.2vw, 18px);
  font-size: clamp(19px, 2.1vw, 32px);
  font-weight: 700;
  letter-spacing: .14em;
}

.section-title::before {
  content: "";
  flex: none;
  width: 4px;
  height: 1.05em;
  background: linear-gradient(180deg, #fff5da, #a9762f);
  transform: skewX(-12deg);
  box-shadow: 0 0 10px rgba(240, 190, 100, .45);
}

.section-title .rule { flex: 1 1 auto; height: 1px; background: linear-gradient(90deg, rgba(196, 152, 74, .5), transparent); }
.section-desc { max-width: 74ch; margin-top: .8em; font-size: clamp(12px, 1.02vw, 16px); line-height: 1.95; color: rgba(232, 215, 180, .68); }

/* ---------- 卡片 ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(14px, 1.8vw, 26px);
  margin-top: clamp(16px, 2.8vh, 30px);
}

.panel {
  position: relative;
  padding: clamp(18px, 2.1vw, 30px);
  border: 1px solid rgba(196, 152, 74, .26);
  background: linear-gradient(180deg, rgba(24, 15, 9, .8), rgba(11, 7, 4, .88));
  box-shadow: inset 0 1px 0 rgba(255, 235, 190, .06), 0 12px 30px rgba(0, 0, 0, .38);
  transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}

/* 四角金饰 */
.panel::before,
.panel::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(226, 185, 114, .72);
  pointer-events: none;
}

.panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.panel::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.panel:hover {
  border-color: rgba(226, 185, 114, .55);
  transform: translateY(-4px);
  box-shadow: inset 0 1px 0 rgba(255, 235, 190, .1), 0 18px 40px rgba(0, 0, 0, .5);
}

.panel-icon { width: clamp(42px, 4.2vw, 62px); height: auto; filter: drop-shadow(0 0 10px rgba(226, 185, 114, .28)); }
.panel-title { margin-top: .55em; font-size: clamp(15px, 1.32vw, 22px); font-weight: 700; letter-spacing: .1em; color: #ffeec4; }
.panel-tag { margin-top: .25em; font-size: clamp(10px, .88vw, 14px); letter-spacing: .14em; color: var(--txt-dim); }
.panel-body { margin-top: .85em; font-size: clamp(12px, 1vw, 16px); line-height: 1.9; color: rgba(232, 215, 180, .72); }

/* ---------- 职业属性条 ---------- */

.stat { display: flex; align-items: center; gap: .8em; margin-top: .75em; font-size: clamp(11px, .95vw, 15px); }
.stat-name { flex: none; min-width: 4.6em; white-space: nowrap; letter-spacing: .1em; color: var(--txt-dim); }
.stat-bar { flex: 1 1 auto; height: 6px; background: rgba(255, 235, 190, .08); border: 1px solid rgba(196, 152, 74, .28); }
.stat-fill { display: block; height: 100%; width: var(--v, 50%); background: linear-gradient(90deg, #8a5a1c, #ffeec4); box-shadow: 0 0 8px rgba(240, 190, 100, .5); }

.tags { display: flex; flex-wrap: wrap; gap: .5em; margin-top: 1.1em; }
.tag { padding: .34em .8em; border: 1px solid rgba(196, 152, 74, .4); background: rgba(196, 152, 74, .08); font-size: clamp(10px, .86vw, 14px); letter-spacing: .1em; color: #e6c98d; }

/* ---------- 时间线 ---------- */

.timeline { margin-top: clamp(16px, 2.8vh, 30px); padding-left: clamp(18px, 2.4vw, 34px); border-left: 1px solid rgba(196, 152, 74, .32); }
.step { position: relative; padding-bottom: clamp(16px, 2.6vh, 28px); }
.step:last-child { padding-bottom: 0; }

.step::before {
  content: "";
  position: absolute;
  top: .5em;
  left: calc(-1 * clamp(18px, 2.4vw, 34px) - 5px);
  width: 9px;
  height: 9px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #fff5da, #b8863b);
  box-shadow: 0 0 10px rgba(240, 190, 100, .7);
}

.step-title { font-size: clamp(14px, 1.18vw, 20px); letter-spacing: .1em; color: #ffeec4; }
.step-body { margin-top: .4em; font-size: clamp(12px, 1vw, 16px); line-height: 1.9; color: rgba(232, 215, 180, .68); }

/* ---------- 表格 ---------- */

.table-wrap { margin-top: clamp(14px, 2.4vh, 26px); overflow-x: auto; border: 1px solid rgba(196, 152, 74, .22); background: rgba(11, 7, 4, .6); }
.table { width: 100%; min-width: 540px; border-collapse: collapse; font-size: clamp(12px, 1vw, 16px); }
.table th,
.table td { padding: clamp(10px, 1.3vh, 16px) clamp(12px, 1.3vw, 20px); text-align: left; white-space: nowrap; border-bottom: 1px solid rgba(196, 152, 74, .16); }
.table th { font-weight: 700; letter-spacing: .12em; color: #ffeec4; background: rgba(196, 152, 74, .12); }
.table td { letter-spacing: .06em; color: rgba(232, 215, 180, .76); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(196, 152, 74, .07); }

.pill { display: inline-block; padding: .18em .66em; font-size: .86em; letter-spacing: .1em; border: 1px solid; }
.pill--new { color: #fff2cf; border-color: rgba(226, 185, 114, .6); background: rgba(226, 185, 114, .14); }
.pill--hot { color: #ffd0a8; border-color: rgba(255, 140, 80, .5); background: rgba(255, 120, 60, .14); }

/* ---------- FAQ：原生 details，无需脚本 ---------- */

.faq { margin-top: clamp(14px, 2.4vh, 26px); border-top: 1px solid rgba(196, 152, 74, .22); }
.faq details { border-bottom: 1px solid rgba(196, 152, 74, .22); }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  padding: clamp(13px, 1.9vh, 22px) 0;
  cursor: pointer;
  list-style: none;
  font-size: clamp(13px, 1.1vw, 19px);
  letter-spacing: .1em;
  color: #f2ddb0;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  flex: none;
  font-size: 1.5em;
  line-height: 1;
  color: var(--gold);
  transition: transform .3s ease;
}

.faq details[open] summary::after { transform: rotate(45deg); }
.faq-body { padding: 0 0 clamp(14px, 2.1vh, 24px); font-size: clamp(12px, 1vw, 16px); line-height: 1.95; color: rgba(232, 215, 180, .68); }

/* ---------- 联系方式与行动按钮 ---------- */

.contact-line { display: flex; align-items: baseline; gap: .7em; margin-top: .8em; font-size: clamp(12px, 1.02vw, 17px); }
.contact-label { flex: none; font-size: .88em; letter-spacing: .12em; color: var(--txt-dim); }
.contact-value { letter-spacing: .06em; color: #ffeec4; }

.cta { margin-top: clamp(32px, 6vh, 72px); text-align: center; }

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: clamp(12px, 1.6vh, 18px) clamp(24px, 3vw, 46px);
  border: 1px solid rgba(226, 185, 114, .6);
  font-size: clamp(13px, 1.08vw, 18px);
  letter-spacing: .18em;
  text-indent: .18em;
  color: #fff2cf;
  background: linear-gradient(180deg, rgba(196, 152, 74, .3), rgba(110, 70, 24, .24));
  box-shadow: 0 10px 26px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 240, 205, .16);
  transition: transform .28s cubic-bezier(.2, .8, .3, 1), box-shadow .28s ease, background .28s ease;
}

.btn-gold:hover {
  transform: translateY(-3px);
  background: linear-gradient(180deg, rgba(226, 185, 114, .42), rgba(140, 90, 30, .3));
  box-shadow: 0 16px 34px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 240, 205, .28), 0 0 22px rgba(240, 190, 100, .28);
}

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

.btn-gold--sm { margin-top: 1em; padding: 9px 22px; font-size: clamp(12px, .95vw, 15px); }
.cta-note { margin-top: 1em; font-size: clamp(11px, .92vw, 15px); letter-spacing: .1em; color: var(--txt-dim); }

/* ---------- 页脚 ---------- */

.foot {
  position: relative;
  z-index: 2;
  padding: clamp(20px, 3.4vh, 38px) var(--pad-x) clamp(22px, 3.6vh, 42px);
  border-top: 1px solid rgba(196, 152, 74, .2);
  background: linear-gradient(180deg, rgba(6, 4, 3, .2), rgba(6, 4, 3, .9));
  text-align: center;
}

.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(12px, 2vw, 32px); font-size: clamp(11px, .92vw, 15px); letter-spacing: .12em; }
.foot-links a { color: var(--txt-dim); transition: color .25s ease, text-shadow .25s ease; }
.foot-links a:hover { color: var(--gold-hi); text-shadow: 0 0 14px rgba(226, 185, 114, .5); }
.foot-note { margin-top: 1em; font-size: clamp(10px, .82vw, 13px); letter-spacing: .1em; line-height: 1.9; color: rgba(226, 206, 166, .38); }

/* ---------- 内页窄屏 ---------- */

@media (max-width: 760px) {
  .page { padding: 16px 18px 44px; }
  .page-hero { padding-top: 6px; }
  .section { margin-top: 34px; }
  .section-title { font-size: 18px; }
  .grid { grid-template-columns: 1fr; gap: 14px; }
  .cta { margin-top: 40px; }
  .btn-gold { width: 100%; justify-content: center; }
}
