/* ============================================================
   CheatLeaks — shared stylesheet
   ============================================================ */
:root {
  --bg: #0a0a0b;
  --bg-soft: #101012;
  --card: #131316;
  --card-hover: #17171b;
  --text: #f4f4f5;
  --muted: #8a8a92;
  --faint: #5a5a62;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.22);
  --accent: #e08a3c;
  --accent-soft: rgba(224, 138, 60, 0.14);
  --radius: 14px;
  --mono: ui-monospace, "SF Mono", "Consolas", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(224, 138, 60, 0.08), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.top {
  padding: 56px 0 8px;
  text-align: center;
}
.brand {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.brand .dot { color: var(--accent); }
.tagline {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Back link ---------- */
.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 28px 0 0;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 13px;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}
.back:hover { border-color: var(--line-strong); color: var(--text); background: var(--bg-soft); }

/* ---------- Search ---------- */
.search {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 18px;
  margin: 40px 0 22px;
  transition: border-color 0.18s;
}
.search:focus-within { border-color: var(--line-strong); }
.search svg { width: 18px; height: 18px; flex-shrink: 0; stroke: var(--faint); }
.search input {
  flex: 1;
  background: none; border: none; outline: none;
  color: var(--text);
  font-size: 1rem;
  font-family: var(--sans);
}
.search input::placeholder { color: var(--faint); }

/* ---------- Card list ---------- */
.list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 64px;
}
.card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--text);
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
}
.card:hover {
  border-color: var(--line-strong);
  background: var(--card-hover);
  transform: translateY(-1px);
}
.card-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.card-title { font-size: 1.02rem; font-weight: 600; }
.card-sub {
  font-size: 0.82rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-arrow { color: var(--faint); flex-shrink: 0; font-size: 1.1rem; }
.card:hover .card-arrow { color: var(--accent); }
.card.hidden { display: none; }

/* thumbnail on list cards */
.card-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Empty state ---------- */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty h2 { color: var(--text); font-size: 1.2rem; margin-bottom: 8px; }
.empty code {
  font-family: var(--mono);
  font-size: 0.85rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 7px;
  color: var(--accent);
}

/* ---------- Detail page ---------- */
.detail { padding-bottom: 64px; }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 40px 0 12px;
}
.detail h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.detail .desc {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 1rem;
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.tag {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
}

.detail-gallery {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.detail-image {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}
.detail-image img { width: 100%; height: auto; display: block; }

.downloads {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.downloads h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--faint);
  margin-bottom: 4px;
}
.dl {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: border-color 0.18s, background 0.18s;
}
.dl:hover { border-color: var(--accent); background: var(--card-hover); }
.dl-icon {
  width: 38px; height: 38px;
  flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--accent-soft);
  border-radius: 10px;
  color: var(--accent);
}
.dl-icon svg { width: 18px; height: 18px; }
.dl-main { flex: 1; min-width: 0; }
.dl-label { font-weight: 600; font-size: 0.98rem; }
.dl-name {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dl-cta { color: var(--faint); font-size: 0.8rem; font-family: var(--mono); }
.dl:hover .dl-cta { color: var(--accent); }

/* ---------- Footer ---------- */
.foot {
  text-align: center;
  color: var(--faint);
  font-size: 0.8rem;
  padding: 20px 0 40px;
}

@media (max-width: 520px) {
  .brand { font-size: 1.7rem; }
  .detail h1 { font-size: 1.6rem; }
  .top { padding-top: 40px; }
}
