/* Тёмная тема с красным акцентом */
:root {
  --bg: #000;
  --bg-2: #1a1a1a;
  --bg-3: #262626;
  --line: #333;
  --text: #ddd;
  --text-dim: #8c8c8c;
  --title: #f0f0f0;
  --accent: #de2600;
  --accent-2: #ff3b1a;
  --link: #e8e8e8;
  --radius: 3px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.4 Arial, Helvetica, sans-serif;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--link); text-decoration: none; }
a:hover { color: #fff; }
img { max-width: 100%; display: block; }

/* Header */
.site-header { background: var(--bg-2); border-bottom: 3px solid var(--accent); position: sticky; top: 0; z-index: 20; }
.head-inner { max-width: 1600px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 10px 16px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 24px; letter-spacing: -.5px; color: #fff; white-space: nowrap; }
.logo-mark { background: var(--accent); color: #fff; width: 32px; height: 32px; border-radius: var(--radius); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 900; }
.logo-text { text-transform: uppercase; }
.search { flex: 1; display: flex; max-width: 640px; margin-inline-start: auto; }
.search input { flex: 1; min-width: 0; background: #fff; color: #000; border: 0; border-radius: var(--radius) 0 0 var(--radius); padding: 9px 12px; font-size: 14px; outline: none; }
.search button { background: var(--accent); color: #fff; border: 0; border-radius: 0 var(--radius) var(--radius) 0; padding: 0 16px; cursor: pointer; }
.search button:hover { background: var(--accent-2); }
.burger { display: none; background: none; border: 0; color: #fff; font-size: 22px; cursor: pointer; padding: 0 4px; }
.main-nav { max-width: 1600px; margin: 0 auto; display: flex; gap: 2px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.main-nav a { padding: 9px 14px; font-weight: 700; text-transform: uppercase; font-size: 13px; color: #ccc; border-radius: var(--radius) var(--radius) 0 0; white-space: nowrap; }
.main-nav a:hover { background: var(--bg-3); color: #fff; }
.main-nav a.on { background: var(--accent); color: #fff; }

/* Layout */
.page { max-width: 1600px; margin: 0 auto; padding: 12px 16px 30px; }
.page-title { font-size: 20px; color: var(--title); margin: 10px 0 12px; font-weight: 700; }
.page-title small { color: var(--text-dim); font-size: 13px; font-weight: 400; margin-inline-start: 6px; }
.section-title { font-size: 18px; color: var(--title); margin: 24px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.empty { color: var(--text-dim); padding: 30px 0; text-align: center; }
.empty a { color: var(--accent-2); }

.tag-strip { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.tag-strip a { background: var(--bg-3); color: #ccc; padding: 4px 10px; border-radius: 2px; font-size: 12px; }
.tag-strip a:hover, .tag-strip a.on { background: var(--accent); color: #fff; }

/* Grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px 10px; }
.thumb-block { min-width: 0; }
.thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: #111; overflow: hidden; border-radius: var(--radius); }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb video { position: absolute; inset: 0; }
.thumb:hover { outline: 2px solid var(--accent); }
.dur { position: absolute; right: 4px; bottom: 4px; background: rgba(0,0,0,.8); color: #fff; font-size: 12px; font-weight: 700; padding: 1px 5px; border-radius: 2px; }
.q-mark { position: absolute; right: 4px; top: 4px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 4px; border-radius: 2px; }
.q-mark.inline { position: static; font-size: 12px; vertical-align: middle; margin-left: 6px; }
.thumb-block .title { margin: 6px 0 2px; font-size: 14px; line-height: 1.3; height: 2.6em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.thumb-block .title a { color: var(--title); }
.thumb-block .title a:hover { color: var(--accent-2); }
.thumb-block .meta { margin: 0; font-size: 12px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb-block .meta .up { color: #bbb; font-weight: 700; }

/* Pagination */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 26px 0 10px; }
.pagination a, .pagination span { min-width: 38px; text-align: center; padding: 8px 10px; background: var(--bg-3); color: #ddd; font-weight: 700; border-radius: var(--radius); }
.pagination a:hover { background: #3a3a3a; }
.pagination .cur { background: var(--accent); color: #fff; }
.pagination .next { padding: 8px 16px; }

/* Video page */
.video-title { font-size: 20px; color: var(--title); margin: 8px 0 10px; line-height: 1.3; }
.video-title .duration { color: var(--text-dim); font-weight: 400; font-size: 15px; margin-left: 6px; }
.player { position: relative; width: 100%; max-width: 1200px; aspect-ratio: 16 / 9; background: #000; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-bar { max-width: 1200px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; background: var(--bg-2); padding: 10px 12px; margin-top: 0; }
.vb-left { display: flex; gap: 14px; align-items: center; color: var(--text-dim); }
.uploader { color: #fff; font-weight: 700; background: var(--bg-3); padding: 4px 10px; border-radius: var(--radius); }
.vb-right { display: flex; gap: 8px; align-items: center; }
.vote, .share { background: var(--bg-3); color: #ddd; border: 0; padding: 6px 12px; border-radius: var(--radius); cursor: pointer; font-size: 14px; }
.vote:hover, .share:hover { background: #3a3a3a; }
.vote.voted { background: var(--accent); color: #fff; }
.rating { display: flex; align-items: center; gap: 6px; color: var(--text-dim); font-weight: 700; }
.rating-bar { width: 60px; height: 4px; background: #555; display: inline-block; }
.rating-bar i { display: block; height: 100%; background: var(--accent); }
.video-tags { max-width: 1200px; margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.video-tags strong { color: var(--text-dim); margin-right: 4px; }
.video-tags a { background: var(--bg-3); padding: 4px 10px; border-radius: 2px; font-size: 13px; }
.video-tags a:hover { background: var(--accent); color: #fff; }

/* Tags page */
.tags-list { columns: 5 200px; column-gap: 20px; }
.tags-list section { break-inside: avoid; margin-bottom: 14px; }
.tags-list h3 { color: var(--accent); margin: 0 0 4px; font-size: 18px; border-bottom: 1px solid var(--line); }
.tags-list ul { list-style: none; margin: 0; padding: 0; }
.tags-list li { padding: 2px 0; }
.tags-list li span { color: var(--text-dim); font-size: 12px; }

.static-page { max-width: 900px; line-height: 1.6; }

/* Footer */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--line); text-align: center; color: var(--text-dim); font-size: 12px; padding: 20px 16px; }
.foot-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; margin-bottom: 10px; }
.foot-links a { color: #bbb; }

/* Age gate */
.age-gate { position: fixed; inset: 0; background: rgba(0,0,0,.94); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.age-gate[hidden] { display: none; }
.age-box { background: var(--bg-2); border-top: 4px solid var(--accent); max-width: 520px; width: 100%; padding: 26px; text-align: center; border-radius: var(--radius); }
.age-logo { font-size: 22px; font-weight: 900; color: #fff; text-transform: uppercase; display: flex; justify-content: center; align-items: center; gap: 8px; }
.age-box h2 { color: #fff; margin: 18px 0 8px; }
.age-box p { color: #aaa; line-height: 1.5; }
.age-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.btn-red, .btn-grey { border: 0; padding: 11px 22px; font-weight: 700; font-size: 15px; border-radius: var(--radius); cursor: pointer; }
.btn-red { background: var(--accent); color: #fff; }
.btn-red:hover { background: var(--accent-2); }
.btn-grey { background: var(--bg-3); color: #ddd; }

/* Mobile */
@media (max-width: 760px) {
  .head-inner { flex-wrap: wrap; gap: 10px; }
  .burger { display: block; }
  .logo { font-size: 20px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .main-nav { display: none; flex-direction: column; padding: 0; }
  .main-nav.open { display: flex; }
  .main-nav a { border-radius: 0; border-top: 1px solid var(--line); }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px 8px; }
  .page-title, .video-title { font-size: 17px; }
  .page { padding: 10px 10px 24px; }
}
@media (max-width: 420px) {
  .grid { grid-template-columns: 1fr; }
}

/* SEO / перелинковка */
.crumbs { font-size: 12px; color: var(--text-dim); margin: 4px 0 0; }
.crumbs a { color: #aaa; }
.crumbs a:hover { color: var(--accent-2); }
.video-descr { max-width: 1200px; margin-top: 10px; background: var(--bg-2); padding: 12px; line-height: 1.55; color: #ccc; }
.seo-text { margin: 22px 0 6px; padding: 14px 16px; background: var(--bg-2); line-height: 1.6; color: #bbb; border-left: 3px solid var(--accent); }
.seo-text h2, .seo-text h3 { color: var(--title); margin: 0 0 8px; }
.seo-text p { margin: 0 0 8px; }
a.ilink { color: var(--accent-2); border-bottom: 1px dotted var(--accent); }
a.ilink:hover { color: #fff; }
.tag-strip.big a { font-size: 13px; padding: 6px 12px; }
.more-cats { max-width: 1200px; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.more-cats a { color: var(--accent-2); font-weight: 700; font-size: 13px; }
.neighbors { max-width: 1200px; display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 13px; }
.neighbors a { background: var(--bg-3); padding: 8px 12px; border-radius: var(--radius); max-width: 48%; }
.neighbors a:hover { background: var(--accent); color: #fff; }
.foot-tags { max-width: 1200px; margin: 0 auto 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; }
.foot-tags .foot-h { width: 100%; color: #ddd; font-weight: 700; text-transform: uppercase; margin-bottom: 4px; }
.foot-tags a { color: #999; }
.foot-tags a:hover { color: var(--accent-2); }
.age-title { color: #fff; font-size: 22px; font-weight: 700; margin: 18px 0 8px; }

/* RTL (арабский) */
html[dir="rtl"] body { font-family: 'Cairo', Tahoma, Arial, sans-serif; font-size: 15px; }
html[dir="rtl"] .logo-text { text-transform: none; letter-spacing: 0; }
html[dir="rtl"] .main-nav a { text-transform: none; font-size: 14px; }
html[dir="rtl"] .search input { border-radius: 0 var(--radius) var(--radius) 0; }
html[dir="rtl"] .search button { border-radius: var(--radius) 0 0 var(--radius); }
html[dir="rtl"] .dur { right: auto; left: 4px; direction: ltr; }
html[dir="rtl"] .q-mark { right: auto; left: 4px; }
html[dir="rtl"] .q-mark.inline { margin-left: 0; margin-right: 6px; }
html[dir="rtl"] .video-title .duration { margin-left: 0; margin-right: 6px; direction: ltr; display: inline-block; }
html[dir="rtl"] .video-tags strong { margin-right: 0; margin-left: 4px; }
html[dir="rtl"] .seo-text { border-left: 0; border-right: 3px solid var(--accent); }
html[dir="rtl"] .thumb-block .title { line-height: 1.45; height: 2.9em; }
html[dir="rtl"] .rating, html[dir="rtl"] .views { direction: rtl; }
