/* assets/css/core/base.css */
@import url('./variables.css');

@font-face{
  font-family: "HanSerif";
  src: url("../../fonts/dist/SourceHanSerifCN-Regular-subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face{
  font-family: "HanSerif";
  src: url("../../fonts/dist/SourceHanSerifCN-Regular-subset.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face{
  font-family: "HanSerif";
  src: url("../../fonts/dist/SourceHanSerifCN-Bold-subset.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face{
  font-family: "LingDongQiCheChunTang";
  src: url("../../fonts/dist/LingDongQiCheChunTang-subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

html, body{
  height: 100%;
}

*{ box-sizing: border-box; }

input[type="range"]{
  touch-action: pan-y !important;
  cursor: pointer;
}
img { -webkit-user-drag: none; }

.stage-watermark img,
.home-logo img {
  pointer-events: none;
}

:root{
  /* legacy vars (不破坏现有引用) */
  --bg: #0b0c10;
  --panel: rgba(255,255,255,0.06);
  --panel-2: rgba(255,255,255,0.10);
  --border: rgba(255,255,255,0.12);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.62);
  --muted-2: rgba(255,255,255,0.38);
  --accent: rgba(120,190,255,0.85);

  /* premium tokens */
  --gx-bg:
    radial-gradient(circle at 18% 16%, rgba(120,190,255,0.12), rgba(0,0,0,0) 46%),
    radial-gradient(circle at 82% 28%, rgba(255,255,255,0.08), rgba(0,0,0,0) 42%),
    radial-gradient(circle at 40% 120%, rgba(120,190,255,0.06), rgba(0,0,0,0) 55%),
    linear-gradient(180deg, #0e1016, #0b0c10);

  --gx-vignette: radial-gradient(closest-side at 50% 40%, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 100%);
  --gx-blur: 14px;
  --gx-radius-lg: 22px;
  --gx-radius-md: 16px;
  --gx-shadow-md: 0 14px 30px rgba(0,0,0,0.45);
  --gx-shadow-lg: 0 24px 60px rgba(0,0,0,0.55);
  --gx-topbar-bg: rgba(10,11,15,0.78);

  /* layering tokens */
  --gx-card-z-min: 100;
  /* keep below #gx-zoom (ui.css: z-index 8000) */
  --gx-card-z-max: 7000;
}

body{
  margin: 0;
  background: var(--gx-bg);
  color: var(--text, #fff);
  font-family: "HanSerif", "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", serif;
  position: relative;
}

body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    var(--gx-vignette),
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,0.012) 0px,
      rgba(255,255,255,0.012) 1px,
      rgba(0,0,0,0) 3px,
      rgba(0,0,0,0) 6px
    );
  opacity: 0.9;
}

a{ color: inherit; text-decoration: none; }

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-family: "HanSerif", "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", serif;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: transform .12s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:hover{ background: var(--panel-2); transform: translateY(-1px); }
.btn:active{ transform: translateY(0px) scale(0.99); }

.btn.active{
  background: var(--accent) !important;
  color: #0e0f12 !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 12px rgba(120,190,255,0.4);
  font-weight: 650;
}

.btn-gold{
  background:
    radial-gradient(circle at 24% 18%, rgba(255,255,255,0.62), rgba(255,255,255,0) 42%),
    linear-gradient(140deg, rgba(255, 242, 190, 0.98), rgba(214, 169, 68, 0.98) 58%, rgba(169, 120, 30, 0.98));
  border-color: rgba(208, 156, 52, 0.92);
  color: #1b160c;
  box-shadow:
    0 10px 24px rgba(0,0,0,0.32),
    0 0 0 1px rgba(255, 227, 146, 0.34) inset,
    inset 0 10px 18px rgba(255, 246, 214, 0.3),
    inset 0 -10px 18px rgba(108, 66, 12, 0.38);
  text-shadow: 0 1px 0 rgba(255,252,238,0.45);
}
.btn-gold:hover{
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.7), rgba(255,255,255,0) 45%),
    linear-gradient(140deg, rgba(255, 248, 212, 0.99), rgba(226, 186, 82, 0.99) 58%, rgba(181, 132, 34, 0.99));
  border-color: rgba(225, 176, 72, 0.98);
  box-shadow:
    0 14px 28px rgba(0,0,0,0.34),
    0 0 18px rgba(239, 192, 79, 0.22),
    0 0 0 1px rgba(255, 231, 162, 0.38) inset,
    inset 0 10px 18px rgba(255, 250, 228, 0.32),
    inset 0 -10px 18px rgba(118, 74, 14, 0.42);
}
.btn-gold:active{
  transform: translateY(0px) scale(0.98);
}

.page{
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.gx-scroll-hint-target{
  position: relative;
}

.gx-scroll-hint-target::before{
  content: "";
  position: sticky;
  left: 0;
  right: 0;
  bottom: 0;
  display: block;
  height: 52px;
  margin-top: -52px;
  border-radius: 0 0 14px 14px;
  background: linear-gradient(180deg, rgba(10,14,22,0), rgba(10,14,22,0.94) 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 2;
}

.gx-scroll-hint-target::after{
  content: attr(data-scroll-hint);
  position: sticky;
  left: 0;
  right: 0;
  bottom: 10px;
  display: block;
  width: max-content;
  max-width: calc(100% - 24px);
  margin: -24px auto 0;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(120,190,255,0.32);
  background: rgba(12, 18, 30, 0.84);
  box-shadow: 0 8px 16px rgba(0,0,0,0.28);
  color: rgba(210,230,255,0.88);
  font-size: 11px;
  letter-spacing: 0.8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(0);
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 3;
}

.gx-scroll-hint-target.gx-scrollable.gx-scroll-not-bottom::before,
.gx-scroll-hint-target.gx-scrollable.gx-scroll-not-bottom::after{
  opacity: 1;
}

.gx-scroll-hint-target.gx-scrollable.gx-scroll-not-bottom::after{
  animation: gx-scroll-hint-float 1.2s ease-in-out infinite;
}

.gx-page-scroll-hint{
  position: fixed;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 6200;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(120,190,255,0.3);
  background: rgba(10, 16, 28, 0.82);
  color: rgba(220,236,255,0.9);
  font-size: 11px;
  letter-spacing: 0.8px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.35);
  opacity: 1;
  transition: opacity 180ms ease, transform 180ms ease;
}

.gx-page-scroll-hint::after{
  content: "v";
  font-size: 13px;
  line-height: 1;
  animation: gx-scroll-hint-float 1.1s ease-in-out infinite;
}

.gx-page-scroll-hint.is-hidden{
  opacity: 0;
  transform: translateX(-50%) translateY(6px);
}

@keyframes gx-scroll-hint-float{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(4px); }
}

.topbar{
  position: fixed;
  left: 16px;
  top: 14px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 6000;
  pointer-events: auto;
}

.footer-icp{
  position: fixed;
  left: 0; right: 0;
  bottom: 10px;
  text-align: center;
  font-size: 12px;
  color: var(--muted-2);
  pointer-events: auto;   /* ✅ 允许点击 */
  z-index: 9999;          /* ✅ 防止被遮挡（建议加） */
}

/* 让链接可点击且样式不突兀 */
.footer-icp a{
  pointer-events: auto;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-icp a:hover{
  color: var(--accent);
}


/* mobile perf */
@media (max-width: 600px){
  :root{ --base-w: clamp(45px, 16vw, 90px); }

  .btn{
    padding: 0 8px !important;
    font-size: 11px !important;
    border-radius: 6px !important;
    gap: 4px !important;
    height: 30px !important;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15) !important;
    backdrop-filter: none !important;
  }
  .btn:active{ background: rgba(255,255,255,0.25); transform: scale(0.95); }

  .gx-scroll-hint-target::before{
    height: 44px;
    margin-top: -44px;
  }

  .gx-scroll-hint-target::after{
    bottom: 8px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce){
  .gx-scroll-hint-target.gx-scrollable.gx-scroll-not-bottom::after,
  .gx-page-scroll-hint::after{
    animation: none;
  }
}
/* iOS: 禁用长按呼出“复制/存储图片/查看图片”等系统菜单 + 禁止选中文本 + 禁止拖拽图片 */
html, body {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

img, a {
  -webkit-user-drag: none;
  -webkit-touch-callout: none; 
}

/* 保留输入框可选中/可长按编辑（否则会影响复制粘贴、光标移动） */
input, textarea, [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}
