/* 万喜娱乐 官网样式 — 深色高级质感 + 金色点缀，移动端优先 */

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

:root {
  --bg-0: #08040f;
  --bg-1: #130a22;
  --bg-2: #1b1032;

  --gold-1: #ffe6a6;
  --gold-2: #f7b731;
  --gold-3: #b9791a;

  --violet: #7b3ff2;
  --magenta: #ff4d8d;
  --cyan: #3fd8ff;

  --text: #f5f1ff;
  --muted: #a396c0;
  --line: rgba(255, 214, 120, 0.16);
  --line-soft: rgba(255, 255, 255, 0.08);

  --card: linear-gradient(160deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02));

  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;

  --head-h: 60px;
  --wrap: 1160px;
}

html {
  scroll-behavior: smooth;
  /* 锚点跳转不被吸顶头挡住 */
  scroll-padding-top: calc(var(--head-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC",
    "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg-0);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* 背景光晕：固定不随滚动重绘，手机不卡 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(90vw 60vh at 12% -8%, rgba(123, 63, 242, 0.34), transparent 62%),
    radial-gradient(70vw 50vh at 92% 4%, rgba(255, 77, 141, 0.2), transparent 60%),
    radial-gradient(80vw 60vh at 50% 108%, rgba(247, 183, 49, 0.16), transparent 62%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0) 55%);
}

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

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 18px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------------- 头部 ---------------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--head-h);
  display: flex;
  align-items: center;
  background: rgba(10, 5, 20, 0.82);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.site-head__inner {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* 品牌标识：直接用项目里的官方金色 LOGO 原图 */
.brand {
  display: flex;
  align-items: center;
  flex: none;
}

.brand__logo {
  height: 34px;
  width: auto;
  display: block;
  filter: drop-shadow(0 3px 10px rgba(247, 183, 49, 0.28));
}

.site-foot .brand__logo {
  height: 48px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav a {
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 14.5px;
  color: var(--muted);
  transition: color 0.18s, background 0.18s;
}

.nav a:hover,
.nav a.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.16s, box-shadow 0.16s, background 0.16s, border-color 0.16s;
}

.btn:active {
  transform: translateY(1px) scale(0.995);
}

.btn svg {
  width: 19px;
  height: 19px;
  flex: none;
}

.btn--gold {
  color: #3a2400;
  background: linear-gradient(180deg, #ffe9b0, #f4ae20);
  box-shadow: 0 10px 26px rgba(244, 174, 32, 0.34);
}

.btn--gold:hover {
  box-shadow: 0 14px 32px rgba(244, 174, 32, 0.46);
  transform: translateY(-2px);
}

.btn--ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--line);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.btn--sm {
  padding: 9px 16px;
  font-size: 13.5px;
}

.btn--cs {
  flex: none;
}

/* iOS 未开放时的置灰态（main.js 会加这个类） */
.dl-btn--pending {
  opacity: 0.62;
}

/* ---------------- Hero ---------------- */
.hero {
  padding: 46px 0 28px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  align-items: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold-1);
  background: rgba(247, 183, 49, 0.12);
  border: 1px solid var(--line);
}

.hero__badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #37d97f;
  box-shadow: 0 0 0 3px rgba(55, 217, 127, 0.22);
}

.hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(32px, 8.4vw, 58px);
  line-height: 1.14;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.hero h1 span {
  background: linear-gradient(92deg, var(--gold-1) 10%, var(--gold-2) 55%, #ff9d3d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  font-size: clamp(14.5px, 3.7vw, 17px);
  color: var(--muted);
  max-width: 46ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  color: #d8cff0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-soft);
}

.chip b {
  color: var(--gold-1);
  font-weight: 800;
}

/* Hero 里的大厅展示图 */
.hero__art {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55);
}

.hero__art img {
  width: 100%;
}

.hero__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 62%, rgba(8, 4, 15, 0.72));
  pointer-events: none;
}

.hero__art figcaption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 11px;
  z-index: 2;
  font-size: 12.5px;
  color: #e6ddf7;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* ---------------- 通用区块 ---------------- */
.section {
  padding: 44px 0;
}

.section__head {
  margin-bottom: 24px;
}

.section__kicker {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--gold-2);
  text-transform: uppercase;
}

.section__title {
  margin-top: 8px;
  font-size: clamp(23px, 5.6vw, 34px);
  font-weight: 900;
  line-height: 1.25;
}

.section__desc {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14.5px;
  max-width: 60ch;
}

/* ---------------- 游戏宫格（首页） ---------------- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.gcard {
  position: relative;
  display: block;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line-soft);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.gcard:hover {
  transform: translateY(-4px);
  border-color: var(--line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.gcard__img {
  width: 100%;
  aspect-ratio: 152 / 142;
  object-fit: cover;
}

/* 大闹天宫3 为竖版主打卡，占两行：图片撑满剩余高度，标题条钉在底部 */
.gcard--feature {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
}

.gcard--feature .gcard__img {
  flex: 1 1 auto;
  aspect-ratio: auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center 28%;
}

.gcard--feature .gcard__bar {
  flex: none;
}

.gcard__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  background: rgba(8, 4, 15, 0.55);
  border-top: 1px solid var(--line-soft);
}

.gcard__name {
  font-size: 14px;
  font-weight: 800;
}

.gcard__tag {
  font-size: 11px;
  color: var(--muted);
}

.gcard__hot {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, #ff6a3d, #e5251f);
  box-shadow: 0 4px 12px rgba(229, 37, 31, 0.5);
}

/* ---------------- 游戏详情（games.html） ---------------- */
.glist {
  display: grid;
  gap: 20px;
}

.gitem {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line-soft);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.36);
  scroll-margin-top: calc(var(--head-h) + 14px);
}

.gitem__top {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 15px;
  border-bottom: 1px solid var(--line-soft);
}

.gitem__icon {
  width: 62px;
  height: 62px;
  flex: none;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #120a20;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.gitem__meta {
  min-width: 0;
  flex: 1;
}

.gitem__name {
  font-size: 18px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gitem__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.tag {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  color: #d9cff2;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-soft);
}

.tag--gold {
  color: #3a2400;
  background: linear-gradient(180deg, var(--gold-1), var(--gold-2));
  border-color: transparent;
  font-weight: 800;
}

/* 实拍图：横竖屏混排 —— 用微缩底图铺满，主图 contain 居中，绝不变形 */
.shot {
  position: relative;
  aspect-ratio: 16 / 8;
  overflow: hidden;
  background: #0d0718;
}

.shot__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.15);
  opacity: 0.5;
}

.shot__img {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.shot--soon {
  display: grid;
  place-items: center;
}

.shot__soon {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 16px;
}

.shot__soon img {
  width: 96px;
  border-radius: 16px;
  margin: 0 auto 10px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
}

.shot__soon span {
  font-size: 12.5px;
  color: #cfc3ea;
}

.gitem__body {
  padding: 15px;
}

.gitem__desc {
  color: #cfc5e6;
  font-size: 14.5px;
}

.gitem__feats {
  display: grid;
  gap: 7px;
  margin: 13px 0 16px;
}

.gitem__feats li {
  list-style: none;
  position: relative;
  padding-left: 22px;
  font-size: 13.5px;
  color: var(--muted);
}

.gitem__feats li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  transform: rotate(45deg);
  background: linear-gradient(160deg, var(--gold-1), var(--gold-2));
}

.gitem__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* ---------------- 特色 ---------------- */
.feats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.feat {
  padding: 18px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--line-soft);
}

.feat__ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  background: rgba(247, 183, 49, 0.14);
  border: 1px solid var(--line);
}

.feat__ico svg {
  width: 21px;
  height: 21px;
  stroke: var(--gold-1);
}

.feat h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 6px;
}

.feat p {
  font-size: 13.5px;
  color: var(--muted);
}

/* ---------------- 下载 CTA ---------------- */
.cta {
  position: relative;
  overflow: hidden;
  padding: 34px 20px;
  border-radius: var(--r-lg);
  text-align: center;
  border: 1px solid var(--line);
  background:
    radial-gradient(60% 100% at 50% 0%, rgba(247, 183, 49, 0.18), transparent 70%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
}

.cta__icon {
  width: 84px;
  height: 84px;
  margin: 0 auto 14px;
  border-radius: 20px;
  display: block;
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
}

.cta h2 {
  font-size: clamp(21px, 5.4vw, 30px);
  font-weight: 900;
}

.cta p {
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 52ch;
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.cta__note {
  margin-top: 14px;
  font-size: 12px;
  color: #8f82ac;
}

/* ---------------- 页脚 ---------------- */
.site-foot {
  margin-top: 44px;
  padding: 26px 0 34px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 13px;
}

.site-foot__row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.site-foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.site-foot__links a:hover {
  color: var(--gold-1);
}

.site-foot__tip {
  margin-top: 14px;
  font-size: 12px;
  color: #7c709a;
  line-height: 1.7;
}

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 14px);
  z-index: 90;
  max-width: 86vw;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  color: #fff;
  background: rgba(20, 10, 34, 0.96);
  border: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------------- 滚动进场 ----------------
   默认可见；site.js 跑起来后才加 .js-reveal 开启动画。
   JS 挂了内容照常显示，不会白屏。 */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.js-reveal .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js-reveal .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------------- 响应式 ---------------- */
@media (min-width: 560px) {
  .games-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .feats {
    grid-template-columns: repeat(2, 1fr);
  }
  .gitem__icon {
    width: 70px;
    height: 70px;
  }
}

@media (min-width: 900px) {
  :root {
    --head-h: 68px;
  }
  .brand__logo {
    height: 42px;
  }
  .wrap {
    padding: 0 24px;
  }
  .hero {
    padding: 68px 0 40px;
  }
  .hero__grid {
    grid-template-columns: 1.02fr 0.98fr;
    gap: 46px;
  }
  .section {
    padding: 62px 0;
  }
  .games-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
  }
  .feats {
    grid-template-columns: repeat(4, 1fr);
  }

  /* 详情：图文左右分栏，奇偶交替；手机端保持 标题→实拍图→说明 的自然顺序 */
  .gitem {
    display: grid;
    grid-template-columns: 1.06fr 0.94fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "shot top"
      "shot body";
  }
  .gitem .shot {
    grid-area: shot;
    aspect-ratio: auto;
    min-height: 320px;
  }
  .gitem__top {
    grid-area: top;
    border-bottom: none;
    padding: 20px 22px 4px;
  }
  .gitem__body {
    grid-area: body;
    padding: 4px 22px 20px;
  }
  .gitem:nth-child(even) {
    grid-template-columns: 0.94fr 1.06fr;
    grid-template-areas:
      "top shot"
      "body shot";
  }
}
