/* ============================================================
   VidTube — YouTube-style theme (dark)
   Layout constants match YouTube web: 56px header, 240px guide,
   72px mini-guide, 12px thumb radius, Roboto type system.
   ============================================================ */
:root {
  --bg: #0f0f0f;
  --raised: #212121;
  --chip: rgba(255, 255, 255, .08);
  --chip-hover: rgba(255, 255, 255, .14);
  --hover: rgba(255, 255, 255, .1);
  --active: rgba(255, 255, 255, .2);
  --border: #303030;
  --text: #f1f1f1;
  --text-2: #aaaaaa;
  --brand: #ff0033;
  --blue: #3ea6ff;
  --blue-dark: #1c62b9;
  --header-h: 56px;
  --guide-w: 240px;
  --guide-mini-w: 72px;
  --radius: 12px;
  --font: "Roboto", "Noto Sans Khmer", "Kantumruy Pro", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scrollbar-color: #454545 transparent; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font-family: inherit; }
svg { display: block; fill: currentColor; }
img { display: block; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #454545; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  transition: background .1s;
}
.icon-btn:hover { background: var(--hover); }
.icon-btn:active { background: var(--active); }

.avatar {
  border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 500; flex: none; user-select: none;
  overflow: hidden; text-transform: uppercase;
}

/* ============================== Header ============================== */
.vt-header {
  position: fixed; inset: 0 0 auto 0; height: var(--header-h); z-index: 100;
  background: var(--bg);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; gap: 8px;
}
.vt-header__start { display: flex; align-items: center; gap: 4px; min-width: 0; }
.vt-logo { display: flex; align-items: center; gap: 4px; padding: 0 14px 0 8px; height: 56px; }
.vt-logo__icon { width: 30px; height: 22px; }
.vt-logo__text { font-size: 20px; font-weight: 700; letter-spacing: -1px; font-family: Roboto, Arial, sans-serif; }
.vt-logo__text sup { font-size: 10px; font-weight: 400; color: var(--text-2); letter-spacing: 0; margin-left: 3px; vertical-align: super; }

.vt-header__center { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: 12px; min-width: 0; }
.vt-search { display: flex; flex: 0 1 636px; min-width: 0; }
.vt-search__box {
  flex: 1; display: flex; align-items: center; height: 40px; min-width: 0;
  background: #121212; border: 1px solid var(--border);
  border-radius: 40px 0 0 40px; padding: 0 4px 0 16px;
}
.vt-search__box:focus-within { border-color: var(--blue-dark); }
.vt-search__box input {
  flex: 1; min-width: 0; background: none; border: 0; outline: 0;
  color: var(--text); font-size: 16px;
}
.vt-search__box input::placeholder { color: #888; }
.vt-search__clear { display: none; }
.vt-search__box input:not(:placeholder-shown) ~ .vt-search__clear { display: grid; }
.vt-search__btn {
  width: 64px; height: 40px; flex: none;
  background: #222222; border: 1px solid var(--border); border-left: 0;
  border-radius: 0 40px 40px 0; display: grid; place-items: center;
}
.vt-search__btn:hover { background: #2b2b2b; }
.vt-mic { background: #181818; }
.vt-mic:hover { background: var(--raised); }

.vt-header__end { display: flex; align-items: center; gap: 8px; }
.vt-signin {
  display: flex; align-items: center; gap: 8px; height: 36px;
  padding: 0 12px; border: 1px solid var(--border); border-radius: 18px;
  color: var(--blue); font-size: 14px; font-weight: 500; white-space: nowrap;
}
.vt-signin:hover { background: rgba(62, 166, 255, .15); border-color: transparent; }
.vt-header__avatar-btn { padding: 0; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; }

/* Account dropdown */
.vt-menu {
  position: absolute; top: 52px; right: 16px; width: 280px; z-index: 120;
  background: #282828; border-radius: var(--radius);
  box-shadow: 0 4px 32px rgba(0, 0, 0, .5); overflow: hidden;
  display: none;
}
.vt-menu.open { display: block; }
.vt-menu__id { display: flex; gap: 16px; padding: 16px; border-bottom: 1px solid var(--border); }
.vt-menu__id b { font-size: 16px; font-weight: 400; display: block; }
.vt-menu__id span { color: var(--text-2); font-size: 14px; word-break: break-all; }
.vt-menu__item {
  display: flex; align-items: center; gap: 16px; width: 100%;
  padding: 10px 16px; font-size: 14px; text-align: left;
}
.vt-menu__item:hover { background: var(--hover); }
.vt-menu__sep { height: 1px; background: var(--border); margin: 8px 0; }

/* Mobile search mode */
.vt-header.search-mode .vt-header__start,
.vt-header.search-mode .vt-header__end { display: none; }
.vt-header.search-mode .vt-search { display: flex !important; flex: 1; }
.vt-header .vt-search-back { display: none; }
.vt-header.search-mode .vt-search-back { display: grid; }
.vt-search-open { display: none; }

/* ============================== Guide (sidebar) ============================== */
.vt-guide {
  position: fixed; top: var(--header-h); bottom: 0; left: 0; width: var(--guide-w);
  overflow-y: auto; padding: 12px; z-index: 90; background: var(--bg);
}
.vt-guide::-webkit-scrollbar-thumb { background: transparent; }
.vt-guide:hover::-webkit-scrollbar-thumb { background: #454545; }
.vt-guide__section { padding: 0 0 12px; margin-bottom: 12px; border-bottom: 1px solid var(--border); }
.vt-guide__section:last-child { border-bottom: 0; }
.vt-guide__title { padding: 6px 12px; font-size: 16px; font-weight: 500; }
.vt-guide__item {
  display: flex; align-items: center; gap: 24px; width: 100%;
  height: 40px; padding: 0 12px; border-radius: 10px; font-size: 14px;
  white-space: nowrap; overflow: hidden;
}
.vt-guide__item:hover { background: var(--hover); }
.vt-guide__item.active { background: var(--hover); font-weight: 500; }
.vt-guide__item .avatar { width: 24px; height: 24px; font-size: 12px; }
.vt-guide__foot { padding: 16px 12px; color: var(--text-2); font-size: 12px; line-height: 1.8; }

/* Mini guide */
.vt-guide--mini {
  width: var(--guide-mini-w); padding: 0 4px; display: none;
}
.vt-guide--mini .vt-mini__item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 64px; padding: 16px 0 14px; border-radius: 10px; font-size: 10px;
}
.vt-mini__item:hover { background: var(--hover); }
.vt-mini__item.active { font-weight: 500; }

/* Drawer (mobile) */
.vt-scrim {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 110;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.vt-drawer {
  position: fixed; top: 0; bottom: 0; left: 0; width: var(--guide-w); z-index: 111;
  background: #212121; transform: translateX(-100%); transition: transform .2s;
  overflow-y: auto; padding: 0 12px 12px;
}
.vt-drawer__head { display: flex; align-items: center; height: var(--header-h); position: sticky; top: 0; background: #212121; }
body.drawer-open .vt-scrim { opacity: 1; pointer-events: auto; }
body.drawer-open .vt-drawer { transform: none; }

/* ============================== Page shells ============================== */
.vt-page { padding-top: var(--header-h); }
.vt-page--browse { padding-left: var(--guide-w); }

/* ============================== Chips ============================== */
.vt-chips-wrap {
  position: sticky; top: var(--header-h); z-index: 80; background: var(--bg);
  padding: 12px 24px 12px; overflow: hidden;
}
.vt-chips { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; }
.vt-chips::-webkit-scrollbar { display: none; }
.vt-chip {
  height: 32px; padding: 0 12px; border-radius: 8px; flex: none;
  background: var(--chip); font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background .1s;
}
.vt-chip:hover { background: var(--chip-hover); }
.vt-chip.active { background: var(--text); color: var(--bg); }

/* ============================== Video grid ============================== */
.vt-grid {
  display: grid; gap: 40px 16px; padding: 4px 24px 40px;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
}
@media (min-width: 1800px) { .vt-grid { grid-template-columns: repeat(5, 1fr); } }

.v-card { display: flex; flex-direction: column; gap: 12px; }
.v-card__thumb {
  position: relative; aspect-ratio: 16/9; border-radius: var(--radius);
  overflow: hidden; background: var(--raised);
  transition: border-radius .25s;
}
.v-card:hover .v-card__thumb { border-radius: 0; }
.v-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.v-card__dur {
  position: absolute; right: 6px; bottom: 6px;
  background: rgba(0, 0, 0, .8); color: #fff;
  font-size: 12px; font-weight: 500; padding: 1px 4px; border-radius: 4px;
}
.v-card__body { display: flex; gap: 12px; }
.v-card__body .avatar { width: 36px; height: 36px; font-size: 15px; margin-top: 2px; }
.v-card__title {
  font-size: 16px; font-weight: 500; line-height: 22px; max-height: 44px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.v-card__meta { color: var(--text-2); font-size: 14px; line-height: 20px; margin-top: 4px; }
.v-card__meta a:hover { color: var(--text); }

/* Search results — row layout */
.vt-list { display: flex; flex-direction: column; gap: 16px; padding: 8px 24px 40px; max-width: 1096px; }
.vt-list__count { color: var(--text-2); padding: 12px 24px 0; font-size: 14px; }
.r-card { display: flex; gap: 16px; }
.r-card__thumb {
  position: relative; flex: none; width: min(360px, 42vw); aspect-ratio: 16/9;
  border-radius: var(--radius); overflow: hidden; background: var(--raised);
}
.r-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.r-card__title { font-size: 18px; line-height: 26px; font-weight: 400;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.r-card__meta { color: var(--text-2); font-size: 12px; margin-top: 4px; }
.r-card__chan { display: flex; align-items: center; gap: 8px; margin: 12px 0; color: var(--text-2); font-size: 12px; }
.r-card__chan .avatar { width: 24px; height: 24px; font-size: 11px; }
.r-card__desc { color: var(--text-2); font-size: 12px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* Skeletons */
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.sk { background: linear-gradient(90deg, #1c1c1c 25%, #262626 50%, #1c1c1c 75%);
  background-size: 800px 100%; animation: shimmer 1.4s infinite linear; border-radius: var(--radius); }
.sk-thumb { aspect-ratio: 16/9; }
.sk-line { height: 16px; border-radius: 4px; margin-top: 10px; }
.sk-line.short { width: 60%; }

.vt-empty { grid-column: 1/-1; text-align: center; padding: 80px 24px; color: var(--text-2); }
.vt-empty h3 { color: var(--text); font-size: 20px; margin-bottom: 8px; font-weight: 500; }

/* ============================== Watch page ============================== */
.vt-watch {
  display: flex; gap: 24px; max-width: 1754px;
  padding: 24px; margin: 0 auto;
}
.vt-watch__primary { flex: 1; min-width: 0; }
.vt-watch__secondary { width: 402px; flex: none; }

.vt-player { aspect-ratio: 16/9; background: #000; border-radius: var(--radius); overflow: hidden; max-height: calc(100vh - 200px); }
.vt-player video { width: 100%; height: 100%; display: block; }

.vt-vtitle { font-size: 20px; font-weight: 700; line-height: 28px; margin: 12px 0; }

.vt-vrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.vt-owner { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vt-owner .avatar { width: 40px; height: 40px; font-size: 17px; }
.vt-owner__name { font-size: 16px; font-weight: 500; white-space: nowrap; }
.vt-owner__subs { font-size: 12px; color: var(--text-2); }

.vt-btn {
  height: 36px; padding: 0 16px; border-radius: 18px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; white-space: nowrap;
  background: var(--chip);
}
.vt-btn:hover { background: var(--chip-hover); }
.vt-btn--solid { background: var(--text); color: var(--bg); margin-left: 12px; }
.vt-btn--solid:hover { background: #d9d9d9; }
.vt-btn--solid.subscribed { background: var(--chip); color: var(--text); }
.vt-btn--blue { background: var(--blue); color: #0f0f0f; }
.vt-btn--blue:hover { background: #65b8ff; }
.vt-btn--blue:disabled { background: var(--chip); color: var(--text-2); cursor: default; }

.vt-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vt-like-group { display: flex; background: var(--chip); border-radius: 18px; overflow: hidden; }
.vt-like-group button { height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 16px; font-size: 14px; font-weight: 500; }
.vt-like-group button:hover { background: var(--chip-hover); }
.vt-like-group button:first-child { border-right: 1px solid rgba(255,255,255,.2); padding-right: 12px; }
.vt-like-group button.on svg { fill: var(--text); }
.vt-round { width: 36px; height: 36px; border-radius: 50%; background: var(--chip); display: grid; place-items: center; }
.vt-round:hover { background: var(--chip-hover); }

.vt-desc {
  background: var(--chip); border-radius: var(--radius);
  padding: 12px; margin-top: 16px; font-size: 14px; line-height: 20px; cursor: pointer;
}
.vt-desc:hover { background: var(--chip-hover); }
.vt-desc.expanded { cursor: default; background: var(--chip); }
.vt-desc__head { font-weight: 500; margin-bottom: 4px; }
.vt-desc__text { white-space: pre-wrap; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.vt-desc.expanded .vt-desc__text { display: block; }
.vt-desc__more { font-weight: 500; margin-top: 6px; }

/* Comments */
.vt-comments { margin-top: 24px; }
.vt-comments__head { display: flex; align-items: center; gap: 32px; margin-bottom: 24px; }
.vt-comments__head h2 { font-size: 20px; font-weight: 700; }
.vt-compose { display: flex; gap: 16px; margin-bottom: 32px; }
.vt-compose .avatar { width: 40px; height: 40px; font-size: 17px; }
.vt-compose__field { flex: 1; }
.vt-compose__field textarea {
  width: 100%; background: none; border: 0; border-bottom: 1px solid var(--border);
  color: var(--text); font-size: 14px; padding: 4px 0 8px; resize: none; outline: 0; min-height: 30px;
}
.vt-compose__field textarea:focus { border-bottom: 2px solid var(--text); padding-bottom: 7px; }
.vt-compose__actions { display: none; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.vt-compose.focused .vt-compose__actions { display: flex; }
.vt-signin-hint { color: var(--text-2); font-size: 14px; padding: 8px 0 24px; }
.vt-signin-hint a { color: var(--blue); cursor: pointer; }

.c-item { display: flex; gap: 16px; margin-bottom: 20px; }
.c-item .avatar { width: 40px; height: 40px; font-size: 17px; flex: none; }
.c-item__head { font-size: 13px; font-weight: 500; }
.c-item__head time { color: var(--text-2); font-weight: 400; font-size: 12px; margin-left: 6px; }
.c-item__text { font-size: 14px; line-height: 20px; margin-top: 2px; white-space: pre-wrap; word-break: break-word; }

/* Related */
.rel-card { display: flex; gap: 8px; margin-bottom: 8px; border-radius: 10px; padding: 4px; }
.rel-card:hover { background: var(--hover); }
.rel-card__thumb { position: relative; flex: none; width: 168px; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: var(--raised); }
.rel-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.rel-card__title { font-size: 14px; font-weight: 500; line-height: 20px; max-height: 40px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rel-card__meta { font-size: 12px; color: var(--text-2); margin-top: 4px; line-height: 16px; }

/* ============================== Auth modal ============================== */
.vt-modal-scrim {
  position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .6);
  display: none; place-items: center; padding: 16px;
}
.vt-modal-scrim.open { display: grid; }
.vt-auth {
  width: 100%; max-width: 400px; background: var(--raised);
  border-radius: var(--radius); padding: 32px; position: relative;
}
.vt-auth__close { position: absolute; top: 8px; right: 8px; }
.vt-auth__logo { display: flex; justify-content: center; margin-bottom: 8px; }
.vt-auth h2 { text-align: center; font-size: 22px; font-weight: 500; margin-bottom: 4px; }
.vt-auth__sub { text-align: center; color: var(--text-2); margin-bottom: 24px; font-size: 14px; }
.vt-field { margin-bottom: 14px; }
.vt-field input {
  width: 100%; height: 48px; padding: 0 14px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-size: 15px; outline: 0;
}
.vt-field input:focus { border-color: var(--blue); }
.vt-auth__err { color: #ff6b6b; font-size: 13px; min-height: 18px; margin-bottom: 8px; }
.vt-auth__submit { width: 100%; height: 44px; justify-content: center; border-radius: 22px; font-size: 15px; }
.vt-auth__switch { text-align: center; margin-top: 18px; font-size: 14px; color: var(--text-2); }
.vt-auth__switch a { color: var(--blue); cursor: pointer; font-weight: 500; }

/* Toast */
.vt-toast {
  position: fixed; left: 50%; bottom: 76px; transform: translate(-50%, 16px); z-index: 300;
  background: #e8e8e8; color: #0f0f0f; font-size: 14px;
  padding: 12px 20px; border-radius: 8px; opacity: 0; pointer-events: none;
  transition: all .25s;
}
.vt-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============================== Bottom nav (mobile) ============================== */
.vt-bottomnav {
  display: none; position: fixed; inset: auto 0 0 0; height: 52px; z-index: 100;
  background: var(--bg); border-top: 1px solid var(--border);
}
.vt-bottomnav a {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; font-size: 10px; color: var(--text);
}
.vt-bottomnav a.active svg { fill: var(--text); }
.vt-bottomnav .avatar { width: 24px; height: 24px; font-size: 11px; }

/* ============================== Responsive ============================== */
@media (max-width: 1312px) {
  .vt-page--browse { padding-left: var(--guide-mini-w); }
  .vt-guide--full { display: none; }
  .vt-guide--mini { display: block; }
}
@media (max-width: 1024px) {
  .vt-watch { flex-direction: column; }
  .vt-watch__secondary { width: 100%; }
}
@media (max-width: 792px) {
  .vt-page--browse { padding-left: 0; }
  .vt-guide--mini { display: none; }
  .vt-bottomnav { display: flex; }
  body { padding-bottom: 52px; }
  .vt-chips-wrap { padding: 12px 16px; }
  .vt-grid { padding: 0 0 24px; gap: 24px; grid-template-columns: 1fr; }
  .v-card { gap: 10px; }
  .v-card__thumb, .v-card:hover .v-card__thumb { border-radius: 0; }
  .v-card__body { padding: 0 16px; }
  .vt-list { padding: 8px 16px 24px; }
  .r-card { flex-direction: column; gap: 10px; }
  .r-card__thumb { width: 100%; }
  .vt-watch { padding: 0 0 24px; gap: 0; }
  .vt-player { border-radius: 0; position: sticky; top: var(--header-h); z-index: 60; }
  .vt-watch__info { padding: 0 16px; }
  .vt-watch__secondary { padding: 0 16px; }
  .vt-actions { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; padding-bottom: 4px; }
  .vt-actions::-webkit-scrollbar { display: none; }
}
@media (max-width: 656px) {
  .vt-header { padding: 0 8px; }
  .vt-header .vt-search { display: none; }
  .vt-mic { display: none; }
  .vt-search-open { display: grid; }
  .vt-logo { padding-left: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============================== Home shelves ============================== */
.shelves { padding: 4px 0 40px; }
.shelf { position: relative; margin: 0 24px 42px; }
.shelf__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.shelf__title { font-size: 20px; font-weight: 700; letter-spacing: -.2px; }
.shelf__title small { color: var(--text-2); font-size: 13px; font-weight: 400; margin-left: 10px; }
.shelf__all {
  flex: none; font-size: 14px; font-weight: 500; color: var(--text);
  border: 1px solid var(--border); border-radius: 18px; padding: 7px 15px;
}
.shelf__all:hover { background: var(--hover); border-color: transparent; }
.shelf__row {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100% - 3 * 16px) / 4);
  gap: 16px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 2px;
}
.shelf__row::-webkit-scrollbar { display: none; }
.shelf__row > .v-card { scroll-snap-align: start; }
.shelf__arrow {
  position: absolute; z-index: 6; top: 80px; width: 40px; height: 40px;
  border-radius: 50%; background: #212121; color: var(--text);
  box-shadow: 0 3px 14px rgba(0, 0, 0, .65);
  display: grid; place-items: center;
  opacity: 0; pointer-events: none; transition: opacity .15s, background .15s;
}
.shelf__arrow--l { left: -14px; } .shelf__arrow--r { right: -14px; }
.shelf:hover .shelf__arrow.show { opacity: 1; pointer-events: auto; }
.shelf__arrow:hover { background: #3d3d3d; }
@media (max-width: 1500px) { .shelf__row { grid-auto-columns: calc((100% - 2 * 16px) / 3); } }
@media (max-width: 1000px) { .shelf__row { grid-auto-columns: calc((100% - 16px) / 2); } }
@media (max-width: 792px) {
  .shelves { padding-top: 0; }
  .shelf { margin: 0 0 32px; }
  .shelf__head { padding: 0 16px; }
  .shelf__title { font-size: 18px; }
  .shelf__row { grid-auto-columns: min(300px, 80%); padding: 0 16px 2px; scroll-padding-left: 16px; }
  .shelf__arrow { display: none; }
  .shelf .v-card__thumb, .shelf .v-card:hover .v-card__thumb { border-radius: var(--radius); }
  .shelf .v-card__body { padding: 0; }
}

/* Hover video preview */
.v-card__thumb video.pv {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .3s; pointer-events: none; z-index: 1;
}
.v-card__thumb video.pv.on { opacity: 1; }
.v-card__dur { z-index: 2; }

/* Quality selector */
.vt-quality { position: relative; }
.vt-qmenu {
  position: absolute; bottom: 44px; right: 0; z-index: 60;
  background: #282828; border-radius: 10px; padding: 6px; min-width: 118px;
  box-shadow: 0 6px 28px rgba(0, 0, 0, .55); display: none;
}
.vt-qmenu.open { display: block; }
.vt-qmenu button { display: block; width: 100%; text-align: left; padding: 8px 14px; border-radius: 7px; font-size: 14px; }
.vt-qmenu button:hover { background: var(--hover); }
.vt-qmenu button.on { color: var(--blue); font-weight: 500; }
