:root {
  --bg: #14121a;
  --panel: #1e1b27;
  --panel-2: #282433;
  --line: #353044;
  --text: #ece9f3;
  --muted: #a39db5;
  --accent: #ff5d73;
  --accent-ink: #1a0b0f;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 16px; }

/* Header */
.top { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; gap: 16px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.brand { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.brand b { color: var(--accent); }
.nav { display: flex; gap: 14px; color: var(--muted); font-weight: 600; }
.search { margin-left: auto; display: flex; flex: 1 1 240px; max-width: 420px; }
.search input {
  flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--line); border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius); background: var(--bg); color: var(--text); font: inherit;
}
.search button {
  padding: 0 16px; border: 0; border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; cursor: pointer;
}

/* Sections */
main { padding: 22px 0 40px; }
h1 { font-size: 24px; margin: 0 0 14px; }
h2 { font-size: 19px; margin: 28px 0 12px; }
.sub { color: var(--muted); margin: -8px 0 16px; }

/* Grids */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.tile { display: block; background: var(--panel); border-radius: var(--radius); overflow: hidden; border: 1px solid transparent; }
.tile:hover { border-color: var(--accent); color: var(--text); }
.shot { position: relative; aspect-ratio: 16 / 9; background: var(--panel-2); }
.shot img, .shot .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph {
  background:
    radial-gradient(circle at 30% 30%, hsl(var(--h) 60% 45% / .9), transparent 60%),
    linear-gradient(135deg, hsl(calc(var(--h) + 40) 45% 28%), hsl(calc(var(--h) - 30) 40% 16%));
}
.badge {
  position: absolute; right: 6px; bottom: 6px; padding: 1px 7px; border-radius: 6px;
  background: rgb(0 0 0 / .72); font-size: 12px; font-weight: 600;
}
.cap { padding: 8px 10px 10px; font-size: 14px; }
.cap .t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.cap .m { color: var(--muted); font-size: 12px; margin-top: 4px; }
.cat .cap { font-weight: 700; display: flex; justify-content: space-between; gap: 8px; }
.cat .cap span { color: var(--muted); font-weight: 500; }

/* Tag cloud */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { padding: 5px 12px; border-radius: 999px; background: var(--panel-2); font-size: 13px; }
.tags a:hover { background: var(--accent); color: var(--accent-ink); }

/* Pager */
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 26px 0 0; }
.pager a, .pager span {
  min-width: 38px; padding: 7px 10px; text-align: center; border-radius: 8px; background: var(--panel); font-weight: 600;
}
.pager .on { background: var(--accent); color: var(--accent-ink); }
.pager .gap { background: none; color: var(--muted); }

/* Video page */
.watch { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--panel-2); display: block; }
.player img, .player .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.srclink {
  display: inline-block; margin-top: 12px; padding: 9px 16px; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink); font-weight: 700;
}
.srclink:hover { color: var(--accent-ink); filter: brightness(1.1); }
.player .go {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px;
  background: rgb(0 0 0 / .35); color: #fff; font-weight: 700;
}
.player .go i {
  width: 84px; height: 84px; border-radius: 50%; background: var(--accent); display: grid; place-items: center;
}
.player .go i::before {
  content: ""; border-style: solid; border-width: 16px 0 16px 28px;
  border-color: transparent transparent transparent var(--accent-ink); margin-left: 6px;
}
.player:hover .go { background: rgb(0 0 0 / .2); }
.meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); margin: 12px 0; }
.note { color: var(--muted); font-size: 13px; margin-top: 12px; }
.ad { margin-bottom: 14px; }
.ad-ph {
  display: grid; place-items: center; min-height: 250px; border: 1px dashed var(--line);
  border-radius: var(--radius); color: var(--muted); font-size: 13px; text-align: center; padding: 10px;
}
.ad-wide .ad-ph { min-height: 90px; }
.ad-wide { margin: 22px 0 0; }

/* Text pages */
.prose { max-width: 760px; }
.prose p, .prose li { color: #d3cee0; }
.prose a { color: var(--accent); }

/* Footer */
footer { border-top: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 13px; }
footer .wrap { padding-top: 18px; padding-bottom: 22px; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
footer .rta { margin-left: auto; border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; font-weight: 700; }

/* Age gate */
.locked body { overflow: hidden; }
.locked body > *:not(#gate) { filter: blur(26px); pointer-events: none; user-select: none; }
#gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgb(10 8 14 / .86); padding: 16px; }
#gate .box { max-width: 460px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 26px; text-align: center; }
#gate h2 { margin: 0 0 8px; font-size: 22px; }
#gate p { color: var(--muted); margin: 0 0 18px; }
#gate .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
#gate button, #gate a.btn {
  padding: 11px 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel-2);
  color: var(--text); font: inherit; font-weight: 700; cursor: pointer;
}
#gate button.yes { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 40;
  background: var(--panel-2); border: 1px solid var(--line); padding: 10px 16px; border-radius: var(--radius);
}

@media (max-width: 900px) {
  .watch { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .search { order: 3; max-width: none; flex-basis: 100%; margin-left: 0; }
}
