/* ==========================================================================
   Theme: "Afterhours" — redesign for Sex303.Com
   Palette chosen deliberately away from the generic AI orange/clay:
     --bg      #120f17  near-black plum (not pure black — softer on the eyes for long sessions)
     --surface #1c1822  card surface
     --accent  #e63969  crimson/magenta signature color
     --accent-2#d4af6a  warm gold, used sparingly for meta/badges
     --text    #f3eef6
     --muted   #8d8496
   Type: system font stack only — no third-party font requests, so visitor
   IPs never get leaked to Google Fonts on a site where that privacy matters.
   ========================================================================== */

:root {
  --bg: #120f17;
  --surface: #1c1822;
  --surface-2: #241f2c;
  --accent: #e63969;
  --link: #ff6b8f;
  --accent-dark: #c22a56;
  --accent-2: #d4af6a;
  --text: #f3eef6;
  --muted: #a89fb0;
  --border: #2c2635;
  --radius: 6px;
  --max: 1280px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--accent-2); }

img { max-width: 100%; display: block; }

/* ---------- Top bar ---------- */
.topbar {
  background: #0b090e;
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 1rem;
  flex-wrap: wrap;
}
.brand {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand .f1 { color: var(--accent); }
.brand .f2 { color: var(--text); }
.age-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  color: #0b090e;
  background: var(--accent-2);
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.02em;
}

.search-form {
  flex: 1 1 260px;
  display: flex;
  max-width: 32rem;
  margin: 0 auto 0 0;
}
.search-form input[type="text"] {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius) 0 0 var(--radius);
  padding: 0.55rem 0.8rem;
  font-size: 0.95rem;
  min-width: 0;
}
.search-form input[type="text"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}
.search-form input[type="text"]::placeholder {
  color: var(--muted);
  opacity: 1;
}
.search-form input[type="submit"] {
  border: 1px solid var(--accent-dark);
  background: var(--accent-dark);
  color: #fff;
  font-weight: 700;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0 1.1rem;
  cursor: pointer;
}
.search-form input[type="submit"]:hover { background: var(--accent); border-color: var(--accent); }

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1rem;
}
.content { padding: 0.75rem 0 2rem; }

h1.page-title {
  position: relative;
  display: inline-block;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 1.25rem 0 1rem;
  padding-bottom: 0.5rem;
  background: linear-gradient(100deg, var(--text) 30%, var(--accent) 65%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
h1.page-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: 64px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
h2.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.75rem 0 0.75rem;
  padding-left: 0.6rem;
  border-left: 3px solid var(--accent);
}

/* ---------- Trending tag ticker (signature element) ---------- */
.ticker {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  white-space: nowrap;
  padding: 0.45rem 0;
}
.ticker-track {
  display: inline-flex;
  gap: 0.5rem;
  padding-left: 100%;
  animation: ticker-scroll 40s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker a {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
}
.ticker a:hover { color: var(--text); border-color: var(--accent); }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; padding-left: 0; }
}

/* ---------- Video grid / cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.85rem;
}
.item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.item:hover { transform: translateY(-3px); border-color: var(--accent); }
.item .thumb {
  position: relative;
  padding-bottom: 56.25%;
  background: #000;
  overflow: hidden;
}
.item .thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}
.item img.lazy { opacity: 0; }
.item img.lazy.loaded { opacity: 1; }
.item .duration {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0,0,0,0.8);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
}
.item .body { padding: 0.6rem 0.7rem 0.7rem; }
.item .title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.item .info {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.75rem;
}

.error {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

/* ---------- Tags / share pills ---------- */
.tags, .share { margin: 1rem 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tags a, .share a {
  display: inline-block;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}
.tags a:hover { border-color: var(--accent); color: var(--accent-2); }
.share-label { color: var(--muted); font-size: 0.82rem; font-weight: 700; margin-right: 2px; }
.share a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px 7px 8px;
  font-weight: 700;
  border: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.35);
}
.share a svg { width: 16px; height: 16px; flex-shrink: 0; fill: currentColor; }
.share a.whatsapp { background: #25d366; color: #06210f; }
.share a.telegram { background: #26a5e4; color: #04202e; }
.share a.twitter  { background: #ffffff; color: #14171a; }
.share a.reddit   { background: #ff4500; color: #2a0900; }
.share a.email    { background: var(--accent-2); color: #2a1e00; }
.share a.copy-link{ background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; cursor: pointer; }
.share a:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.45); }

/* ---------- Video player page ---------- */
ul.breadcrumb {
  list-style: none;
  padding: 0.6rem 0;
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}
ul.breadcrumb li { display: inline; }
ul.breadcrumb li + li::before { content: "\00a0/\00a0"; color: var(--border); }
ul.breadcrumb a { color: var(--muted); }
ul.breadcrumb a:hover { color: var(--accent); }

.video_player {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-height: 85vh;
}

.video_player video {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  margin: 0 auto;
  background: #000;
}

@media (max-width: 640px) {
  .video_player {
    max-height: 70vh;
  }

  .video_player video {
    max-height: 70vh;
  }
}
.video-meta {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}
.description { white-space: pre-line; color: var(--text); line-height: 1.5; }

/* ---------- Sidebar / categories block ---------- */
.channel-categories {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1.5rem 0;
}
.channel-categories h2 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
  text-align: left;
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 2rem 0;
  padding: 0;
}
.pagination li { display: flex; }
.pagination a, .pagination strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.pagination a:hover {
  border-color: var(--accent);
  color: var(--accent-2);
  text-decoration: none;
}
.pagination strong {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}
.pagination .ellipsis {
  color: var(--muted);
  padding: 0 0.3rem;
  min-width: auto;
  border: none;
  background: none;
}
.pagination .prev-next a {
  padding: 0 1rem;
  color: var(--muted);
  font-weight: 700;
}
.pagination .prev-next a:hover { color: var(--accent-2); border-color: var(--accent); }
.pagination .disabled {
  min-width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #0b090e;
  border-top: 1px solid var(--border);
  padding: 1.75rem 1rem 2.5rem;
  margin-top: 2rem;
  text-align: center;
}
.footer-notice {
  max-width: 42rem;
  margin: 0 auto 1rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}
.footer-notice strong { color: var(--accent-2); }
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--accent); }
.footer-copy { color: var(--muted); font-size: 0.75rem; margin-top: 0.75rem; }

/* ---------- Age verification gate ---------- */
.age-gate {
  position: fixed;
  inset: 0;
  background: rgba(6,5,8,0.96);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.age-gate-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  max-width: 26rem;
  padding: 1.75rem;
  text-align: center;
}
.age-gate-box h2 { margin-top: 0; font-size: 1.2rem; }
.age-gate-box p { color: var(--muted); font-size: 0.85rem; line-height: 1.5; }
.age-gate-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.25rem;
}
.age-gate-actions button {
  flex: 1;
  border: none;
  border-radius: var(--radius);
  padding: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
}
.age-gate-enter { background: var(--accent-dark); color: #fff; }
.age-gate-enter:hover { background: var(--accent); }
.age-gate-exit { background: var(--surface-2); color: var(--text); }
.age-gate-exit:hover { background: var(--border); }

/* ---------- Ad placements ---------- */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.25rem auto;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow: hidden;
}
.ad-slot span { letter-spacing: 0.06em; }
.ad-leaderboard { max-width: 728px; min-height: 90px; }
.ad-incontent   { max-width: 336px; min-height: 90px; }
.ad-sidebar     { min-height: 250px; }
.ad-mobile      { display: none; min-height: 100px; }
@media (max-width: 640px) {
  .ad-leaderboard { min-height: 50px; }
  .ad-mobile { display: flex; }
}

/* ---------- Static/legal pages ---------- */
.legal-page { max-width: 46rem; margin: 0 auto; padding: 1.5rem 0 3rem; line-height: 1.65; }
.legal-page h1 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.legal-page .updated { color: var(--muted); font-size: 0.8rem; margin-bottom: 1.5rem; }
.legal-page h2 { font-size: 1.05rem; margin-top: 1.75rem; color: var(--accent-2); }
.legal-page a { text-decoration: underline; }

@media (max-width: 640px) {
  .video_player video { height: 220px; }
  .topbar-inner { gap: 0.5rem; }
}

