/* ============================================================
 * OMNE · PREMIUM_SKIN_V2 · BASE（/assets/css/premium.css）
 * ------------------------------------------------------------
 * 定位：H5 功能页的「只增强、不改布局」视觉层 —— 主题无关，
 *       暗色页 / 浅色页（如乐园中心）都安全。
 * V2 新增：AURORA 环境光层、主按钮品牌辉光（暗色玻璃另见 premium-dark.css）
 * 硬约束（踩过就回滚不干净）：
 *   · 不写 width/height/margin/padding/display/position/z-index
 *     （唯一例外：body::after 环境光层的 fixed + z-index:-1，
 *      它是独立伪元素盒子，不会给任何 fixed 后代造包含块）
 *   · 不在 body / html 元素本体上挂 transform/filter/opacity 动画
 *   · 动效只挂伪元素 / 组件自身，且遵守 prefers-reduced-motion
 * 回滚：删掉各页面 <head> 里那行 <link> 即完全恢复。
 * ============================================================ */

/* ---------- 1. 渲染与文字 ---------- */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(150, 16, 255, .45);
  color: #fff;
}

body {
  overscroll-behavior-y: contain;
}

/* ---------- 2. AURORA 环境光层（V2 · 全站动态氛围，明暗皆宜） ---------- */
body::after {
  content: '';
  position: fixed;
  inset: -22%;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(36% 28% at 82% 4%, rgba(150, 16, 255, .26), transparent 68%),
    radial-gradient(28% 24% at 6% 80%, rgba(255, 127, 168, .16), transparent 70%),
    radial-gradient(42% 32% at 50% 112%, rgba(110, 33, 232, .22), transparent 72%),
    radial-gradient(18% 14% at 94% 86%, rgba(245, 200, 106, .08), transparent 70%);
  filter: blur(48px) saturate(135%);
  transform: translate3d(0, 0, 0);
  animation: pg-aurora 30s ease-in-out infinite alternate;
}

@keyframes pg-aurora {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(2.4%, -1.8%, 0) scale(1.06); }
  100% { transform: translate3d(-2%, 2.2%, 0) scale(1.02); }
}

/* ---------- 3. 卡片 / 面板：多层阴影 + 顶部内高光（V1 保留） ---------- */
[class*="card"]:not(canvas):not(img),
[class*="Card"]:not(canvas):not(img),
[class*="panel"]:not(canvas),
[class*="Panel"]:not(canvas),
[class*="sheet"]:not(canvas) {
  box-shadow:
    0 14px 34px -14px rgba(0, 0, 0, .38),
    inset 0 1px 0 rgba(255, 255, 255, .10);
  transition:
    box-shadow .24s ease,
    transform .18s cubic-bezier(.2, .9, .3, 1),
    border-color .24s ease;
}

[class*="card"]:active,
[class*="panel"]:active {
  transform: scale(.985);
}

/* ---------- 4. 主按钮品牌辉光（V2） ---------- */
[class*="btn"].pri,
button[class*="pri"]:not([class*="price"]) {
  box-shadow:
    0 8px 22px -6px rgba(150, 16, 255, .50),
    inset 0 1px 0 rgba(255, 255, 255, .22);
}

[class*="btn"].gold,
button[class*="gold"] {
  box-shadow:
    0 8px 20px -6px rgba(245, 200, 106, .42),
    inset 0 1px 0 rgba(255, 255, 255, .30);
}

/* ---------- 5. 按钮 / 可点元素：按压回弹（V1 保留） ---------- */
button,
[role="button"],
[class*="btn"],
[class*="Btn"] {
  -webkit-tap-highlight-color: transparent;
  transition:
    transform .13s cubic-bezier(.2, 1.4, .4, 1),
    filter .16s ease,
    box-shadow .18s ease;
}

button:active,
[role="button"]:active,
[class*="btn"]:active,
[class*="Btn"]:active {
  transform: scale(.96);
  filter: brightness(.97);
}

button:focus-visible,
[role="button"]:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(127, 233, 255, .7);
  outline-offset: 2px;
}

button:disabled,
[class*="btn"][disabled] {
  filter: grayscale(.35) brightness(.9);
}

/* ---------- 6. 链接（V1 保留） ---------- */
a {
  transition: color .18s ease, opacity .18s ease;
}

a:active {
  opacity: .72;
}

/* ---------- 7. 滚动条（V1 保留） ---------- */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(196, 107, 255, .55) transparent;
}

::-webkit-scrollbar {
  width: 3px;
  height: 3px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #C46BFF, #7FE9FF);
  border-radius: 99px;
}

/* ---------- 8. 数字等宽（V1 保留） ---------- */
[class*="score"], [class*="Score"],
[class*="num"], [class*="Num"],
[class*="count"], [class*="Count"],
[class*="price"], [class*="Price"],
[class*="rank"], [class*="Rank"],
[class*="coin"], [class*="Coin"] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ---------- 9. 图片 / Canvas 观感（V1 保留） ---------- */
canvas {
  filter: saturate(1.05) contrast(1.02);
}

img {
  -webkit-user-drag: none;
}

/* ---------- 10. 降低动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  body::after {
    animation: none;
  }
}
