/* assets/downloads.css
   Downloads grid + search + "load more" button
   Pairs with pages/downloads.php
*/

/* -------- Tokens / fallbacks -------- */
:root{
  --dl-ink: var(--ink, #e8eef7);
  --dl-muted: #9fb0c5;
  --dl-line: rgba(120,150,185,.22);
  --dl-surface: rgba(10,16,24,.72);
  --dl-card: rgba(9,14,22,.9);
  --dl-accent: var(--cine-primary, #00e5ff);
  --dl-accent-2: #9e30a9;
}

/* Section base */
section > h2 { margin-bottom: 10px; }

/* -------- Search -------- */
.dl-search{
  margin: 4px 0 10px;
}
.dl-search label{
  color: #cfe1ff;
  font-weight: 600;
  letter-spacing: .02em;
}
.dl-search input[type="text"]{
  display: block;
  width: min(520px, 100%);
  height: 40px;
  margin-top: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--dl-line);
  background: var(--dl-card);
  color: var(--dl-ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.dl-search input[type="text"]::placeholder{ color: var(--dl-muted); }
.dl-search input[type="text"]:focus{
  border-color: color-mix(in srgb, var(--dl-accent) 60%, var(--dl-line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--dl-accent) 20%, transparent);
}

/* Optional boxed link (Upload) — fallback if not globally styled */
.box-link{
  display:inline-block; padding:8px 12px; border-radius:12px;
  border:1px solid var(--dl-line); background:var(--dl-card); color:#7bd0ff; text-decoration:none;
}
.box-link:hover{ border-color: color-mix(in srgb, var(--dl-accent) 45%, var(--dl-line)); text-decoration:none; }

/* -------- Grid -------- */
.dl-grid{
  list-style:none; margin: 12px 0 16px; padding:0;
  display:grid; gap:12px; grid-template-columns:repeat(5, minmax(0,1fr));
}

/* Cards */
.dl-card{
  border:1px solid var(--dl-line);
  border-radius:14px;
  background: var(--dl-card);
  overflow:hidden;
  display:flex; flex-direction:column;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.dl-card:hover{
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--dl-accent) 45%, var(--dl-line));
  box-shadow:
    0 6px 18px rgba(0,0,0,.35),
    0 0 22px color-mix(in srgb, var(--dl-accent) 20%, transparent);
}

/* cover */
.dl-cover{ display:block; background: radial-gradient(120% 120% at 0 0, rgba(0,229,255,.06), transparent 60%); }
.dl-cover img{
  display:block; width:100%; height:auto;
  aspect-ratio:16/9; object-fit:cover; object-position:center;
  background:#0d1117;
}

/* body */
.dl-body{ padding:10px 12px; min-width:0; display:grid; gap:6px; }

/* title */
.dl-title{ margin:0; line-height:1.25; }
.dl-title a{
  color: var(--dl-ink);
  text-decoration:none;
  text-shadow: 0 0 1px rgba(0,0,0,.25);
}
.dl-card:hover .dl-title a{ text-decoration:underline; }

/* author/uploader strip */
.dl-sub{
  display:flex; flex-wrap:wrap; gap:6px; align-items:baseline;
  color: var(--dl-muted); font-size: 14px; min-width:0;
}
.dl-sub .sep{ opacity:.7; }
.dl-sub .dl-auth, .dl-sub .dl-upl{
  max-width:100%; white-space:nowrap; text-overflow:ellipsis; overflow:hidden;
}

/* meta time */
.dl-meta small{ color: var(--dl-muted); }

/* summary (2–3 lines clamp) */
.dl-summary{
  margin:0;
  color: var(--dl-ink);
  opacity:.92;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

/* Load more (when IntersectionObserver not supported) */
#dlMoreWrap{ margin-top: 8px; }
#dlLoadMore{
  padding:10px 14px; border-radius:12px; border:1px solid var(--dl-line);
  background: var(--dl-card); color:#7bd0ff; cursor:pointer;
}
#dlLoadMore:hover{
  border-color: color-mix(in srgb, var(--dl-accent) 45%, var(--dl-line));
}

/* -------- Responsive breaks -------- */
@media (max-width: 1200px){
  .dl-grid{ grid-template-columns:repeat(4, minmax(0,1fr)); }
}
@media (max-width: 1000px){
  .dl-grid{ grid-template-columns:repeat(3, minmax(0,1fr)); }
}
@media (max-width: 700px){
  .dl-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); gap:10px; }
  .dl-search input[type="text"]{ width:100%; }
}
@media (max-width: 420px){
  .dl-grid{ grid-template-columns:1fr; gap:8px; }
}

/* thin separator above FastDL section */
.dv-sep{
  margin: 28px 0;
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(150,180,210,.28), transparent);
}

/* ===== FastDL section — on-brand (blue/cyan/violet) ===== */

/* wrapper */
.fastdl-section{
  margin-top: 16px;
  padding: 2rem 0;
  color: var(--ink, #e8eef7);
}

/* header card uses the same “box” look */
.fastdl-heading.card{
  text-align: center;
  padding: 1rem 1.25rem;
  border: 1px solid #1a2a40;
  border-radius: 14px;
  background: linear-gradient(180deg, #0e1725cc, #0b121dcc);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
  margin-bottom: 1.75rem;
}

.fastdl-heading h2{
  font-family: "Orbitron", system-ui, sans-serif;
  font-weight: 900;
  letter-spacing: .08em;
  margin: 0 0 .25rem;
  /* cyan → magenta gradient text, same vibe as the headers */
  background: linear-gradient(90deg, var(--cine-primary, #00e5ff), var(--cine-accent, #ff00ea));
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 0 8px rgba(0,229,255,.18),
    0 0 10px rgba(255,0,234,.12);
}

.fastdl-heading p{
  font-family: "Rajdhani", system-ui, sans-serif;
  font-size: .95rem;
  color: #cfe4ff;
  opacity: .9;
  line-height: 1.35;
  max-width: 640px;
  margin: 0 auto;
}

/* grid */
.fastdl-grid{
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* cards match the .box tone */
.fastdl-card{
  border: 1px solid #1a2a40;
  border-radius: 14px;
  background: linear-gradient(180deg, #0e1725e6, #0b121de6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  box-shadow: 0 6px 18px rgba(0,0,0,.28) inset;
}
.fastdl-card:hover{
  transform: translateY(-2px);
  border-color: color-mix(in oklab, var(--cine-primary, #00e5ff) 45%, #1a2a40);
  box-shadow:
    0 6px 18px rgba(0,0,0,.35),
    0 0 18px color-mix(in oklab, var(--cine-primary, #00e5ff) 22%, transparent);
}

.fastdl-card h3{
  margin: 0;
  color: #cfe4ff;
  font-family: "Orbitron", system-ui, sans-serif;
  letter-spacing: .03em;
  font-size: 1.1rem;
  line-height: 1.2;
  min-height: 2.2em;
}

/* hairline accent under titles (cyan → magenta) */
.fastdl-card h3::after{
  content: "";
  display: block;
  height: 2px;
  width: 46px;
  margin-top: .5rem;
  border-radius: 999px;
  background: linear-gradient(90deg,
    rgba(0,229,255,.45),
    rgba(157, 0, 255, .34),
    rgba(0,229,255,.45)
  );
  box-shadow:
    0 0 10px rgba(0,229,255,.18),
    0 0 12px rgba(157,0,255,.14);
}

/* link + copy */
.fastdl-card a{
  font-family: ui-monospace, SFMono-Regular, Menlo, "Courier New", monospace;
  color: #8ecbff;
  text-decoration: none;
  word-break: break-word;
}
.fastdl-card a:hover{ text-decoration: underline; }

.fastdl-card p{
  margin: 0;
  color: #cfe4ff;
  opacity: .9;
  line-height: 1.5;
}

/* left rails (use brand tokens instead of orange) */
.official-fastdl{      border-left: 4px solid var(--cine-primary, #00e5ff); }
.official-competitive{ border-left: 4px solid var(--cine-accent,  #ff00ea); }
.community-fastdl{     border-left: 4px solid #1a2a40; }

/* mobile spacing tweaks */
@media (max-width: 680px){
  .fastdl-heading.card{ padding: .9rem 1rem; }
  .fastdl-card{ padding: 1rem .9rem; }
}
