/* LibreCrawl Workshop
   Tokens match librecrawl.com/style.css so the two read as one product.
   Layout follows the Steam Workshop structure in reference.png: top bar, page
   tab row, banner, featured carousel, faceted sidebar, sort tabs over rows. */

:root {
  --bg: #0f172a;
  --bg-deep: #0b1120;
  --card: #1e293b;
  --card-2: #17233a;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --faint: #64748b;
  --accent: #8b5cf6;
  --accent-2: #a855f7;
  --border: #334155;
  --border-soft: #263349;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --radius: 10px;
  --radius-sm: 6px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: #fff; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: .88em;
  background: #0d1526;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: .08em .35em;
  /* paths like web/static/plugins/ have no break opportunity, and a grid item
     sized to its min-content would push the whole column past the viewport */
  overflow-wrap: anywhere;
}
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 800px; }

/* stub-data warning strip */
.stub-banner {
  background: rgba(245, 158, 11, .12);
  border-bottom: 1px solid rgba(245, 158, 11, .35);
  color: #fbbf24;
  font-size: .84rem;
  padding: .5rem 20px;
  text-align: center;
}
.stub-banner strong { color: #fcd34d; }

/* top bar */
.topbar { background: #0a0f1c; border-bottom: 1px solid #1b2436; }
.topbar-inner { display: flex; align-items: center; gap: 28px; height: 54px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: .2px; }
.brand-mark {
  width: 20px; height: 20px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .18);
}
.topbar-links { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; flex: 1; }
.topbar-links a {
  color: var(--muted); font-size: .82rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .6px; padding: 4px 0;
}
.topbar-links a:hover { color: var(--text); }
.topbar-links a.active { color: var(--accent-2); border-bottom: 2px solid var(--accent); }
.topbar-right { display: flex; gap: 10px; }

/* page header with tab row */
.pagehead { background: var(--bg); border-bottom: 1px solid var(--border-soft); padding-top: 18px; }
.pagehead-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pagehead-title { font-size: 1.35rem; margin: 0; }
.tabs { display: flex; gap: 4px; list-style: none; margin: 14px 0 0; padding: 0; }
.tabs a {
  display: block; padding: 9px 16px; font-size: .88rem; font-weight: 600;
  color: var(--muted); border: 1px solid transparent; border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.tabs a:hover { color: var(--text); background: rgba(255, 255, 255, .03); }
.tabs a.active {
  color: var(--text); background: var(--bg-deep);
  border-color: var(--border-soft); position: relative; top: 1px;
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: .6rem 1.1rem; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: transparent; color: var(--text); font: inherit; font-weight: 600;
  font-size: .9rem; cursor: pointer; transition: background .15s, border-color .15s;
}
.btn:hover { background: rgba(255, 255, 255, .05); border-color: #43536b; color: #fff; }
.btn-sm { padding: .38rem .8rem; font-size: .82rem; }
.btn-primary {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-ghost { background: rgba(255, 255, 255, .02); }
.btn.full { width: 100%; margin-bottom: .5rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* banner */
.banner {
  background: linear-gradient(180deg, #16203a, #111a2e);
  border-bottom: 1px solid var(--border-soft);
}
.banner-inner { display: flex; gap: 26px; align-items: center; padding: 22px 20px; }
.banner-art { flex: 0 0 260px; }
.banner-art-frame {
  height: 104px; border: 2px dashed var(--border); border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; background: #131c2e;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: .82rem; letter-spacing: 2px; color: var(--faint);
}
.banner-copy h2 { font-size: 1.15rem; margin-bottom: .25rem; }
.banner-copy p { margin: 0 0 .5rem; color: var(--muted); font-size: .92rem; max-width: 62ch; }
.banner-link { color: #a78bfa; font-size: .9rem; font-weight: 600; }
.banner-link:hover { color: #c4b5fd; text-decoration: underline; }

/* panels */
.panel {
  background: var(--card-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 18px; margin: 20px 0;
}
.panel-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 14px;
}
.panel-head h2 { font-size: 1.05rem; margin: 0; }
.panel-sub { margin: 2px 0 0; color: var(--muted); font-size: .82rem; }
.panel-title { font-size: 1.2rem; }
.panel-subtitle { font-size: 1rem; margin-top: 1.5rem; }
.panel-foot { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.panel p { color: #cbd5e1; }

/* main two column layout */
.layout { display: grid; grid-template-columns: 232px 1fr; gap: 20px; align-items: start; }
/* grid items default to min-width:auto, which lets long content widen a column
   beyond the container; opt out so the columns stay put */
.layout > *, .detail > * { min-width: 0; }
.sidebar { position: sticky; top: 16px; }

/* sidebar search and facets */
.search { display: flex; margin: 20px 0 14px; }
.search input {
  flex: 1; min-width: 0; padding: .5rem .65rem; font: inherit; font-size: .88rem;
  background: #0d1526; color: var(--text);
  border: 1px solid var(--border); border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.search input:focus { outline: none; border-color: var(--accent); }
.search-go {
  padding: 0 .7rem; font-size: 1.05rem; cursor: pointer;
  background: #182135; color: var(--muted);
  border: 1px solid var(--border); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.search-go:hover { color: var(--text); background: #1e2942; }

.facet {
  background: var(--card-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px;
}
.facet-head {
  margin: 0 0 .5rem; font-size: .72rem; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--faint);
}
.facet-list { list-style: none; margin: 0; padding: 0; }
.facet-list a {
  display: flex; justify-content: space-between; gap: 8px;
  padding: .28rem .35rem; border-radius: 4px;
  font-size: .87rem; color: #b8c4d6;
}
.facet-list a:hover { background: rgba(255, 255, 255, .04); color: #fff; }
.facet-list a.on { background: rgba(139, 92, 246, .16); color: #ddd6fe; }
.facet-list .count { color: var(--faint); font-size: .8rem; }
.tag-list { max-height: 250px; overflow-y: auto; }
.facet-note p { margin: 0 0 .6rem; }

/* carousel */
.carousel { position: relative; }
.carousel-track {
  display: flex; gap: 12px; overflow-x: auto; scroll-behavior: smooth;
  scrollbar-width: thin; padding-bottom: 6px;
}
.carousel-track::-webkit-scrollbar { height: 8px; }
.carousel-track::-webkit-scrollbar-thumb { background: #2b3a54; border-radius: 4px; }
.carousel-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 30px; height: 54px; cursor: pointer; font-size: 1.4rem; line-height: 1;
  background: rgba(10, 15, 28, .86); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.carousel-nav:hover { background: #16203a; }
.carousel-nav.prev { left: -10px; }
.carousel-nav.next { right: -10px; }

/* tiles */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tile {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.carousel-track .tile { flex: 0 0 auto; width: 210px; }
.tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.tile-shot { position: relative; display: block; }
.tile-shot .shot { display: block; width: 100%; height: auto; }
.badge-check {
  position: absolute; right: 6px; bottom: 6px;
  width: 18px; height: 18px; border-radius: 3px;
  background: var(--success); color: #04220f;
  font-size: .72rem; font-weight: 700; line-height: 18px; text-align: center;
}
.tile-body { display: block; padding: 8px 10px 10px; }
.tile-name {
  display: block; font-size: .87rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile-author { display: block; font-size: .78rem; color: var(--muted); }

/* rows */
.rows { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: flex; gap: 14px; padding: 10px;
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); transition: border-color .15s, background .15s;
}
.row:hover { border-color: var(--accent); background: #22304a; }
.row-shot { flex: 0 0 120px; border-radius: 4px; display: block; }
.row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-name { font-size: .96rem; font-weight: 600; }
.row-author { font-size: .8rem; color: var(--muted); }
.row-summary {
  font-size: .87rem; color: #b8c4d6; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.row-meta {
  display: flex; gap: 12px; flex-wrap: wrap; margin-top: 3px;
  font-size: .78rem; color: var(--faint);
}
.chip {
  display: inline-block; padding: .08rem .5rem; border-radius: 999px;
  background: rgba(139, 92, 246, .14); border: 1px solid rgba(139, 92, 246, .3);
  color: #c4b5fd; font-size: .75rem;
}
a.chip:hover { background: rgba(139, 92, 246, .26); color: #ede9fe; }
.verified { color: var(--success); }

/* stars */
.stars { display: inline-flex; gap: 1px; font-size: .8rem; line-height: 1; }
.star.on { color: #60a5fa; }
.star.off { color: #334155; }

/* sort tabs */
.tabs-head { align-items: flex-end; }
.sorttabs { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; }
.sorttabs a {
  font-size: .88rem; font-weight: 600; color: var(--muted);
  padding-bottom: 4px; border-bottom: 2px solid transparent;
}
.sorttabs a:hover { color: var(--text); }
.sorttabs a.active { color: #fff; border-bottom-color: var(--accent); }

/* detail page */
.crumbs { display: flex; gap: 8px; padding: 14px 0 0; font-size: .84rem; color: var(--muted); }
.crumbs a { color: #a78bfa; }
.crumbs a:hover { text-decoration: underline; }
.detail { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.detail-side { position: sticky; top: 16px; }
.detail-hero .shot { display: block; width: 100%; height: auto; border-radius: var(--radius-sm); }
.detail-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.thumb-shot {
  border-radius: 4px; border: 1px solid var(--border-soft); cursor: pointer;
  flex: 0 0 auto; width: 120px; height: auto;
}
.thumb-shot:hover { border-color: var(--accent); }
.detail-name { font-size: 1.3rem; margin-bottom: .15rem; }
.detail-author { margin: 0 0 .6rem; font-size: .86rem; color: var(--muted); }
.detail-author a { color: #a78bfa; }
.detail-summary { font-size: .92rem; color: #cbd5e1; }
.detail-rating { display: flex; align-items: center; gap: 8px; margin: .6rem 0 1rem; }
.specs { margin: 1.1rem 0 0; padding: 1rem 0 0; border-top: 1px solid var(--border-soft); }
.specs div { display: flex; justify-content: space-between; gap: 12px; padding: .22rem 0; font-size: .86rem; }
.specs dt { color: var(--muted); margin: 0; }
.specs dd { margin: 0; text-align: right; }
.specs a { color: #a78bfa; }
.taglist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 1rem; }
.steps { color: #cbd5e1; padding-left: 1.2rem; }
.steps li { margin-bottom: .3rem; }
.plain { list-style: none; padding: 0; }
.plain li { padding: .2rem 0; }
.plain a { color: #a78bfa; }

/* forms */
.notice {
  background: rgba(245, 158, 11, .1); border: 1px solid rgba(245, 158, 11, .3);
  border-radius: var(--radius-sm); padding: .7rem .9rem;
  color: #fcd34d; font-size: .88rem;
}
.form { display: flex; flex-direction: column; gap: 14px; margin-top: 1.2rem; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: .86rem; font-weight: 600; }
.form input, .form select, .form textarea {
  padding: .55rem .7rem; font: inherit; font-size: .9rem; font-weight: 400;
  background: #0d1526; color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.form input:disabled, .form select:disabled, .form textarea:disabled { opacity: .55; }
.dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 1.6rem 1rem; text-align: center; background: #101a2c; opacity: .6;
}
.dropzone p { margin: 0; }
.dropzone.small-zone { padding: 1rem; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }

/* auth and account pages */
.inline-form { display: inline; margin: 0; }
.problems {
  margin: 1rem 0; padding: .7rem .9rem .7rem 2rem; list-style: disc;
  background: rgba(239, 68, 68, .1); border: 1px solid rgba(239, 68, 68, .35);
  border-radius: var(--radius-sm); color: #fca5a5; font-size: .88rem;
}
.problems li { margin: .15rem 0; }
.hint { font-weight: 400; font-size: .8rem; color: var(--muted); }
.panel-inset {
  margin-top: 1.2rem; padding: .9rem; background: #101a2c;
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
}
.panel-inset p { margin: 0 0 .5rem; }
.form-inline { display: flex; gap: 8px; flex-wrap: wrap; }
.form-inline input {
  flex: 1; min-width: 180px; padding: .4rem .6rem; font: inherit; font-size: .88rem;
  background: #0d1526; color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.form input[type="file"] { padding: .45rem; font-size: .85rem; }
.pending { color: var(--warning); }
.rejected { color: var(--error); }

.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.data-table th, .data-table td {
  text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--border-soft);
}
.data-table th {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .8px;
  color: var(--faint); font-weight: 700;
}
.data-table tbody tr:hover { background: rgba(255, 255, 255, .03); }
.data-table a { color: #a78bfa; }

/* footer */
.site-footer {
  margin-top: 36px; padding: 26px 0;
  background: #0a0f1c; border-top: 1px solid #1b2436;
}
.footer-inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-brand { margin: 0; font-weight: 700; }
.footer-cols { display: flex; gap: 44px; flex-wrap: wrap; }
.footer-cols a { display: block; font-size: .85rem; color: var(--muted); padding: .12rem 0; }
.footer-cols a:hover { color: var(--text); }
.footer-head {
  margin: 0 0 .4rem; font-size: .74rem; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--faint);
}

@media (max-width: 960px) {
  .layout, .detail { grid-template-columns: 1fr; }
  .sidebar, .detail-side { position: static; }
  .banner-inner { flex-direction: column; align-items: flex-start; }
  .banner-art { flex: 0 0 auto; width: 100%; }
}
@media (max-width: 620px) {
  .topbar-inner { gap: 14px; }
  .topbar-links { display: none; }
  .tabs { overflow-x: auto; }
  .row { flex-direction: column; }
  .row-shot { width: 100%; flex-basis: auto; }
}
