/* PixoGame UI v1 (2026-11-30): theme switch, search dialog, light-mode fixes */
/* ---------- theme switch ---------- */
@keyframes pxtTw{0%,100%{opacity:.25}50%{opacity:1}}
html body #main-header .pixo-theme-toggle{width:66px !important;min-width:66px;height:36px !important;padding:0 !important;border-radius:999px !important;background:transparent !important;border:0 !important;transform:none !important}
html body #main-header .pixo-theme-toggle:hover{transform:none !important;background:transparent !important}
.px-tt{position:relative;display:block;width:66px;height:36px;border-radius:999px;overflow:hidden;background:linear-gradient(135deg,#1b1640,#0b0a1f);box-shadow:inset 0 2px 6px rgba(0,0,0,.55),0 0 0 1px rgba(255,255,255,.12);transition:background .6s}
.px-tt s{position:absolute;width:2px;height:2px;border-radius:50%;background:#fff;animation:pxtTw 2s ease-in-out infinite;transition:opacity .5s,transform .6s}
.px-tt s:nth-of-type(1){left:12px;top:9px}.px-tt s:nth-of-type(2){left:20px;top:21px;animation-delay:.6s}.px-tt s:nth-of-type(3){left:30px;top:12px;animation-delay:1.1s;width:3px;height:3px}.px-tt s:nth-of-type(4){left:9px;top:25px;animation-delay:1.5s}
.px-tt u{position:absolute;left:8px;top:11px;width:22px;height:9px;border-radius:9px;background:#fff;opacity:0;transform:translateX(-12px);transition:opacity .5s,transform .6s}
.px-tt u::before{content:"";position:absolute;left:5px;top:-5px;width:10px;height:10px;border-radius:50%;background:#fff}
.px-tt b{position:absolute;top:4px;left:34px;width:28px;height:28px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#f4f1ff,#c9c3e8 60%,#a9a2d6);box-shadow:0 2px 8px rgba(0,0,0,.5),inset -3px -3px 0 rgba(0,0,0,.08);transition:left .55s cubic-bezier(.5,1.6,.4,1),background .5s,box-shadow .5s}
.px-tt b::before,.px-tt b::after{content:"";position:absolute;border-radius:50%;background:rgba(120,110,170,.35);transition:opacity .4s}
.px-tt b::before{width:7px;height:7px;left:6px;top:12px}.px-tt b::after{width:5px;height:5px;left:15px;top:6px}
body.light-mode .px-tt{background:linear-gradient(135deg,#7dd3fc,#38bdf8)}
body.light-mode .px-tt s{opacity:0 !important;transform:translateY(-10px)}
body.light-mode .px-tt u{opacity:.95;transform:none}
body.light-mode .px-tt b{left:4px;background:radial-gradient(circle at 40% 40%,#fff6c2,#ffd43b 55%,#ffa31a);box-shadow:0 0 0 4px rgba(255,214,59,.35),0 0 18px rgba(255,190,40,.9)}
body.light-mode .px-tt b::before,body.light-mode .px-tt b::after{opacity:0}
.pixo-theme-toggle:active .px-tt b{width:32px}
@media (max-width:768px){html body #main-header .pixo-theme-toggle{width:56px !important;min-width:56px;height:32px !important}.px-tt{width:56px;height:32px}.px-tt b{width:24px;height:24px;left:28px}body.light-mode .px-tt b{left:4px}}
::view-transition-old(root),::view-transition-new(root){animation:none;mix-blend-mode:normal}
::view-transition-new(root){animation:pxtReveal .7s cubic-bezier(.5,0,.2,1)}
@keyframes pxtReveal{from{clip-path:circle(0 at var(--tx,90%) var(--ty,5%))}to{clip-path:circle(150% at var(--tx,90%) var(--ty,5%))}}

/* ---------- search dialog ---------- */
@keyframes pxsIn{from{opacity:0;transform:translateY(18px) scale(.97)}to{opacity:1;transform:none}}
#search-overlay{--s-bg:#121119;--s-ink:#f6f6f8;--s-mute:#9a98a8;--s-line:rgba(255,255,255,.09);--s-soft:rgba(255,255,255,.05);--s-hover:rgba(255,255,255,.08)}
body.light-mode #search-overlay{--s-bg:#ffffff;--s-ink:#15131c;--s-mute:#6b6878;--s-line:rgba(20,20,45,.10);--s-soft:#f4f4f7;--s-hover:#ececf2}
#search-overlay .search-overlay-backdrop{background:rgba(6,6,12,.62) !important;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
#search-overlay .search-overlay-content{width:min(720px,94vw) !important;max-height:min(84vh,780px) !important;margin:7vh auto 0 !important;padding:22px !important;border-radius:28px !important;background:radial-gradient(70% 50% at 100% 0%,rgba(255,40,80,.12),transparent 60%),var(--s-bg) !important;border:1px solid var(--s-line) !important;box-shadow:0 40px 90px -30px rgba(0,0,0,.7) !important;color:var(--s-ink) !important;display:flex !important;flex-direction:column;animation:pxsIn .35s cubic-bezier(.2,.8,.2,1) both}
#search-overlay .search-dialog-eyebrow{display:inline-flex;align-items:center;gap:8px;padding:6px 12px;border-radius:999px;background:rgba(255,59,85,.1);color:#ff3b55 !important;-webkit-text-fill-color:#ff3b55 !important;font-size:.68rem !important;font-weight:900 !important;letter-spacing:.14em}
#search-overlay .search-dialog-eyebrow span{width:7px;height:7px;border-radius:50%;background:#ff3b55;box-shadow:0 0 10px #ff3b55}
#search-overlay .search-overlay-close-btn{width:42px !important;height:42px !important;border-radius:14px !important;background:var(--s-soft) !important;border:1px solid var(--s-line) !important;color:var(--s-ink) !important;-webkit-text-fill-color:var(--s-ink) !important;transition:transform .3s !important}
#search-overlay .search-overlay-close-btn:hover{transform:rotate(90deg)}
#search-overlay .search-overlay-title{margin:14px 0 4px !important;font-size:clamp(1.5rem,3.4vw,2.1rem) !important;font-weight:900 !important;letter-spacing:-.035em;text-align:left !important;color:var(--s-ink) !important;-webkit-text-fill-color:var(--s-ink) !important;opacity:1 !important}
#search-overlay .search-dialog-subtitle{margin:0 0 16px !important;text-align:left !important;font-size:.9rem !important;color:var(--s-mute) !important;-webkit-text-fill-color:var(--s-mute) !important;opacity:1 !important}
#search-overlay .search-overlay-input-wrapper{height:60px !important;border-radius:18px !important;background:var(--s-soft) !important;border:1.5px solid var(--s-line) !important;box-shadow:none !important;transition:border-color .25s,box-shadow .25s !important}
#search-overlay .search-overlay-input-wrapper:focus-within{border-color:#ff3b55 !important;box-shadow:0 0 0 5px rgba(255,59,85,.14) !important}
#search-overlay .search-overlay-icon{color:#ff3b55 !important}
#search-overlay #search-overlay-input{background:transparent !important;color:var(--s-ink) !important;-webkit-text-fill-color:var(--s-ink) !important;font-size:1.02rem !important;font-weight:600 !important}
#search-overlay #search-overlay-input::placeholder{color:var(--s-mute) !important;-webkit-text-fill-color:var(--s-mute) !important}
#search-overlay .search-clear-btn{color:var(--s-mute) !important}
#search-overlay .search-dialog-meta{color:var(--s-mute) !important;font-size:.74rem !important;margin:10px 4px 6px !important}
#search-overlay .search-dialog-meta *{color:var(--s-mute) !important;-webkit-text-fill-color:var(--s-mute) !important}
#search-overlay .search-overlay-results{flex:1;min-height:0;overflow-y:auto !important;padding:4px 4px 6px !important;scrollbar-width:thin}
#search-overlay .search-section-label{margin:14px 2px 10px !important;font-size:.7rem !important;font-weight:900 !important;letter-spacing:.14em;color:var(--s-mute) !important;-webkit-text-fill-color:var(--s-mute) !important}
#search-overlay .search-suggestions{display:flex !important;flex-wrap:wrap;gap:8px !important}
#search-overlay .search-suggestions>*{height:38px;padding:0 15px !important;border-radius:999px !important;background:var(--s-soft) !important;border:1px solid var(--s-line) !important;color:var(--s-ink) !important;-webkit-text-fill-color:var(--s-ink) !important;font-weight:700 !important;font-size:.82rem !important;transition:all .25s !important}
#search-overlay .search-suggestions>*:hover{background:linear-gradient(110deg,#ff1744,#ff5a36) !important;color:#fff !important;-webkit-text-fill-color:#fff !important;border-color:transparent !important;transform:translateY(-2px)}
#search-overlay .search-overlay-result-item{display:grid !important;grid-template-columns:56px minmax(0,1fr) auto auto;align-items:center;gap:14px;width:100%;margin:0 0 8px !important;padding:8px 14px 8px 8px !important;border-radius:18px !important;background:var(--s-soft) !important;border:1px solid var(--s-line) !important;text-align:left;cursor:pointer;transition:transform .25s,border-color .25s,background .25s !important}
#search-overlay .search-overlay-result-item:hover,#search-overlay .search-overlay-result-item:focus-visible{transform:translateX(4px);background:var(--s-hover) !important;border-color:rgba(255,59,85,.45) !important}
#search-overlay .search-result-thumb{width:56px !important;height:56px !important;border-radius:14px !important;overflow:hidden;background:linear-gradient(135deg,#2a1830,#120d18)}
#search-overlay .search-result-thumb img{width:100%;height:100%;object-fit:cover}
#search-overlay .search-result-info small{display:block;font-size:.66rem !important;font-weight:900 !important;letter-spacing:.1em;text-transform:uppercase;color:#ff3b55 !important;-webkit-text-fill-color:#ff3b55 !important;opacity:.9}
#search-overlay .search-result-info strong{display:block;margin-top:3px;font-size:.94rem !important;font-weight:800 !important;color:var(--s-ink) !important;-webkit-text-fill-color:var(--s-ink) !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#search-overlay .search-result-price strong{font-weight:900 !important;font-size:1rem !important;background:linear-gradient(90deg,#ff3b55,#ff8a3d);-webkit-background-clip:text;background-clip:text;color:transparent !important;-webkit-text-fill-color:transparent !important}
#search-overlay .search-result-arrow{color:var(--s-mute) !important;transition:transform .25s,color .25s}
#search-overlay .search-overlay-result-item:hover .search-result-arrow{color:#ff3b55 !important;transform:translate(2px,-2px)}
#search-overlay mark{background:rgba(255,59,85,.2);color:inherit;border-radius:4px;padding:0 2px}
@media (max-width:640px){
  #search-overlay .search-overlay-content{width:100vw !important;max-height:100dvh !important;height:100dvh;margin:0 !important;border-radius:0 !important;padding:16px 14px !important}
  #search-overlay .search-overlay-input-wrapper{height:54px !important}
  #search-overlay .search-overlay-result-item{grid-template-columns:48px minmax(0,1fr) auto;gap:10px}
  #search-overlay .search-result-thumb{width:48px !important;height:48px !important;border-radius:12px !important}
  #search-overlay .search-result-arrow{display:none !important}
}

/* ---------- light-mode fixes ---------- */
html body.light-mode #main-content #news-view .pxw-hero :is(h2,p,.pxw-meta,.pxw-meta span,.pxw-src){color:#fff !important;-webkit-text-fill-color:#fff !important}
html body.light-mode #main-content #news-view .pxw-hero p{color:rgba(255,255,255,.82) !important;-webkit-text-fill-color:rgba(255,255,255,.82) !important}
html body.light-mode #main-content #news-view .pxw-card .th .pxw-src{color:#fff !important;-webkit-text-fill-color:#fff !important}
html body.light-mode #main-content #partners-view .pxp-hero :is(h1,p,.pxp-kicker,small){color:#fff !important;-webkit-text-fill-color:#fff !important}
html body.light-mode #main-content #partners-view .pxp-hero p{color:rgba(255,255,255,.75) !important;-webkit-text-fill-color:rgba(255,255,255,.75) !important}
html body.light-mode #main-content #partners-view .pxp-hero h1 span{-webkit-text-fill-color:transparent !important}
html body.light-mode #main-content #partners-view .pxp-hero .pxp-stats small{color:rgba(255,255,255,.6) !important;-webkit-text-fill-color:rgba(255,255,255,.6) !important}

@media (max-width:768px){
  html body #main-header .nav-btn{width:34px !important;height:34px !important;min-width:34px;font-size:.88rem !important}
  html body #main-header .pixo-theme-toggle{width:48px !important;min-width:48px;height:28px !important;margin-left:2px}
  .px-tt{width:48px;height:28px}.px-tt b{width:20px;height:20px;top:4px;left:24px}body.light-mode .px-tt b{left:4px}
  .px-tt s:nth-of-type(3){left:22px}.px-tt u{left:6px;top:9px;width:18px;height:7px}
  html body #main-header .navbar{padding:0 6px 0 12px !important}
  html body #main-header .navbar .logo img{height:26px !important}
}
@media (max-width:360px){html body #main-header .px-partner-btn{display:none !important}}
