/* ============================================================
   KAGE // 影 THEME LAYER — loaded after style.css, overrides it.
   Japanese hacker terminal: mono fonts, pure black, white accents,
   CRT scanline mode. Structure/behavior untouched.
   ============================================================ */

:root {
  --kage-bg: #050505;
  --kage-panel: #0a0a0a;
  --kage-panel-2: #111111;
  --kage-line: #262626;
  --kage-line-soft: #171717;
  --kage-text: #fafafa;
  --kage-muted: #a3a3a3;
  --kage-dim: #525252;
  --kage-mono: 'JetBrains Mono', 'Share Tech Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 4px;
  --radius-lg: 6px;
}

/* --- Global surface --- */
body {
  background: var(--kage-bg) !important;
  color: var(--kage-text);
  font-family: var(--kage-mono) !important;
  letter-spacing: 0.01em;
}

h1, h2, h3, h4, h5, button, input, select, textarea {
  font-family: var(--kage-mono) !important;
}

/* Selection */
::selection { background: #fff; color: #000; }

/* Scrollbars: thin terminal rails */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #050505; }
::-webkit-scrollbar-thumb { background: #262626; border: 2px solid #050505; border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: #404040; }

/* --- CRT scanline overlay (body.crt-on) --- */
.crt-overlay {
  position: fixed; inset: 0; z-index: 2147483646;
  pointer-events: none; opacity: 0; transition: opacity .25s;
  background:
    repeating-linear-gradient(to bottom, rgba(255,255,255,.028) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.38) 100%);
  mix-blend-mode: screen;
}
body.crt-on .crt-overlay { opacity: 1; }

/* --- Header --- */
.site-header {
  background: rgba(5,5,5,.95) !important;
  border-bottom: 1px solid var(--kage-line) !important;
  backdrop-filter: blur(8px);
}
.header-inner { height: 56px; }

.wordmark { display: inline-flex; align-items: center; gap: 10px; }
.wordmark .kage-helm {
  width: 34px; height: 34px; object-fit: cover;
  border: 1px solid var(--kage-line); background: #0a0a0a;
  filter: grayscale(1) contrast(1.15);
  transition: border-color .15s, transform .15s;
}
.wordmark:hover .kage-helm { border-color: #fff; transform: scale(1.04); }
.wordmark .wm-lewd,
.wordmark .wm-level {
  font-family: var(--kage-mono) !important;
  font-weight: 700; letter-spacing: .08em;
  color: var(--kage-text) !important;
  text-shadow: none !important;
  background: none !important;
  -webkit-text-fill-color: currentColor;
}
.wordmark .wm-lewd { font-size: 15px; }
.wordmark .wm-level { font-size: 15px; color: var(--kage-muted) !important; }
.wordmark .wm-sigil {
  font-size: 13px; color: var(--kage-dim);
  border: 1px solid var(--kage-line-soft);
  padding: 1px 5px; background: var(--kage-panel);
}
.drawer .wordmark .kage-helm { width: 42px; height: 42px; }

/* Header search — terminal input */
.search-form input[type="search"] {
  background: var(--kage-panel) !important;
  border: 1px solid var(--kage-line) !important;
  color: var(--kage-text) !important;
  font-family: var(--kage-mono) !important;
  border-radius: var(--radius) !important;
  caret-color: #fff;
}
.search-form input[type="search"]:focus { border-color: #737373 !important; outline: none; }
.search-form input[type="search"]::placeholder { color: var(--kage-dim); }
.search-form button {
  background: #fff !important; color: #000 !important;
  font-family: var(--kage-mono) !important; font-weight: 700;
  border-radius: var(--radius) !important; border: 0 !important;
  letter-spacing: .05em; text-transform: uppercase;
}
.search-form button:hover { background: #d4d4d4 !important; }

/* CRT toggle */
.crt-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--kage-mono); font-size: 10px; letter-spacing: .12em;
  color: var(--kage-muted); background: var(--kage-panel);
  border: 1px solid var(--kage-line); border-radius: var(--radius);
  padding: 5px 8px; cursor: pointer; white-space: nowrap;
}
.crt-toggle:hover { color: #fff; border-color: #404040; }
body.crt-on .crt-toggle { color: #fff; border-color: #737373; }
.crt-toggle .crt-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--kage-dim); transition: background .2s;
}
body.crt-on .crt-toggle .crt-dot { background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.8); }
@media (max-width: 900px) { .crt-toggle { display: none; } }

/* Header nav links */
.header-nav .nav-link, .partner-pill {
  font-family: var(--kage-mono) !important;
}

/* --- Hamburger --- */
.hamburger span { background: var(--kage-text) !important; border-radius: 0 !important; }

/* --- Drawer --- */
.drawer {
  background: var(--kage-bg) !important;
  border-right: 1px solid var(--kage-line) !important;
}
.drawer-head { border-bottom: 1px solid var(--kage-line-soft) !important; }
.drawer-title {
  font-family: var(--kage-mono) !important;
  color: var(--kage-dim) !important; letter-spacing: .14em; text-transform: uppercase;
}
.drawer-link {
  font-family: var(--kage-mono) !important;
  color: var(--kage-muted) !important;
  border-left: 2px solid transparent;
  border-radius: 0 !important;
  transition: color .12s, border-color .12s, background .12s;
}
.drawer-link:hover { color: #fff !important; background: var(--kage-panel) !important; border-left-color: #fff; }
.drawer-count { color: var(--kage-dim) !important; font-size: 10px; }

/* --- Chips / sort tabs --- */
.chip {
  font-family: var(--kage-mono) !important;
  background: var(--kage-panel) !important;
  border: 1px solid var(--kage-line) !important;
  color: var(--kage-muted) !important;
  border-radius: var(--radius) !important;
  text-transform: uppercase; letter-spacing: .06em;
}
.chip:hover { color: #fff !important; border-color: #525252 !important; }
.chip.active {
  background: #fff !important; color: #000 !important;
  border-color: #fff !important; font-weight: 700;
}

/* --- Video cards --- */
.card {
  background: transparent !important;
  border: 0 !important;
  border-radius: var(--radius) !important;
  padding: 0 !important;
  box-shadow: none !important;
}
.card .thumb {
  border-radius: var(--radius) !important;
  border: 1px solid var(--kage-line-soft);
  overflow: hidden; background: #000;
  transition: border-color .15s;
}
.card:hover .thumb { border-color: #737373; }
.card .thumb img { border-radius: 0 !important; filter: saturate(.92); transition: filter .15s; }
.card:hover .thumb img { filter: saturate(1); }
.card .duration {
  font-family: var(--kage-mono) !important;
  background: rgba(0,0,0,.85) !important;
  color: #fff !important; border-radius: 2px !important;
  font-size: 10px; letter-spacing: .05em;
}
.badge-hd {
  font-family: var(--kage-mono) !important;
  background: rgba(0,0,0,.85) !important; color: #fff !important;
  border: 1px solid #333; border-radius: 2px !important; font-size: 9px;
}
.card-title {
  font-family: var(--kage-mono) !important;
  color: var(--kage-text) !important; font-size: 12.5px !important; line-height: 1.45 !important;
}
.card:hover .card-title { color: #fff; }
.card-meta, .card-cat, .muted {
  font-family: var(--kage-mono) !important;
  color: var(--kage-dim) !important; font-size: 10.5px !important;
  text-transform: uppercase; letter-spacing: .07em;
}

/* --- Section titles: terminal labels --- */
.section-title, .page-head h1 {
  font-family: var(--kage-mono) !important;
  color: var(--kage-text) !important;
  letter-spacing: .1em; text-transform: uppercase;
  font-size: 13px !important;
}
.section-title::before, .page-head h1::before {
  content: '> '; color: var(--kage-dim);
}
.page-head .muted { font-size: 11px !important; }

/* --- Buttons --- */
.btn, .btn-ghost {
  font-family: var(--kage-mono) !important;
  border-radius: var(--radius) !important;
  letter-spacing: .05em; text-transform: uppercase;
}
.btn { background: #fff !important; color: #000 !important; border: 0 !important; font-weight: 700; }
.btn:hover { background: #d4d4d4 !important; }
.btn-ghost { background: transparent !important; color: var(--kage-text) !important; border: 1px solid var(--kage-line) !important; }
.btn-ghost:hover { border-color: #737373 !important; }

/* --- Pagination --- */
.pagination a, .pagination span {
  font-family: var(--kage-mono) !important;
  background: var(--kage-panel) !important;
  border: 1px solid var(--kage-line) !important;
  color: var(--kage-muted) !important; border-radius: var(--radius) !important;
}
.pagination .current, .pagination a:hover { color: #000 !important; background: #fff !important; border-color: #fff !important; }

/* --- Watch page --- */
.player-wrap { background: #000 !important; border: 1px solid var(--kage-line) !important; border-radius: var(--radius-lg) !important; overflow: hidden; }
.player { border-radius: 0 !important; }
.watch-desc, .vote-count, .vote-btn {
  font-family: var(--kage-mono) !important;
}
.vote-btn { background: var(--kage-panel) !important; border: 1px solid var(--kage-line) !important; border-radius: var(--radius) !important; }
.vote-btn:hover { border-color: #525252 !important; }
/* --- Preview photo gallery: horizontal strip under the player --- */
.preview-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px;
}
@media (max-width: 760px) { .preview-photos { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 4px; } }
.preview-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--kage-line-soft);
  border-radius: 3px;
  overflow: hidden;
  background: #000;
  transition: border-color .15s, opacity .15s;
}
.preview-thumb:hover { border-color: #737373; opacity: .92; }
.preview-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0 !important;
}
.tag-strip .chip, .model-strip .chip { font-size: 10px; }

/* --- Model pages --- */
.model-photo {
  border: 1px solid var(--kage-line) !important; border-radius: var(--radius-lg) !important;
  filter: grayscale(.15) contrast(1.05);
}
.model-info h1 { font-family: var(--kage-mono) !important; letter-spacing: .08em; text-transform: uppercase; }
.model-stats span { font-family: var(--kage-mono) !important; }
.model-bio { font-family: var(--kage-mono) !important; color: var(--kage-muted) !important; font-size: 12.5px !important; line-height: 1.7; }
.model-grid .card-meta { color: var(--kage-dim) !important; }

/* --- Ads: blend into terminal --- */
.ad-slot, .ad-tile, .funnel-cta, .cams-strip {
  font-family: var(--kage-mono) !important;
}
.ad-tag { font-family: var(--kage-mono) !important; color: var(--kage-dim) !important; }

/* --- Footer --- */
.site-footer {
  background: var(--kage-bg) !important;
  border-top: 1px solid var(--kage-line) !important;
}
.site-footer a, .site-footer p, .site-footer .logo {
  font-family: var(--kage-mono) !important;
}
.site-footer .logo { color: var(--kage-text) !important; letter-spacing: .08em; }

/* --- Login / admin --- */
.login-card, .admin-form, .admin-table {
  font-family: var(--kage-mono) !important;
  background: var(--kage-panel) !important; border: 1px solid var(--kage-line) !important;
  border-radius: var(--radius-lg) !important;
}
.admin-table th { color: var(--kage-dim) !important; text-transform: uppercase; font-size: 10px; letter-spacing: .1em; }

/* --- Misc --- */
.empty, .error { font-family: var(--kage-mono) !important; color: var(--kage-muted) !important; }
.empty::before { content: '[ 404 ] '; color: var(--kage-dim); }
.floating-hearts, .drip-separator { opacity: .6; }
.link-danger { font-family: var(--kage-mono) !important; }

/* Mobile: keep header compact */
@media (max-width: 760px) {
  .wordmark .wm-sigil { display: none; }
  .header-inner { height: 52px; }
}

/* Gallery directly under the player: tighter spacing */
.player-wrap ~ .section-title { margin-top: 12px !important; margin-bottom: 8px !important; font-size: 12px !important; }

/* atOptions 300x250 slot — centered, terminal frame */
.banner-300 { display: flex; justify-content: center; margin: 14px 0; }
.banner-300 iframe { border: 1px solid var(--kage-line-soft); border-radius: 3px; background: #000; }
