/* AdultGames - dark theme. One stylesheet for every page.
   Change the colours below (the :root block) to re-theme the whole site. */
:root {
  --bg: #0b0f14;
  --card: #121820;
  --border: #26313d;
  --accent: #00ff88;
  --text: #ffffff;
  --muted: #8b949e;
  --on-accent: #04140c;
  --danger: #ff5c6c;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
p { margin: 0 0 .8em; }
ul { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 1480px; margin: 0 auto; padding: 0 14px; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.bar { display: flex; align-items: center; gap: 14px; padding-top: 10px; padding-bottom: 10px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 20px; letter-spacing: .2px; }
.logo img { border-radius: 8px; }
.logo:hover { text-decoration: none; }
.search { flex: 1; max-width: 460px; margin-left: auto; }
input[type=search], input[type=text], input[type=password], input[type=url], select, textarea {
  width: 100%; background: var(--card); color: var(--text); border: 1px solid var(--border);
  border-radius: 6px; padding: 9px 12px; font: inherit; font-size: 15px;
}
input::placeholder, textarea::placeholder { color: #5d6875; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* Buttons */
.btn {
  display: inline-block; background: var(--accent); color: var(--on-accent); border: 0; border-radius: 6px;
  padding: 9px 16px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; text-align: center;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn[disabled] { opacity: .55; cursor: default; filter: none; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); font-weight: 600; }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }

/* Homepage */
.toolbar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; padding: 14px 0 4px; }
.toolbar h1 { font-size: 20px; }
.status { color: var(--muted); font-size: 13px; margin: 0; }
.intro { color: var(--muted); font-size: 14px; margin: 0 0 10px; max-width: 80ch; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 6px 0 14px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.chip { flex: none; background: var(--card); color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; font-size: 13px; white-space: nowrap; }
.chip small { opacity: .7; font-size: 11px; margin-left: 2px; }
.chip:hover { color: var(--text); border-color: var(--muted); text-decoration: none; }
.chip[aria-current="page"] { color: var(--on-accent); background: var(--accent); border-color: var(--accent); font-weight: 700; }
.skip { position: absolute; left: -999px; top: 6px; background: var(--accent); color: var(--on-accent); padding: 6px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }

.grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { display: block; height: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; color: var(--text); }
.card:hover { border-color: var(--accent); text-decoration: none; }
.thumb { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; background: #0e141b; }
.thumb.none { display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.card-body { padding: 7px 9px 9px; }
.card-title { font-size: 14px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.card-meta { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 339px) { .grid { grid-template-columns: 1fr; } }
@media (min-width: 600px)  { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px)  { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 1440px) { .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 22px 0 28px; }
.pager a, .pager span { min-width: 38px; text-align: center; padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--card); color: var(--text); font-size: 14px; }
.pager a:hover { border-color: var(--accent); text-decoration: none; }
.pager [aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.pager .gap { border: 0; background: none; color: var(--muted); min-width: 0; padding-inline: 2px; }
.empty { text-align: center; color: var(--muted); padding: 48px 0; }
.related { margin-top: 22px; }
.related h2 { font-size: 17px; margin-bottom: 12px; padding-left: 10px; border-left: 3px solid var(--accent); }
.related .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* Game page */
.game-page .wrap { max-width: 980px; }
.crumbs { font-size: 13px; color: var(--muted); padding: 14px 0 10px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.banner { margin: 0 0 14px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--card); }
.banner img { width: 100%; max-height: 460px; object-fit: contain; margin: 0 auto; }
.game-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.game-head h1 { font-size: clamp(22px, 4.2vw, 32px); }
.badge { background: var(--card); border: 1px solid var(--accent); color: var(--accent); border-radius: 999px; padding: 2px 11px; font-size: 13px; font-weight: 600; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 16px 18px; margin-bottom: 14px; }
.panel h2 { font-size: 17px; margin-bottom: 12px; padding-left: 10px; border-left: 3px solid var(--accent); }
.info { display: grid; grid-template-columns: max-content 1fr; gap: 6px 22px; margin: 0; }
.info dt { color: var(--muted); }
.info dd { margin: 0; overflow-wrap: anywhere; }
.prose { max-width: 75ch; overflow-wrap: anywhere; }
.prose p:last-child { margin-bottom: 0; }
.prose ul { padding-left: 1.2em; margin: 0 0 .8em; }
.prose li { margin-bottom: .25em; }
.shots { list-style: none; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.shots a { display: block; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.shots a:hover { border-color: var(--accent); }
.shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #0e141b; }

.dl-gate { display: none; align-items: center; gap: 14px; }
.js .dl-gate { display: flex; }
.js .dl-links[data-locked] { display: none; }
.dl-status { margin: 0; color: var(--muted); font-size: 14px; }
.dl-group + .dl-group { margin-top: 14px; }
.dl-group h3 { font-size: 15px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.dl-row { display: flex; flex-wrap: wrap; gap: 8px; }
.dl-btn { min-width: 120px; }
.ad { margin-bottom: 14px; text-align: center; overflow: hidden; }

.site-footer { border-top: 1px solid var(--border); margin-top: 28px; padding: 18px 0; color: var(--muted); font-size: 13px; }
.site-footer a { color: var(--muted); }
.site-footer .age { margin: 6px 0 0; font-size: 12px; }
.empty-page { padding: 64px 14px; text-align: center; }
.empty-page h1 { margin-bottom: 10px; }

@media (max-width: 520px) {
  .bar { flex-wrap: wrap; }
  .search { max-width: none; flex-basis: 100%; order: 3; }
  .panel { padding: 14px; }
  .info { grid-template-columns: 1fr; gap: 0; }
  .info dd { margin-bottom: 8px; }
  .dl-btn { flex: 1 1 130px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
