/* 圆角卡片（浅灰蓝）。类名按「块__部件--状态」写 */
:root {
  --color-page: #eef1f5;
  --color-surface: #fff;
  --color-border: #d5dbe4;
  --color-text: #1c2430;
  --color-muted: #66717f;
  --color-brand: #2f6fed;
  --radius: 12px;
  --width: 1360px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--color-page); color: var(--color-text); font: 14px/1.45 Inter, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--color-brand); }
button, input, select { font: inherit; }
.page--locked { overflow: hidden; }
.page__content { max-width: var(--width); margin: 0 auto; padding: 0 20px 32px; min-height: 60vh; }
.page__heading, .pageTitle, .page__content > h1 { margin: 22px 0 14px; font-size: 22px; font-weight: 700; }
.page__count, .pageTitle small, .page__content > h1 small { font-size: 13px; font-weight: 400; color: var(--color-muted); }
.page__empty, .empty { padding: 64px 0; text-align: center; color: var(--color-muted); }
.page__more { margin-top: 26px; text-align: center; }

.site-header { position: sticky; top: 0; z-index: 20; background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.site-header__inner { display: flex; align-items: center; gap: 16px; max-width: var(--width); margin: 0 auto; padding: 10px 20px; }
.site-header__logo { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--color-brand); white-space: nowrap; }
.site-header__prefs { display: flex; gap: 8px; }
.search-form { display: flex; flex: 1; max-width: 560px; margin: 0 auto; }
.search-form__input { flex: 1; min-width: 0; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: var(--radius) 0 0 var(--radius); outline: 0; background: var(--color-surface); color: var(--color-text); }
.search-form__input:focus { border-color: var(--color-brand); }
.search-form__submit { padding: 0 16px; border: 0; border-radius: 0 var(--radius) var(--radius) 0; background: var(--color-brand); color: #fff; font-weight: 700; cursor: pointer; }
[dir=rtl] .search-form__input { border-radius: 0 var(--radius) var(--radius) 0; }
[dir=rtl] .search-form__submit { border-radius: var(--radius) 0 0 var(--radius); }
.pref-select, .sortBar select { max-width: 150px; padding: 6px 8px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); color: var(--color-text); font-size: 13px; }
.sortBar { margin-bottom: 14px; }

.button { display: inline-block; padding: 6px 16px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); color: var(--color-text); cursor: pointer; }
.button:hover { border-color: var(--color-brand); color: var(--color-brand); }
.button--primary { border-color: var(--color-brand); background: var(--color-brand); color: #fff; font-weight: 700; }
.button--primary:hover { color: #fff; filter: brightness(1.1); }
.button--quiet { border-color: transparent; background: none; color: var(--color-muted); }

.video-grid, .grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px 14px; }
.video-card { min-width: 0; overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); }
.video-card__thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.video-card__image, .video-card__preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-card__badge, .video-card__duration { position: absolute; z-index: 1; padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 700; color: #fff; }
.video-card__badge { top: 6px; inset-inline-start: 6px; background: var(--color-brand); }
.video-card__duration { bottom: 6px; inset-inline-end: 6px; background: rgba(0, 0, 0, .8); }
.video-card__body { padding: 8px 10px 10px; }
.video-card__title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 13px; font-weight: 600; line-height: 1.35; }
.video-card__meta { margin-top: 3px; overflow: hidden; color: var(--color-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.pagination, .pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 26px; }
.pagination__link { min-width: 36px; padding: 7px 10px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); text-align: center; }
.pagination__link--current { border-color: var(--color-brand); background: var(--color-brand); color: #fff; }
.pagination__gap { align-self: center; color: var(--color-muted); }

.tagList { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.tagList a, .tag { display: inline-block; padding: 4px 12px; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface); font-size: 13px; }
.tagList b, .tag--channel { color: var(--color-brand); font-weight: 700; }
.doc { max-width: 760px; margin: 0 auto; }
.doc a { color: var(--color-brand); }

.watch { margin-top: 18px; }
.watch__main { max-width: 1040px; margin: 0 auto; }
.watch__title { margin: 14px 0 8px; font-size: 20px; line-height: 1.3; }
.watch__stats { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 10px; padding: 0; list-style: none; color: var(--color-muted); font-size: 13px; }
.watch__stats strong { color: var(--color-text); }
.watch__actions { display: flex; gap: 8px; margin-bottom: 10px; }
.watch__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.watch__more { margin-top: 28px; }
.watch__subheading { margin: 0 0 12px; font-size: 17px; }
.share-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; padding: 10px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); }
.share-box[hidden] { display: none; }
.share-box__label { flex-basis: 100%; color: var(--color-muted); font-size: 12px; }
.share-box__url { flex: 1; min-width: 0; padding: 6px 8px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-page); }

.clip-player { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: var(--radius); background: #000; outline: 0; user-select: none; }
.clip-player__video { position: absolute; inset: 0; width: 100%; height: 100%; }
.clip-player__start { position: absolute; top: 50%; left: 50%; width: 72px; height: 72px; padding: 0; border: 0; border-radius: 50%; background: var(--color-brand); cursor: pointer; transform: translate(-50%, -50%); }
.clip-player__start svg { width: 30px; height: 30px; fill: #fff; }
.clip-player--playing .clip-player__start { display: none; }
.clip-player__controls { position: absolute; right: 0; bottom: 0; left: 0; padding: 18px 10px 4px; background: linear-gradient(transparent, rgba(0, 0, 0, .78)); color: #fff; transition: opacity .2s; }
.clip-player:not(.clip-player--started) .clip-player__controls, .clip-player--quiet.clip-player--playing .clip-player__controls { opacity: 0; pointer-events: none; }
.clip-player--quiet.clip-player--playing { cursor: none; }
.clip-player__progress { position: relative; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .3); cursor: pointer; touch-action: none; }
.clip-player__progress::before { content: ""; position: absolute; inset: -8px 0; }
.clip-player__loaded, .clip-player__played { position: absolute; top: 0; bottom: 0; left: 0; width: 0; border-radius: 3px; }
.clip-player__loaded { background: rgba(255, 255, 255, .4); }
.clip-player__played { background: var(--color-brand); }
.clip-player__peek { position: absolute; bottom: 16px; display: none; text-align: center; font-size: 12px; font-weight: 700; pointer-events: none; transform: translateX(-50%); }
.clip-player__peek-image { margin-bottom: 4px; border: 2px solid #fff; border-radius: 6px; background-color: #000; background-repeat: no-repeat; }
.clip-player__row { display: flex; align-items: center; gap: 4px; height: 40px; }
.clip-player__button { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; background: none; color: #fff; cursor: pointer; }
.clip-player__button svg { width: 20px; height: 20px; fill: currentColor; pointer-events: none; }
.clip-player__button--text { width: auto; padding: 0 8px; font-size: 13px; font-weight: 700; }
.clip-player__volume { width: 72px; accent-color: var(--color-brand); }
.clip-player__clock { padding: 0 8px; font-size: 12px; white-space: nowrap; }
.clip-player__spacer { flex: 1; }
.clip-player__autoplay { display: flex; align-items: center; gap: 4px; font-size: 12px; white-space: nowrap; }

.age-gate { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(238, 241, 245, .97); }
.age-gate__dialog { max-width: 440px; padding: 28px 24px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); text-align: center; box-shadow: 0 10px 40px rgba(28, 36, 48, .12); }
.age-gate__title { margin: 0 0 10px; }
.age-gate__text { margin: 0 0 18px; color: var(--color-muted); }
.age-gate__text a { text-decoration: underline; }
.age-gate__buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.age-gate__buttons .button { padding: 10px 20px; }

.site-footer { margin-top: 28px; padding: 22px 16px 30px; border-top: 1px solid var(--color-border); color: var(--color-muted); font-size: 12px; text-align: center; }
.site-footer__countries { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin: 0 0 12px; padding: 0; list-style: none; color: var(--color-text); font-size: 13px; }
.site-footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin: 6px 0; }
.site-footer__note { margin: 6px 0; }

@media (max-width: 1100px) { .video-grid, .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 800px) { .video-grid, .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .page__content { padding: 0 10px 24px; }
  .video-grid, .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 8px; }
  .site-header__inner { flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
  .site-header__logo { font-size: 17px; }
  .site-header__prefs { margin-inline-start: auto; }
  .search-form { order: 3; flex-basis: 100%; max-width: none; }
  .pref-select { max-width: 104px; }
  .watch__title { font-size: 17px; }
  .clip-player__volume, .clip-player__autoplay { display: none; }
}
