/* PriceGenie — tab "Hot 2026" (theme hot-*): chi tiết riêng từng theme + FX 2.0.
   Màu nền: themes-more.css · nền động: theme-fx.js · tương tác chuột: theme-fx2.js.
   FX 2.0 chỉ bật khi html có class .pg-fx2 (theme hot-*, bật "Hiệu ứng nền động", không giảm chuyển động). */

@property --hot-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

/* ---------- chung cho hot-* ---------- */
html[data-theme^="hot-"] :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile) { position: relative; }
html[data-theme^="hot-"] :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile)::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
}

/* FX 2.0 — đèn rọi theo chuột trên thẻ (vẽ dưới chữ, không che dữ liệu) */
html.pg-fx2 :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile) {
    background-image: radial-gradient(420px circle at var(--mx, -999px) var(--my, -999px),
        color-mix(in srgb, var(--color-primary) 13%, transparent), transparent 65%);
}
/* FX 2.0 — nút hút theo chuột */
html.pg-fx2 .btn { translate: var(--mag-x, 0) var(--mag-y, 0); transition: translate .18s ease-out, background-color .15s, box-shadow .15s, color .15s; }
/* FX 2.0 — thẻ hiện dần khi cuộn tới */
@supports (animation-timeline: view()) {
    html.pg-fx2 :is(.card, .og-card, .panel, .kpi-tile, .src-card) {
        animation: pg-hot-reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 55%;
    }
}
@keyframes pg-hot-reveal { from { opacity: 0; translate: 0 26px; scale: .97; } to { opacity: 1; translate: 0 0; scale: 1; } }
/* FX 2.0 — đổi theme: vòng tròn lan ra từ chỗ bấm */
html.pg-vt::view-transition-old(root), html.pg-vt::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.pg-vt::view-transition-new(root) { animation: pg-hot-vt .65s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes pg-hot-vt {
    from { clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 50%)); }
    to { clip-path: circle(var(--vt-r, 150vmax) at var(--vt-x, 50%) var(--vt-y, 50%)); }
}

/* ---------- Holo Foil: viền + tiêu đề cầu vồng xoay ---------- */
html[data-theme="hot-holo"] :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile)::after {
    padding: 1.5px;
    background: conic-gradient(from var(--hot-a) at var(--mx, 50%) var(--my, 50%), #ff9ad5, #9ad8ff, #b6ffcf, #fff3a0, #c4a8ff, #ff9ad5);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
    opacity: .55; animation: pg-hot-spin 8s linear infinite;
}
html[data-theme="hot-holo"] :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile):hover::after { opacity: 1; }
html[data-theme="hot-holo"] :is(h1, .h1, .page-title, .navbar-brand) {
    background: linear-gradient(90deg, #ff9ad5, #9ad8ff, #b6ffcf, #fff3a0, #c4a8ff, #ff9ad5) 0 0 / 300% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent; animation: pg-hot-slide 9s linear infinite;
}
html[data-theme="hot-holo"] .btn-primary { background-image: linear-gradient(120deg, #ffb3e0, #c4a8ff 45%, #9ad8ff); border-color: transparent; color: #140f24; }
@keyframes pg-hot-spin { to { --hot-a: 360deg; } }
@keyframes pg-hot-slide { to { background-position: 300% 0; } }

/* ---------- Liquid Mercury: kim loại bóng ---------- */
html[data-theme="hot-mercury"] :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile)::after {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 -1px 0 rgba(0, 0, 0, .4);
}
html[data-theme="hot-mercury"] .btn-primary {
    background-image: linear-gradient(180deg, #f6f9fc 0%, #b9c2ce 48%, #8e99a8 52%, #d5dce5 100%);
    border-color: #8e99a8; color: #0c0e11; text-shadow: 0 1px 0 rgba(255, 255, 255, .6);
}
html[data-theme="hot-mercury"] :is(h1, .h1, .page-title) {
    background: linear-gradient(180deg, #ffffff 10%, #9aa3b0 55%, #e8ecf1 90%); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Bioluminescence: phát sáng xanh khi rê ---------- */
html[data-theme="hot-biolum"] :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile) { transition: box-shadow .35s; }
html[data-theme="hot-biolum"] :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile):hover {
    box-shadow: 0 0 0 1px rgba(46, 230, 255, .35), 0 0 28px rgba(46, 230, 255, .22), 0 0 60px rgba(56, 255, 176, .08);
}
html[data-theme="hot-biolum"] a:not(.btn):hover { text-shadow: 0 0 10px rgba(46, 230, 255, .7); }
html[data-theme="hot-biolum"] .btn-primary { box-shadow: 0 0 18px rgba(46, 230, 255, .35); color: #02131c; }

/* ---------- Glitch Datamosh: lệch kênh màu ---------- */
html[data-theme="hot-glitch"] :is(h1, .h1, .page-title) { text-shadow: 1.5px 0 rgba(255, 46, 99, .75), -1.5px 0 rgba(8, 247, 254, .75); }
html.pg-glitching[data-theme="hot-glitch"] :is(h1, .h1, .page-title, .card-header, .navbar-brand) {
    animation: pg-hot-jitter .12s steps(2) infinite; text-shadow: 4px 0 #ff2e63, -4px 0 #08f7fe;
}
html[data-theme="hot-glitch"] :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile)::after {
    border-left: 2px solid rgba(255, 46, 99, .55); border-right: 2px solid rgba(8, 247, 254, .35);
}
html[data-theme="hot-glitch"] .btn:hover { animation: pg-hot-jitter .2s steps(2) 2; }
@keyframes pg-hot-jitter {
    0% { transform: translate(0, 0); clip-path: inset(0 0 0 0); }
    50% { transform: translate(-2px, 1px); clip-path: inset(10% 0 35% 0); }
    100% { transform: translate(2px, -1px); clip-path: inset(0 0 0 0); }
}

/* ---------- Warp Speed: vệt sáng khi rê ---------- */
html[data-theme="hot-warp"] :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile)::after {
    background: linear-gradient(100deg, transparent 35%, rgba(156, 187, 255, .14) 50%, transparent 65%) -150% 0 / 250% 100% no-repeat;
}
html[data-theme="hot-warp"] :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile):hover::after { animation: pg-hot-streak .8s ease-out; }
html[data-theme="hot-warp"] .btn-primary { box-shadow: 0 0 22px rgba(122, 162, 255, .4); color: #04050c; }
@keyframes pg-hot-streak { from { background-position: -150% 0; } to { background-position: 150% 0; } }

/* ---------- Stained Glass: viền chì + chỉ vàng ---------- */
html[data-theme="hot-stained"] :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile) { border: 2px solid #050305; }
html[data-theme="hot-stained"] :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile)::after {
    box-shadow: inset 0 0 0 1px rgba(232, 181, 74, .35), inset 0 0 40px rgba(232, 181, 74, .05);
}
html[data-theme="hot-stained"] :is(h1, .h1, .page-title) { font-family: 'Noto Serif', 'Times New Roman', serif; letter-spacing: .02em; color: #f0c76f; }

/* ---------- Lava Lamp: bo tròn, ánh nóng ---------- */
html[data-theme="hot-lava"] :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile) { border-radius: 18px; }
html[data-theme="hot-lava"] :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile)::after { box-shadow: inset 0 -18px 30px -24px rgba(255, 122, 61, .45); }
html[data-theme="hot-lava"] .btn-primary { background-image: linear-gradient(135deg, #ffb000, #ff5e3a 55%, #ff2d78); border-color: transparent; color: #1f0a08; border-radius: 999px; }

/* ---------- Zen Sand: giấy mộc, serif ---------- */
html[data-theme="hot-zen"] :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile) {
    border-radius: 14px; border-color: transparent; box-shadow: 0 1px 2px rgba(47, 42, 34, .06), 0 10px 30px -12px rgba(47, 42, 34, .18);
}
html[data-theme="hot-zen"] :is(h1, .h1, h2, .h2, .page-title) { font-family: 'Noto Serif', 'Times New Roman', serif; font-weight: 600; letter-spacing: .01em; }
html[data-theme="hot-zen"] .btn { border-radius: 999px; }

/* ---------- Firefly Night: ánh đom đóm ---------- */
html[data-theme="hot-firefly"] :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile) { transition: box-shadow .4s; }
html[data-theme="hot-firefly"] :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile):hover { box-shadow: 0 0 26px rgba(216, 243, 106, .18); }
html[data-theme="hot-firefly"] .btn-primary { box-shadow: 0 0 16px rgba(216, 243, 106, .35); color: #0b1206; }

/* ---------- Sci-fi HUD: góc ngắm + chữ đơn cách ---------- */
html[data-theme="hot-hud"] :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile) { border-radius: 4px; border-color: rgba(34, 211, 238, .28); }
html[data-theme="hot-hud"] :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile)::after {
    --c: rgba(34, 211, 238, .85);
    background:
        linear-gradient(var(--c), var(--c)) 0 0 / 14px 2px, linear-gradient(var(--c), var(--c)) 0 0 / 2px 14px,
        linear-gradient(var(--c), var(--c)) 100% 0 / 14px 2px, linear-gradient(var(--c), var(--c)) 100% 0 / 2px 14px,
        linear-gradient(var(--c), var(--c)) 0 100% / 14px 2px, linear-gradient(var(--c), var(--c)) 0 100% / 2px 14px,
        linear-gradient(var(--c), var(--c)) 100% 100% / 14px 2px, linear-gradient(var(--c), var(--c)) 100% 100% / 2px 14px;
    background-repeat: no-repeat; transition: inset .25s;
}
html[data-theme="hot-hud"] :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile):hover::after { inset: -4px; }
html[data-theme="hot-hud"] :is(h1, .h1, .page-title, .card-header, th) {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace; text-transform: uppercase; letter-spacing: .06em;
}
html[data-theme="hot-hud"] .btn { border-radius: 2px; }
html[data-theme="hot-hud"] .btn-primary { box-shadow: 0 0 14px rgba(34, 211, 238, .35); color: #03141a; }

/* ---------- Jelly Candy: bo tròn, rung như thạch ---------- */
html[data-theme="hot-jelly"] :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile) { border-radius: 22px; }
html[data-theme="hot-jelly"] .btn { border-radius: 999px; }
html[data-theme="hot-jelly"] .btn-primary { background-image: linear-gradient(180deg, #ff6fae, #e5338d); border-color: transparent; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15), inset 0 2px 0 rgba(255, 255, 255, .35); }
html[data-theme="hot-jelly"] .btn:hover, html[data-theme="hot-jelly"] :is(.kpi-tile, .mon-tile):hover { animation: pg-hot-jelly .6s ease; }
@keyframes pg-hot-jelly {
    0%, 100% { transform: scale(1, 1); } 30% { transform: scale(1.08, .92); } 45% { transform: scale(.94, 1.06); }
    60% { transform: scale(1.03, .97); } 75% { transform: scale(.99, 1.01); }
}

/* ---------- Neon Sign: chữ neon chập chờn ---------- */
html[data-theme="hot-neon"] :is(h1, .h1, .page-title, .navbar-brand) {
    color: #ffe6f4; text-shadow: 0 0 4px #fff, 0 0 10px #ff3ea5, 0 0 22px #ff3ea5, 0 0 42px rgba(255, 62, 165, .6);
    animation: pg-hot-flicker 6s infinite;
}
html[data-theme="hot-neon"] :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile) { border-color: rgba(255, 62, 165, .4); }
html[data-theme="hot-neon"] :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile):hover { box-shadow: 0 0 0 1px rgba(255, 62, 165, .5), 0 0 24px rgba(255, 62, 165, .25); }
html[data-theme="hot-neon"] .btn-primary { box-shadow: 0 0 12px rgba(255, 62, 165, .6), inset 0 0 6px rgba(255, 255, 255, .3); color: #1a0510; }
@keyframes pg-hot-flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; }
    20%, 24%, 55% { opacity: .45; text-shadow: none; }
}

/* ---------- Underwater Caustics: kính nước ---------- */
html[data-theme="hot-caustics"] :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile) {
    border-radius: 16px; border-color: rgba(255, 255, 255, .7); box-shadow: 0 8px 28px -14px rgba(14, 143, 174, .35);
}
html[data-theme="hot-caustics"] :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile)::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 30%) top / 100% 40% no-repeat;
}
html[data-theme="hot-caustics"] .btn { border-radius: 12px; }

/* ---------- Bauhaus Motion: viền đen dày, bóng lệch ---------- */
html[data-theme="hot-bauhaus"] :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile) {
    border: 2px solid #1b1b1b; border-radius: 0; box-shadow: 5px 5px 0 #1b1b1b; transition: box-shadow .15s, transform .15s;
}
html[data-theme="hot-bauhaus"] :is(.kpi-tile, .mon-tile, .src-card):hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 #1b1b1b; }
html[data-theme="hot-bauhaus"] :is(.card, .og-card, .panel, .kpi-tile, .src-card, .mon-tile)::after {
    inset: 8px 8px auto auto; width: 10px; height: 10px; border-radius: 50%; background: #d7301f;
}
html[data-theme="hot-bauhaus"] .card:nth-of-type(3n+2)::after { background: #1f4fd7; border-radius: 0; }
html[data-theme="hot-bauhaus"] .card:nth-of-type(3n)::after { background: #f2c12e; clip-path: polygon(50% 0, 100% 100%, 0 100%); border-radius: 0; }
html[data-theme="hot-bauhaus"] :is(h1, .h1, .page-title) { text-transform: uppercase; font-weight: 800; letter-spacing: .04em; }
html[data-theme="hot-bauhaus"] .btn { border-radius: 0; border-width: 2px; }
html[data-theme="hot-bauhaus"] .btn-primary { box-shadow: 3px 3px 0 #1b1b1b; }

/* tắt "Hiệu ứng nền động" → dừng mọi chuyển động lặp của theme */
html[data-theme^="hot-"]:not(.pg-fx-on) *, html[data-theme^="hot-"]:not(.pg-fx-on) *::after { animation-play-state: paused !important; }

/* ---------- tôn trọng giảm chuyển động ---------- */
@media (prefers-reduced-motion: reduce) {
    html[data-theme^="hot-"] *, html[data-theme^="hot-"] *::after { animation: none !important; }
    html.pg-fx2 .btn { translate: none; }
}
