/* HELPER enhancements: layout fixes, animations, small UI features */
:root{--hx-accent:#8b5cf6;--hx-accent2:#3b82f6}

/* --- scroll progress bar + navbar polish --- */
#hxProgress{position:fixed;top:0;left:0;height:3px;width:0;z-index:2147483000;background:linear-gradient(90deg,var(--hx-accent),var(--hx-accent2));box-shadow:0 0 12px rgba(139,92,246,.7);transition:width .1s linear;pointer-events:none}
.navbar.hx-scrolled{box-shadow:0 10px 36px rgba(0,0,0,.35)!important}

/* --- reveal on scroll --- */
.hx-reveal{opacity:0;transform:translateY(26px);transition:opacity .7s cubic-bezier(.2,.8,.2,1),transform .7s cubic-bezier(.2,.8,.2,1);transition-delay:var(--hx-d,0s)}
.hx-reveal.hx-in{opacity:1;transform:none}

/* --- spotlight card hover following the cursor --- */
.hx-spot{position:relative;overflow:hidden}
.hx-spot::before{content:"";position:absolute;inset:0;pointer-events:none;opacity:0;transition:opacity .3s;border-radius:inherit;
  background:radial-gradient(260px circle at var(--mx,50%) var(--my,50%),rgba(167,139,250,.22),transparent 60%);z-index:0}
.hx-spot:hover::before{opacity:1}

/* --- hero: animated gradient title + shimmer button --- */
.hero h1{background:linear-gradient(100deg,#fff 0%,#c4b5fd 35%,#7dd3fc 60%,#fff 100%)!important;background-size:250% auto;
  -webkit-background-clip:text!important;background-clip:text!important;-webkit-text-fill-color:transparent!important;color:transparent!important;
  animation:hxShine 7s linear infinite}
@keyframes hxShine{to{background-position:250% center}}
.hero-btn{position:relative;overflow:hidden}
.hero-btn::after{content:"";position:absolute;top:0;left:-60%;width:40%;height:100%;background:linear-gradient(100deg,transparent,rgba(255,255,255,.35),transparent);transform:skewX(-20deg);animation:hxSweep 3.8s ease-in-out infinite}
@keyframes hxSweep{0%,55%{left:-60%}100%{left:130%}}

/* --- live stats strip --- */
#hxStats{width:min(1000px,92%);margin:6px auto 10px;display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:14px}
#hxStats .hx-stat{padding:18px 12px;border-radius:18px;text-align:center;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);backdrop-filter:blur(10px)}
#hxStats b{display:block;font-size:30px;font-weight:900;background:linear-gradient(135deg,#c4b5fd,#7dd3fc);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
#hxStats span{display:block;margin-top:4px;font-size:12px;color:#94a3b8}

/* --- recently viewed --- */
#hxRecent{width:min(1180px,92%);margin:10px auto 26px}
#hxRecent h2{font-size:20px;margin:0 0 12px;text-align:start}
#hxRecent .hx-row{display:flex;gap:12px;overflow-x:auto;padding-bottom:8px;scroll-snap-type:x proximity}
#hxRecent a{flex:0 0 190px;scroll-snap-align:start;text-decoration:none;color:inherit;border-radius:16px;overflow:hidden;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);transition:transform .25s,border-color .25s}
#hxRecent a:hover{transform:translateY(-5px);border-color:rgba(167,139,250,.6)}
#hxRecent .hx-thumb{height:96px;display:grid;place-items:center;font-size:30px;background:linear-gradient(135deg,rgba(124,58,237,.35),rgba(37,99,235,.2))}
#hxRecent .hx-thumb img{width:100%;height:100%;object-fit:cover}
#hxRecent .hx-t{padding:10px 12px;font-size:13px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* --- back to top --- */
#hxTop{position:fixed;bottom:22px;right:22px;width:46px;height:46px;border-radius:14px;border:1px solid rgba(255,255,255,.18);background:linear-gradient(135deg,var(--hx-accent),var(--hx-accent2));color:#fff;font-size:20px;cursor:pointer;z-index:2000;opacity:0;transform:translateY(16px) scale(.9);pointer-events:none;transition:.3s;box-shadow:0 12px 30px rgba(0,0,0,.35)}
#hxTop.show{opacity:1;transform:none;pointer-events:auto}
#hxTop:hover{filter:brightness(1.12);transform:translateY(-3px)}

/* --- sort control on category pages --- */
.hx-sort{display:flex;justify-content:center;align-items:center;gap:10px;margin:0 0 18px;flex-wrap:wrap}
.hx-sort select{padding:10px 14px;border-radius:12px;border:1px solid rgba(255,255,255,.14);background:rgba(15,23,42,.8);color:#fff;font:700 13px Tahoma,Arial,sans-serif;cursor:pointer}
.hx-sort label{font-size:13px;color:#94a3b8}

/* --- mods without a download link yet --- */
.hx-soon{pointer-events:none!important;opacity:.55!important;filter:grayscale(.6);cursor:not-allowed}

/* --- copy button (server IP) --- */
.hx-copy{margin-inline-start:8px;padding:5px 10px;border-radius:9px;border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.08);color:#fff;font:700 12px Tahoma,Arial,sans-serif;cursor:pointer;transition:.2s}
.hx-copy:hover{background:rgba(139,92,246,.35)}

/* --- keyboard focus + ripple --- */
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid rgba(167,139,250,.9);outline-offset:2px}
.hx-ripple{position:absolute;border-radius:50%;background:rgba(255,255,255,.35);transform:scale(0);animation:hxRip .6s ease-out;pointer-events:none}
@keyframes hxRip{to{transform:scale(3.2);opacity:0}}

/* --- toast --- */
#hxToast{position:fixed;bottom:22px;left:50%;transform:translate(-50%,20px);padding:11px 18px;border-radius:12px;background:#16a34a;color:#fff;font:700 13px Tahoma,Arial,sans-serif;opacity:0;z-index:2147483000;transition:.3s;pointer-events:none}
#hxToast.show{opacity:1;transform:translate(-50%,0)}

/* --- share button + particles --- */
#hxShare{position:fixed;bottom:22px;inset-inline-start:22px;z-index:1500;border:0;border-radius:999px;padding:11px 18px;color:#fff;font:700 13px Tahoma,Arial,sans-serif;cursor:pointer;background:linear-gradient(135deg,#8b5cf6,#3b82f6);box-shadow:0 10px 28px rgba(59,130,246,.35);transition:transform .25s}
#hxShare:hover{transform:translateY(-3px)}
#hxParticles{position:fixed;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none;opacity:.7}

@media(prefers-reduced-motion:reduce){
  #hxParticles{display:none}
  .hx-reveal{opacity:1;transform:none;transition:none}
  .hero h1,.hero-btn::after{animation:none!important}
  #hxProgress{transition:none}
}

/* header: keep nav links and buttons on one line */
.navbar .menu a,.navbar .create-btn,.navbar .login-btn,.navbar .control,.navbar .shared-search-btn,.navbar .shared-user,.navbar .account-link{white-space:nowrap}
@media(max-width:1400px){.navbar .menu{gap:16px}.navbar .menu a{font-size:13px}}
@media(max-width:1180px){.navbar .menu{gap:11px}.navbar .menu a{font-size:12px}}

/* category toolbar: brand picker (right) + sort (left) on one row */
.hx-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 18px}
.hx-toolbar .hx-sort{margin:0;margin-inline-start:auto;justify-content:flex-start}
.hx-toolbar #helperCarBrandFilterFinal{margin:0!important}

/* back / home buttons */
a.back{display:inline-flex!important;align-items:center!important;gap:10px!important;padding:11px 20px!important;border-radius:14px!important;background:linear-gradient(135deg,rgba(139,92,246,.24),rgba(59,130,246,.18))!important;border:1px solid rgba(167,139,250,.5)!important;color:#ece8ff!important;font-weight:800!important;text-decoration:none!important;box-shadow:0 8px 22px rgba(99,102,241,.2)!important;transition:transform .25s,box-shadow .25s,background .25s!important}
a.back::before{content:"";width:18px;height:18px;flex:none;background:currentColor;-webkit-mask:var(--hx-ic) center/contain no-repeat;mask:var(--hx-ic) center/contain no-repeat}
a.back[href="index.html"]{--hx-ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 2 12h3v8h5v-5h4v5h5v-8h3L12 3z'/%3E%3C/svg%3E")}
a.back:not([href="index.html"]){--hx-ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 5l7 7-7 7' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
html[dir="ltr"] a.back:not([href="index.html"])::before{transform:scaleX(-1)}
a.back:hover{transform:translateY(-3px)!important;box-shadow:0 14px 32px rgba(99,102,241,.35)!important;background:linear-gradient(135deg,rgba(139,92,246,.4),rgba(59,130,246,.3))!important;color:#fff!important}
body.light-mode a.back{color:#4c1d95!important;background:linear-gradient(135deg,rgba(124,58,237,.14),rgba(37,99,235,.1))!important;border-color:rgba(109,40,217,.35)!important}
body.light-mode a.back:hover{color:#3b0764!important}

.backbar{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 18px}
.backbar.auth-backbar{justify-content:center;margin:0 0 12px}

/* account icon (replaces the person emoji) */
.account-link::before,.shared-user::before,.has-ic-user::before,.comment-user::before{content:"";display:inline-block;width:1.15em;height:1.15em;vertical-align:-.22em;margin-inline-end:.5em;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10zm0 2c-4.4 0-8 2.2-8 5v3h16v-3c0-2.8-3.6-5-8-5z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10zm0 2c-4.4 0-8 2.2-8 5v3h16v-3c0-2.8-3.6-5-8-5z'/%3E%3C/svg%3E") center/contain no-repeat}
.avatar-ic{display:inline-block;width:54px;height:54px;background:currentColor;opacity:.92;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10zm0 2c-4.4 0-8 2.2-8 5v3h16v-3c0-2.8-3.6-5-8-5z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10zm0 2c-4.4 0-8 2.2-8 5v3h16v-3c0-2.8-3.6-5-8-5z'/%3E%3C/svg%3E") center/contain no-repeat}

/* button feedback: press, ripple, loading spinner */
.main-btn{position:relative;overflow:hidden;transition:transform .15s,box-shadow .25s,filter .25s}
.main-btn:active:not(:disabled){transform:scale(.97)}
.is-loading{pointer-events:none;cursor:progress!important;background-size:200% 100%!important;animation:hxshine 1.1s linear infinite}
.is-loading::before{content:"";display:inline-block;width:16px;height:16px;margin-inline-end:10px;border:3px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:hxspin .7s linear infinite;vertical-align:-3px}
@keyframes hxspin{to{transform:rotate(360deg)}}
@keyframes hxshine{0%{background-position:0 0}100%{background-position:-200% 0}}
.hx-ripple{position:absolute;border-radius:50%;background:rgba(255,255,255,.45);transform:scale(0);animation:hxripple .6s ease-out forwards;pointer-events:none}
@keyframes hxripple{to{transform:scale(2.6);opacity:0}}
.resend-btn{display:block;width:100%;margin-top:12px;padding:12px 16px;border-radius:14px;border:1px solid rgba(167,139,250,.45);background:rgba(139,92,246,.12);color:#e9e3ff;font:inherit;font-weight:800;cursor:pointer;transition:background .2s,transform .2s}
.resend-btn:hover:not(:disabled){background:rgba(139,92,246,.28);transform:translateY(-2px)}
.resend-btn:disabled{opacity:.75;cursor:not-allowed}

/* ===== like / favorite / share / download: clear icons with their own hover colours ===== */
@keyframes hxPop{0%{transform:scale(1)}40%{transform:scale(1.5) rotate(-12deg)}100%{transform:scale(1)}}
@keyframes hxBeat{0%,100%{transform:scale(1)}30%{transform:scale(1.35)}60%{transform:scale(1.12)}}
@keyframes hxDown{0%,100%{transform:translateY(0)}50%{transform:translateY(3px)}}
/* mod page */
.actions .btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:transform .22s,box-shadow .28s,background .28s,border-color .28s,color .28s}
.actions .btn .hx-i{margin:0;transition:transform .28s}
#likeBtn:hover{transform:translateY(-3px);background:linear-gradient(135deg,rgba(59,130,246,.38),rgba(99,102,241,.3));border-color:rgba(96,165,250,.85);color:#e0edff;box-shadow:0 12px 28px rgba(59,130,246,.4)}
#likeBtn:hover .hx-i{transform:rotate(-16deg) scale(1.22)}
#likeBtn.liked{background:linear-gradient(135deg,rgba(59,130,246,.55),rgba(99,102,241,.45));border-color:rgba(147,197,253,.9);color:#fff}
#likeBtn.liked .hx-i{animation:hxPop .45s ease}
#favBtn:hover{transform:translateY(-3px);background:linear-gradient(135deg,rgba(244,63,94,.3),rgba(236,72,153,.28));border-color:rgba(251,113,133,.85);color:#ffe4e9;box-shadow:0 12px 28px rgba(244,63,94,.36)}
#favBtn:hover .hx-i{animation:hxBeat .7s ease infinite}
#favBtn:has([data-i="heart-fill"]){background:linear-gradient(135deg,rgba(244,63,94,.45),rgba(236,72,153,.4));border-color:rgba(251,113,133,.92);color:#fff}
#favBtn:has([data-i="heart-fill"]) .hx-i{color:#fb7185;filter:drop-shadow(0 0 6px rgba(251,113,133,.7))}
#shareBtn:hover{transform:translateY(-3px);background:linear-gradient(135deg,rgba(34,197,94,.28),rgba(20,184,166,.25));border-color:rgba(74,222,128,.8);color:#dcfce7;box-shadow:0 12px 28px rgba(34,197,94,.32)}
#shareBtn:hover .hx-i{transform:scale(1.2) rotate(10deg)}
.actions .btn.primary:hover .hx-i[data-i="download"]{animation:hxDown .8s ease infinite}
/* cards */
.mod-card .favorite-btn,.mod-card .helper-like-btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;height:40px!important;border:1px solid rgba(255,255,255,.2)!important;border-radius:14px!important;background:rgba(15,23,42,.66)!important;color:#e2e8f0!important;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-shadow:0 6px 18px rgba(0,0,0,.28)!important;cursor:pointer;transition:transform .22s,background .25s,border-color .25s,box-shadow .28s,color .25s!important}
.mod-card .favorite-btn{width:40px!important;padding:0!important}
.mod-card .helper-like-btn{width:auto!important;min-width:40px!important;padding:0 12px!important}
.mod-card .favorite-btn .hx-i,.mod-card .helper-like-btn .hx-i{margin:0;width:19px;height:19px;transition:transform .25s}
.mod-card .helper-like-btn .helper-like-icon{display:inline-flex;font-size:inherit;line-height:1}
.mod-card .helper-like-btn .helper-like-count{font-size:13px;font-weight:800;line-height:1;min-width:8px;text-align:center}
.mod-card .helper-like-btn:hover{transform:translateY(-3px)!important;background:linear-gradient(135deg,rgba(59,130,246,.82),rgba(99,102,241,.76))!important;border-color:rgba(147,197,253,.9)!important;color:#fff!important;box-shadow:0 12px 26px rgba(59,130,246,.5)!important}
.mod-card .helper-like-btn:hover .hx-i{transform:rotate(-16deg) scale(1.2)}
.mod-card .helper-like-btn.liked{background:linear-gradient(135deg,rgba(59,130,246,.88),rgba(99,102,241,.82))!important;border-color:rgba(147,197,253,.95)!important;color:#fff!important}
.mod-card .helper-like-btn.liked .hx-i{animation:hxPop .45s ease}
.mod-card .favorite-btn:hover{transform:translateY(-3px)!important;background:linear-gradient(135deg,rgba(244,63,94,.84),rgba(236,72,153,.78))!important;border-color:rgba(253,164,175,.95)!important;color:#fff!important;box-shadow:0 12px 26px rgba(244,63,94,.5)!important}
.mod-card .favorite-btn:hover .hx-i{animation:hxBeat .7s ease infinite}
.mod-card .favorite-btn:has([data-i="heart-fill"]){background:linear-gradient(135deg,rgba(244,63,94,.88),rgba(236,72,153,.82))!important;border-color:rgba(253,164,175,.95)!important;color:#fff!important}
.mod-card .helper-v50-stat{order:-1;align-self:flex-start;display:inline-flex;align-items:center;gap:6px;padding:4px 11px;border-radius:99px;background:rgba(148,163,184,.14);color:#cbd5e1;font-size:12px;font-weight:700}
.mod-card .helper-v50-stat .hx-i{margin:0;width:14px;height:14px}
body.light-mode .mod-card .favorite-btn,body.light-mode .mod-card .helper-like-btn{background:rgba(255,255,255,.92)!important;color:#4c1d95!important;border-color:rgba(76,29,149,.18)!important}
body.light-mode .mod-card .helper-v50-stat{color:#475569;background:rgba(71,85,105,.1)}

/* home cards (popular / latest): the dark band was positioned for a 170px image and cut the picture in two */
.helper-latest-card>.latest-overlay{display:none!important}
.helper-latest-card>img{-webkit-mask-image:linear-gradient(to bottom,#000 82%,transparent 100%);mask-image:linear-gradient(to bottom,#000 82%,transparent 100%)}

/* buttons that have no target must not behave like links */
a.hx-soon,.helper-purchase-btn.disabled,a.disabled{pointer-events:none!important;cursor:not-allowed!important}
