/* Shared polish layer — 游戏比价助手 prototypes */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700;800&family=Noto+Sans+SC:wght@400;500;600;700;800&display=swap');

:root {
  --fx-ease: cubic-bezier(.22, 1, .36, 1);
  --fx-ease-out: cubic-bezier(.16, 1, .3, 1);
  --fx-glow: 0 0 0 1px rgba(18, 87, 255, .08), 0 20px 50px rgba(18, 46, 110, .12);
  --fx-glow-pink: 0 0 0 1px rgba(219, 39, 119, .1), 0 20px 50px rgba(190, 24, 93, .1);
}

html {
  scroll-behavior: smooth;
}

body,
body.dt-body,
body.modown-game-deals-shell,
.game-deals-page,
.game-deal-detail-page,
.game-deals-home-page,
.gdh-home-page {
  font-family: "Outfit", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Ambient mesh + grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 8% -5%, rgba(18, 87, 255, .14), transparent 55%),
    radial-gradient(700px 420px at 92% 8%, rgba(236, 72, 153, .1), transparent 50%),
    radial-gradient(600px 400px at 50% 100%, rgba(16, 185, 129, .07), transparent 55%),
    var(--bg, #eef1f7);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

html[data-theme="dark"] body::before {
  background:
    radial-gradient(900px 500px at 8% -5%, rgba(77, 139, 255, .16), transparent 55%),
    radial-gradient(700px 420px at 92% 8%, rgba(244, 114, 182, .1), transparent 50%),
    radial-gradient(600px 400px at 50% 100%, rgba(52, 211, 153, .06), transparent 55%),
    var(--bg, #0d0f14);
}

html[data-theme="dark"] body::after {
  opacity: .06;
  mix-blend-mode: soft-light;
}

/* Floating orbs */
.fx-orbs {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.fx-orbs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .45;
  animation: fx-float 18s var(--fx-ease) infinite alternate;
}

.fx-orbs span:nth-child(1) {
  width: 280px; height: 280px; left: -40px; top: 12%;
  background: rgba(18, 87, 255, .35);
}

.fx-orbs span:nth-child(2) {
  width: 220px; height: 220px; right: -30px; top: 28%;
  background: rgba(236, 72, 153, .28);
  animation-delay: -6s;
  animation-duration: 22s;
}

.fx-orbs span:nth-child(3) {
  width: 180px; height: 180px; left: 40%; bottom: 8%;
  background: rgba(16, 185, 129, .22);
  animation-delay: -11s;
  animation-duration: 20s;
}

html[data-theme="dark"] .fx-orbs span { opacity: .28; }

@keyframes fx-float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(24px, -30px, 0) scale(1.08); }
}

/* Topbar glass upgrade */
.topbar {
  backdrop-filter: blur(18px) saturate(1.35) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.35) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 8px 24px rgba(20, 40, 90, .04);
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}

html[data-theme="dark"] .topbar {
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 8px 24px rgba(0, 0, 0, .25);
}

.topbar.is-scrolled {
  box-shadow: 0 10px 30px rgba(20, 40, 90, .08);
}

.brand-mark {
  position: relative;
  overflow: hidden;
  transition: transform .35s var(--fx-ease), box-shadow .35s var(--fx-ease);
}

.brand:hover .brand-mark {
  transform: rotate(-8deg) scale(1.06);
  box-shadow: 0 10px 24px rgba(18, 87, 255, .4) !important;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .45), transparent 70%);
  transform: translateX(-120%) rotate(20deg);
  animation: fx-sheen 4.5s ease-in-out infinite;
}

@keyframes fx-sheen {
  0%, 60%, 100% { transform: translateX(-120%) rotate(20deg); }
  75% { transform: translateX(120%) rotate(20deg); }
}

/* Buttons */
.btn, .top-search button, .btn-primary, .btn-buy {
  position: relative;
  overflow: hidden;
  transition: transform .25s var(--fx-ease), box-shadow .25s var(--fx-ease), background .2s ease !important;
}

.btn-primary, .top-search button, .btn-buy {
  box-shadow: 0 8px 22px rgba(18, 87, 255, .28), inset 0 1px 0 rgba(255, 255, 255, .25) !important;
}

.btn-primary:hover, .top-search button:hover, .btn-buy:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 30px rgba(18, 87, 255, .38), inset 0 1px 0 rgba(255, 255, 255, .3) !important;
}

.btn-primary::after, .top-search button::after, .btn-buy::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .28), transparent 65%);
  transform: translateX(-120%);
  transition: transform .6s var(--fx-ease);
}

.btn-primary:hover::after, .top-search button:hover::after, .btn-buy:hover::after {
  transform: translateX(120%);
}

/* Cards / panels */
.panel, .section-block, .list-panel, .deal-card, .code-card, .path-card, .gate, .stat, .hero-stat, .toolbar, .rec-legend, .store-strip {
  transition: transform .35s var(--fx-ease), box-shadow .35s var(--fx-ease), border-color .25s ease !important;
}

.deal-card, .code-card, .path-card, .gate {
  position: relative;
  overflow: hidden;
}

.deal-card::before, .code-card::before, .path-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, .5), transparent 40%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
  z-index: 0;
}

html[data-theme="dark"] .deal-card::before,
html[data-theme="dark"] .code-card::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, .06), transparent 45%);
}

.deal-card:hover, .code-card:hover, .path-card:hover, .gate:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--fx-glow) !important;
}

.gate-codes:hover, .code-card:hover {
  box-shadow: var(--fx-glow-pink) !important;
}

.deal-card:hover::before, .code-card:hover::before, .path-card:hover::before {
  opacity: 1;
}

.deal-card > *, .code-card > *, .path-card > * {
  position: relative;
  z-index: 1;
}

.deal-cover img, .game-cell img, .related img {
  transition: transform .6s var(--fx-ease), filter .4s ease;
}

.deal-card:hover .deal-cover img,
.game-cell:hover img,
.related a:hover img {
  transform: scale(1.08);
  filter: saturate(1.12) contrast(1.04);
}

/* Recommend badges：轻 hover，不改色板（色板见 glass.css） */
.rec {
  transition: transform .25s var(--fx-ease), box-shadow .25s ease;
}

.rec:hover { transform: translateY(-1px); }

/* Price emphasis */
.price-now, .hero-price-card .now, .slide-price-card .now {
  background: linear-gradient(135deg, #059669, #10b981 50%, #34d399);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  filter: drop-shadow(0 2px 8px rgba(16, 185, 129, .2));
}

html[data-theme="dark"] .price-now,
html[data-theme="dark"] .hero-price-card .now,
html[data-theme="dark"] .slide-price-card .now {
  background: linear-gradient(135deg, #34d399, #6ee7b7);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Store pills */
.store-pill, .store-mini, .store-item, .chip {
  transition: transform .2s var(--fx-ease), border-color .2s ease, background .2s ease, color .2s ease !important;
}

.store-pill:hover, .store-mini:hover, .chip:hover {
  transform: translateY(-2px);
}

.store-pill.best, .store-mini.best {
  box-shadow: 0 4px 12px rgba(16, 185, 129, .18);
}

/* Carousel upgrades */
.carousel {
  isolation: isolate;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .28), 0 0 0 1px rgba(255, 255, 255, .06) inset !important;
}

.carousel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
  z-index: 4;
}

.slide-bg img {
  animation: fx-kenburns 12s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes fx-kenburns {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.12) translate3d(-1.5%, -1%, 0); }
}

.slide-price-card, .hero-price-card {
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .12) !important;
  transition: transform .4s var(--fx-ease), box-shadow .4s ease;
}

.slide:hover .slide-price-card,
.game-hero:hover .hero-price-card {
  transform: translateY(-4px);
}

.carousel-arrow {
  transition: transform .25s var(--fx-ease), background .2s ease, border-color .2s ease !important;
}

.carousel-arrow:hover {
  transform: translateY(-50%) scale(1.08) !important;
}

/* Progress bar under carousel */
.fx-carousel-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  z-index: 5;
  background: rgba(255, 255, 255, .12);
  overflow: hidden;
}

.fx-carousel-progress i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #60a5fa, #a78bfa, #f472b6);
  box-shadow: 0 0 12px rgba(167, 139, 250, .7);
}

/* Section block top accent shimmer — 所有模块统一彩虹渐变条 */
.section-block,
.list-panel,
.panel#stores {
  position: relative;
}

/* 顶条改由 glass 背景层统一绘制 */
.section-block::after,
.list-panel::after {
  content: none;
  display: none;
}

@keyframes shell-stripe {
  to { background-position: 200% 0; }
}

/* Reveal on scroll */
.fx-reveal {
  opacity: 0;
  transform: translateY(28px) scale(.98);
  transition: opacity .7s var(--fx-ease-out), transform .7s var(--fx-ease-out);
  will-change: opacity, transform;
}

.fx-reveal.is-in {
  opacity: 1;
  transform: none;
}

.fx-reveal-delay-1 { transition-delay: .06s; }
.fx-reveal-delay-2 { transition-delay: .12s; }
.fx-reveal-delay-3 { transition-delay: .18s; }
.fx-reveal-delay-4 { transition-delay: .24s; }
.fx-reveal-delay-5 { transition-delay: .3s; }

/* Stagger children */
.fx-stagger > .fx-reveal:nth-child(1) { transition-delay: .04s; }
.fx-stagger > .fx-reveal:nth-child(2) { transition-delay: .1s; }
.fx-stagger > .fx-reveal:nth-child(3) { transition-delay: .16s; }
.fx-stagger > .fx-reveal:nth-child(4) { transition-delay: .22s; }
.fx-stagger > .fx-reveal:nth-child(5) { transition-delay: .28s; }
.fx-stagger > .fx-reveal:nth-child(6) { transition-delay: .34s; }

/* Table row hover glow (no transform on tr — keeps table layout stable) */
table.deals tbody tr,
.store-table tbody tr {
  transition: background .25s ease, box-shadow .25s ease, filter .25s ease !important;
}

table.deals tbody tr:hover,
.store-table tbody tr:hover {
  filter: brightness(1.02);
  box-shadow: inset 0 0 0 1px rgba(18, 87, 255, .08);
  background: linear-gradient(90deg, rgba(18, 87, 255, .05), transparent 70%) !important;
}

.store-table tbody tr.is-best {
  position: relative;
}

.store-table tbody tr.is-best td:first-child {
  box-shadow: inset 3px 0 0 #13a05b;
}

/* Hero title gradient */
.hero-intro h1 b,
.hero-copy h1 b,
.page-title-row h1 {
  background: linear-gradient(120deg, var(--strong, #11151c) 20%, #1257ff 55%, #7c3aed 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}

.hero-intro h1,
.hero-copy h1 {
  letter-spacing: -.04em !important;
}

html[data-theme="dark"] .hero-intro h1 b,
html[data-theme="dark"] .hero-copy h1 b,
html[data-theme="dark"] .page-title-row h1 {
  background: linear-gradient(120deg, #f3f5fa 10%, #7aa9ff 50%, #c4b5fd 90%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Stats counter pop */
.hero-stat, .stat {
  position: relative;
  overflow: hidden;
}

.hero-stat::after, .stat::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120px 60px at 80% 0%, rgba(18, 87, 255, .12), transparent 70%);
  pointer-events: none;
}

.hero-stat b, .stat b {
  transition: transform .35s var(--fx-ease);
  display: inline-block;
}

.hero-stat:hover b, .stat:hover b {
  transform: scale(1.08);
}

/* Code box copy flash */
.code-box, .slide-code-box {
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s var(--fx-ease);
}

.code-box:hover, .slide-code-box:hover {
  border-color: rgba(219, 39, 119, .35) !important;
  box-shadow: 0 8px 24px rgba(219, 39, 119, .1);
  transform: translateY(-1px);
}

/* Region menu pop */
.region-menu {
  transform-origin: top right;
  animation: none;
}

.region-wrap.open .region-menu {
  animation: fx-pop .22s var(--fx-ease);
}

@keyframes fx-pop {
  from { opacity: 0; transform: translateY(-8px) scale(.96); }
  to { opacity: 1; transform: none; }
}

/* Soft glass on major shells only */
.list-panel, .section-block, .toolbar, .rec-legend, .store-strip, .path-card {
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}

.list-panel, .section-block {
  box-shadow: 0 12px 40px rgba(20, 46, 110, .08), 0 1px 0 rgba(255,255,255,.65) inset !important;
}

html[data-theme="dark"] .list-panel,
html[data-theme="dark"] .section-block {
  box-shadow: 0 16px 48px rgba(0,0,0,.35), 0 1px 0 rgba(255,255,255,.05) inset !important;
}

/* Soft section spacing rhythm */
.section, .page-head {
  position: relative;
}

/* Page load curtain */
.fx-boot {
  animation: fx-boot-in .7s var(--fx-ease-out) both;
}

@keyframes fx-boot-in {
  from { opacity: 0; filter: blur(6px); }
  to { opacity: 1; filter: none; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .fx-reveal { opacity: 1; transform: none; }
  .slide-bg img { animation: none; }
}

/* Mobile: less float */
@media (max-width: 720px) {
  .fx-orbs { display: none; }
  .deal-card:hover, .code-card:hover, .path-card:hover, .gate:hover {
    transform: translateY(-3px);
  }
}

@keyframes fx-stripe { to { background-position: 200% 0; } }
