/* Cams365 — design system. Single stylesheet, CSS custom properties,
   CSS Grid + Flexbox. Mobile-first. No framework. */

:root {
  --color-primary:    #ff2d55;
  --color-primary-2:  #ff5e85;
  --color-primary-3:  #ff9eb0;
  --color-bg:         #0b0b12;
  --color-bg-2:       #12121c;
  --color-card:       #16161f;
  --color-card-2:     #1c1c26;
  --color-text:       #f2f2f7;
  --color-muted:      #9a9aa8;
  --color-border:     rgba(255,255,255,.08);
  --color-border-2:   rgba(255,255,255,.14);
  --color-success:    #34c759;
  --color-warning:    #ff9f0a;
  --color-error:      #ff453a;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-1: 0 1px 2px rgba(0,0,0,.35);
  --shadow-2: 0 8px 28px rgba(0,0,0,.45);
  --content-width: 1240px;
  --header-h: 68px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--color-text);
  background: radial-gradient(1200px 600px at 12% -10%, rgba(255,45,85,.18), transparent 60%),
              radial-gradient(900px 500px at 100% 0%, rgba(120,80,255,.14), transparent 60%),
              var(--color-bg);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
:focus-visible {
  outline: 2px solid var(--color-primary-2);
  outline-offset: 2px;
  border-radius: 4px;
}
.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;
}

/* Layout ---------------------------------------------------------- */
.wrap { max-width: var(--content-width); margin: 0 auto; padding: 0 20px; }
.wrap-lg { max-width: 1440px; margin: 0 auto; padding: 0 20px; }

/* Header ---------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,11,18,.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: 20px;
  max-width: var(--content-width); margin: 0 auto; padding: 0 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; letter-spacing: -.01em; font-size: 18px;
}
.brand .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(255,45,85,.18), 0 0 18px rgba(255,45,85,.7);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(255,45,85,.18), 0 0 18px rgba(255,45,85,.7); }
  50%     { box-shadow: 0 0 0 8px rgba(255,45,85,.10), 0 0 22px rgba(255,45,85,.9); }
}
.brand b { background: linear-gradient(90deg, #fff 0%, #ffd2da 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand span { color: var(--color-primary); font-weight: 800; }
nav.main { margin-left: auto; display: flex; align-items: center; gap: 4px; }
nav.main a {
  padding: 8px 12px; border-radius: 999px; font-size: 14px; color: var(--color-muted);
  transition: color .15s ease, background .15s ease;
}
nav.main a:hover { color: var(--color-text); background: rgba(255,255,255,.05); }
nav.main a.active { color: #fff; background: rgba(255,45,85,.18); }
.header-search {
  position: relative;
}
.header-search input {
  appearance: none;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--color-border);
  color: #fff;
  padding: 9px 12px 9px 34px;
  border-radius: 999px;
  font-size: 14px;
  width: 200px;
  transition: border-color .15s ease, background .15s ease, width .2s ease;
}
.header-search input:focus { outline: none; border-color: var(--color-border-2); background: rgba(255,255,255,.09); width: 240px; }
.header-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--color-muted); pointer-events: none; }

/* Age gate -------------------------------------------------------- */
.agegate {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8,8,14,.92);
  backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.agegate[hidden] { display: none; }
.agegate .card {
  width: min(520px, 100%);
  background: var(--color-bg-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow-2);
}
.agegate .icon {
  width: 64px; height: 64px; margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), #7a3cff);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 900; color: #fff;
}
.agegate h1 { font-size: 22px; margin: 0 0 8px; letter-spacing: -.01em; }
.agegate p  { color: var(--color-muted); font-size: 14.5px; margin: 0 0 22px; }
.agegate .btns { display: flex; gap: 10px; }
.agegate .btns button { flex: 1; }

/* Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: 14.5px;
  border: 1px solid transparent; cursor: pointer; transition: transform .08s ease, filter .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(90deg, var(--color-primary), var(--color-primary-2)); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost   { background: transparent; color: var(--color-text); border-color: var(--color-border-2); }
.btn-ghost:hover { background: rgba(255,255,255,.05); }
.btn-sm { padding: 7px 12px; font-size: 13px; }

/* Hero ------------------------------------------------------------ */
.hero { padding: 48px 0 28px; }
.hero h1 {
  font-size: clamp(28px, 4.4vw, 46px);
  line-height: 1.08; letter-spacing: -.02em; margin: 0 0 12px;
  background: linear-gradient(180deg, #fff 0%, #d9d9e4 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--color-muted); font-size: 17px; max-width: 62ch; margin: 0 0 22px; }
.hero-meta { display: flex; gap: 22px; flex-wrap: wrap; color: var(--color-muted); font-size: 13px; }
.hero-meta b { color: #fff; font-weight: 700; }

/* Toolbar / filter bar -------------------------------------------- */
.toolbar {
  position: sticky; top: var(--header-h); z-index: 40;
  background: rgba(11,11,18,.72);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.toolbar .inner {
  max-width: var(--content-width); margin: 0 auto; padding: 12px 20px;
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.toolbar select {
  appearance: none;
  background: rgba(255,255,255,.06) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="rgba(255,255,255,.6)" stroke-width="2"><path d="M6 9l6 6 6-6"/></svg>') no-repeat right 12px center;
  border: 1px solid var(--color-border);
  color: #fff; padding: 9px 32px 9px 12px; border-radius: 999px; font-size: 13.5px;
  cursor: pointer;
}
.toolbar select:focus { outline: none; border-color: var(--color-border-2); }
.toolbar .count { margin-left: auto; color: var(--color-muted); font-size: 13px; }
.toolbar .count b { color: #fff; font-weight: 700; }

/* Grid ------------------------------------------------------------ */
.grid {
  padding: 22px 0 56px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
.card {
  position: relative;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
  display: block;
}
/* [hidden] must win over author display rules */
[hidden] { display: none !important; }
.card:hover { transform: translateY(-3px); border-color: var(--color-border-2); box-shadow: var(--shadow-2); }
.card .thumb {
  position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: #0a0a12;
}
.card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .thumb .live {
  position: absolute; top: 10px; left: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(10,10,16,.72); backdrop-filter: blur(6px);
  padding: 4px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #fff;
  border: 1px solid rgba(255,255,255,.12);
}
.card .thumb .live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-success); box-shadow: 0 0 8px var(--color-success); }
.card .thumb .viewers {
  position: absolute; bottom: 10px; left: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(10,10,16,.78); backdrop-filter: blur(6px);
  padding: 4px 9px; border-radius: 999px; font-size: 11.5px; color: #fff;
  border: 1px solid rgba(255,255,255,.12);
}
.card .thumb .flag { position: absolute; bottom: 10px; right: 10px; font-size: 18px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.card .body { padding: 12px 14px 14px; }
.card .name { font-weight: 700; font-size: 15px; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.card .name .tag { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--color-primary-2); background: rgba(255,45,85,.14); padding: 2px 7px; border-radius: 999px; }
.card .meta { color: var(--color-muted); font-size: 12.5px; margin: 0; }
.card .new {
  position: absolute; top: 10px; right: 10px;
  background: var(--color-primary); color: #fff; font-size: 10.5px; font-weight: 800;
  padding: 3px 8px; border-radius: 999px; letter-spacing: .04em;
}

/* Empty / states -------------------------------------------------- */
.empty {
  grid-column: 1 / -1;
  text-align: center; padding: 60px 20px;
  color: var(--color-muted);
}
.empty h2 { color: #fff; font-size: 20px; margin: 0 0 8px; }
.empty p { margin: 0 0 18px; }

/* Page hero (inner pages) ----------------------------------------- */
.page-hero { padding: 40px 0 8px; }
.page-hero h1 { font-size: clamp(26px, 3.6vw, 38px); margin: 0 0 8px; letter-spacing: -.02em; }
.page-hero p { color: var(--color-muted); font-size: 15.5px; margin: 0; max-width: 68ch; }
.breadcrumb { font-size: 12.5px; color: var(--color-muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--color-muted); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb .sep { margin: 0 6px; opacity: .5; }

/* About / legal prose --------------------------------------------- */
.prose { padding: 24px 0 60px; max-width: 76ch; }
.prose h2 { font-size: 20px; margin: 28px 0 10px; letter-spacing: -.01em; }
.prose h3 { font-size: 16px; margin: 20px 0 8px; }
.prose p  { color: #d4d4de; margin: 0 0 12px; }
.prose ul { color: #d4d4de; padding-left: 20px; margin: 0 0 12px; }
.prose li { margin: 4px 0; }

/* Footer ---------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: rgba(8,8,14,.5);
  padding: 28px 0 36px; margin-top: 20px;
}
.footer-inner {
  max-width: var(--content-width); margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px;
}
@media (max-width: 760px) {
  .footer-inner { grid-template-columns: 1fr; gap: 18px; }
}
.site-footer h4 { margin: 0 0 10px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--color-muted); }
.site-footer a { display: block; color: var(--color-muted); font-size: 14px; padding: 4px 0; }
.site-footer a:hover { color: #fff; }
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-brand p { margin: 6px 0 0; color: var(--color-muted); font-size: 13.5px; max-width: 42ch; }
.footer-legal { color: var(--color-muted); font-size: 12.5px; margin-top: 24px; border-top: 1px solid var(--color-border); padding-top: 18px; display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.footer-legal a { padding: 0; }
.footer-18 {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid #fff; font-weight: 800; font-size: 12px;
  color: #fff;
}

/* Search page ----------------------------------------------------- */
.search-bar {
  display: flex; gap: 10px; margin: 18px 0 8px;
}
.search-bar input {
  flex: 1; padding: 13px 16px; border-radius: var(--radius-md);
  background: rgba(255,255,255,.05); border: 1px solid var(--color-border);
  color: #fff; font-size: 15px;
}
.search-bar input:focus { outline: none; border-color: var(--color-border-2); }
.search-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 4px; }
.chip {
  padding: 6px 12px; border-radius: 999px; font-size: 13px;
  background: rgba(255,255,255,.05); border: 1px solid var(--color-border);
  color: var(--color-muted); cursor: pointer;
}
.chip:hover { color: #fff; }
.chip.active { background: rgba(255,45,85,.18); color: #fff; border-color: rgba(255,45,85,.4); }

/* 404 ------------------------------------------------------------- */
.notfound { text-align: center; padding: 80px 20px 120px; }
.notfound .num { font-size: 96px; font-weight: 900; letter-spacing: -.04em; background: linear-gradient(90deg, var(--color-primary), #7a3cff); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 0 0 8px; }
.notfound h1 { font-size: 22px; margin: 0 0 8px; }
.notfound p { color: var(--color-muted); margin: 0 0 22px; }

/* Misc ------------------------------------------------------------ */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
kbd { background: rgba(255,255,255,.08); border: 1px solid var(--color-border); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; font-size: 11.5px; }
/* ── Detail pages: model + tag + trends ─────────────────────────────────── */
.detail { padding: 30px 0 60px; }
.back { display: inline-block; color: var(--color-muted); font-size: 13.5px; margin-bottom: 18px; }
.back:hover { color: #fff; }
.model-head { display: flex; align-items: flex-start; gap: 22px; margin-bottom: 24px; }
.model-id { display: flex; gap: 18px; align-items: flex-start; flex: 1; min-width: 0; }
.model-id .thumb { width: 132px; height: 176px; object-fit: cover; border-radius: var(--radius-md); border: 1px solid var(--color-border); background: #0a0a12; flex: 0 0 auto; }
.mname { font-size: clamp(24px, 3.4vw, 34px); margin: 0 0 4px; letter-spacing: -.02em; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.handle { color: var(--color-muted); font-size: 14px; margin: 0 0 6px; }
.subject { color: #d4d4de; font-size: 15px; margin: 6px 0 0; max-width: 60ch; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; }
.pill.online { background: rgba(52,199,89,.16); color: var(--color-success); box-shadow: inset 0 0 0 1px rgba(52,199,89,.4); }
.pill.offline { background: rgba(255,255,255,.06); color: var(--color-muted); }
.meta-line { display: flex; gap: 18px; flex-wrap: wrap; color: var(--color-muted); font-size: 13.5px; margin-top: 10px; }
.meta-line b { color: #fff; font-weight: 700; }
.meta-line.small { font-size: 12.5px; color: var(--color-muted); }
.meta-line .stat { white-space: nowrap; }
.meta-line .stat b { color: #fff; }
.watch { flex: 0 0 auto; white-space: nowrap; }
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 26px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; gap: 26px; } .model-id .thumb { width: 104px; height: 140px; } }
.sec { font-size: 17px; margin: 8px 0 14px; letter-spacing: -.01em; display: flex; align-items: baseline; gap: 10px; }
.sec .hint { font-size: 12.5px; color: var(--color-muted); font-weight: 400; }
.muted { color: var(--color-muted); font-size: 14px; }

/* Activity bars */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 130px; padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.bars .bar { flex: 1 1 0; min-width: 3px; height: 100%; display: flex; align-items: flex-end; cursor: default; }
.bars .bar i { display: block; width: 100%; background: linear-gradient(180deg, var(--color-primary-2), var(--color-primary)); border-radius: 3px 3px 0 0; opacity: .85; transition: opacity .12s ease; }
.bars .bar:hover i { opacity: 1; }

/* Related / rank lists */
.rel-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rel-list a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; background: var(--color-card); border: 1px solid var(--color-border); border-radius: var(--radius-sm); transition: border-color .12s ease, background .12s ease; }
.rel-list a:hover { border-color: var(--color-border-2); background: var(--color-card-2); }
.rel-list img { width: 42px; height: 56px; object-fit: cover; border-radius: 6px; background: #0a0a12; flex: 0 0 auto; }
.rel-list span { display: flex; flex-direction: column; min-width: 0; }
.rel-list b { font-size: 14px; }
.rel-list em { font-style: normal; color: var(--color-muted); font-size: 12.5px; }
.rel-list em.on { color: var(--color-success); }
.rank-list { list-style: none; margin: 0 0 24px; padding: 0; counter-reset: rk; }
.rank-list li { counter-increment: rk; border-bottom: 1px solid var(--color-border); }
.rank-list li a { display: flex; align-items: center; gap: 10px; padding: 10px 4px; }
.rank-list li a::before { content: counter(rk); font-size: 12px; font-weight: 800; color: var(--color-muted); width: 20px; }
.rank-list b { font-size: 15px; }
.rank-list small { margin-left: auto; color: var(--color-muted); font-size: 12px; }
.dir { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 999px; }
.dir.rising { background: rgba(52,199,89,.16); color: var(--color-success); }
.dir.falling { background: rgba(255,69,58,.16); color: var(--color-error); }
.dir.stable { background: rgba(255,255,255,.07); color: var(--color-muted); }

/* Tag cloud */
.tag-cloud { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.tag-cloud .chip { cursor: pointer; }
.tag-cloud .chip i { font-style: normal; color: var(--color-muted); font-size: 11.5px; margin-left: 4px; }
.tag-cloud .chip.hot { background: rgba(255,45,85,.16); color: #fff; border-color: rgba(255,45,85,.4); }
.tag-cloud .chip.combo { cursor: default; }

/* Stat strip (trends) */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 6px 20px 26px; }
@media (max-width: 640px) { .stat-strip { grid-template-columns: repeat(2, 1fr); } }
.stat-box { background: var(--color-card); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 16px 18px; }
.stat-box b { display: block; font-size: 22px; font-weight: 800; margin-bottom: 2px; }
.stat-box span { color: var(--color-muted); font-size: 12.5px; }

/* Category bars */
.cat-bars { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.cat-bars a { display: flex; align-items: center; gap: 12px; }
.cat-bars span { width: 90px; font-size: 13.5px; color: var(--color-muted); }
.cat-bars i { position: relative; height: 26px; border-radius: 6px; background: rgba(255,45,85,.18); display: inline-block; min-width: 20px; }
.cat-bars i u { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); text-decoration: none; font-size: 12px; font-weight: 700; color: #fff; }

/* Facts list */
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { position: relative; padding: 10px 0 10px 26px; border-bottom: 1px solid var(--color-border); color: #d4d4de; font-size: 14.5px; }
.facts li::before { content: "◆"; position: absolute; left: 0; color: var(--color-primary); font-size: 11px; top: 13px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
