/* =========================================================================
   VideoHati — 2014 YouTube-era interface.
   Flat surfaces, a persistent left guide, card grids, Roboto with an Arial
   fallback (which is exactly what YouTube itself shipped in 2014 — no webfont
   download, so the site stays fast and has no third-party requests).
   ========================================================================= */

:root {
  /* Accent: 2014-style red (#cc181e), 5.9:1 on white. */
  --accent: #cc181e;
  --accent-dark: #a31217;
  --accent-ink: #7f0e12;
  /* Kept as aliases so no rule had to be rewritten during the rebrand. */
  --red: var(--accent);
  --red-dark: var(--accent-dark);
  --ink: #030303;
  --ink-2: #555;
  --ink-3: #767676;
  --line: #e2e2e2;
  --line-2: #ccc;
  --bg: #f9f9f9;
  --surface: #fff;
  --blue: #167ac6;
  --topbar-h: 50px;
  --guide-w: 200px;
  --radius: 2px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 13px/1.4 Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: anywhere;
}

img, video, iframe { max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: none; }
h1, h2, h3, h4 { font-weight: 400; margin: 0; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--topbar-h);
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 6px; flex: none; }
.brand-mark { width: 28px; height: 20px; display: block; }
.brand-name {
  color: var(--ink);
  font-size: 21px;
  letter-spacing: -.6px;
  font-weight: 300;
}
.brand-name b { font-weight: 700; color: var(--accent); }

/* The guide is permanent on a desktop, so the menu button only exists on narrow
   screens — see the 860px breakpoint, which switches this to grid. */
.guide-toggle {
  display: none;
  flex: none;
  width: 36px; height: 36px;
  align-content: center; justify-items: center; gap: 4px;
  background: none; border: 0; cursor: pointer; padding: 0;
  border-radius: 50%;
}
.guide-toggle:hover { background: #f0f0f0; }
.guide-toggle span { display: block; width: 17px; height: 2px; background: #606060; }

.search {
  flex: 1 1 auto;
  display: flex;
  /* Without this a flex item refuses to shrink below its content width, and the
     top bar pushes the sign-in button off the side of a phone screen. */
  min-width: 0;
  max-width: 600px;
  margin: 0 auto;
}
.search input[type=text] {
  flex: 1 1 auto;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #ccc;
  border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
  font: inherit;
  background: #fff;
}
.search input[type=text]:focus { outline: none; border-color: #1c62b9; }
.search select {
  height: 30px;
  border: 1px solid #ccc;
  border-right: 0;
  background: #fafafa;
  font: inherit;
  color: var(--ink-2);
}
.search button {
  flex: none;
  width: 65px; height: 30px;
  border: 1px solid #d3d3d3;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: #f8f8f8;
  cursor: pointer;
  display: grid; place-items: center;
}
.search button:hover { background: #f0f0f0; }
.search button svg { width: 20px; height: 20px; fill: #606060; }

.topbar-right { flex: none; display: flex; align-items: center; gap: 12px; font-size: 12px; }
.topbar-right a { color: var(--ink-2); }
.topbar-right a:hover { color: var(--ink); }
.topbar-right .who { color: var(--ink); font-weight: 500; }
.btn-upload {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid #d3d3d3;
  border-radius: var(--radius);
  background: #f8f8f8;
  color: var(--ink-2) !important;
  font-weight: 500;
}
.btn-upload:hover { background: #f0f0f0; }
.btn-signin {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--blue);
  border-radius: var(--radius);
  color: var(--blue) !important;
  font-weight: 500;
}
.btn-signin:hover { background: var(--blue); color: #fff !important; }

/* ---------- layout ---------- */
.shell { display: flex; align-items: flex-start; }
.guide {
  position: sticky;
  top: var(--topbar-h);
  flex: none;
  width: var(--guide-w);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 12px 0;
}
.stage { flex: 1 1 auto; min-width: 0; padding: 24px; max-width: 1280px; }

.guide-section { padding: 8px 0; border-bottom: 1px solid var(--line); }
.guide-section:last-child { border-bottom: 0; }
.guide-title {
  padding: 6px 24px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--ink-3);
}
.guide a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 24px;
  color: var(--ink);
  font-size: 13px;
}
.guide a:hover { background: #f0f0f0; }
.guide a.on { background: #e8e8e8; font-weight: 500; border-left: 3px solid var(--red); padding-left: 21px; }
.guide a .gi { width: 18px; height: 18px; fill: #666; flex: none; }
.guide a.on .gi { fill: var(--red); }
.guide .count { margin-left: auto; color: var(--ink-3); font-size: 11px; }
.guide .avatar-sm {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: #ccc; display: grid; place-items: center;
  font-size: 11px; color: #fff; text-transform: uppercase; overflow: hidden;
}
.guide .avatar-sm img { width: 100%; height: 100%; object-fit: cover; }
.guide-note { padding: 8px 24px; color: var(--ink-3); font-size: 12px; line-height: 1.5; }

.guide-scrim { display: none; }

/* ---------- page furniture ---------- */
h1 { font-size: 20px; font-weight: 400; margin: 0 0 16px; }
h2 { font-size: 16px; font-weight: 500; margin: 0 0 12px; }
.section-head {
  display: flex; align-items: baseline; gap: 10px;
  margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.section-head h2 { margin: 0; }
.section-head .more { margin-left: auto; font-size: 12px; }
.meta { color: var(--ink-3); font-size: 12px; }
.loading { color: var(--ink-3); padding: 24px 0; }

.card-surface, .panel, .statusbox, .box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* ---------- video cards ---------- */
.vgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px 16px;
  margin: 0 0 24px;
}
.vcell { min-width: 0; }
.vthumb {
  display: block;
  position: relative;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  font-size: 0;
}
.vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vthumb .nothumb {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background: #e5e5e5; color: #aaa; font-size: 26px;
}
/* The duration chip sits on the thumbnail, 2014-style. */
.vthumb > :last-child:not(img):not(.nothumb),
.vthumb .dur {
  position: absolute;
  right: 4px; bottom: 4px;
  background: rgba(0,0,0,.8);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  padding: 3px 4px;
  border-radius: 2px;
}
.vcell .vtitle {
  display: block;
  margin: 8px 0 2px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  max-height: 2.5em;
  overflow: hidden;
}
.vcell .vtitle:hover { color: var(--blue); }
.vcell .meta a { color: var(--ink-3); }
.vcell .meta a:hover { color: var(--ink); }

/* ---------- list rows (search results, trending, channel pages) ---------- */
.vlist { list-style: none; margin: 0 0 20px; padding: 0; }
.vrow {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.vrow > .vthumb { width: 246px; flex: none; }
.vinfo { min-width: 0; flex: 1; }
.vrow .vtitle { display: block; font-size: 18px; font-weight: 400; color: var(--ink); line-height: 1.3; }
.vrow .vtitle:hover { color: var(--blue); }
.vdesc { color: var(--ink-2); font-size: 12px; margin: 6px 0; max-height: 3em; overflow: hidden; }

.trendrow .rank { flex: none; width: 28px; font-size: 18px; color: var(--ink-3); text-align: right; padding-top: 12px; }
.trendrow:nth-child(1) .rank, .trendrow:nth-child(2) .rank, .trendrow:nth-child(3) .rank { color: var(--red); }

/* ---------- watch page ---------- */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.watch-top { grid-column: 1; min-width: 0; }
.watch-side { grid-column: 2; grid-row: 1 / span 2; min-width: 0; }
.watch-comments { grid-column: 1; min-width: 0; }

.player { background: #000; border-radius: var(--radius); overflow: hidden; }
.player video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.player:fullscreen { border-radius: 0; display: flex; flex-direction: column; }
.player:fullscreen video { flex: 1; aspect-ratio: auto; min-height: 0; }

.watch-title { font-size: 20px; font-weight: 400; margin: 16px 0 6px; line-height: 1.3; }
.watch-stats {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
  color: var(--ink-3); font-size: 12px;
}
.watch-views { font-size: 18px; color: var(--ink-2); font-weight: 300; }
.watch-actions { margin-left: auto; display: flex; gap: 14px; align-items: center; }
.watch-actions a { color: var(--ink-3); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .3px; }
.watch-actions a:hover { color: var(--ink); }

.uploader-row { display: flex; gap: 12px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.uploader-row .pic { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; flex: none; background: #ccc; display: grid; place-items: center; color: #fff; font-size: 20px; text-transform: uppercase; }
.uploader-row .pic img { width: 100%; height: 100%; object-fit: cover; }
.uploader-name { font-size: 14px; font-weight: 500; color: var(--ink); }
.uploader-name:hover { color: var(--blue); }
.btn-subscribe {
  margin-left: auto;
  background: var(--red-dark);
  color: #fff !important;
  border: 0;
  border-radius: var(--radius);
  padding: 9px 14px;
  font: 500 12px/1 Roboto, Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: .3px;
  cursor: pointer;
}
.btn-subscribe:hover { background: var(--accent-ink); }
.btn-subscribe.on { background: #f1f1f1; color: var(--ink-2) !important; border: 1px solid var(--line-2); }
.video-desc { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 13px; white-space: pre-wrap; }
.video-tags a { display: inline-block; margin-right: 8px; color: var(--blue); font-size: 12px; }

/* related rail */
.sidelist { list-style: none; margin: 0; padding: 0; }
.sidelist li { display: flex; gap: 8px; padding: 0 0 10px; }
.sidelist .vthumb { width: 120px; flex: none; }
.sidelist .vtitle { font-size: 13px; font-weight: 500; color: var(--ink); line-height: 1.25; display: block; max-height: 2.6em; overflow: hidden; }
.sidelist .vtitle:hover { color: var(--blue); }
.sidelist .meta { font-size: 11px; }

/* ---------- forms and buttons ---------- */
button, .btn, input[type=submit] {
  font: 500 13px/1 Roboto, Arial, sans-serif;
  padding: 9px 14px;
  border: 1px solid #d3d3d3;
  border-radius: var(--radius);
  background: #f8f8f8;
  color: var(--ink-2);
  cursor: pointer;
}
button:hover, .btn:hover { background: #f0f0f0; text-decoration: none; }
.btn-yellow, .btn-primary {
  background: var(--red-dark);
  border-color: var(--red-dark);
  color: #fff;
}
.btn-yellow:hover, .btn-primary:hover { background: var(--accent-ink); }
.btn-big { padding: 11px 18px; font-size: 14px; }

.formtable { border-collapse: collapse; width: 100%; max-width: 640px; }
.formtable th {
  text-align: left; vertical-align: top;
  width: 150px; padding: 10px 12px 10px 0;
  font-weight: 400; color: var(--ink-2); font-size: 13px;
}
.formtable td { padding: 8px 0; }
.formtable input[type=text], .formtable input[type=password], .formtable input[type=email], .formtable textarea, .formtable select {
  width: 100%; max-width: 420px;
  padding: 8px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  font: inherit;
  background: #fff;
}
.formtable input:focus, .formtable textarea:focus { outline: none; border-color: #1c62b9; }
.formtable .hint { color: var(--ink-3); font-size: 11px; margin: 4px 0 0; }

/* ---------- misc components ---------- */
.banner { background: #fff9e6; border: 1px solid #f0d78c; padding: 10px 12px; margin-bottom: 16px; font-size: 12px; border-radius: var(--radius); }
.banner button { margin-left: 8px; padding: 5px 10px; }
.panel { padding: 12px 14px; margin: 0 0 16px; font-size: 12px; }
.panel h4 { margin: 0 0 8px; font-size: 13px; font-weight: 500; }
.panel .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.notice { background: #eef6fd; border: 1px solid #c6ddf2; padding: 10px 12px; margin-bottom: 16px; border-radius: var(--radius); font-size: 12px; }
.statusbox { padding: 48px 24px; text-align: center; color: var(--ink-2); font-size: 13px; }
.statusbox b { display: block; font-size: 16px; margin-bottom: 8px; color: var(--ink); font-weight: 500; }
.errbox { background: #fdecea; border: 1px solid #f5c2bd; color: #b3261e; padding: 10px 12px; border-radius: var(--radius); margin: 10px 0; font-size: 12px; }
.pill { display: inline-block; padding: 2px 6px; border-radius: 2px; font-size: 10px; background: #eee; color: var(--ink-2); text-transform: uppercase; letter-spacing: .3px; }
.pill.warn { background: #fdecea; color: #b3261e; }
.pill.ok { background: #e8f5e9; color: #1b7e2b; }

.sorttabs { list-style: none; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; margin: 0 0 16px; padding: 0 0 8px; border-bottom: 1px solid var(--line); font-size: 12px; }
.sorttabs li { color: var(--ink-3); }
.sorttabs b { color: var(--ink); border-bottom: 2px solid var(--red); padding-bottom: 8px; }
.sorttabs .cat { margin-left: auto; }
.sorttabs select { padding: 5px; border: 1px solid var(--line-2); border-radius: var(--radius); font: inherit; }

.tabsline { list-style: none; display: flex; gap: 24px; margin: 0 0 16px; padding: 0 0 8px; border-bottom: 1px solid var(--line); font-size: 13px; }
.tabsline li.on { font-weight: 500; border-bottom: 2px solid var(--red); padding-bottom: 8px; }

.pager { margin: 20px 0; display: flex; gap: 6px; flex-wrap: wrap; }
.pager a, .pager b { padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font-size: 12px; }
.pager b { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }

/* channel header, 2014 had a banner strip */
.profile-head {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px;
}
.profile-head .pic { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; flex: none; background: #ccc; display: grid; place-items: center; color: #fff; font-size: 32px; text-transform: uppercase; }
.profile-head .pic img { width: 100%; height: 100%; object-fit: cover; }
.profile-head h1 { font-size: 22px; margin: 0 0 6px; }
.profile-head .meta span { margin-right: 16px; white-space: nowrap; }
.profile-head .about { font-size: 13px; margin: 10px 0 0; white-space: pre-wrap; max-width: 70ch; color: var(--ink-2); }
.profile-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.admintable { border-collapse: collapse; width: 100%; font-size: 12px; background: #fff; }
.admintable th { text-align: left; background: #f5f5f5; border-bottom: 1px solid var(--line); padding: 8px; font-weight: 500; }
.admintable td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admintable img { width: 100px; height: 56px; object-fit: cover; border-radius: var(--radius); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.stats-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.stats-row > div { flex: 1 1 140px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }

.comment { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.comment .pic { width: 40px; height: 40px; border-radius: 50%; flex: none; background: #ccc; display: grid; place-items: center; color: #fff; text-transform: uppercase; overflow: hidden; }
.comment .pic img { width: 100%; height: 100%; object-fit: cover; }

.footer { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 12px; }
.footer a { color: var(--ink-3); margin-right: 12px; }
.footer a:hover { color: var(--ink); }
.footer p { margin: 4px 0; }

/* progress bars */
.progress { display: block; width: 100%; max-width: 460px; height: 4px; background: #e5e5e5; border-radius: 2px; overflow: hidden; margin: 10px 0 4px; }
.progress div { height: 100%; width: 0; background: var(--red); transition: width .3s linear; }
.transcode-progress { display: block; max-width: 460px; margin: 12px auto 6px; height: 4px; background: #e5e5e5; border-radius: 2px; overflow: hidden; }
.transcode-progress span { display: block; height: 100%; width: 0; background: var(--red); transition: width .4s linear; }
.transcode-label { font-size: 12px; color: var(--ink-3); }

.quality { font-size: 12px; color: var(--ink-3); margin: 8px 0 0; }
.code { width: 100%; padding: 6px; border: 1px solid var(--line-2); border-radius: var(--radius); font: 12px monospace; background: #fafafa; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .watch { grid-template-columns: minmax(0, 1fr); }
  .watch-side { grid-column: 1; grid-row: auto; }
  .watch-comments { grid-column: 1; }
  .sidelist li { max-width: 640px; }
}

@media (max-width: 860px) {
  .guide-toggle { display: grid; }
  .guide {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform .15s ease-out;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
  }
  body.guide-open .guide { transform: none; }
  body.guide-open .guide-scrim {
    display: block; position: fixed; inset: var(--topbar-h) 0 0 0;
    background: rgba(0,0,0,.35); z-index: 39;
  }
  .stage { padding: 16px; }
  .vrow > .vthumb { width: 160px; }
  .vrow .vtitle { font-size: 15px; }
}

@media (max-width: 640px) {
  .topbar { padding: 0 8px; gap: 4px; }
  .brand-name { display: none; }
  .search { margin: 0; }
  .search select { display: none; }
  /* 16px stops iOS zooming the page when the field takes focus. */
  .search input[type=text] { font-size: 16px; }
  .search button { width: 46px; }
  .topbar-right .hide-sm { display: none; }
  .stage { padding: 12px; }
  .vgrid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px 12px; }
  .vrow { gap: 10px; }
  .vrow > .vthumb { width: 130px; }
  .vrow .vtitle { font-size: 14px; font-weight: 500; }
  .vdesc { display: none; }
  .formtable th { display: block; width: auto; padding: 10px 0 2px; }
  .formtable td { display: block; }
  .formtable input, .formtable textarea, .formtable select { max-width: none; }
  /* Any field under 16px makes iOS zoom the page on focus. The base rules use
     `.formtable input[type=text]`, which outranks a bare `input[type=text]` no
     matter where it sits in the file — so the scoped selectors are repeated here
     rather than relying on source order. */
  input[type=text], input[type=password], input[type=email], input[type=search],
  input[type=url], input[type=number], input[type=tel], textarea, select,
  .formtable input[type=text], .formtable input[type=password],
  .formtable input[type=email], .formtable textarea, .formtable select,
  .search input[type=text] {
    font-size: 16px;
  }
  .watch-title { font-size: 17px; }
  .sorttabs { gap: 14px; }
  .profile-head { padding: 14px; flex-wrap: wrap; }
  .profile-head .pic { width: 56px; height: 56px; font-size: 22px; }
  .profile-head .actions { margin-left: 0; width: 100%; }
  /* Finger-sized targets: the guide is the main navigation on a phone. */
  .guide a { padding-left: 16px; padding-right: 16px; min-height: 44px; }
  .guide-title { padding-left: 16px; padding-right: 16px; }
  button, .btn, input[type=submit], .btn-upload, .btn-signin, .btn-subscribe { min-height: 44px; }
  .guide-toggle { min-height: 40px; }
}

/* ---- watch page details ---- */
.video-desc .desc-text { white-space: pre-wrap; }
.video-desc { white-space: normal; }
.video-tags { margin-top: 12px; }
.comment-body { min-width: 0; flex: 1; }
.comment-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.comment-head .who { font-weight: 500; color: var(--ink); font-size: 13px; }
.comment-head .who:hover { color: var(--blue); }
.comment-head .when { color: var(--ink-3); font-size: 12px; }
.comment-head .remove { margin-left: auto; color: var(--ink-3); font-size: 12px; }
.comment-head .remove:hover { color: #b3261e; }
.comment p { margin: 0; font-size: 13px; white-space: pre-wrap; }

/* Privacy: the pill on a title, and the radio list on the upload and edit forms. */
.pill.vis { background: #eef2f7; color: #4a5568; }
.watch-title .pill { vertical-align: middle; font-size: 11px; }
label.radio { display: block; margin: 0 0 6px; font-size: 13px; }
label.radio input { margin-right: 6px; }
label.radio .hint { display: inline; color: var(--ink-3); font-size: 12px; }


/* Replies: one level in, with a rule down the left so a thread reads as a thread. */
.comment-head .when { margin-right: auto; }   /* the links sit at the far right */
.comment-head .remove { margin-left: 10px; }
.comment-head .reply-link { color: var(--ink-3); font-size: 12px; }
.comment-head .reply-link:hover { color: var(--blue); }
.replies { margin-top: 10px; }
.replies:empty { margin-top: 0; }
.comment.reply { padding: 10px 0 0; border-bottom: 0; border-left: 2px solid var(--line); padding-left: 12px; }
.comment.reply .pic { width: 28px; height: 28px; font-size: 12px; }
.reply-box:empty { display: none; }
.replyform { margin: 8px 0 2px; }
.replyform textarea { display: block; width: 100%; max-width: 560px; font: inherit; font-size: 16px; padding: 6px; border: 1px solid var(--line); margin-bottom: 6px; }
.replyform .cancel-reply { font-size: 12px; color: var(--ink-3); margin-left: 8px; }


/* ---- like / dislike (2014) ---- */
.votes { display: flex; align-items: center; gap: 14px; }
.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--ink-3);
  font: 500 12px/1 Roboto, Arial, sans-serif;
  cursor: pointer;
  min-height: 0;
}
.vote-btn:hover { background: none; color: var(--ink); }
.vote-btn svg { width: 17px; height: 17px; fill: currentColor; }
.vote-btn.on { color: var(--accent); }
.vote-btn.disabled { cursor: default; opacity: .75; }
.vote-btn.disabled:hover { color: var(--ink-3); }
/* The split bar: how much of the vote is positive. Hidden until someone votes. */
.vote-bar {
  display: inline-block;
  width: 88px;
  height: 2px;
  background: #c8c8c8;
  border-radius: 1px;
  overflow: hidden;
}
.vote-bar i { display: block; height: 100%; background: var(--accent); }
@media (max-width: 640px) {
  .vote-bar { width: 58px; }
  .watch-actions { gap: 10px; }
}

/* ---- library ---- */
.resume-note {
  background: #eef6fd;
  border: 1px solid #c6ddf2;
  border-radius: var(--radius);
  padding: 7px 10px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-2);
}
.history-row { position: relative; }
.history-row .remove-item {
  position: absolute; top: 12px; right: 0;
  color: var(--ink-3); font-size: 18px; line-height: 1;
  padding: 2px 6px; border-radius: 2px;
}
.history-row .remove-item:hover { color: #b3261e; background: #f3f3f3; }
/* How far through the video this person got, drawn on the thumbnail. */
.progress-strip {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 3px; background: rgba(0,0,0,.4);
}
.progress-strip i { display: block; height: 100%; background: var(--accent); }
.library-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.library-head .grow { flex: 1; }
.library-head button { padding: 6px 10px; font-size: 12px; }

/* ---- notifications ---- */
.bell {
  position: relative;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 0; background: none; padding: 0; cursor: pointer;
  border-radius: 50%;
  min-height: 0;
}
.bell:hover { background: #f0f0f0; }
.bell svg { width: 20px; height: 20px; fill: #606060; }
.bell-count {
  position: absolute; top: 0; right: 0;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #cc0000;
  color: #fff;
  font: 700 10px/16px Roboto, Arial, sans-serif;
  text-align: center;
}
.notif-panel {
  position: fixed;
  z-index: 60;
  width: 360px;
  max-width: calc(100vw - 16px);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.notif-head {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px; font-weight: 500;
}
.notif-body { overflow-y: auto; }
.notif-foot { border-top: 1px solid var(--line); padding: 8px 14px; font-size: 12px; }
.notif {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 14px;
  border-bottom: 1px solid #f1f1f1;
  color: var(--ink);
}
.notif:last-of-type { border-bottom: 0; }
.notif:hover { background: #f8f8f8; }
.notif.unread { background: #f1f8f7; }
.notif.unread:hover { background: #e8f3f1; }
.notif-thumb { width: 64px; height: 36px; object-fit: cover; border-radius: 2px; flex: none; background: #e5e5e5; }
.notif-thumb.empty { display: block; }
.notif-text { min-width: 0; display: block; font-size: 12px; line-height: 1.35; }
.notif-text b { font-weight: 500; display: block; }
.notif-detail { display: block; color: var(--ink-2); margin-top: 1px; overflow: hidden; max-height: 2.7em; }
.notif-when { display: block; color: var(--ink-3); margin-top: 2px; font-size: 11px; }
@media (max-width: 640px) {
  .notif-panel { width: auto; left: 8px; right: 8px !important; }
}

/* ---- Creator dashboard ---------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 12px 0 20px; }
.stat { border: 1px solid var(--line); background: #fff; padding: 10px 12px; }
.stat-n { font-size: 20px; font-weight: 500; color: var(--ink); }
.stat-l { font-size: 12px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .3px; }
.stat-h { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.chart { border: 1px solid var(--line); background: #fff; padding: 6px; }
.chart rect { fill: var(--accent); }
.chart rect:hover { fill: var(--ink-2); }
.chart-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); margin: 4px 2px 18px; }
.studio-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.studio-table th { text-align: left; font-weight: 500; color: var(--ink-2); font-size: 12px; border-bottom: 1px solid var(--line); padding: 6px 8px; }
.studio-table td { border-bottom: 1px solid var(--line); padding: 8px; vertical-align: top; }
.studio-table td.n, .studio-table th.n { text-align: right; white-space: nowrap; }
.studio-table .sv-thumb img { width: 96px; height: 54px; object-fit: cover; display: block; }
.studio-table .sv-title a { font-weight: 500; }
.studio-table .sv-links { margin-top: 3px; }
.studio-table td.pick { width: 24px; }
.bulkbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px; background: #fff; border: 1px solid var(--line); border-bottom: 0; font-size: 13px; }
.bulkbar .bulk-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bulkbar button.bulk { font: inherit; font-size: 12px; padding: 3px 8px; }
.bulkbar button.danger:not(:disabled) { color: #b3261e; }
@media (max-width: 700px) {
  .studio-table .sv-thumb { display: none; }
  .studio-table th.n:nth-child(6), .studio-table td.n:nth-child(6),
  .studio-table th.n:nth-child(7), .studio-table td.n:nth-child(7) { display: none; }
  .bulkbar .bulk-actions { margin-left: 0; }
}
.editform { margin: 4px 0 2px; }
.editform textarea { display: block; width: 100%; max-width: 560px; font: inherit; font-size: 16px; padding: 6px; border: 1px solid var(--line); margin-bottom: 6px; }
.editform .cancel-edit { font-size: 12px; color: var(--ink-3); margin-left: 8px; }
.comment-head .edit-link { color: var(--ink-3); font-size: 12px; margin-left: 10px; }
.comment-head .edit-link:hover { color: var(--blue); }
.comment-head .when i { font-style: normal; }

/* ---- Player: speed, autoplay ---------------------------------------------- */
.controls select#speed { font: inherit; font-size: 12px; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 2px; padding: 1px 2px; }
.controls select#speed option { color: #111; }
label.autoplay { font-size: 12px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }

/* ---- Search filters -------------------------------------------------------- */
.filters { border: 1px solid var(--line); background: #fff; padding: 8px 10px; margin: 0 0 12px; font-size: 12px; }
.filter-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; padding: 3px 0; }
.filter-row + .filter-row { border-top: 1px solid var(--line); }
.filter-label { color: var(--ink-3); text-transform: uppercase; letter-spacing: .3px; min-width: 72px; }
.filter-row a { color: var(--ink-2); }
.filter-row a.on { color: var(--ink); font-weight: 500; text-decoration: underline; }
.channel-hits { margin-bottom: 16px; }

/* ---- Channel: banner, featured, about -------------------------------------- */
.channel-banner { margin: 0 0 -1px; border: 1px solid var(--line); background: #fff; overflow: hidden; }
.channel-banner img { display: block; width: 100%; max-height: 220px; object-fit: cover; }
.channel-banner.small img { max-height: 110px; }
.profile-head.under-banner { border-top: 0; }
.featured-row { display: flex; gap: 12px; margin-bottom: 16px; }
.featured-row .vthumb { flex: none; width: 240px; }
.featured-row .vtitle { font-size: 15px; font-weight: 500; }
.about-table th { white-space: nowrap; text-align: left; color: var(--ink-2); font-weight: 400; padding-right: 12px; }
@media (max-width: 700px) {
  .featured-row { display: block; }
  .featured-row .vthumb { width: 100%; margin-bottom: 8px; }
  .channel-banner img { max-height: 110px; }
}

/* ---- Subtitles ------------------------------------------------------------- */
.cc-list { list-style: none; margin: 0 0 8px; padding: 0; font-size: 13px; }
.cc-list li { display: flex; align-items: baseline; gap: 10px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.cc-list li b { min-width: 160px; }
.cc-list .cc-remove { margin-left: auto; color: var(--ink-3); font-size: 12px; }
.cc-list .cc-remove:hover { color: #b3261e; }
.cc-add select, .cc-add input[type=file] { font: inherit; font-size: 13px; }
.cc-add { display: grid; gap: 6px; max-width: 420px; }
video::cue { font-size: 90%; background: rgba(0,0,0,.75); }

/* ---- Moderation queue ------------------------------------------------------ */
.reportlist { margin: 6px 0 0; padding-left: 16px; font-size: 12px; }
.admintable td.rtype { white-space: nowrap; vertical-align: top; }
.reported-text { display: block; margin: 4px 0; padding: 6px 8px; background: #fafafa; border-left: 2px solid var(--line); font-size: 13px; white-space: pre-wrap; }
.banner.warn { background: #fdecea; border-color: #f3b9b3; }
.comment-head .flag-comment { color: var(--ink-3); font-size: 12px; margin-left: 10px; }
.comment-head .flag-comment:hover { color: #b3261e; }

/* ---- Notification settings -------------------------------------------------- */
table.prefs { border-collapse: collapse; font-size: 13px; margin: 6px 0; }
table.prefs th { text-align: left; font-weight: 500; color: var(--ink-2); font-size: 12px; padding: 4px 12px 4px 0; border-bottom: 1px solid var(--line); }
table.prefs td { padding: 4px 12px 4px 0; border-bottom: 1px solid var(--line); }
table.prefs th:not(:first-child), table.prefs td:not(:first-child) { text-align: center; padding-right: 0; width: 90px; }

/* Channel page: featured channels form */
.fch-form { margin: 12px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fch-form input[type="text"] { min-width: 0; flex: 1 1 160px; max-width: 280px; }
