/* ============================================================
   SYHLA · 6.0 PRO 模块样式
   - 语言切换器 / 跳过导航 / 焦点可见 / 站内搜索 / 年龄门 / mature 分区
   ============================================================ */

/* ---------- 无障碍：跳过导航 + 焦点可见 ---------- */
.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 9999;
  background: var(--gold, #D4A574);
  color: #1a1208;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 3px solid var(--gold, #D4A574);
  outline-offset: 2px;
}

/* ---------- 语言切换器 ---------- */
.lang-switcher {
  display: inline-flex;
  gap: 4px;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--line, #2a2f3a);
  border-radius: 999px;
  padding: 3px;
}
.lang-switcher button {
  border: 0; background: transparent; color: var(--bone-dim, #9aa0ad);
  width: 30px; height: 28px; border-radius: 999px; cursor: pointer;
  font-size: 13px; font-weight: 700; line-height: 1;
}
.lang-switcher button.is-active {
  background: var(--gold, #D4A574); color: #1a1208;
}

/* ---------- 站内搜索 / 筛选条 ---------- */
.games-toolbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin: 0 0 26px;
}
.games-search {
  flex: 1 1 260px; min-width: 200px;
  display: flex; align-items: center; gap: 8px;
  background: var(--ink-1, #11151c); border: 1px solid var(--line, #2a2f3a);
  border-radius: 12px; padding: 10px 14px;
}
.games-search input {
  flex: 1; border: 0; background: transparent; color: inherit;
  font-size: 15px; outline: none;
}
.games-search svg { opacity: .6; }
.games-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.gfilter {
  border: 1px solid var(--line, #2a2f3a); background: transparent;
  color: var(--bone-dim, #9aa0ad); padding: 8px 14px; border-radius: 999px;
  cursor: pointer; font-size: 13px; transition: all .2s;
}
.gfilter:hover { border-color: var(--gold, #D4A574); color: var(--gold, #D4A574); }
.gfilter.is-active { background: var(--gold, #D4A574); color: #1a1208; border-color: var(--gold, #D4A574); }

.game-coming {
  opacity: .7; filter: grayscale(.3);
  cursor: not-allowed;
}
.game-coming .tag-row .gtag { background: rgba(255,255,255,.06); }

/* ---------- 年龄门（mature 分区） ---------- */
.age-gate {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 30%, rgba(40,20,60,.96), rgba(8,6,14,.98));
  padding: 24px; text-align: center;
}
.age-gate__box {
  max-width: 460px; width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px; padding: 36px 28px;
  backdrop-filter: blur(6px);
}
.age-gate__icon { font-size: 46px; margin-bottom: 14px; }
.age-gate h2 { font-size: 22px; margin-bottom: 12px; color: #fff; }
.age-gate p { color: #b9b2c8; font-size: 14px; line-height: 1.8; margin-bottom: 24px; }
.age-gate__btns { display: flex; gap: 12px; justify-content: center; }
.age-gate__btns button {
  flex: 1; padding: 12px 16px; border-radius: 10px; border: 0;
  font-size: 15px; font-weight: 700; cursor: pointer;
}
.age-gate__yes { background: #D4A574; color: #1a1208; }
.age-gate__no { background: rgba(255,255,255,.08); color: #ddd; }
.age-gate__warn { margin-top: 16px; color: #ff9a9a; font-size: 13px; min-height: 18px; }

/* ---------- mature 分区页 ---------- */
.mature-hero { text-align: center; padding: 70px 0 30px; }
.mature-hero h1 { font-size: clamp(28px,5vw,46px); }
.mature-hero .badge { color: #ffb3c8; border-color: rgba(255,140,180,.4); }
.mature-note {
  max-width: 640px; margin: 18px auto 0; color: #c9b8d6; font-size: 14px;
  border: 1px dashed rgba(255,140,180,.4); border-radius: 12px; padding: 14px 18px;
}

/* ---------- 通用：空状态 ---------- */
.empty-state {
  grid-column: 1/-1; text-align: center; color: var(--bone-mute, #6b7280);
  padding: 40px 0; font-size: 15px;
}

/* ---------- PWA 安装按钮 ---------- */
.pwa-install {
  position: fixed; right: 18px; bottom: 84px; z-index: 9000;
  background: var(--gold, #D4A574); color: #1a1208;
  border: 0; border-radius: 999px; padding: 12px 18px;
  font-weight: 700; font-size: 14px; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  display: none;
}
.pwa-install.show { display: block; }

/* ============================================================
   UI 大改（tech 默认主题 · 轻量增强版）
   - 作用域限定 [data-theme="tech"]，纯增量覆盖，不破坏现有布局
   ============================================================ */
[data-theme="tech"] .v4-nav {
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--v4-bg, #0E1118) 82%, transparent);
  border-bottom: 1px solid var(--v4-border, rgba(255,255,255,.06));
}
[data-theme="tech"] .v4-nav-brand .logo {
  background: linear-gradient(135deg, var(--gold, #D4A574), #f0c48a);
  color: #1a1208;
  border-radius: 12px;
}
[data-theme="tech"] .v4-nav-links a {
  border-radius: 999px;
  padding: 6px 14px;
  transition: all .2s ease;
}
[data-theme="tech"] .v4-nav-links a:hover {
  background: rgba(255,255,255,.06);
  color: var(--gold, #D4A574);
}
[data-theme="tech"] .v4-nav-links a.active {
  background: color-mix(in srgb, var(--gold, #D4A574) 16%, transparent);
  color: var(--gold, #D4A574);
}

[data-theme="tech"] .card {
  border-radius: 18px;
  border: 1px solid var(--v4-border, rgba(255,255,255,.06));
  box-shadow: 0 10px 34px rgba(0,0,0,.28);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
[data-theme="tech"] .card:hover {
  border-color: color-mix(in srgb, var(--gold, #D4A574) 40%, transparent);
  box-shadow: 0 16px 46px rgba(0,0,0,.38);
}

[data-theme="tech"] .btn-gold,
[data-theme="tech"] .v4-btn-primary {
  background: linear-gradient(135deg, var(--gold, #D4A574), #e8b67c);
  color: #1a1208;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--gold, #D4A574) 35%, transparent);
  transition: transform .15s ease, box-shadow .2s ease;
}
[data-theme="tech"] .btn-gold:hover,
[data-theme="tech"] .v4-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--gold, #D4A574) 45%, transparent);
}

[data-theme="tech"] .section-head h2,
[data-theme="tech"] .hero h1 {
  letter-spacing: .5px;
}

[data-theme="tech"] .game-card {
  border-radius: 16px;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
[data-theme="tech"] .game-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--gold, #D4A574) 45%, transparent);
}

/* 记住我复选框 */
.v4-remember {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--bone-dim, #9aa0ad);
  margin: 4px 0 14px; cursor: pointer; user-select: none;
}
.v4-remember input { accent-color: var(--gold, #D4A574); width: 16px; height: 16px; }

/* ============================================================
   专业人员认证门 (cert-gate)
   ============================================================ */
.cert-gate {
  position: fixed; inset: 0; z-index: 11000;
  display: none; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 30%, rgba(20,16,40,.97), rgba(6,6,12,.99));
  padding: 24px;
}
.cert-gate.show { display: flex; }
.cert-gate__box {
  max-width: 420px; width: 100%; text-align: center;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px; padding: 34px 28px;
  box-shadow: 0 24px 70px rgba(0,0,0,.6);
}
.cert-gate__icon { font-size: 44px; margin-bottom: 12px; }
.cert-gate h2 { font-size: 22px; margin-bottom: 10px; color: #fff; }
.cert-gate__sub { color: #b9b2c8; font-size: 13px; line-height: 1.8; margin-bottom: 20px; }
.cert-gate__sub b { color: #ffd166; }
.cert-gate__input {
  width: 100%; box-sizing: border-box; padding: 13px 16px; font-size: 16px;
  text-align: center; letter-spacing: 4px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.18); background: rgba(0,0,0,.35); color: #fff;
  outline: none; margin-bottom: 12px;
}
.cert-gate__input:focus { border-color: #ffd166; }
.cert-gate__btn {
  width: 100%; padding: 13px; border: 0; border-radius: 10px;
  background: linear-gradient(135deg, #ffd166, #d4a574); color: #1a1208;
  font-size: 15px; font-weight: 800; cursor: pointer; margin-bottom: 10px;
}
.cert-gate__guest {
  width: 100%; padding: 12px; border: 1px solid rgba(255,255,255,.15); border-radius: 10px;
  background: transparent; color: #cfd4de; font-size: 14px; cursor: pointer;
}
.cert-gate__guest:hover { border-color: #ffd166; color: #ffd166; }
.cert-gate__skip {
  margin-top: 4px; width: 100%; padding: 10px; border: 0; border-radius: 10px;
  background: transparent; color: #8b93a3; font-size: 13px; cursor: pointer;
}
.cert-gate__skip:hover { color: #cfe8dd; text-decoration: underline; }
.cert-gate__warn { margin-top: 12px; color: #ff9a9a; font-size: 13px; min-height: 18px; display: none; }
.cert-fab {
  position: fixed; left: 16px; bottom: 16px; z-index: 9400;
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  background: rgba(20,26,40,.92); border: 1px solid rgba(255,209,102,.5);
  color: #ffd166; font-size: 13px; font-weight: 700;
  box-shadow: 0 6px 18px rgba(0,0,0,.4);
  transition: transform .15s ease;
}
.cert-fab:hover { transform: translateY(-2px); }
.cert-fab span { font-size: 12px; }
.cert-toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 11500;
  background: rgba(20,26,40,.95); border: 1px solid #ffd166; color: #ffd166;
  padding: 10px 18px; border-radius: 999px; font-size: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  animation: cert-in .25s ease;
}
.cert-toast.out { opacity: 0; transition: opacity .4s; }
@keyframes cert-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; } }

/* ============================================================
   色彩动态渲染引擎 3.0 (面板区)
   ============================================================ */
.ce3-section { margin-top: 14px; border-top: 1px dashed rgba(255,255,255,.12); padding-top: 12px; }
.ce3-section h5 { font-size: 13px; color: #cfe8dd; margin-bottom: 10px; }
.ce3-row { display: flex; flex-direction: column; gap: 8px; }
.ce3-btn {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05);
  color: inherit; font-size: 14px; font-weight: 700; text-align: left;
}
.ce3-btn span { font-size: 12px; font-weight: 400; opacity: .7; }
.ce3-btn.is-on { border-color: #ffd166; background: rgba(255,209,102,.12); color: #ffd166; }
.ce3-btn.is-locked { opacity: .55; cursor: not-allowed; }
.ce3-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 12px; font-size: 12px; color: #9aa0ad;
}
.ce3-foot button {
  border: 1px solid rgba(255,255,255,.18); background: transparent; color: #cfe8dd;
  border-radius: 999px; padding: 5px 14px; font-size: 12px; cursor: pointer;
}
.ce3-foot button:hover { border-color: #ffd166; color: #ffd166; }

/* ============================================================
   UI 整体优化 —— 防字体过大导致排版异常 / 溢出
   ============================================================ */
img, video, canvas, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4, p, li, a, span, button, input, textarea { overflow-wrap: break-word; word-break: break-word; }

/* 导航：13 项时横向可滚动，避免挤爆 */
.v4-nav-links {
  flex-wrap: nowrap !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.v4-nav-links::-webkit-scrollbar { display: none; }
.v4-nav-links a { white-space: nowrap; font-size: 13.5px; padding: 6px 10px; }
.v4-nav-inner { min-width: 0; }
.v4-nav-right { flex-shrink: 0; }

/* 标题字号收敛，防过大 */
.hero h1 { font-size: clamp(26px, 4.6vw, 44px); line-height: 1.18; }
.hero .lead { max-width: 720px; font-size: clamp(14px, 2.2vw, 17px); line-height: 1.9; }
.section-head h2 { font-size: clamp(20px, 3vw, 28px); line-height: 1.25; }
.section-head p { font-size: clamp(13px, 1.9vw, 15px); }
.game-card h3 { font-size: 15px; line-height: 1.3; }
.game-card p { font-size: 13px; line-height: 1.65; }
.v4-account-section h3 { font-size: clamp(16px, 2.4vw, 20px); }
.badge, .eyebrow { font-size: 12px; letter-spacing: 1px; }

/* 卡片网格自适应 */
.games-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.foot-grid { flex-wrap: wrap; gap: 24px; }
.game-info { flex-wrap: wrap; gap: 10px; }
.game-info .stat-box { min-width: 84px; }

/* 小屏：导航换行，避免挤压 */
@media (max-width: 900px) {
  .v4-nav-inner { flex-wrap: wrap; row-gap: 6px; }
  .v4-nav-links { order: 3; width: 100%; }
}
@media (max-width: 600px) {
  .hero h1 { font-size: clamp(24px, 7vw, 34px); }
  .chat-2-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; height: auto; min-height: calc(100vh - 64px); }
  .chat-2-online { display: none; }
}

/* ---------- 全站顶部小喇叭公告 ---------- */
.site-announce {
  position: relative; z-index: 9500;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px;
  background: linear-gradient(90deg, #3b1d2e, #12060c);
  border-bottom: 1px solid rgba(212,165,116,.35);
  color: #f0e6d8; font-size: 13px; line-height: 1.5;
  opacity: 0; transform: translateY(-6px);
  transition: opacity .35s ease, transform .35s ease;
}
.site-announce.show { opacity: 1; transform: translateY(0); }
.site-announce .sa-ico { font-size: 15px; flex-shrink: 0; }
.site-announce .sa-text { flex: 1; min-width: 0; }
.site-announce .sa-text b { color: #ffd166; }
.site-announce .sa-link { color: #ffd166; text-decoration: underline; margin: 0 2px; }
.site-announce .sa-close {
  flex-shrink: 0; border: 0; background: transparent; color: #c9b8a0;
  font-size: 18px; cursor: pointer; line-height: 1; padding: 2px 6px;
}
.site-announce .sa-close:hover { color: #fff; }
@media (max-width: 600px) {
  .site-announce { font-size: 12px; padding: 8px 10px; flex-wrap: wrap; }
}

/* ============================================================
   6.2 UI 重排：收敛导航 + 网页索引面板 + 科技感动效
   ============================================================ */
/* 索引按钮 */
.v4-index-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(212,165,116,.4); background: rgba(212,165,116,.08);
  color: var(--gold,#D4A574); font-size: 13px; font-weight: 700;
  transition: all .2s;
}
.v4-index-btn:hover { background: rgba(212,165,116,.18); box-shadow: 0 0 14px rgba(212,165,116,.35); }

/* 索引面板：毛玻璃 + 滑入 + 分组 */
.v4-index-panel {
  position: absolute; right: 12px; top: 60px; z-index: 9600;
  width: min(460px, calc(100vw - 24px));
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px;
  padding: 18px 16px; border-radius: 16px;
  background: rgba(16,20,30,.92);
  border: 1px solid rgba(212,165,116,.25);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(0,0,0,.55), inset 0 0 40px rgba(212,165,116,.04);
  opacity: 0; transform: translateY(-10px) scale(.98); pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.v4-index-panel.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.v4-index-group h6 {
  margin: 0 0 8px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  color: #9aa0ad; border-bottom: 1px solid rgba(255,255,255,.08); padding-bottom: 6px;
}
.v4-index-links { display: flex; flex-direction: column; gap: 2px; }
.v4-index-links a {
  padding: 7px 10px; border-radius: 8px; font-size: 13.5px; color: #cfd4de;
  transition: all .15s; position: relative;
}
.v4-index-links a:hover { background: rgba(212,165,116,.12); color: #ffd166; transform: translateX(3px); }
.v4-index-links a.active { color: #ffd166; font-weight: 700; }

/* 顶部常驻链接：科技感下划线动效 */
.v4-nav-links a { position: relative; }
.v4-nav-links a::after {
  content: ''; position: absolute; left: 10px; right: 10px; bottom: 3px; height: 2px;
  background: linear-gradient(90deg, transparent, #ffd166, transparent);
  transform: scaleX(0); transition: transform .25s ease; border-radius: 2px;
}
.v4-nav-links a:hover::after, .v4-nav-links a.active::after { transform: scaleX(1); }
.v4-nav-links a.active { color: #ffd166 !important; }

/* 导航整体玻璃化 + 底部发光边 */
.v4-nav {
  background: color-mix(in srgb, var(--v4-bg,#0E1118) 78%, transparent) !important;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent !important;
  background-image: linear-gradient(var(--v4-bg,#0E1118), var(--v4-bg,#0E1118)), linear-gradient(90deg, rgba(77,141,255,.4), rgba(212,165,116,.6), rgba(167,139,250,.4));
  background-origin: border-box; background-clip: padding-box, border-box;
}
.v4-nav-inner { min-height: 56px; }

/* 面板右上角小挂件位置避让（避免与返回顶部/引擎徽章重叠） */
.ce3-badge { bottom: 62px !important; right: 16px !important; }
.back-to-top { bottom: 28px !important; right: 28px !important; }
.cert-fab { left: 16px !important; bottom: 16px !important; }
.pwa-install { right: 18px !important; bottom: 108px !important; }

/* ---------- 进站同意门（定位追踪） ---------- */
.track-gate {
  position: fixed; inset: 0; z-index: 2147483000;
  display: none; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 30%, rgba(16,22,38,.97), rgba(6,8,14,.99));
  padding: 24px;
}
.track-gate.show { display: flex; }
.track-gate__box {
  max-width: 440px; width: 100%; text-align: center;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(77,141,255,.35);
  border-radius: 18px; padding: 34px 28px;
  box-shadow: 0 24px 70px rgba(0,0,0,.6), 0 0 60px rgba(77,141,255,.08);
}
.track-gate__icon { font-size: 42px; margin-bottom: 12px; }
.track-gate h2 { font-size: 21px; margin-bottom: 10px; color: #fff; }
.track-gate__sub { color: #b9c2d8; font-size: 13.5px; line-height: 1.8; margin-bottom: 20px; }
.track-gate__sub b { color: #4d8dff; }
.track-gate__btns { display: flex; flex-direction: column; gap: 10px; }
.track-gate__btns button { padding: 13px; border-radius: 10px; border: 0; font-size: 14px; font-weight: 700; cursor: pointer; }
.track-gate__yes { background: linear-gradient(135deg, #4d8dff, #7a5cff); color: #fff; }
.track-gate__no { background: rgba(255,255,255,.08); color: #cfd4de; }
.track-gate__no:hover { border: 1px solid rgba(255,255,255,.2); }
.track-gate__note { margin-top: 14px; color: #8b93a3; font-size: 12px; line-height: 1.6; }
.track-gate__blocked {
  margin-top: 14px; padding: 12px; border-radius: 10px;
  background: rgba(255,90,90,.12); border: 1px solid rgba(255,90,90,.4);
  color: #ff9a9a; font-size: 13px; line-height: 1.6;
}
/* ---- 完整滚动式隐私同意书 ---- */
.track-gate__lg { max-width: 520px; padding: 28px 26px; }
.track-gate__scroll {
  max-height: 230px; overflow-y: auto; text-align: left;
  border: 1px solid rgba(255,255,255,.12); border-radius: 12px;
  background: rgba(0,0,0,.22); padding: 12px 14px; margin: 6px 0 10px;
  scrollbar-width: thin; scrollbar-color: rgba(77,141,255,.5) transparent;
}
.track-gate__scroll::-webkit-scrollbar { width: 6px; }
.track-gate__scroll::-webkit-scrollbar-thumb { background: rgba(77,141,255,.45); border-radius: 3px; }
.tk-term { display: flex; gap: 10px; padding: 9px 4px; border-bottom: 1px dashed rgba(255,255,255,.08); }
.tk-term:last-child { border-bottom: 0; }
.tk-term__ico { font-size: 17px; flex-shrink: 0; margin-top: 2px; }
.tk-term h4 { margin: 0 0 3px; font-size: 13.5px; color: #eef2fa; }
.tk-term p { margin: 0; font-size: 12px; color: #aab4c8; line-height: 1.65; }
.tk-term p b { color: #7fb0ff; }
.track-gate__readtip {
  text-align: center; color: #7fb0ff; font-size: 12px;
  padding: 2px 0 8px; animation: tkPulse 1.6s ease-in-out infinite;
}
@keyframes tkPulse { 0%,100%{opacity:.55;} 50%{opacity:1;} }
.track-gate__yes:disabled {
  background: rgba(255,255,255,.14); color: #8b93a3; cursor: not-allowed;
}
.track-gate__yes:not(:disabled) {
  background: linear-gradient(135deg, #4d8dff, #7a5cff); color: #fff; cursor: pointer;
}
