:root { --theme-primary:#7c3aed; --theme-secondary:#06b6d4; --theme-primary-rgb:124,58,237; --theme-secondary-rgb:6,182,212; --theme-bg-rgb:7,8,15; }
html[data-theme-loading] body > :not(script) { visibility:hidden; }
#theme-decor { position:fixed; inset:0; z-index:0; overflow:hidden; pointer-events:none; user-select:none; opacity:.085; }
#theme-decor img { position:absolute; width:clamp(170px,22vw,320px); height:auto; object-fit:contain; }
#theme-decor img:nth-child(1) { left:-45px; top:16vh; transform:rotate(-14deg); }
#theme-decor img:nth-child(2) { right:-35px; top:26vh; transform:rotate(13deg); }
#theme-decor img:nth-child(3) { left:18vw; bottom:-85px; transform:rotate(10deg); }
#theme-decor img:nth-child(4) { right:19vw; bottom:-85px; transform:rotate(-12deg); }
@media(max-width:600px) {
 #theme-decor { opacity:.055; }
 #theme-decor img { width:48vw; }
 #theme-decor img:nth-child(1) { left:-30px; top:24vh; }
 #theme-decor img:nth-child(2) { right:-30px; top:auto; bottom:6vh; }
 #theme-decor img:nth-child(n+3) { display:none; }
}
.admin-themes { margin-bottom:32px; padding:24px; }
.admin-themes h3 { font-size:20px; margin-bottom:10px; }
.admin-themes p { color:var(--gray); font-size:13px; line-height:1.7; }
.theme-current { margin:16px 0; }
.theme-current strong { color:var(--white); }
.theme-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; border:0; padding:0; margin:20px 0; }
.theme-choice { display:flex; align-items:center; position:relative; gap:12px; min-width:0; padding:16px; border:1px solid var(--border); border-radius:14px; background:var(--bg2); cursor:pointer; }
.theme-choice:has(input:checked) { border-color:var(--violet2); box-shadow:0 0 0 1px var(--violet2); background:rgba(var(--theme-primary-rgb),.09); }
.theme-choice:has(input:focus-visible) { outline:2px solid var(--teal); outline-offset:4px; }
.theme-choice:has(input:disabled) { cursor:default; }
.theme-choice input { position:absolute; opacity:0; width:1px; height:1px; }
.theme-sample { display:block; flex-shrink:0; width:36px; height:48px; border-radius:9px; }
.theme-choice-text { display:grid; gap:6px; min-width:0; }
.theme-choice-text strong { color:var(--white); font-size:13px; }
.theme-choice-text > span { font-size:11px; color:var(--gray); line-height:1.5; }
.theme-recovery { padding:14px; margin-bottom:18px; background:rgba(var(--theme-primary-rgb),.07); border:1px solid var(--border); border-radius:10px; }
.theme-recovery a { color:var(--teal2); overflow-wrap:anywhere; font-size:12px; }
.theme-recovery #admin-theme-warning { color:#fbbf24; margin-top:10px; }
.theme-actions { display:flex; align-items:center; flex-wrap:wrap; gap:14px; }
.theme-actions button:disabled { opacity:.5; cursor:default; }
#admin-theme-status { flex:1; min-width:min(100%,220px); }

/* Preserve the original theme exactly. Only event presets override the existing UI. */
html[data-site-theme]:not([data-site-theme="zero"]):not([data-site-theme="black-hole"]) nav { background:rgba(var(--theme-bg-rgb),.90); border-bottom-color:rgba(var(--theme-primary-rgb),.25); }
html[data-site-theme]:not([data-site-theme="zero"]):not([data-site-theme="black-hole"]) body::before { background-image:linear-gradient(rgba(var(--theme-primary-rgb),.045) 1px,transparent 1px),linear-gradient(90deg,rgba(var(--theme-primary-rgb),.045) 1px,transparent 1px); }
html[data-site-theme]:not([data-site-theme="zero"]):not([data-site-theme="black-hole"]) :is(.orb-1,.orb-3) { background:var(--violet); }
html[data-site-theme]:not([data-site-theme="zero"]):not([data-site-theme="black-hole"]) .orb-2 { background:var(--teal); }
html[data-site-theme]:not([data-site-theme="zero"]):not([data-site-theme="black-hole"]) :is(.nav-discord,.btn-main,.dl-btn:not(.secondary),#login-btn-submit) { background:linear-gradient(110deg,var(--violet),var(--teal)); box-shadow:0 4px 24px var(--glow-v); }
html[data-site-theme]:not([data-site-theme="zero"]):not([data-site-theme="black-hole"]) :is(.grad,.section-title span,.hero-line.grad) { background-image:linear-gradient(110deg,var(--violet2),var(--teal2)); }
html[data-site-theme]:not([data-site-theme="zero"]):not([data-site-theme="black-hole"]) :is(.badge,.btn-outline,.nav-lang-btn,.nav-lang-menu,.profile-menu,.profile-trigger,.izen-filter-btn.active,.lunar-btn-blue,.lunar-filter-btn.active,.shop-currency-trigger,#account-login) { border-color:rgba(var(--theme-primary-rgb),.4)!important; background-color:rgba(var(--theme-primary-rgb),.12)!important; color:var(--white)!important; }
html[data-site-theme]:not([data-site-theme="zero"]):not([data-site-theme="black-hole"]) :is(.lunar-btn-blue,.profile-save,.shop-buy-btn) { background:var(--violet); }
html[data-site-theme]:not([data-site-theme="zero"]):not([data-site-theme="black-hole"]) :is(.badge-dot,.scroll-line) { background:var(--teal); }
html[data-site-theme]:not([data-site-theme="zero"]):not([data-site-theme="black-hole"]) :is(.nav-lang-menu button:hover,.nav-lang-menu button.active,.profile-menu button:hover,.shop-currency-menu button:hover,.shop-currency-menu [aria-selected="true"]) { background:rgba(var(--theme-primary-rgb),.25); }
html[data-site-theme]:not([data-site-theme="zero"]):not([data-site-theme="black-hole"]) :is(.lunar-box,.lunar-modal,.lunar-login-wrap,.izen-modal,.profile-card) { background-color:var(--bg2); border-color:var(--border); }
html[data-site-theme]:not([data-site-theme="zero"]):not([data-site-theme="black-hole"]) :is(.section-label,.admin-access-link,#account-forgot,.login-forgot) { color:var(--teal2); }
html[data-site-theme]:not([data-site-theme="zero"]):not([data-site-theme="black-hole"]) .nav-tabs li button.active { color:#fff; -webkit-text-fill-color:#fff; font-weight:700; text-shadow:0 1px 4px rgba(0,0,0,.65); }
html[data-site-theme]:not([data-site-theme="zero"]):not([data-site-theme="black-hole"]) .nav-tabs-pill { background:linear-gradient(110deg,color-mix(in srgb,var(--violet) 52%,#0a0a12),color-mix(in srgb,var(--teal) 44%,#0a0a12)); }
html[data-site-theme]:not([data-site-theme="zero"]):not([data-site-theme="black-hole"]) .hero-video-overlay { background:linear-gradient(180deg,rgba(var(--theme-bg-rgb),.4),rgba(var(--theme-bg-rgb),.78)); }
html[data-site-theme]:not([data-site-theme="zero"]):not([data-site-theme="black-hole"]) .hero-vignette { background:radial-gradient(ellipse at center,transparent 20%,var(--bg) 85%); }

/* No navigation, text, controls, scrollbar or hidden focus targets for public visitors. */
#black-hole-view { position:fixed; inset:0; z-index:50000; background:#000; display:grid; place-items:center; touch-action:pan-y; }
#black-hole-view[hidden] { display:none!important; }
.black-hole-portal { position:relative; z-index:1; }
#black-hole-view[data-entering] { background:transparent; pointer-events:auto; }
#black-hole-view[data-entering] .black-hole-portal { opacity:0; z-index:4; }
#black-hole-view[data-entering] canvas { pointer-events:none; }
#black-hole-view[data-entering]::before { content:''; position:absolute; inset:0; background:#000; opacity:var(--hole-blackout,0); }
#black-hole-view canvas.black-hole-energy { position:absolute; inset:0; width:100%; height:100%; z-index:3; pointer-events:none; }
#black-hole-view canvas.black-hole-gravity { position:absolute; inset:0; width:100%; height:100%; z-index:2; pointer-events:none; }
html[data-hole-captured] body > :not(script):not(#black-hole-view) { visibility:hidden!important; }
#black-hole-view canvas { display:block; width:min(72vmin,520px); height:min(72vmin,520px); touch-action:none; }
#black-hole-view.no-canvas canvas { background:radial-gradient(circle,transparent 29%,rgba(140,203,255,.8) 30%,rgba(57,110,194,.2) 32%,transparent 42%); }
html[data-site-theme="black-hole"]:not([data-theme-admin]) { background:#000; overflow:hidden; }
html[data-site-theme="black-hole"]:not([data-theme-admin]):not([data-black-hole-entering]) body { background:#000; overflow:hidden; height:100svh; padding:0!important; }
html[data-site-theme="black-hole"]:not([data-theme-admin]):not([data-black-hole-entering]) body > :not(script):not(#black-hole-view) { display:none!important; }
html[data-black-hole-entering] { overflow:hidden!important; }
html[data-black-hole-entering] body > :not(script):not(#black-hole-view) { pointer-events:none!important; }
/* Let the flying controls leave their header/hero instead of being clipped.
   Empty navigation chrome must not remain behind as rigid horizontal bars. */
html[data-black-hole-entering] :is(nav,.nav-tabs) { background:transparent!important; border-color:transparent!important; box-shadow:none!important; backdrop-filter:none!important; -webkit-backdrop-filter:none!important; }
html[data-black-hole-entering] :is(.nav-tabs,.hero,.izen-hero) { overflow:visible!important; }
html[data-black-hole-entering] .izen-filters { border-color:transparent!important; }
html[data-site-theme="black-hole"] body::before,html[data-site-theme="black-hole"] body::after { display:none!important; }
/* A separate login route is available even if the admin's session has expired. */
html[data-site-theme="black-hole"][data-theme-admin="login"] body > :not(script):not(#pages-wrapper):not(#login-modal) { display:none!important; }
html[data-site-theme="black-hole"][data-theme-admin="login"] #pages-wrapper > :not(#page-admin):not(#login-modal) { display:none!important; }
html[data-site-theme="black-hole"][data-theme-admin="login"] #page-admin { display:block!important; position:relative!important; transform:none!important; animation:none!important; opacity:1!important; }
@media(max-width:900px) { .theme-choices { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:480px) { .admin-themes { padding:18px; } .theme-choices { grid-template-columns:1fr; } .theme-choice { padding:14px; } .theme-actions button { width:100%; } }
