/* ============================================================
   VideoScript - Main Stylesheet
   Dark adult-site theme with responsive grid
   ============================================================ */

:root {
  --bg:        #0d0d0d;
  --bg2:       #181818;
  --bg3:       #222;
  --border:    #2e2e2e;
  --accent:    #ff6b35;
  --accent2:   #e55a25;
  --text:      #e8e8e8;
  --muted:     #888;
  --card-h:    200px;
  --radius:    8px;
  --font:      'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent2); }
img { max-width: 100%; display: block; }

/* ── Layout ── */
.container { max-width: 1400px; margin: 0 auto; padding: 0 16px; }

/* ── Header ── */
#header {
  background: var(--bg2);
  border-bottom: 2px solid var(--accent);
  position: sticky; top: 0; z-index: 100;
  padding: 10px 0;
}
.header-inner {
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap;
}
.logo { font-size: 1.6rem; font-weight: 800; color: var(--accent); white-space: nowrap; }
.logo span { color: var(--text); }

/* Search bar */
.search-form { display: flex; flex: 1; min-width: 200px; max-width: 500px; }
.search-form input {
  flex: 1; padding: 8px 14px;
  background: var(--bg3); border: 1px solid var(--border);
  border-right: none; border-radius: var(--radius) 0 0 var(--radius);
  color: var(--text); font-size: .95rem;
}
.search-form input:focus { outline: none; border-color: var(--accent); }
.search-form button {
  padding: 8px 16px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer; font-size: .95rem; font-weight: 600;
  transition: background .2s;
}
.search-form button:hover { background: var(--accent2); }

/* Nav */
.main-nav { background: var(--bg3); border-bottom: 1px solid var(--border); }
.main-nav ul { display: flex; list-style: none; gap: 0; }
.main-nav a {
  display: block; padding: 10px 18px;
  color: var(--text); font-size: .9rem; font-weight: 500;
  transition: background .2s, color .2s;
}
.main-nav a:hover, .main-nav a.active { background: var(--accent); color: #fff; }

/* ── Video Grid ── */
.section-title {
  font-size: 1.3rem; font-weight: 700;
  margin: 24px 0 14px;
  display: flex; align-items: center; gap: 10px;
}
.section-title::after {
  content: ''; flex: 1; height: 2px;
  background: linear-gradient(to right, var(--accent), transparent);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

/* Video card */
.video-card {
  background: var(--bg2);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform .2s, border-color .2s;
  position: relative;
}
.video-card:hover { transform: translateY(-3px); border-color: var(--accent); }

.thumb-wrap {
  position: relative; overflow: hidden;
  height: var(--card-h); background: #111;
}
.thumb-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s;
}
.video-card:hover .thumb-wrap img { transform: scale(1.06); }

.thumb-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.3);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s;
}
.video-card:hover .thumb-overlay { opacity: 1; }
.play-icon {
  width: 54px; height: 54px;
  background: rgba(255,107,53,.9);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #fff; padding-left: 4px;
}

.thumb-duration {
  position: absolute; bottom: 6px; right: 6px;
  background: rgba(0,0,0,.8);
  color: #fff; font-size: .75rem; padding: 2px 6px;
  border-radius: 4px;
}
.thumb-hd {
  position: absolute; top: 6px; left: 6px;
  background: var(--accent);
  color: #fff; font-size: .65rem; font-weight: 700;
  padding: 2px 5px; border-radius: 3px; letter-spacing: .05em;
}

.card-body { padding: 10px 12px 12px; }
.card-title {
  font-size: .875rem; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; color: var(--text); margin-bottom: 6px;
}
.card-title:hover { color: var(--accent); }
.card-meta { font-size: .78rem; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.card-cat {
  font-size: .72rem; background: var(--bg3);
  color: var(--accent); padding: 2px 7px;
  border-radius: 3px; margin-bottom: 4px;
  display: inline-block;
}

/* ── Video Page ── */
.video-page { display: grid; grid-template-columns: 1fr 340px; gap: 24px; padding: 20px 0; }
@media (max-width: 900px) { .video-page { grid-template-columns: 1fr; } }

.player-wrap {
  background: #000; border-radius: var(--radius);
  overflow: hidden; position: relative;
  aspect-ratio: 16/9;
}
.player-wrap iframe {
  width: 100%; height: 100%; border: none; display: block;
}

.video-info { margin-top: 14px; }
.video-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.video-meta-row { display: flex; gap: 16px; color: var(--muted); font-size: .85rem; flex-wrap: wrap; margin-bottom: 14px; }
.video-meta-row strong { color: var(--text); }

.video-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.tag-pill {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--muted); font-size: .78rem;
  padding: 3px 10px; border-radius: 20px;
  transition: border-color .2s, color .2s;
}
.tag-pill:hover { border-color: var(--accent); color: var(--accent); }

/* Sidebar */
.sidebar-title { font-size: 1rem; font-weight: 700; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }

.sidebar-card { display: flex; gap: 10px; margin-bottom: 10px; }
.sidebar-card .thumb { width: 120px; height: 70px; object-fit: cover; border-radius: 4px; flex-shrink: 0; background: #111; }
.sidebar-card-title { font-size: .78rem; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sidebar-card-meta { font-size: .72rem; color: var(--muted); margin-top: 3px; }

/* ── Category / Tag page ── */
.page-hero {
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
  border-bottom: 2px solid var(--accent);
  padding: 28px 0; margin-bottom: 20px;
}
.page-hero h1 { font-size: 2rem; font-weight: 800; }
.page-hero p  { color: var(--muted); margin-top: 4px; }

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px; margin-bottom: 30px;
}
.cat-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  text-align: center; transition: border-color .2s, transform .2s;
}
.cat-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.cat-card-name { font-weight: 700; color: var(--text); }
.cat-card-count { font-size: .8rem; color: var(--muted); margin-top: 3px; }

.tags-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.tag-cloud-item {
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text); font-size: .85rem;
  padding: 5px 14px; border-radius: 20px;
  transition: background .2s, color .2s;
}
.tag-cloud-item:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Pagination ── */
.pagination { display: flex; justify-content: center; margin: 30px 0; }
.pagination ul { display: flex; list-style: none; gap: 4px; flex-wrap: wrap; justify-content: center; }
.pagination a, .pagination span {
  display: block; padding: 7px 12px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 4px; color: var(--text); font-size: .9rem;
  transition: background .2s;
}
.pagination a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination li.active a { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.pagination .dots { padding: 7px 6px; color: var(--muted); }

/* ── Breadcrumb ── */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); padding: 12px 0; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--border); }

/* ── Footer ── */
#footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 30px 0; margin-top: 40px; }
.footer-inner { display: flex; gap: 30px; flex-wrap: wrap; }
.footer-col { flex: 1; min-width: 150px; }
.footer-col h4 { font-size: .9rem; font-weight: 700; margin-bottom: 10px; color: var(--accent); }
.footer-col a { display: block; color: var(--muted); font-size: .82rem; margin-bottom: 5px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { text-align: center; color: var(--muted); font-size: .78rem; margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--border); }

/* ── Lang switcher ── */
.lang-switcher { display: flex; flex-wrap: wrap; gap: 4px; }
.lang-btn {
  padding: 3px 8px; border-radius: 4px;
  font-size: .75rem; color: var(--muted);
  background: var(--bg3); border: 1px solid var(--border);
  transition: background .2s;
}
.lang-btn.active, .lang-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Age gate ── */
.age-gate {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.97);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
}
.age-gate-box {
  background: var(--bg2); border: 2px solid var(--accent);
  border-radius: 12px; padding: 40px;
  text-align: center; max-width: 420px; width: 90%;
}
.age-gate-box h2 { font-size: 1.6rem; margin-bottom: 10px; }
.age-gate-box p  { color: var(--muted); margin-bottom: 24px; font-size: .9rem; }
.age-gate-btns { display: flex; gap: 12px; justify-content: center; }
.btn-enter {
  padding: 12px 28px; background: var(--accent);
  color: #fff; font-weight: 700; border-radius: var(--radius); font-size: 1rem;
}
.btn-leave { padding: 12px 28px; background: var(--bg3); color: var(--muted); border-radius: var(--radius); font-size: 1rem; }

/* ── Utilities ── */
.btn { display: inline-block; padding: 8px 20px; border-radius: var(--radius); font-weight: 600; cursor: pointer; transition: background .2s; border: none; font-size: .9rem; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent2); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.badge { font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: 3px; text-transform: uppercase; }
.badge-accent { background: var(--accent); color: #fff; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); --card-h: 120px; }
  .header-inner { flex-direction: column; align-items: flex-start; }
  .search-form { width: 100%; max-width: 100%; }
  .main-nav ul { flex-wrap: wrap; }
  .footer-inner { flex-direction: column; }
  .age-gate-box { padding: 24px 16px; }
}
@media (max-width: 480px) {
  .video-grid { grid-template-columns: 1fr 1fr; --card-h: 100px; }
  .video-title { font-size: 1rem; }
}

/* ── Legal Pages ── */
.legal-page { max-width: 900px; margin: 0 auto; padding: 20px 0 40px; }
.legal-page h1 { font-size: 2rem; font-weight: 800; margin-bottom: 20px; color: var(--accent); }
.legal-content { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.legal-content section { margin-bottom: 30px; }
.legal-content h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 12px; color: var(--text); border-bottom: 2px solid var(--border); padding-bottom: 6px; }
.legal-content h3 { font-size: 1.1rem; font-weight: 600; margin: 16px 0 8px; color: var(--text); }
.legal-content p { margin-bottom: 12px; line-height: 1.7; color: var(--muted); }
.legal-content ul, .legal-content ol { margin: 12px 0 12px 24px; color: var(--muted); line-height: 1.8; }
.legal-content li { margin-bottom: 6px; }
.legal-content strong { color: var(--text); font-weight: 600; }
.legal-content a { color: var(--accent); text-decoration: underline; }
.legal-content a:hover { color: var(--accent2); }

/* DMCA Form */
.contact-box { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-top: 20px; }
.contact-box h3 { font-size: 1.2rem; margin-bottom: 16px; color: var(--accent); }
.dmca-form .form-group { margin-bottom: 16px; }
.dmca-form label { display: block; margin-bottom: 6px; font-size: .9rem; color: var(--text); font-weight: 500; }
.dmca-form input[type="text"],
.dmca-form input[type="email"],
.dmca-form input[type="url"],
.dmca-form textarea {
  width: 100%; padding: 10px 12px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 4px; color: var(--text); font-size: .9rem;
  font-family: inherit; transition: border-color .2s;
}
.dmca-form input:focus, .dmca-form textarea:focus { outline: none; border-color: var(--accent); }
.dmca-form textarea { resize: vertical; min-height: 100px; }
.dmca-form input[type="checkbox"] { margin-right: 8px; }
.dmca-form label:has(input[type="checkbox"]) { display: flex; align-items: flex-start; cursor: pointer; font-weight: 400; }
.dmca-form button[type="submit"] { margin-top: 8px; }

.alert { padding: 12px 16px; border-radius: 4px; margin-top: 12px; }
.alert-success { background: rgba(34, 197, 94, 0.15); border: 1px solid rgba(34, 197, 94, 0.3); color: #4ade80; }
.alert-error { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3); color: #f87171; }

@media (max-width: 768px) {
  .legal-content { padding: 20px 16px; }
  .legal-page h1 { font-size: 1.5rem; }
  .legal-content h2 { font-size: 1.2rem; }
}
