/* CS2 Neon Live Search — Horizontal v3 (no "Popular", truncated titles, animated active) */
.cs2-theme-dark { --panel:#131126; --text:#f3efff; --muted:#9aa0b4; --accent-from:#7c3aed; --accent-to:#a855f7; color:var(--text); }
.cs2-search{ position:relative; }
.cs2-search__box{ position:relative; z-index:3; }
.cs2-search__input{
  width:100%; background:#100e1f; border:1px solid #1f1b33; color:#fff;
  padding:12px 44px 12px 12px; border-radius:12px; outline:none;
}
.cs2-search__spinner{ position:absolute; right:12px; top:50%; transform:translateY(-50%); width:18px; height:18px; border-radius:50%; border:2px solid #2a2444; border-top-color:#a855f7; animation:spin 1s linear infinite; opacity:0; pointer-events:none; }
.cs2-search__spinner.on{ opacity:1; }
@keyframes spin{ to{ transform: translateY(-50%) rotate(360deg);} }

/* Floating panel */
.cs2-search__suggest{
  display:none; position:absolute; left:0; right:0; top:calc(100% + 8px); z-index:2;
  background: linear-gradient(180deg, #0b0a13, #0d0b14);
  border:1px solid #1f1b33; border-radius:14px; padding:10px; box-shadow:0 16px 40px rgba(0,0,0,.5);
}
.cs2-search__suggest.open{ display:block; }

/* Horizontal results */
.cs2-search__results{
  display:flex; gap:10px; overflow-x:auto; white-space:nowrap;
  padding-bottom:6px; -webkit-overflow-scrolling:touch;
}
.cs2-search__results::-webkit-scrollbar{ height:8px; }
.cs2-search__results::-webkit-scrollbar-thumb{ background:#2b2444; border-radius:6px; }

.cs2-search__results .res{
  flex:0 0 auto; width:260px; text-decoration:none; color:#fff;
  background:#131126; border:1px solid #1f1b33; border-radius:12px; padding:8px;
  display:flex; gap:10px; align-items:center; position:relative;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.cs2-search__results .res:hover, .cs2-search__results .res.sel{
  transform:translateY(-2px); box-shadow:0 0 18px rgba(124,58,237,.45);
  border-color:#2f2850;
}

/* active "hot" bar animation */
.cs2-search__results .res::after{
  content:""; position:absolute; left:8px; right:8px; bottom:6px; height:4px; border-radius:6px;
  background:linear-gradient(90deg,var(--accent-from),var(--accent-to)); transform:scaleX(0);
  transform-origin:left center; transition:transform 1.2s ease;
  opacity:.9;
}
.cs2-search__results .res.hot::after{ transform:scaleX(1); }

.cs2-search__results .thumb{ width:56px; height:56px; border-radius:10px; overflow:hidden; background:#0f0d1f; flex:0 0 auto; position:relative; }
.cs2-search__results .thumb::before{
  content:""; position:absolute; inset:0; background:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.06),rgba(255,255,255,0));
  transform:translateX(-100%); animation:glint 2.2s ease-in-out infinite;
}
@keyframes glint{ 0%{transform:translateX(-120%);} 60%{transform:translateX(120%);} 100%{transform:translateX(120%);} }

.cs2-search__results .thumb img{ width:100%; height:100%; object-fit:cover; display:block; }

/* Title truncation to avoid overflow */
.cs2-search__results .meta{ min-width:0; }
.cs2-search__results .meta .title{
  font-weight:800; line-height:1.2;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; /* one-line clamp */
  max-width:100%;
}

/* Highlight text */
.cs2-search mark{
  background:linear-gradient(90deg,var(--accent-from),var(--accent-to));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.cs2-search__results .empty{ color:#9aa0b4; padding:8px; }
