/* Holo trading-card theme for personal.html#characters -- active only while
   body.theme-holo is set by assets/personal-holo.js.
   v1 (2026-09-29): gacha rarity frames (SSR gold · SR violet · R blue ·
   N green · C grey), 3D tilt + foil sheen following the pointer, pack pull. */

body.theme-holo {
    --hc-ssr: #f7c948; --hc-sr: #b57bff; --hc-r: #4fa8ff; --hc-n: #5fd49a; --hc-c: #9aa3ad;
    background:
        radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,0.7), transparent 60%),
        radial-gradient(1px 1px at 68% 32%, rgba(255,255,255,0.6), transparent 60%),
        radial-gradient(1.5px 1.5px at 42% 72%, rgba(255,255,255,0.5), transparent 60%),
        radial-gradient(1px 1px at 86% 84%, rgba(255,255,255,0.6), transparent 60%),
        radial-gradient(ellipse 90% 60% at 50% 0%, #2b1f5c 0%, #120e26 55%, #09071a 100%) fixed #09071a;
    background-size: 300px 300px, 360px 360px, 420px 420px, 380px 380px, auto;
}
body.theme-holo .gallery-wrap { max-width: 1200px; padding: 0 20px 5rem; }
body.theme-holo .back-bar,
body.theme-holo .hero-title,
body.theme-holo .hero-sub,
body.theme-holo .category-view-header,
body.theme-holo .pcms-admin-only[onclick="openDraftModal()"],
body.theme-holo[data-hc-cat="characters"] .gallery-section[data-category="characters"] { display: none !important; }

#holoView { display: none; font-family: 'Outfit', 'Mitr', var(--font-body, 'Plus Jakarta Sans', 'Sarabun'), sans-serif; color: #ece8ff; }
body.theme-holo #holoView { display: block; }

.hc-btn {
    background: rgba(255,255,255,0.06); color: #ece8ff; border: 1px solid rgba(255,255,255,0.22); border-radius: 999px;
    padding: 7px 16px; font: inherit; font-size: .88rem; cursor: pointer; white-space: nowrap; transition: background .15s ease, border-color .15s ease;
}
.hc-btn:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.45); }
.hc-btn.is-solid { background: linear-gradient(90deg, #f7c948, #ff8fd8, #7fb4ff); color: #150f2e; border: 0; font-weight: 700; }
.hc-btn:focus-visible, .hc-chip:focus-visible, .hc-pull:focus-visible, .hc-card:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ---------- header ---------- */
.hc-top-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 24px 0 18px; }
.hc-top-bar > .hc-btn { justify-self: start; }
.hc-top-right { justify-self: end; }
.hc-title { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hc-title-small { font-size: .78rem; letter-spacing: .3em; color: #b6aee0; }
.hc-title-small:last-child { letter-spacing: .02em; margin-top: 4px; }
.hc-title-big {
    font-family: 'Bebas Neue', 'Outfit', 'Mitr', sans-serif; font-size: clamp(2.2rem, 5.2vw, 3.6rem); line-height: 1; letter-spacing: .08em;
    background: linear-gradient(100deg, #ffe7a3 0%, #ff9ee0 30%, #9fc4ff 55%, #b6ffe0 75%, #ffe7a3 100%); background-size: 200% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent; animation: hcShimmer 8s linear infinite;
    filter: drop-shadow(0 0 18px rgba(180,150,255,0.35));
}
@keyframes hcShimmer { to { background-position: -200% 0; } }

.hc-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 26px; }
.hc-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.hc-chip {
    --c: #ece8ff;
    background: rgba(255,255,255,0.05); color: var(--c); border: 1px solid rgba(255,255,255,0.18); border-radius: 8px;
    padding: 6px 14px; font: inherit; font-weight: 800; font-size: .9rem; letter-spacing: .06em; cursor: pointer;
}
.hc-chip span { font-weight: 400; opacity: .7; font-size: .78rem; margin-left: 2px; }
.hc-chip.is-ssr { --c: var(--hc-ssr); } .hc-chip.is-sr { --c: var(--hc-sr); } .hc-chip.is-r { --c: var(--hc-r); }
.hc-chip.is-n { --c: var(--hc-n); } .hc-chip.is-c { --c: var(--hc-c); }
.hc-chip:hover { border-color: var(--c); }
.hc-chip.is-on { background: var(--c); color: #140f2c; border-color: var(--c); }
.hc-pull {
    background: linear-gradient(90deg, #f7c948, #ff8fd8 40%, #7fb4ff 75%, #7ff0c4); background-size: 200% 100%; color: #150f2e; border: 0; border-radius: 999px;
    padding: 10px 22px; font: inherit; font-weight: 800; font-size: 1rem; cursor: pointer; box-shadow: 0 6px 24px rgba(255,143,216,0.35);
    animation: hcShimmer 6s linear infinite; transition: transform .15s ease;
}
.hc-pull:hover { transform: translateY(-2px) scale(1.03); }

/* ---------- pages ---------- */
.hc-page { margin: 0 0 42px; }
.hc-page-title { display: flex; align-items: baseline; gap: 12px; margin: 0 0 18px; font-weight: 400; }
.hc-page-title b { font-family: 'Bebas Neue', 'Outfit', 'Mitr', sans-serif; font-size: 2.6rem; line-height: 1; letter-spacing: .06em; font-weight: 400; color: var(--rc, #ece8ff); text-shadow: 0 0 20px var(--rc, transparent); }
.hc-page-title span { color: #b6aee0; font-size: .9rem; }
.hc-page.is-ssr { --rc: var(--hc-ssr); } .hc-page.is-sr { --rc: var(--hc-sr); } .hc-page.is-r { --rc: var(--hc-r); }
.hc-page.is-n { --rc: var(--hc-n); } .hc-page.is-c { --rc: var(--hc-c); }
.hc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 26px 22px; perspective: 900px; }

/* ---------- the card ---------- */
.hc-card {
    --rc: #9aa3ad; --frame: linear-gradient(135deg, #cfd5db, #6f7780 50%, #cfd5db);
    --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%; --pos: 50% 50%;
    position: relative; display: block; width: 100%; aspect-ratio: 5 / 7; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; color: inherit;
    transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d;
    transition: transform .5s cubic-bezier(.2,.8,.2,1), filter .3s ease;
}
.hc-card.is-active { transition: transform .08s linear; z-index: 2; }
.hc-card.is-ssr { --rc: var(--hc-ssr); --frame: linear-gradient(135deg, #fff3c4 0%, #f7c948 25%, #b8860b 50%, #ffe28a 75%, #c9951a 100%); }
.hc-card.is-sr  { --rc: var(--hc-sr);  --frame: linear-gradient(135deg, #f0e2ff 0%, #b57bff 30%, #6a2fd0 60%, #d7b8ff 100%); }
.hc-card.is-r   { --rc: var(--hc-r);   --frame: linear-gradient(135deg, #d9ecff 0%, #4fa8ff 40%, #1e5fb8 70%, #a9d3ff 100%); }
.hc-card.is-n   { --rc: var(--hc-n);   --frame: linear-gradient(135deg, #d8ffe9 0%, #5fd49a 45%, #23865a 100%); }
.hc-inner {
    position: absolute; inset: 0; display: block; border-radius: 14px; overflow: hidden; padding: 7px;
    background: var(--frame); box-shadow: 0 14px 30px rgba(0,0,0,0.55), 0 0 0 1px rgba(0,0,0,0.4);
}
.hc-card.is-ssr .hc-inner { box-shadow: 0 14px 30px rgba(0,0,0,0.55), 0 0 26px rgba(247,201,72,0.35); }
.hc-card.is-active .hc-inner, .hc-card:focus-visible .hc-inner { box-shadow: 0 24px 50px rgba(0,0,0,0.6), 0 0 34px var(--rc); }
.hc-art { position: absolute; inset: 7px; border-radius: 9px; overflow: hidden; background: #1a1535; }
.hc-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hc-noart { position: absolute; inset: 0; display: grid; place-items: center; font-size: 3rem; }
.hc-top { position: absolute; left: 12px; right: 12px; top: 12px; display: flex; align-items: center; justify-content: space-between; z-index: 2; }
.hc-rar {
    font-family: 'Bebas Neue', 'Outfit', 'Mitr', sans-serif; font-weight: 400; font-size: 1.35rem; line-height: 1; letter-spacing: .06em; padding: 3px 8px 1px; border-radius: 6px;
    background: rgba(10,8,25,0.72); color: var(--rc); text-shadow: 0 0 10px var(--rc); border: 1px solid var(--rc);
}
.hc-stars { color: var(--rc); font-size: .82rem; letter-spacing: .04em; text-shadow: 0 1px 3px #000, 0 0 8px var(--rc); }
.hc-plate {
    position: absolute; left: 7px; right: 7px; bottom: 7px; z-index: 2; padding: 26px 10px 10px; border-radius: 0 0 9px 9px;
    background: linear-gradient(0deg, rgba(10,8,25,0.95) 0%, rgba(10,8,25,0.75) 55%, rgba(10,8,25,0) 100%);
}
.hc-name { display: block; font-weight: 700; font-size: 1rem; line-height: 1.2; color: #fff; text-align: center; letter-spacing: .02em; text-shadow: 0 2px 6px #000; }
/* Foil: rainbow bands that slide with the pointer; strength by rarity. */
.hc-foil {
    position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: 14px; opacity: 0; mix-blend-mode: color-dodge;
    background:
        repeating-linear-gradient(115deg, #ff7ab6 0%, #ffd36b 7%, #7cf5c3 14%, #6fb7ff 21%, #c68bff 28%, #ff7ab6 35%),
        repeating-linear-gradient(35deg, rgba(255,255,255,0.12) 0 2px, transparent 2px 6px);
    background-size: 300% 300%, 100% 100%;
    background-position: var(--pos), 0 0;
    transition: opacity .3s ease;
}
.hc-card.is-ssr .hc-foil { opacity: .14; }
.hc-card.is-sr .hc-foil { opacity: .08; filter: hue-rotate(40deg); }
.hc-card.is-ssr.is-active .hc-foil { opacity: .6; }
.hc-card.is-sr.is-active .hc-foil { opacity: .42; }
.hc-card.is-r.is-active .hc-foil { opacity: .18; }
/* Glare: a soft light spot where the pointer is. */
.hc-glare {
    position: absolute; inset: 0; z-index: 4; pointer-events: none; border-radius: 14px; opacity: 0; mix-blend-mode: overlay;
    background: radial-gradient(circle at var(--mx) var(--my), rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.25) 22%, rgba(255,255,255,0) 55%);
    transition: opacity .3s ease;
}
.hc-card.is-active .hc-glare, .hc-card:focus-visible .hc-glare { opacity: 1; }
.hc-card:focus-visible { transform: translateY(-6px); }

/* ---------- pack pull ---------- */
.hc-pull-overlay {
    --rc: #ece8ff;
    position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 20px;
    background: radial-gradient(ellipse at 50% 45%, rgba(40,28,90,0.92) 0%, rgba(6,4,18,0.97) 70%);
    font-family: 'Outfit', 'Mitr', 'Plus Jakarta Sans', 'Sarabun', sans-serif; color: #ece8ff;
}
.hc-pull-overlay.is-ssr { --rc: var(--hc-ssr); } .hc-pull-overlay.is-sr { --rc: var(--hc-sr); } .hc-pull-overlay.is-r { --rc: var(--hc-r); }
.hc-pull-overlay.is-n { --rc: var(--hc-n); } .hc-pull-overlay.is-c { --rc: var(--hc-c); }
.hc-pull-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.hc-burst {
    position: absolute; left: 50%; top: 42%; width: 620px; height: 620px; transform: translate(-50%, -50%); pointer-events: none;
    background: repeating-conic-gradient(from 0deg, var(--rc) 0deg 6deg, transparent 6deg 18deg);
    -webkit-mask: radial-gradient(circle, #000 0%, transparent 62%); mask: radial-gradient(circle, #000 0%, transparent 62%);
    opacity: .28; animation: hcSpin 18s linear infinite;
}
@keyframes hcSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.hc-flip { position: relative; width: min(300px, 70vw); aspect-ratio: 5 / 7; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.3,1.3,.5,1); transform: rotateY(180deg) scale(.85); }
.hc-flip.is-shown { transform: rotateY(0) scale(1); }
.hc-back, .hc-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.hc-back {
    transform: rotateY(180deg); border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: repeating-linear-gradient(45deg, #2b1f5c 0 12px, #3a2a7a 12px 24px); border: 6px solid #d9cfff; box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    font-family: 'Bebas Neue', 'Outfit', 'Mitr', sans-serif; letter-spacing: .2em; color: #efe9ff;
}
.hc-back span { font-size: 3.2rem; line-height: 1; }
.hc-back small { font-size: 1.2rem; }
.hc-face .hc-card { height: 100%; cursor: pointer; }
.hc-face .hc-inner { box-shadow: 0 24px 60px rgba(0,0,0,0.6), 0 0 60px var(--rc); }
.hc-face .hc-foil { opacity: .45; animation: hcFoilSweep 3.5s ease-in-out infinite alternate; }
@keyframes hcFoilSweep { from { background-position: 0% 0%, 0 0; } to { background-position: 100% 100%, 0 0; } }
.hc-pull-msg { margin: 0; font-size: 1.15rem; text-align: center; position: relative; }
.hc-pull-msg b { font-family: 'Bebas Neue', 'Outfit', 'Mitr', sans-serif; font-weight: 400; font-size: 2rem; letter-spacing: .08em; color: var(--rc); text-shadow: 0 0 16px var(--rc); margin-right: 6px; }
.hc-pull-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; position: relative; }

/* The review modal follows the theme while it's open over the characters page. */
body.theme-holo .modal-content { background: #16112e; border-color: #3a2f6e; }
body.theme-holo .modal-tag { color: #140f2c; background: var(--hc-ssr); }

@media (prefers-reduced-motion: reduce) {
    .hc-title-big, .hc-pull, .hc-burst, .hc-face .hc-foil { animation: none; }
    .hc-card, .hc-flip { transition: none; }
}
@media (hover: none) { .hc-card.is-ssr .hc-foil { opacity: .22; } }
@media (max-width: 760px) {
    .hc-top-bar { grid-template-columns: 1fr auto; }
    .hc-title { grid-column: 1 / -1; grid-row: 1; }
    .hc-top-bar > .hc-btn, .hc-top-right { grid-row: 2; }
    .hc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; }
    .hc-name { font-size: .88rem; }
    .hc-rar { font-size: 1.1rem; }
    .hc-stars { font-size: .7rem; }
    .hc-burst { width: 420px; height: 420px; }
}

/* Add button: holographic foil (admin) */
.hc-add { position: relative; border: 2px solid transparent !important; color: #fff !important; font-weight: 700;
    background: linear-gradient(#171a33, #171a33) padding-box, linear-gradient(120deg, #ff7ad9, #7afcff, #fff67a, #b36bff, #ff7ad9) border-box !important;
    background-size: 100% 100%, 300% 300% !important; animation: hcFoil 4s linear infinite; box-shadow: 0 0 18px rgba(179,107,255,0.35); }
.hc-add span { background: linear-gradient(120deg, #ff7ad9, #7afcff, #fff67a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hc-add:hover { box-shadow: 0 0 26px rgba(122,252,255,0.5); }
@keyframes hcFoil { to { background-position: 0 0, 300% 0; } }
@media (prefers-reduced-motion: reduce) { .hc-add { animation: none; } }
