/* ============================================================
   lilithporn.com  –  Frontend CSS
   Dark adult theme – can be fully reskinned later
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0a0a0a;
  --bg2:       #141414;
  --bg3:       #1e1e1e;
  --border:    #2a2a2a;
  --accent:    #c0392b;
  --accent2:   #e74c3c;
  --text:      #e0e0e0;
  --muted:     #777;
  --radius:    8px;
  --header-h:  56px;
  --max-w:     1300px;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── Header ──────────────────────────────────────────── */
.site-header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}
.site-logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent2);
  white-space: nowrap;
}
.site-logo span { color: var(--text); font-weight: 400; }

.header-search {
  flex: 1;
  max-width: 460px;
  display: flex;
  gap: 0;
}
.header-search input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  color: var(--text);
  padding: 8px 12px;
  font-size: 14px;
  outline: none;
}
.header-search input:focus { border-color: var(--accent); }
.header-search button {
  background: var(--accent);
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: #fff;
  padding: 0 16px;
  cursor: pointer;
  font-size: 16px;
  transition: background .15s;
}
.header-search button:hover { background: var(--accent2); }

.header-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.header-nav a {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--muted);
  transition: color .15s, background .15s;
}
.header-nav a:hover, .header-nav a.active { color: var(--text); background: var(--bg3); }

/* ── Layout ──────────────────────────────────────────── */
.page-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px 16px 40px;
}
.page-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.page-title small { font-size: 13px; font-weight: 400; color: var(--muted); }

/* ── Video grid ──────────────────────────────────────── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.video-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.video-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.thumb-wrap {
  position: relative;
  padding-top: 56.25%; /* 16:9 */
  background: var(--bg3);
  overflow: hidden;
}
.thumb-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.video-card:hover .thumb-wrap img { transform: scale(1.05); }

.thumb-duration {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0,0,0,.75);
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s;
}
.thumb-play::after {
  content: '▶';
  font-size: 32px;
  color: #fff;
  text-shadow: 0 0 12px rgba(0,0,0,.8);
}
.video-card:hover .thumb-play { opacity: 1; }

.card-info {
  padding: 10px 10px 12px;
}
.card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
}
.card-meta {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 10px;
}

/* ── Category chips ──────────────────────────────────── */
.cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.cat-chip {
  display: inline-block;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  color: var(--muted);
  transition: all .15s;
}
.cat-chip:hover, .cat-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Section heading ─────────────────────────────────── */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 14px;
}
.section-head h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.section-head h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--accent2);
  border-radius: 2px;
  margin-right: 10px;
  vertical-align: middle;
}
.section-head a {
  font-size: 13px;
  color: var(--muted);
  transition: color .15s;
}
.section-head a:hover { color: var(--accent2); }

/* ── Video page ──────────────────────────────────────── */
.video-page {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}
.video-player-wrap {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  padding-top: 56.25%;
}
.video-player-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.video-info { margin-top: 14px; }
.video-info h1 {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
}
.video-meta-bar {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.video-meta-bar .views { color: var(--text); }
.video-description {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}
.video-tags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.video-tag {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--muted);
  transition: all .15s;
}
.video-tag:hover { border-color: var(--accent); color: var(--accent2); }

/* Sidebar related -->
.sidebar-related { display: flex; flex-direction: column; gap: 10px; }
.related-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color .15s;
}
.related-card:hover { border-color: var(--accent); }
.related-thumb {
  padding-top: 62.5%;
  position: relative;
  background: var(--bg3);
  overflow: hidden;
}
.related-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.related-info { padding: 8px 8px 8px 0; }
.related-title { font-size: 12px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.related-meta { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ── Ad slots ────────────────────────────────────────── */
.ad-slot {
  background: var(--bg3);
  border: 1px dashed var(--border);
  border-radius: 6px;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
  margin: 16px 0;
  overflow: hidden;
}

/* ── Pagination ──────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
  transition: all .15s;
}
.pagination a:hover { border-color: var(--accent); color: var(--text); }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Category page header ────────────────────────────── */
.cat-header {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.cat-header h1 { font-size: 22px; margin-bottom: 6px; }
.cat-header p  { font-size: 14px; color: var(--muted); }

/* ── Search results ──────────────────────────────────── */
.search-hero {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  gap: 12px;
}
.search-hero input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 10px 14px;
  font-size: 15px;
  outline: none;
}
.search-hero input:focus { border-color: var(--accent); }
.search-hero button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0 20px;
  font-size: 15px;
  cursor: pointer;
  transition: background .15s;
}
.search-hero button:hover { background: var(--accent2); }

/* ── Footer ──────────────────────────────────────────── */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 24px 16px;
  margin-top: 40px;
  font-size: 13px;
  color: var(--muted);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}
.footer-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.footer-links a { color: var(--muted); transition: color .15s; }
.footer-links a:hover { color: var(--text); }

/* ── 404 ─────────────────────────────────────────────── */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  gap: 16px;
}
.error-page h1 { font-size: 80px; color: var(--accent); }
.error-page h2 { font-size: 24px; }
.error-page p  { color: var(--muted); }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 900px) {
  .video-page { grid-template-columns: 1fr; }
  .sidebar-related { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
  .related-card { grid-template-columns: 90px 1fr; }
}
@media (max-width: 600px) {
  .header-inner { gap: 10px; }
  .site-logo { font-size: 18px; }
  .video-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .sidebar-related { grid-template-columns: 1fr; }
  .header-nav { display: none; }
}
