/* =====================================================================
   HEXX RGB + GLOW LAYER (v1)  -  premium neon RGB on every section.
   Colours only (borders, glows, buttons). Layout is untouched.
   To remove: delete the <link ... css/rgb.css> from includes/pwa.php
   ===================================================================== */
@property --hx-c{syntax:'<color>';inherits:true;initial-value:#a855f7}
@property --hx-c2{syntax:'<color>';inherits:true;initial-value:#00d4ff}
@keyframes hxC{0%,100%{--hx-c:#ff2d95}20%{--hx-c:#a11efe}40%{--hx-c:#00d4ff}60%{--hx-c:#00ff9d}80%{--hx-c:#ffd51b}}
@keyframes hxC2{0%,100%{--hx-c2:#00d4ff}20%{--hx-c2:#00ff9d}40%{--hx-c2:#ffd51b}60%{--hx-c2:#ff2d95}80%{--hx-c2:#a11efe}}
@keyframes hxSlide{to{background-position:200% 0}}
@keyframes hxBreathe{50%{filter:brightness(1.18) saturate(1.15)}}

html{--hx-c:#a855f7;--hx-c2:#00d4ff;animation:hxC 12s linear infinite,hxC2 12s linear infinite}
html body{--hx-cc:#a855f7;--hx-rgb:linear-gradient(90deg,#ff2d95,#a11efe,#00d4ff,#00ff9d,#ffd51b,#ff2d95)}
/* cards glow with the live RGB colour on mouse devices; on phones they keep a steady neon purple (smoother scrolling) */
@media (hover:hover) and (pointer:fine){html body{--hx-cc:var(--hx-c)}}

/* ---------------- cards / sections ---------------- */
html body :is(.glass-card,.hx-pcard,.fz-card,.fz-panel,.fz-stat,.fz-proc>div,.kc,.ud-hero,.ud-kpi,.ud-mod,.ud-ord,.ud-quick a,.ad-kpi,.ad-q,.hx-ban,.hx-hero,.hx-cta,.fz-res,.hx-faq,.hx-pmodal-box,.bg-white.rounded-2xl,.bg-white.rounded-xl,.bg-brand-surface.rounded-2xl,table.hx-rtable tr),
html.dark body :is(.glass-card,.hx-pcard,.fz-card,.fz-panel,.fz-stat,.fz-proc>div,.kc,.ud-hero,.ud-kpi,.ud-mod,.ud-ord,.ud-quick a,.ad-kpi,.ad-q,.hx-ban,.hx-hero,.hx-cta,.fz-res,.hx-faq,.hx-pmodal-box,.bg-white.rounded-2xl,.bg-white.rounded-xl,.bg-brand-surface.rounded-2xl,table.hx-rtable tr){
  border-color:rgba(168,85,247,.5) !important;
  box-shadow:0 0 0 1px rgba(168,85,247,.18),0 0 24px -10px #a855f7,0 18px 40px -28px rgba(0,0,0,.9) !important;
}
@supports (color:color-mix(in srgb,red,blue)){
  html body :is(.glass-card,.hx-pcard,.fz-card,.fz-panel,.fz-stat,.fz-proc>div,.kc,.ud-hero,.ud-kpi,.ud-mod,.ud-ord,.ud-quick a,.ad-kpi,.ad-q,.hx-ban,.hx-hero,.hx-cta,.fz-res,.hx-faq,.hx-pmodal-box,.bg-white.rounded-2xl,.bg-white.rounded-xl,.bg-brand-surface.rounded-2xl,table.hx-rtable tr),
  html.dark body :is(.glass-card,.hx-pcard,.fz-card,.fz-panel,.fz-stat,.fz-proc>div,.kc,.ud-hero,.ud-kpi,.ud-mod,.ud-ord,.ud-quick a,.ad-kpi,.ad-q,.hx-ban,.hx-hero,.hx-cta,.fz-res,.hx-faq,.hx-pmodal-box,.bg-white.rounded-2xl,.bg-white.rounded-xl,.bg-brand-surface.rounded-2xl,table.hx-rtable tr){
    border-color:color-mix(in srgb,var(--hx-cc) 55%,transparent) !important;
    box-shadow:0 0 0 1px color-mix(in srgb,var(--hx-cc) 16%,transparent),0 0 26px -10px var(--hx-cc),0 18px 40px -28px rgba(0,0,0,.9) !important;
  }
  html body :is(.glass-card,.hx-pcard,.fz-card,.kc,.ud-mod,.ud-quick a,.ad-q,.fz-stat):hover,
  html.dark body :is(.glass-card,.hx-pcard,.fz-card,.kc,.ud-mod,.ud-quick a,.ad-q,.fz-stat):hover{
    border-color:var(--hx-c) !important;
    box-shadow:0 0 0 1px color-mix(in srgb,var(--hx-c) 40%,transparent),0 0 38px -6px var(--hx-c),0 24px 44px -26px rgba(0,0,0,.95) !important;
  }
}

/* ---------------- main buttons: moving RGB gradient + glow ---------------- */
html body :is(button,a)[class*="bg-brand-primary"]:not([class*="bg-brand-primary/"]),
html.dark body :is(button,a)[class*="bg-brand-primary"]:not([class*="bg-brand-primary/"]),
html body :is(.fz-solid,.hx-ban-btn,.kc-go,.lg-btn,.ud-get,.hx-cta-main),
html body .kc.is-open .kc-btn-main{
  background-image:linear-gradient(90deg,#a11efe,#d649da,#ffd51b,#00d4ff,#a11efe) !important;
  background-size:200% 100% !important;background-color:#a11efe !important;color:#fff !important;
  animation:hxSlide 7s linear infinite;
  box-shadow:0 0 22px -4px #a855f7,0 10px 26px -14px rgba(0,0,0,.9) !important;
}
@supports (color:color-mix(in srgb,red,blue)){
  html body :is(button,a)[class*="bg-brand-primary"]:not([class*="bg-brand-primary/"]),
  html.dark body :is(button,a)[class*="bg-brand-primary"]:not([class*="bg-brand-primary/"]),
  html body :is(.fz-solid,.hx-ban-btn,.kc-go,.lg-btn,.ud-get,.hx-cta-main),
  html body .kc.is-open .kc-btn-main{box-shadow:0 0 24px -4px var(--hx-c),0 10px 26px -14px rgba(0,0,0,.9) !important}
}
html body :is(.fz-solid,.lg-btn,.hx-cta-main){animation:hxSlide 7s linear infinite,hxBreathe 3.2s ease-in-out infinite}
html body .kc-go-off{background-image:none !important;animation:none;box-shadow:none !important}
html body :is(button,a)[class*="bg-brand-primary"]:disabled{animation:none;filter:grayscale(.5) brightness(.8)}

/* ---------------- headings, brand, logo ---------------- */
@supports (color:color-mix(in srgb,red,blue)){
  html body .hx-content :is(h1,h2){text-shadow:0 0 22px color-mix(in srgb,var(--hx-c) 45%,transparent) !important}
  html body .hx-logo-box,html.dark body .hx-logo-box{border-color:var(--hx-c) !important;box-shadow:0 0 20px -2px var(--hx-c) !important}
  html body .lg-brand :is(img,svg){border-color:var(--hx-c) !important;box-shadow:0 0 32px -2px var(--hx-c) !important}
  html body .lg-frame{border-color:color-mix(in srgb,var(--hx-c) 85%,transparent) !important;
    box-shadow:0 0 0 1px color-mix(in srgb,var(--hx-c) 25%,transparent),0 0 50px -4px var(--hx-c),0 30px 70px -30px #000 !important}
  html body .lg-frame::after{background:linear-gradient(90deg,transparent,var(--hx-c),transparent) !important;filter:drop-shadow(0 0 6px var(--hx-c))}
}
html.dark body h1.bg-clip-text,html body h1.bg-clip-text,html body .fz-hero h1 span{
  background-image:var(--hx-rgb) !important;background-size:200% 100% !important;animation:hxSlide 6s linear infinite}
html body footer .text-glow-primary{background-image:var(--hx-rgb) !important;background-size:200% 100% !important;
  -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent !important;color:transparent !important;animation:hxSlide 6s linear infinite}

/* ---------------- navigation ---------------- */
@supports (color:color-mix(in srgb,red,blue)){
  html body header.sticky{box-shadow:0 1px 0 color-mix(in srgb,var(--hx-c) 55%,transparent),0 12px 30px -22px var(--hx-c) !important}
  html body .hx-bottomnav{box-shadow:0 -1px 0 color-mix(in srgb,var(--hx-c) 55%,transparent),0 -14px 30px -22px var(--hx-c) !important}
  html body #application-sidebar a.font-semibold,html.dark body #application-sidebar a.font-semibold{
    border-color:var(--hx-c) !important;box-shadow:0 0 0 1px color-mix(in srgb,var(--hx-c) 35%,transparent),0 0 22px -6px var(--hx-c) !important}
  html body .hx-bottomnav .hx-bn.is-on i{box-shadow:0 0 18px -2px var(--hx-c) !important}
  html body header.sticky a[href="wallet"]{border-color:var(--hx-c) !important;box-shadow:0 0 18px -5px var(--hx-c)}
  html body header.sticky nav div.rounded-full img{border-color:var(--hx-c) !important}
}
/* sidebar wallet card: RGB moving border */
html body #application-sidebar nav>a[href="wallet"]{
  border:1.5px solid transparent !important;
  background:linear-gradient(#150d29,#0e0b19) padding-box,linear-gradient(90deg,#ff2d95,#a11efe,#00d4ff,#00ff9d,#ffd51b,#ff2d95) border-box !important;
  background-size:auto,200% 100% !important;animation:hxSlide 6s linear infinite}

/* ---------------- forms ---------------- */
@supports (color:color-mix(in srgb,red,blue)){
  html body :is(input,select,textarea):focus,html.dark body :is(input,select,textarea):focus{
    border-color:var(--hx-c) !important;
    box-shadow:0 0 0 3px color-mix(in srgb,var(--hx-c) 25%,transparent),0 0 22px -6px var(--hx-c) !important}
  html body table tbody tr:hover{background:color-mix(in srgb,var(--hx-cc) 8%,transparent) !important}
  html body table thead th{border-bottom:1px solid color-mix(in srgb,var(--hx-cc) 45%,transparent) !important}
}

/* ---------------- scrollbar (desktop) ---------------- */
@media (hover:hover) and (pointer:fine){
  ::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#a11efe,#00d4ff) !important;border-radius:9999px}
  ::-webkit-scrollbar-track{background:#07050f !important}
}

/* ---------------- phones: keep it light ---------------- */
@media (max-width:767px){
  html{animation-duration:16s,16s}
  html body :is(.fz-solid,.lg-btn,.hx-cta-main){animation:hxSlide 9s linear infinite}
}
@media (prefers-reduced-motion:reduce){
  html,html body *,html body *::before,html body *::after{animation:none !important}
}
