:root {
  --page-bg: #eeeaf4;
  --surface: #faf8fc;
  --surface-soft: #f4eff8;
  --surface-rose: #f8edf3;
  --surface-violet: #e8e0f1;
  --text: #352f45;
  --text-soft: #6f687d;
  --border: #d9cfe3;
  --border-strong: #c5b6d4;
  --violet: #7047a5;
  --violet-hover: #5f398f;
  --rose: #b63868;
  --rose-soft: #efd3df;
  --coral: #c85162;
  --focus: #a83f86;
  --player-bg: #514b64;
  --success-soft: #e4f0eb;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 4px 14px rgba(83, 64, 104, 0.08);
  --shadow-md: 0 12px 28px rgba(83, 64, 104, 0.12);
  --container: 1440px;
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 16px;
  --space-4: 22px;
  --space-5: 28px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--page-bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid rgba(168, 63, 134, 0.36);
  outline-offset: 3px;
}

.container {
  width: min(100% - 24px, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 20;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--violet);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  padding: 14px 0 10px;
  border-bottom: 1px solid var(--border);
  background: #f5f1f8;
}

.header-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brand-panel {
  min-width: 0;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid #8e6bb6;
  border-radius: 14px 5px 14px 5px;
  background: linear-gradient(145deg, #8659b5, #b74479);
  color: #fffafd;
  font-size: 20px;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.2;
}

.brand-copy strong {
  overflow: hidden;
  font-size: 19px;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small {
  overflow: hidden;
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-search {
  width: 100%;
}

.site-search > label {
  display: block;
  margin-bottom: 5px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.search-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: inset 0 1px 2px rgba(83, 64, 104, 0.05);
}

.search-control:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(168, 63, 134, 0.12);
}

.search-control input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 10px 12px;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.search-control input::placeholder {
  color: #91899d;
}

.search-control button {
  min-width: 68px;
  border: 0;
  padding: 9px 14px;
  background: var(--violet);
  color: #fffafd;
  cursor: pointer;
  font-weight: 700;
}

.search-control button:hover {
  background: var(--violet-hover);
}

.hot-searches {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 11px;
}

.hot-searches__label {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--rose-soft);
  color: #8d2f55;
  font-size: 12px;
  font-weight: 800;
}

.hot-searches__links {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.hot-searches__links a {
  max-width: 180px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hot-searches__links a:hover {
  color: var(--rose);
  text-decoration: underline;
}

.sponsor-banner,
.sponsor-banner.container {
  box-sizing: border-box;
  display: grid;
  width: 100% !important;
  max-width: none !important;
  margin: 2px 0 !important;
  padding: 0 !important;
  gap: 2px 6px;
  grid-template-columns: minmax(0, 1fr);
}

.sponsor-banner__item,
.sponsor-banner__item a,
.sponsor-banner__item img,
.sponsor-banner a,
.sponsor-banner img {
  width: 100%;
  height: 100%;
}

.sponsor-banner__item img,
.sponsor-banner img {
  display: block;
  border-radius: 2px;
  object-fit: fill;
}

.category-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
  margin-bottom: 8px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #f8f5fa;
}

.category-nav a {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 6px 4px;
  color: #554d63;
  font-size: 13px;
  font-weight: 650;
  text-align: center;
}

.category-nav a:hover {
  border-color: var(--border-strong);
  background: var(--surface-violet);
  color: var(--violet);
}

.category-nav__home {
  background: #eadff3;
  color: var(--violet) !important;
}

.site-main {
  padding-top: 18px;
  padding-bottom: 24px;
}

.home-heading,
.catalog-heading,
.search-heading,
.play-heading {
  margin-bottom: 18px;
}

.home-heading {
  display: grid;
  gap: 8px;
  padding: 4px 2px 14px 12px;
  border-left: 4px solid var(--rose);
  border-bottom: 1px solid var(--border);
}

.home-heading h1,
.catalog-heading h1,
.search-heading h1,
.play-heading h1 {
  margin: 2px 0 0;
  font-size: clamp(23px, 5.8vw, 36px);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.home-heading p,
.catalog-heading p,
.search-heading p,
.section-heading p,
.section-note {
  margin: 0;
  color: var(--text-soft);
}

.section-kicker {
  display: block;
  color: var(--rose);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.content-section,
.catalog-results,
.search-results,
.related-section {
  margin-top: 22px;
}

.section-heading {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-heading h2,
.sort-panel h2,
.play-information h2 {
  margin: 1px 0 0;
  font-size: clamp(19px, 4.8vw, 27px);
  line-height: 1.25;
}

.section-heading p,
.section-heading > span,
.section-note {
  font-size: 12px;
}

.section-heading--offset {
  position: relative;
  justify-content: flex-start;
  min-height: 48px;
  padding: 7px 10px 7px 50px;
  border-radius: var(--radius-md);
  background: var(--surface-violet);
}

.section-heading--offset > p {
  margin-left: auto;
  text-align: right;
}

.section-index {
  position: absolute;
  bottom: -6px;
  left: 8px;
  color: #9c7dbb;
  font-family: Georgia, serif;
  font-size: 35px;
  font-style: italic;
  line-height: 1;
}

.recommendation-section {
  margin-inline: -6px;
  padding: 16px 6px 18px;
  border-top: 1px solid #ddc7d3;
  border-bottom: 1px solid #ddc7d3;
  background: linear-gradient(90deg, rgba(248, 237, 243, 0.84), rgba(250, 248, 252, 0.45));
}

.section-heading--split {
  align-items: center;
}

.section-note {
  max-width: 180px;
  border-left: 2px solid var(--rose);
  padding-left: 9px;
  text-align: right;
}

.section-heading--lined {
  align-items: center;
  border-bottom: 2px solid var(--border-strong);
  padding-bottom: 8px;
}

.section-heading--lined > div {
  transform: translateY(11px);
  padding-right: 12px;
  background: var(--page-bg);
}

.video-grid {
  display: grid;
  align-items: stretch;
  grid-auto-rows: 1fr;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.video-card {
  min-width: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.video-card > a {
  display: flex;
  height: 100%;
  min-width: 0;
  flex-direction: column;
}

.video-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #ded7e6;
}

.video-cover img,
.play-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease, filter 180ms ease;
}

.video-card__body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 9px 10px 10px;
}

.video-card h3 {
  display: -webkit-box;
  height: 2.9em;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.video-card:hover {
  border-color: #bda8ce;
  box-shadow: var(--shadow-md);
}

.video-card:hover .video-cover img {
  filter: saturate(1.06);
  transform: scale(1.025);
}

.video-grid--popular {
  counter-reset: popular-card;
}

.video-card--ranked {
  position: relative;
  counter-increment: popular-card;
}

.video-card--ranked::after {
  position: absolute;
  top: 7px;
  left: 7px;
  min-width: 25px;
  border: 1px solid rgba(255, 250, 253, 0.72);
  border-radius: 999px;
  padding: 2px 6px;
  background: rgba(112, 71, 165, 0.88);
  color: #fffafd;
  content: counter(popular-card, decimal-leading-zero);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.video-card--accent {
  border-top: 3px solid var(--rose);
  border-radius: 5px 5px var(--radius-md) var(--radius-md);
}

.video-card--accent .video-card__body {
  position: relative;
  padding-top: 16px;
}

.card-label {
  position: absolute;
  top: -9px;
  left: 9px;
  border-radius: 999px;
  padding: 1px 7px;
  background: var(--rose-soft);
  color: #8d2f55;
  font-size: 9px;
  font-weight: 800;
}

.video-card--minimal {
  border-radius: var(--radius-sm);
  box-shadow: none;
}

.video-card--minimal .video-card__body {
  border-top: 1px solid var(--border);
  background: #f7f3fa;
}

.catalog-heading {
  display: grid;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  background: linear-gradient(120deg, #faf8fc 0 68%, #eee4f5 68%);
  box-shadow: var(--shadow-sm);
}

.catalog-heading__title {
  min-width: 0;
}

.catalog-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.catalog-stats div {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 9px 10px;
  background: rgba(250, 248, 252, 0.88);
  text-align: center;
}

.catalog-stats dt {
  color: var(--text-soft);
  font-size: 11px;
}

.catalog-stats dd {
  margin: 1px 0 0;
  color: var(--violet);
  font-size: 20px;
  font-weight: 850;
  line-height: 1.25;
}

.sort-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px;
  border-left: 4px solid var(--violet);
  background: var(--surface);
}

.sort-options {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 7px;
}

.sort-options a,
.sort-options button {
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 6px 11px;
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
}

.sort-options a:hover,
.sort-options a.active,
.sort-options a.current,
.sort-options button:hover,
.sort-options button.active {
  border-color: var(--violet);
  background: var(--violet);
  color: #fffafd;
}

.section-heading--catalog,
.section-heading--search {
  align-items: center;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 8px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 22px;
}

.page-link {
  display: inline-flex;
  min-width: 38px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 10px 4px 10px 4px;
  padding: 6px 10px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
}

.page-link:hover {
  border-color: var(--rose);
  color: var(--rose);
}

.page-link.current,
.page-link.active,
.page-link.on,
.page-link.selected {
  border-color: var(--violet);
  background: var(--violet);
  color: #fffafd;
}

.search-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.search-heading__marker {
  display: flex;
  width: 38px;
  align-items: center;
  justify-content: center;
  background: var(--surface-violet);
  color: var(--violet);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-orientation: mixed;
  writing-mode: vertical-rl;
}

.search-heading__content {
  min-width: 0;
  padding: 14px;
}

.search-heading strong {
  color: var(--rose);
}

.video-card--search {
  border-bottom: 3px solid #d8c5e6;
}

.empty-guidance {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 12px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  background: rgba(250, 248, 252, 0.56);
  color: var(--text-soft);
  font-size: 12px;
}

.empty-guidance strong {
  color: var(--violet);
}

.play-heading {
  padding: 0 2px 10px;
  border-bottom: 1px solid var(--border-strong);
}

.play-heading h1 {
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.player-section {
  width: 100%;
}

.player-shell {
  position: relative;
  width: 100%;
  max-width: 960px;
  max-height: 540px;
  aspect-ratio: 16 / 9;
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid #70697f;
  border-radius: var(--radius-md);
  background: var(--player-bg);
  box-shadow: var(--shadow-md);
}

.player-shell iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  overflow: hidden;
}

.player-shell.is-ready {
  border-color: #9672b7;
}

.video-actions {
  width: 100%;
  max-width: 960px;
  min-height: 44px;
  margin: 8px auto 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  background: var(--surface);
}

.video-actions button,
.video-actions a {
  border-radius: 999px;
}

.play-information {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
  background: var(--surface-soft);
}

.play-poster {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #ded7e6;
}

.play-information__copy {
  min-width: 0;
}

.play-information__copy p {
  display: -webkit-box;
  margin: 8px 0 12px;
  overflow: hidden;
  color: var(--text-soft);
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.play-information__copy a {
  display: inline-flex;
  border-bottom: 1px solid var(--violet);
  color: var(--violet);
  font-weight: 750;
}

.section-heading--related {
  align-items: center;
  padding: 10px 12px;
  border-left: 4px solid var(--rose);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--surface-rose);
}

.video-card--related .video-card__body {
  background: #f9f6fb;
}

.site-footer {
  border-top: 1px solid var(--border-strong);
  background: #e7e1ed;
  color: var(--text);
}

.footer-layout {
  display: grid;
  gap: 18px;
  padding-top: 22px;
  padding-bottom: 18px;
}

.footer-layout h2 {
  margin: 0 0 7px;
  color: var(--violet);
  font-size: 16px;
}

.footer-about p {
  max-width: 680px;
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
}

.friend-links {
  min-width: 0;
  border-top: 1px solid var(--border-strong);
  padding-top: 14px;
}

.friend-links__list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
}

.friend-links__list a {
  max-width: 180px;
  overflow: hidden;
  color: #63566f;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-links__list a:hover {
  color: var(--rose);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  border-top: 1px solid var(--border-strong);
  padding-top: 12px;
  padding-bottom: 16px;
  color: var(--text-soft);
  font-size: 12px;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom a {
  color: var(--violet);
  font-weight: 700;
}

.error-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 20px;
  background: radial-gradient(circle at top right, #e7d9ef, var(--page-bg) 55%);
}

.error-panel {
  width: min(100%, 560px);
  border: 1px solid var(--border-strong);
  border-radius: 24px 8px 24px 8px;
  padding: clamp(24px, 7vw, 52px);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.error-brand {
  color: var(--violet);
  font-weight: 850;
}

.error-code {
  margin: 16px 0 0;
  color: #b99bc9;
  font-family: Georgia, serif;
  font-size: clamp(72px, 24vw, 132px);
  font-weight: 800;
  line-height: 0.9;
}

.error-panel h1 {
  margin: 15px 0 6px;
  font-size: clamp(25px, 7vw, 38px);
}

.error-panel p {
  margin: 0 auto 20px;
  color: var(--text-soft);
}

.primary-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 8px 20px;
  background: var(--violet);
  color: #fffafd;
  font-weight: 800;
}

.error-panel small {
  display: block;
  margin-top: 16px;
  color: var(--text-soft);
}

@media (min-width: 641px) {
  .container {
    width: min(100% - 36px, var(--container));
  }

  .sponsor-banner,
  .sponsor-banner.container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .video-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .catalog-heading {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
    align-items: center;
  }

  .sort-panel {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 24px;
  }

  .sort-options {
    justify-content: flex-end;
  }

  .play-information {
    grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
  }

  .play-poster {
    max-width: 420px;
  }
}

@media (min-width: 760px) {
  .site-header {
    padding-top: 16px;
  }

  .header-main {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .brand-panel {
    flex: 1 1 auto;
  }

  .site-search {
    width: min(48%, 560px);
  }

  .home-heading {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .footer-layout {
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  }

  .friend-links {
    border-top: 0;
    border-left: 1px solid var(--border-strong);
    padding-top: 0;
    padding-left: 20px;
  }
}

@media (min-width: 1024px) {
  .category-nav {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .site-main {
    padding-top: 22px;
    padding-bottom: 30px;
  }

  .content-section,
  .catalog-results,
  .search-results,
  .related-section {
    margin-top: 28px;
  }

  .video-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }

  .video-card h3 {
    font-size: 14px;
  }

  .recommendation-section {
    margin-inline: 0;
    padding-inline: 16px;
    border-right: 1px solid #ddc7d3;
    border-left: 1px solid #ddc7d3;
    border-radius: var(--radius-lg);
  }
}

@media (min-width: 1320px) {
  .video-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .section-heading--offset > p,
  .section-heading--lined > p,
  .section-heading--related > p,
  .section-note {
    display: none;
  }

  .video-card__body {
    padding-inline: 8px;
  }

  .video-card h3 {
    font-size: 12px;
  }

  .player-shell {
    border-radius: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
