/* Extra styles for PHP version – keep original style.css intact */

.main-nav a.active { color: var(--accent); }

.page-btn {
  display: inline-block;
  padding: 6px 12px;
  margin: 0 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 13px;
}
.page-btn.active, .page-btn.current {
  background: var(--accent);
  color: #1a1a1e;
  border-color: var(--accent);
  font-weight: 600;
}
.page-btn:hover { border-color: var(--accent); color: var(--text); }

.pagination { margin: 24px 0; text-align: center; }

.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.model-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color .15s;
}
.model-card:hover { border-color: var(--accent-dim); }
.model-name { font-weight: 600; }
.model-count { font-size: 12px; color: var(--text-faint); }

.post-desc { margin: 16px 0; color: var(--text-dim); line-height: 1.6; }
.post-meta-tags { margin: 16px 0; }
.tag-group { margin-bottom: 8px; }
.tag {
  display: inline-block;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  margin: 2px 4px 2px 0;
  font-size: 13px;
}
.tag:hover { border-color: var(--accent); }

.screenshots { margin: 24px 0; }
.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.shot-grid img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 4px;
}

.search-form {
  display: flex;
  gap: 8px;
  max-width: 480px;
  margin: 16px 0 24px;
}
.search-form input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
}
.search-form button {
  padding: 10px 18px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

.browse-all { margin-top: 32px; text-align: center; }
.browse-all .btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.browse-all .btn:hover { border-color: var(--accent); }

.empty-state { color: var(--text-faint); padding: 40px 0; text-align: center; }

.ad-native-slot { margin: 20px 0; min-height: 20px; }

/* ===== Responsive categories / sidebar ===== */
.layout {
  display: flex;
  flex-direction: row;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}
.layout > .content { flex: 1; min-width: 0; }
.layout > .sidebar {
  width: 220px;
  flex-shrink: 0;
  max-height: calc(100vh - var(--header-h, 56px));
  overflow-y: auto;
  position: sticky;
  top: var(--header-h, 56px);
  border-left: 1px solid var(--border);
  padding: 16px 12px;
  -webkit-overflow-scrolling: touch;
}
.sidebar-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  font-size: 13px;
  word-break: break-word;
}
.sidebar-count {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-faint);
  background: rgba(255,255,255,.06);
  padding: 1px 6px;
  border-radius: 999px;
}

/* Mobile categories drawer */
.cat-toggle {
  display: none;
  margin: 0 0 12px;
  padding: 8px 12px;
  background: var(--bg-raised, #1a1a1e);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 55;
}
.sidebar-backdrop.open { display: block; }

@media (max-width: 860px) {
  .layout { flex-direction: column; }
  .layout > .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(300px, 86vw);
    max-height: 100vh;
    z-index: 70;
    background: var(--bg-raised, #141416);
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform .22s ease;
    padding-top: 56px;
  }
  .layout > .sidebar.open { transform: translateX(0); }
  .cat-toggle { display: block; }
  .main-nav { display: none !important; }
}

@media (max-width: 520px) {
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important; }
  main.content, .layout > .content { padding: 12px !important; }
}

/* Simple native player chrome */
.nvp-wrap { width: 100%; margin: 0 0 1.25rem; }
.nvp-video {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 10px;
  display: block;
  object-fit: contain; /* letterbox non-16:9 sources instead of stretching them */
}
.nvp-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  padding: 8px 0;
}
.nvp-bar label { font-size: 13px; color: var(--text-dim); }
.nvp-bar select {
  background: var(--bg-raised, #1a1a1e);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
}
.nvp-bar button {
  background: var(--accent, #c44dff);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.nvp-preroll {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000 center/cover no-repeat;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* Dark blur over the thumbnail so ad content stays readable */
.nvp-preroll::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 0;
}
.nvp-preroll-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  position: relative;
  z-index: 1;
}
.nvp-preroll-bar {
  padding: 12px;
  text-align: center;
  background: rgba(0,0,0,.85);
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
/* "Now playing" thumbnail strip in the skip bar */
.nvp-preroll-thumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.nvp-preroll-thumb img {
  width: 54px;
  height: 34px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,.15);
  flex-shrink: 0;
}
.nvp-preroll-thumb span {
  font-size: 12px;
  color: rgba(255,255,255,.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nvp-preroll-bar button {
  padding: 10px 24px; border: none; border-radius: 6px;
  font-weight: 600; font-size: 14px; cursor: not-allowed;
  background: #333; color: #888; flex-shrink: 0;
  transition: background .15s, color .15s;
}
.nvp-preroll-bar button.is-ready {
  cursor: pointer;
  background: var(--accent, #7c3aed);
  color: #fff;
}
.nvp-artplayer {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
}
