/* Тема default — тёмная. Цвета и отступы вынесены в переменные: достаточно поменять их, чтобы получить свой вид. */
:root {
  --bg: #08080a; --surface: #111116; --surface-2: #181820; --line: #25252e;
  --text: #ececf1; --muted: #9a9aa8; --accent: #00f076; --accent-ink: #04170d;
  --radius: 12px; --gap: 18px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 8px; }
h2 { font-size: 19px; margin: 0; }
h3 { margin: 0; }
button, input { font: inherit; color: inherit; }
.muted { color: var(--muted); font-size: 14px; }

/* шапка */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 16px; padding: 10px 24px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; white-space: nowrap; }
.logo-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: 14px; }
.search { position: relative; flex: 1; max-width: 640px; margin: 0 auto; }
.search input { width: 100%; height: 42px; padding: 0 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); outline: none; }
.search input:focus { border-color: var(--accent); }
.suggest { position: absolute; left: 0; right: 0; top: 48px; margin: 0; padding: 4px; list-style: none; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 40px rgba(0,0,0,.5); }
.suggest li a { display: flex; gap: 10px; padding: 8px 12px; border-radius: 8px; }
.suggest li a:hover, .suggest li.sel a { background: var(--surface); color: var(--text); }
.suggest em { margin-left: auto; font-style: normal; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.top-actions { display: flex; gap: 8px; }
.pill { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; white-space: nowrap; }
.pill:hover { border-color: var(--accent); }
.nav { display: flex; gap: 4px; padding: 4px 24px 8px; overflow-x: auto; scrollbar-width: none; }
.nav a { padding: 6px 14px; border-radius: 999px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--accent); color: var(--accent-ink); font-weight: 700; }

.wrap { flex: 1; width: 100%; max-width: 1760px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 36px; }

/* кнопки, плашки, чипы */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; padding: 0 20px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; font-weight: 600; }
.btn:hover { border-color: var(--accent); color: var(--text); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { color: var(--accent-ink); filter: brightness(1.1); }
.tag { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; background: var(--accent); color: var(--accent-ink); }
.tag-short { left: auto; right: 8px; background: rgba(0,0,0,.75); color: var(--accent); }
.chips, .cloud, .pager-links { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.chip small { color: var(--muted); }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.chip-on:hover { color: var(--accent-ink); }
.chip-cat { border-color: rgba(0,240,118,.4); color: var(--accent); background: rgba(0,240,118,.08); }

/* заголовки секций */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.sec-head a { color: var(--muted); font-size: 14px; }
.page-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.empty { text-align: center; color: var(--muted); padding: 48px 0; }

/* сетка видео */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--card-min, 260px), 1fr)); gap: var(--gap) 16px; }
.vcard { min-width: 0; }
.thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.thumb-short { aspect-ratio: 9 / 16; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.thumb:hover img { transform: scale(1.03); }
.thumb-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 28px; }
.dur { position: absolute; right: 8px; bottom: 8px; padding: 1px 6px; border-radius: 5px; background: rgba(0,0,0,.8); font-size: 12px; font-weight: 600; }
.scrub { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.18); }
.scrub i { display: block; height: 100%; width: 0; background: var(--accent); }
.vtitle { margin-top: 8px; font-size: 15px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vmodels { margin: 2px 0 0; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vmeta { margin: 2px 0 0; display: flex; gap: 10px; color: #77778a; font-size: 12.5px; }

/* герой главной */
.hero { position: relative; overflow: hidden; border-radius: 16px; border: 1px solid var(--line); background: #000; }
.hero > a { display: block; position: relative; aspect-ratio: 21 / 9; min-height: 240px; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(to top, #000 0%, rgba(0,0,0,.45) 45%, transparent 100%); }
.hero-body { position: absolute; left: 0; bottom: 0; padding: 28px; max-width: 760px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.hero-body .tag { position: static; }
.hero-body h1 { font-size: 34px; margin: 0; }
.hero-body p { margin: 0; color: var(--muted); }

/* категории, модели */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.cat-tile { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--surface-2); }
.cat-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.cat-tile:hover img { transform: scale(1.04); }
.cat-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.85), transparent 65%); }
.cat-name { position: absolute; left: 14px; bottom: 12px; font-weight: 700; font-size: 17px; }
.cat-name small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.avatars { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 14px; }
.avatar-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.avatar { width: 112px; height: 112px; border-radius: 50%; overflow: hidden; background: var(--surface-2); border: 2px solid var(--line); display: grid; place-items: center; font-size: 32px; color: var(--muted); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-tile:hover .avatar { border-color: var(--accent); }
.avatar-name { font-weight: 600; }
.avatar-count { color: var(--muted); font-size: 12.5px; }
.taxhead { display: flex; gap: 20px; align-items: center; }
.taxhead-img { width: 120px; height: 120px; border-radius: 50%; overflow: hidden; flex: none; border: 2px solid var(--line); }
.taxhead-img img { width: 100%; height: 100%; object-fit: cover; }
.inline-search { display: flex; gap: 8px; max-width: 420px; }
.inline-search input { flex: 1; height: 42px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); outline: none; }

/* страница видео */
.crumbs { color: var(--muted); font-size: 13px; margin-bottom: -20px; }
.crumbs span { color: var(--text); }
.player { background: #000; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.player video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.player-short { max-width: 420px; margin: 0 auto; }
.player-short video { aspect-ratio: 9 / 16; }
.player-error { margin: 0; padding: 12px 16px; color: #ff6b6b; }
.vlayout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; }
.vmain { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.vstats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; color: var(--muted); font-size: 14px; }
.vactions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mchips { display: flex; flex-wrap: wrap; gap: 10px; }
.mchip { display: inline-flex; align-items: center; gap: 8px; padding-right: 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; }
.mchip:hover { border-color: var(--accent); }
.mchip-img { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.mchip-img img { width: 100%; height: 100%; object-fit: cover; }
.desc { white-space: pre-line; color: var(--muted); }
.vside h2 { margin-bottom: 12px; }
.side-grid { display: grid; gap: 16px; }

/* пагинация */
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.pager-info { margin: 0; color: var(--muted); font-size: 14px; }
.gap { align-self: center; color: var(--muted); }

/* формы */
.authbox { max-width: 400px; margin: 40px auto; display: flex; flex-direction: column; gap: 14px; }
.authbox form { display: flex; flex-direction: column; gap: 10px; }
.authbox input { height: 44px; padding: 0 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); outline: none; }
.authbox input:focus { border-color: var(--accent); }
.form-error { margin: 0; color: #ff6b6b; font-size: 14px; }
.notfound { text-align: center; padding: 64px 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* подвал и реклама */
.foot { border-top: 1px solid var(--line); padding: 28px 24px; display: flex; flex-direction: column; gap: 18px; align-items: center; }
.ads { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; width: 100%; max-width: 1100px; }
.ad { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 90px; padding: 14px; text-align: center; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.ad span { color: var(--muted); font-size: 13px; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; color: var(--muted); font-size: 14px; }
.foot-note { margin: 0; color: #6c6c7c; font-size: 13px; text-align: center; }

/* возрастной фильтр */
.agegate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(16px); }
.agegate[hidden] { display: none; }
.agegate-box { width: 100%; max-width: 440px; padding: 30px; text-align: center; background: var(--bg); border: 1px solid rgba(0,240,118,.3); border-radius: 16px; display: flex; flex-direction: column; gap: 12px; }
.agegate-badge { width: 64px; height: 64px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(0,240,118,.5); background: rgba(0,240,118,.1); color: var(--accent); font-weight: 800; font-size: 22px; }
.agegate-box p { margin: 0; color: var(--muted); }

@media (max-width: 1100px) { .vlayout { grid-template-columns: 1fr; } .side-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); } }
@media (max-width: 720px) {
  .top-row { flex-wrap: wrap; padding: 10px 14px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .nav, .wrap, .foot { padding-left: 14px; padding-right: 14px; }
  h1 { font-size: 22px; } .hero-body h1 { font-size: 22px; } .hero-body { padding: 16px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px 10px; }
  .taxhead { flex-direction: column; text-align: center; }
}

/* форма логотипа, платные ролики и замок (общее для всех тем) */
.logo-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; background: var(--accent); color: var(--accent-ink); font-size: 14px; font-style: normal; }
.logo-mark b { font-weight: 800; line-height: 1; }
.logo-circle { border-radius: 50%; } .logo-rounded { border-radius: 8px; } .logo-square { border-radius: 2px; }
.tag-premium { top: auto; bottom: 8px; left: 8px; background: rgba(0,0,0,.78); color: var(--accent); }
.player.locked { position: relative; display: grid; place-items: center; min-height: 320px; aspect-ratio: 16 / 9; }
.player.locked img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(18px) brightness(.55); transform: scale(1.1); }
.lock-body { position: relative; z-index: 1; max-width: 420px; padding: 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; color: #fff; }
.lock-body p { margin: 0; color: #ddd; }
.lock-ico { font-size: 36px; }

/* текст поверх картинки героя всегда светлый — на любом оформлении (светлом и тёмном) */
.hero-body, .hero-body h1, .hero-body h2 { color: #fff; }
.hero-body p { color: #ddd; }

.lock-msg { margin: 4px 0 0; color: #ffd479; font-size: 14px; }

/* comments, playlists, Google sign-in */
.comments[hidden], .cform[hidden], .playlists[hidden], .pl-new[hidden] { display: none; }
.comments { margin-top: 28px; }
.comments h2 { font-size: 20px; margin: 0 0 12px; }
.cform { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.cform textarea { width: 100%; min-height: 76px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: inherit; font: inherit; resize: vertical; }
.cform textarea:focus { outline: none; border-color: var(--accent); }
.cform-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.clist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.citem { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.citem:last-child { border-bottom: 0; }
.cpending { opacity: .75; }
.chead { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; }
.cbadge { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.cdel { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13px; padding: 4px; }
.cdel:hover { color: var(--text); text-decoration: underline; }
.ctext { margin: 6px 0 0; line-height: 1.5; overflow-wrap: anywhere; }
.savewrap { position: relative; display: inline-flex; }
.savemenu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; min-width: 220px; padding: 6px; display: flex; flex-direction: column; gap: 2px;
  background: var(--surface-2, var(--surface)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,.35); }
.savemenu[hidden] { display: none; }
.saveitem { text-align: left; background: none; border: 0; color: inherit; padding: 9px 10px; border-radius: 8px; cursor: pointer; font: inherit; }
.saveitem:hover { background: var(--surface); }
.saveitem.on { color: var(--accent); }
.savenew { display: flex; gap: 6px; padding: 6px 4px 2px; border-top: 1px solid var(--line); margin-top: 4px; }
.savenew input { flex: 1; min-width: 0; height: 34px; padding: 0 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); color: inherit; }
.savenew .btn { height: 34px; padding: 0 12px; }
.playlists { max-width: 900px; margin: 0 auto 40px; }
.pl-new { display: flex; gap: 8px; margin: 10px 0 16px; }
.pl-new input { flex: 1; height: 42px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: inherit; }
.pl { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 10px; background: var(--surface); }
.pl summary { cursor: pointer; font-weight: 600; }
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 12px; }
.pl-item { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.pl-item img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; background: var(--line); }
.pl-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 4px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.or[hidden], .btn-google[hidden] { display: none; }
.btn-google { width: 100%; background: #fff; color: #1f1f1f; border-color: #dadce0; }
.btn-google:hover { background: #f2f2f2; }

/* legal pages */
.legal { max-width: 780px; margin: 24px auto 48px; line-height: 1.6; }
.legal h1 { margin-bottom: 18px; }
.legal h2 { font-size: 18px; margin: 22px 0 6px; }
.legal p { margin: 0 0 10px; }
.legal-links { margin-top: 28px; font-size: 14px; color: var(--muted); }

/* аккаунт зрителя: история, пароль, удаление; «Забыли пароль?» */
.acc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.acc-settings h2 { font-size: 18px; margin: 10px 0 0; }
.acc-settings[hidden], #history[hidden] { display: none; }
.pl-progress { height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.pl-progress i { display: block; height: 100%; background: var(--accent); }
.form-note { margin: 0; font-size: 14px; color: var(--accent); }
.form-note.err { color: #ff6b6b; }
.btn-danger { border-color: #ff6b6b; color: #ff6b6b; }
.btn-danger:hover { background: #ff6b6b; border-color: #ff6b6b; color: #fff; }
.forgot summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.forgot p { margin: 8px 0 0; }
.small { font-size: 13px; }
/* рекламные места: код рекламной сети как есть; пустые не рисуются */
.adslot { display: flex; justify-content: center; align-items: center; max-width: 100%; overflow: hidden; }
.adslot-top { margin: 12px auto 0; padding: 0 16px; }
.adslot-bottom { margin: 24px auto 0; padding: 0 16px; }
.adslot-grid { min-height: 120px; border-radius: var(--radius); }
.adslot-below { margin: 14px 0; }
.adslot-side { margin-bottom: 14px; }
.adslot iframe, .adslot img { max-width: 100%; }
