:root {
  --bg: #080b10;
  --panel: #141821;
  --panel-soft: #1b212b;
  --text: #f4f0e8;
  --muted: #b5bbc7;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #ff5a3d;
  --accent-2: #26d4af;
  --gold: #f5bf4f;
  --surface: rgba(255, 255, 255, 0.028);
  --surface-strong: rgba(255, 255, 255, 0.06);
  --surface-elevated: linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.028));
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.2);
  --radius: 8px;
  --radius-sm: 6px;
  --brand-2: var(--accent-2);
  --focus-ring: 0 0 0 3px rgba(38, 212, 175, 0.38);
  --wrap: min(1180px, calc(100vw - 32px));
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
  touch-action: manipulation;
}

:focus-visible {
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  clip: rect(0, 0, 0, 0);
  overflow: hidden;
}

.wrap {
  width: var(--wrap);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  overflow: visible;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 17, 19, 0.92);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(220px, 300px) auto;
  align-items: center;
  gap: 18px;
  min-height: 76px;
}

.brand,
.site-nav,
.header-search,
.detail-actions,
.footer-links,
.filter-bar,
.filter-panel div {
  display: flex;
  align-items: center;
}

.header-search-wrap {
  position: relative;
  min-width: 0;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-logo {
  width: 136px;
  height: 58px;
  flex: 0 0 136px;
  border-radius: 10px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.42)) drop-shadow(0 0 1px rgba(255, 124, 72, 0.42));
  transition: filter 0.2s ease, transform 0.2s ease;
}

.site-header .brand img {
  width: 136px;
  height: 58px;
  max-width: 156px;
  object-fit: contain;
}

.brand:hover .brand-logo {
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.46)) drop-shadow(0 0 2px rgba(255, 124, 72, 0.5));
  transform: translateY(-1px);
}

.site-nav {
  min-width: 0;
  gap: 2px;
  overflow: hidden;
}

.site-nav a,
.history-link,
.quick-types a,
.filter-bar a,
.filter-panel a {
  border-radius: var(--radius);
  color: var(--muted);
  padding: 10px 12px;
  white-space: nowrap;
  min-height: 44px;
}

.site-nav a {
  flex: 0 0 auto;
}

.mobile-shortcuts {
  display: none;
  align-items: center;
  gap: 6px;
}

.mobile-category-entry {
  display: none;
}

.mobile-game-entry {
  display: none;
}

.mobile-category-entry,
.mobile-game-entry {
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(40, 199, 167, 0.34);
  border-radius: var(--radius);
  background: rgba(40, 199, 167, 0.12);
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  min-height: 44px;
  padding: 0 12px;
}

.site-nav a:hover,
.history-link:hover,
.mobile-category-entry:hover,
.quick-types a:hover,
.filter-bar a:hover,
.filter-panel a:hover {
  background: var(--panel-soft);
  color: var(--text);
}

.site-nav a[aria-current="page"],
.mobile-category-entry.is-active,
.mobile-game-entry.is-active {
  color: var(--text);
  background: var(--panel-soft);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.site-nav a:focus-visible,
.filter-panel a:focus-visible,
.quick-types a:focus-visible,
.history-link:focus-visible,
.hero-slide:focus-visible,
.banner-arrow:focus-visible,
.banner-dot:focus-visible,
.primary-btn:focus-visible,
.ghost-btn:focus-visible,
.page-link:focus-visible,
.page-state:focus-visible,
.page-jump-submit:focus-visible,
.page-jump-input:focus-visible,
.channel-search button:focus-visible,
.filter-reset:focus-visible,
.episode-grid a:focus-visible,
.download-list a:focus-visible,
.list-item:focus-visible,
.category-children a:focus-visible,
.mobile-category-entry:focus-visible,
.mobile-game-entry:focus-visible,
.nav-toggle:focus-visible,
.user-avatar:focus-visible,
.user-dropdown a:focus-visible {
  box-shadow: var(--focus-ring);
}

.user-dropdown a:focus-visible {
  background: var(--panel-soft);
}

.user-menu {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  z-index: 40;
}

.user-menu::after {
  position: absolute;
  top: 100%;
  right: 0;
  width: 160px;
  height: 12px;
  content: "";
}

.user-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: var(--avatar-bg, var(--accent));
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.user-avatar-letter {
  display: block;
  max-width: 100%;
  overflow: hidden;
  font-size: 17px;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
}

.user-avatar-guest {
  background: var(--avatar-bg, #3b82f6);
  font-size: 12px;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: none;
  min-width: 128px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  z-index: 1001;
}

.user-dropdown a {
  display: block;
  color: var(--muted);
  padding: 11px 14px;
  white-space: nowrap;
}

.user-dropdown a:hover {
  background: var(--panel-soft);
  color: var(--text);
}

.user-menu:hover .user-dropdown,
.user-menu:focus-within .user-dropdown {
  display: block;
}

.site-notice {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 1200;
  max-width: min(520px, calc(100vw - 32px));
  border: 1px solid rgba(40, 199, 167, 0.42);
  border-radius: var(--radius);
  background: rgba(25, 27, 31, 0.96);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -16px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  padding: 11px 18px;
}

.site-notice.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.site-notice.is-error {
  border-color: rgba(255, 90, 61, 0.5);
}

.header-search,
.hero-search {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

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

.header-search button,
.hero-search button,
.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
  min-height: 44px;
  touch-action: manipulation;
}

.header-search button,
.hero-search button,
.primary-btn {
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
}

.hot-search-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 1002;
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  min-width: min(420px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(25, 27, 31, 0.98);
  box-shadow: var(--shadow);
  padding: 12px;
}

.hot-search-panel span {
  flex: 0 0 100%;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
}

.hot-search-panel a {
  overflow: hidden;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  padding: 7px 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hot-search-panel a:hover {
  border-color: rgba(255, 90, 61, 0.36);
  color: var(--text);
}

.header-search:focus-within,
.hero-search:focus-within,
.channel-search:focus-within,
.verify-form input:focus-visible,
.verify-form textarea:focus-visible,
.page-jump-input:focus-visible {
  border-color: rgba(38, 212, 175, 0.5);
  box-shadow: var(--focus-ring);
}

.header-search button:disabled,
.hero-search button:disabled,
.primary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.ghost-btn {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 10px 18px;
}

.primary-btn:hover,
.ghost-btn:hover {
  border-color: rgba(255, 255, 255, 0.22);
  filter: saturate(1.04) brightness(1.04);
  transform: translateY(-1px);
}

.favorite-btn {
  position: relative;
  border-color: rgba(40, 199, 167, 0.28);
}

.favorite-btn.is-loading {
  color: var(--muted);
  pointer-events: none;
}

.favorite-btn.is-favorited {
  border-color: rgba(40, 199, 167, 0.52);
  background: rgba(40, 199, 167, 0.14);
  color: var(--accent-2);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 9px;
  min-height: 44px;
  touch-action: manipulation;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
}

.hero {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #171a20 0%, #101216 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  padding: 42px 0;
}

.hero-carousel {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #15171b;
  box-shadow: var(--shadow);
}

.banner-track,
.hero-slide,
.banner-bg {
  position: absolute;
  inset: 0;
}

.hero-slide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 28px;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.38s ease;
}

.hero-carousel[data-gsap-carousel="true"] .hero-slide {
  transition: none;
}

[data-gsap-reveal-ready="true"],
[data-gsap-revealed="true"] {
  backface-visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  [data-gsap-carousel="true"] .hero-slide,
  [data-gsap-reveal-ready="true"],
  [data-gsap-revealed="true"] {
    transition: none;
  }
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.banner-bg {
  background-image: linear-gradient(90deg, rgba(16, 17, 19, 0.94) 0%, rgba(16, 17, 19, 0.78) 42%, rgba(16, 17, 19, 0.42) 100%), var(--banner-bg);
  background-position: center;
  background-size: cover;
  filter: saturate(1.05);
  transform: scale(1.02);
}

.banner-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(16, 17, 19, 0.08), rgba(16, 17, 19, 0.84));
}

.banner-copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 12px;
  max-width: 640px;
  min-width: 0;
  padding: 38px 0 200px 34px;
}

.banner-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: clamp(34px, 4.6vw, 58px);
  font-weight: 900;
  text-wrap: balance;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: normal;
}

.banner-copy small {
  display: -webkit-box;
  overflow: hidden;
  max-width: 560px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.banner-meta,
.banner-actions,
.banner-controls,
.banner-dots {
  display: flex;
  align-items: center;
}

.banner-meta {
  flex-wrap: wrap;
  gap: 8px;
}

.banner-meta i {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 12px;
  font-style: normal;
  padding: 4px 9px;
}

.banner-actions {
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.banner-poster {
  position: relative;
  z-index: 2;
  width: 190px;
  height: auto;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

.hero-carousel .hero-stats {
  position: absolute;
  right: 410px;
  bottom: 24px;
  left: 34px;
  z-index: 3;
  max-width: 560px;
  margin-top: 0;
}

.banner-controls {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 4;
  gap: 10px;
}

.banner-dots {
  gap: 7px;
}

.banner-dot,
.banner-arrow {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(16, 17, 19, 0.62);
  color: var(--text);
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  touch-action: manipulation;
}

.banner-dot {
  padding: 0;
  width: 44px;
  height: 44px;
}

.banner-dot.is-active {
  width: 44px;
  background: var(--accent-2);
  border-color: transparent;
}

.banner-arrow {
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
}

.banner-arrow:hover,
.banner-dot:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

.hero-copy h1,
.page-title h1,
.detail-main h1,
.player-head h1 {
  margin: 10px 0 12px;
  line-height: 1.12;
}

.hero-copy h1 {
  max-width: 640px;
  font-size: clamp(34px, 4vw, 54px);
}

.hero-copy p,
.page-title p,
.summary,
.site-footer p {
  color: var(--muted);
  margin: 0;
}

.hero-search {
  display: grid;
  grid-template-columns: 1fr auto;
  max-width: 560px;
  margin-top: 24px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 560px;
  margin-top: 22px;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px 12px;
}

.stat-card strong {
  display: block;
  color: var(--text);
  font-size: 20px;
  line-height: 1.15;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.eyebrow {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.hero-rank,
.episode-box,
.filter-panel,
.player-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(25, 27, 31, 0.86);
}

.hero-rank {
  padding: 18px;
  box-shadow: var(--shadow);
}

.rank-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.rank-item span {
  display: grid;
  place-items: center;
  height: 28px;
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--gold);
  font-weight: 800;
}

.rank-item strong,
.list-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-item em,
.vod-card small,
.list-item small,
.list-item em,
.section-head span {
  color: var(--muted);
  font-style: normal;
}

.quick-types {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 22px 0 4px;
}

.content-section {
  padding: 34px 0;
}

@supports (content-visibility: auto) {
  .content-section,
  .user-records,
  .category-index,
  .history-timeline,
  .module-fallback,
  .system-page {
    content-visibility: auto;
    contain-intrinsic-size: auto 520px;
  }
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-size: 24px;
}

.section-head a {
  color: var(--accent-2);
}

.compact h2 {
  font-size: 18px;
}

.vod-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: stretch;
  gap: 18px;
}

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

.vod-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 8px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.poster {
  position: relative;
  display: block;
  flex: 0 0 auto;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: var(--panel-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  isolation: isolate;
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.2s ease, transform 0.24s ease;
}

.poster::after {
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  pointer-events: none;
  content: "";
  background: linear-gradient(180deg, transparent 12%, rgba(0, 0, 0, 0.74));
  z-index: 1;
}

.poster em,
.detail-poster span,
.poster .quality-badge,
.poster .score-badge {
  position: absolute;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 12px;
  font-style: normal;
  line-height: 1;
  padding: 6px 9px;
  z-index: 2;
  backdrop-filter: blur(10px);
}

.poster em,
.poster .quality-badge,
.detail-poster span {
  right: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poster .score-badge {
  display: grid;
  place-items: center;
  top: 10px;
  left: 10px;
  min-width: 34px;
  min-height: 28px;
  background: linear-gradient(180deg, #ffd36c, var(--gold));
  color: #15110a;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18);
}

.vod-card:hover .poster img {
  filter: saturate(1.08) contrast(1.03);
  transform: scale(1.04);
}

.vod-card:hover {
  color: #fff;
  border-color: rgba(40, 199, 167, 0.38);
  background: var(--surface-strong);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
  transform: translateY(-3px);
}

.vod-card strong,
.vod-card small {
  display: block;
  min-width: 0;
}

.vod-card strong {
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.7em;
  margin: 10px 2px 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.vod-card small {
  overflow: hidden;
  min-height: 1.35em;
  margin: 4px 2px 0;
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 12px;
}

.card-meta span {
  overflow: hidden;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  padding: 3px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-title {
  position: relative;
  padding: 42px 0 10px;
}

.page-title::after {
  display: block;
  width: min(220px, 42vw);
  height: 2px;
  margin-top: 18px;
  content: "";
  background: linear-gradient(90deg, var(--accent), rgba(38, 212, 175, 0.72), transparent);
}

.page-title h1 {
  font-size: 38px;
  max-width: 860px;
  text-wrap: balance;
}

.filter-bar,
.filter-panel {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.category-filter {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(25, 27, 31, 0.82) 48%, rgba(8, 11, 16, 0.92));
  box-shadow: var(--shadow);
}

.filter-panel div {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  row-gap: 10px;
}

.filter-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-width: 0;
}

.filter-options {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.filter-options::-webkit-scrollbar {
  height: 4px;
}

.filter-options::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.filter-panel strong {
  flex: 0 0 54px;
  line-height: 36px;
  min-width: 54px;
}

.filter-row + .filter-row {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
}

.filter-panel a {
  flex: 0 0 auto;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.025);
}

.filter-panel a.is-active {
  border-color: rgba(40, 199, 167, 0.42);
  background: rgba(40, 199, 167, 0.12);
  color: var(--accent-2);
}

.letter-options a {
  min-width: 38px;
  text-align: center;
}

.filter-actions {
  justify-content: flex-end;
  padding-top: 2px;
}

.filter-reset {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.filter-reset:hover {
  border-color: rgba(255, 90, 61, 0.42);
  color: var(--accent);
}

.search-filter-panel {
  margin-top: 0;
}

.filter-search-row {
  align-items: center;
  padding-bottom: 2px;
}

.filter-search-row strong {
  line-height: 46px;
}

.channel-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  padding: 4px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.channel-search input[type="search"] {
  min-width: 0;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--text);
  padding: 10px 12px;
}

.channel-search:focus-within {
  border-color: rgba(40, 199, 167, 0.46);
  background: rgba(255, 255, 255, 0.06);
}

.channel-search button {
  min-width: 76px;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  padding: 10px 14px;
}

.category-index {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 26px 0 42px;
}

.category-tile {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  padding: 16px;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.category-tile:hover,
.category-tile:focus-within {
  border-color: rgba(40, 199, 167, 0.34);
  background: var(--surface-strong);
  transform: translateY(-2px);
}

.category-hit {
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: inherit;
}

.category-hit:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.category-main {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.category-main span {
  overflow: hidden;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-main em {
  flex: 0 0 auto;
  color: var(--accent-2);
  font-size: 13px;
  font-style: normal;
}

.category-children {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 30px;
  margin-top: 14px;
  pointer-events: none;
}

.category-children a {
  pointer-events: auto;
  overflow: hidden;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  padding: 4px 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-children a:hover {
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text);
}

.category-sort {
  background: rgba(255, 255, 255, 0.025);
}

.sort-latest {
  border-color: rgba(40, 199, 167, 0.36);
  color: #7ee0cf;
}

.sort-hot {
  border-color: rgba(255, 106, 77, 0.36);
  color: #ff9a84;
}

.sort-score {
  border-color: rgba(247, 195, 74, 0.36);
  color: #f5cf75;
}

.history-timeline {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 24px 0 46px;
}

.history-timeline::before {
  position: absolute;
  top: 76px;
  bottom: 48px;
  left: 112px;
  width: 1px;
  content: "";
  background: var(--line);
}

.timeline-date {
  position: relative;
  width: max-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--accent-2);
  font-weight: 800;
  padding: 5px 12px;
  z-index: 1;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  min-width: 0;
}

.timeline-dot {
  position: absolute;
  top: 50%;
  left: 107px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--accent-2);
  border-radius: 50%;
  background: var(--bg);
  transform: translateY(-50%);
  z-index: 1;
}

.timeline-time {
  color: var(--muted);
  font-weight: 700;
  text-align: right;
}

.timeline-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px;
}

.timeline-card:hover {
  border-color: rgba(40, 199, 167, 0.34);
  background: var(--surface-strong);
}

.timeline-card img {
  width: 76px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  object-fit: cover;
}

.timeline-card span,
.timeline-card strong,
.timeline-card small,
.timeline-card em {
  display: block;
  min-width: 0;
}

.timeline-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-card small,
.timeline-card em {
  color: var(--muted);
  font-style: normal;
  margin-top: 3px;
}

.vod-list {
  display: grid;
  gap: 14px;
}

.list-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-elevated);
  padding: 12px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.list-item:hover {
  border-color: rgba(40, 199, 167, 0.34);
  background: var(--surface-strong);
  transform: translateY(-2px);
}

.list-item img {
  width: 96px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  object-fit: cover;
}

.list-item span,
.list-item em {
  display: block;
  min-width: 0;
}

.list-item .card-meta {
  display: flex;
}

.detail-hero,
.player-page {
  border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at 18% 0, rgba(255, 90, 61, 0.16), transparent 32%), radial-gradient(circle at 82% 12%, rgba(38, 212, 175, 0.12), transparent 30%), #101318;
}

.detail-grid {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 28px;
  padding: 42px 0;
}

.detail-poster {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.38);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-main h1 {
  font-size: clamp(30px, 4vw, 42px);
}

.detail-panel {
  align-self: stretch;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-elevated);
  padding: 24px;
  box-shadow: var(--shadow);
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.detail-title-row h1 {
  min-width: 0;
  margin-top: 6px;
}

.detail-title-row .score-badge {
  position: static;
  flex: 0 0 auto;
  margin-top: 8px;
  padding: 7px 10px;
}

.meta {
  color: var(--gold);
  margin: 0 0 14px;
}

.detail-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0;
}

.detail-interactions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 0;
}

.interaction-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 12px;
}

.score-panel strong {
  display: block;
  color: var(--gold);
  font-size: 24px;
  line-height: 1;
}

.score-panel span,
.score-panel em,
.star-panel em,
.digg-panel em {
  color: var(--muted);
  font-style: normal;
}

.score-panel span,
.score-panel em {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

.star-meter {
  overflow: hidden;
  color: var(--gold);
  font-size: 18px;
  line-height: 1;
  white-space: nowrap;
}

.star-panel em {
  display: block;
  margin-top: 8px;
  font-size: 12px;
}

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

.digg-panel button {
  padding: 9px 10px;
}

.detail-data {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.detail-data div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 12px;
}

.detail-data dt {
  color: var(--muted);
  font-size: 13px;
}

.detail-data dd {
  margin: 4px 0 0;
}

.episode-box {
  margin-bottom: 18px;
  padding: 16px;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}

.episode-grid a {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--text);
  padding: 10px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.episode-grid a:focus-visible {
  box-shadow: var(--focus-ring);
}

.episode-grid a:hover,
.episode-grid a.is-active {
  background: var(--accent);
}

.player-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0 18px;
}

.player-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin: 0 0 14px;
  padding: 10px 12px;
}

.player-toolbar span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-toolbar-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.player-fullscreen {
  border-color: rgba(40, 199, 167, 0.36);
  color: var(--accent-2);
}

.player-shell {
  aspect-ratio: 16 / 9;
  min-height: 500px;
  overflow: hidden;
  margin-bottom: 34px;
  background: #050607;
}

.player-shell #MacPlayer,
.player-shell iframe,
.player-shell video,
.player-shell embed,
.player-shell object {
  display: block;
  width: 100%;
  min-height: 500px;
  border: 0;
}

.player-shell #MacPlayer {
  height: 500px;
}

.player-shell #MacPlayer > * {
  width: 100%;
  min-height: 500px;
}

.player-shell:fullscreen,
.player-shell:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  min-height: 0;
  margin: 0;
  background: #000;
}

.player-shell:fullscreen #MacPlayer,
.player-shell:fullscreen iframe,
.player-shell:fullscreen video,
.player-shell:fullscreen embed,
.player-shell:fullscreen object,
.player-shell:fullscreen #MacPlayer > *,
.player-shell:-webkit-full-screen #MacPlayer,
.player-shell:-webkit-full-screen iframe,
.player-shell:-webkit-full-screen video,
.player-shell:-webkit-full-screen embed,
.player-shell:-webkit-full-screen object,
.player-shell:-webkit-full-screen #MacPlayer > * {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.download-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.download-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-elevated);
  padding: 12px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.download-list strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.download-list span {
  flex: 0 0 auto;
  color: var(--accent-2);
  font-size: 13px;
}

.download-list a:hover {
  border-color: rgba(40, 199, 167, 0.38);
  background: var(--surface-strong);
  transform: translateY(-1px);
}

.comment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: start;
}

.comment-list,
.plot-list {
  display: grid;
  gap: 12px;
}

.comment-layout .system-box {
  position: sticky;
  top: 96px;
}

.comment-item,
.plot-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-elevated);
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.comment-item div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.comment-item strong,
.plot-item strong {
  color: var(--text);
}

.comment-item p,
.plot-item p {
  margin: 8px 0 0;
  color: var(--muted);
}

.copyright-box {
  text-align: left;
}

.paging {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.page-link,
.page-state,
.page-jump-input,
.page-jump-submit {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 8px 12px;
}

.page-jump {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-jump-input {
  width: 86px;
  color: var(--text);
  font: inherit;
  outline: 0;
  text-align: center;
}

.page-jump-submit {
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.page-jump-submit:hover {
  border-color: rgba(40, 199, 167, 0.42);
  color: var(--accent-2);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #0c0d0f;
  color: var(--muted);
  padding: 28px 0;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-links {
  gap: 14px;
}

.system-page {
  display: grid;
  min-height: 58vh;
  place-items: center;
  padding: 54px 0;
}

.system-box {
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(20, 24, 33, 0.92));
  padding: 28px;
  box-shadow: var(--shadow);
}

.system-box h1 {
  margin: 8px 0 10px;
  font-size: 30px;
  line-height: 1.2;
}

.system-box p {
  color: var(--muted);
  margin: 0 0 22px;
}

.module-fallback {
  max-width: 640px;
}

.verify-form {
  display: grid;
  gap: 14px;
}

.verify-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.verify-form input,
.verify-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  padding: 11px 12px;
}

.verify-form textarea {
  min-height: 128px;
  resize: vertical;
}

.verify-code {
  overflow: hidden;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  padding: 12px;
}

.verify-code img {
  max-width: 100%;
  height: auto;
}

.user-records {
  padding-bottom: 54px;
}

.favorite-page {
  padding-bottom: 70px;
}

.device-panel {
  padding-bottom: 64px;
}

.device-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-elevated);
  padding: 18px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.device-card:hover {
  border-color: rgba(40, 199, 167, 0.34);
  background: var(--surface-strong);
  transform: translateY(-2px);
}

.device-current {
  margin-left: 8px;
  color: var(--brand-2);
  font-size: 13px;
  font-weight: 800;
}

.device-meta {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.device-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 30px;
  border-radius: 999px;
  background: rgba(40, 199, 167, 0.14);
  color: var(--brand-2);
  font-size: 13px;
  font-weight: 800;
}

.danger-btn {
  border: 0;
  border-radius: var(--radius-sm);
  background: #d92d20;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  padding: 10px 14px;
}

.danger-btn[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
}

.record-toolbar,
.record-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-elevated);
}

.record-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 18px;
}

.favorite-toolbar {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(40, 199, 167, 0.12), rgba(255, 90, 61, 0.08) 42%, var(--panel) 100%);
  box-shadow: var(--shadow);
}

.record-toolbar strong,
.record-title {
  color: var(--text);
  font-weight: 800;
}

.record-toolbar span,
.record-progress,
.record-meta {
  color: var(--muted);
}

.record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.record-list {
  display: grid;
  gap: 12px;
}

.favorite-list {
  gap: 14px;
}

.record-item {
  display: grid;
  grid-template-columns: auto 76px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.record-item:hover {
  border-color: rgba(40, 199, 167, 0.34);
  background: var(--surface-strong);
  transform: translateY(-2px);
}

.favorite-card {
  grid-template-columns: auto 104px minmax(0, 1fr) auto;
  align-items: stretch;
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.028));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.favorite-card:hover {
  border-color: rgba(40, 199, 167, 0.38);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
  transform: translateY(-2px);
}

.record-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.record-poster {
  overflow: hidden;
  width: 76px;
  aspect-ratio: 2 / 3;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.record-poster-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.favorite-cover {
  width: 104px;
  border-radius: 10px;
}

.record-main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.favorite-info {
  align-content: center;
  gap: 9px;
}

.record-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-title-link {
  font-size: 18px;
  letter-spacing: 0;
}

.favorite-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border: 1px solid rgba(40, 199, 167, 0.36);
  border-radius: 999px;
  background: rgba(40, 199, 167, 0.12);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 6px 9px;
}

.record-progress,
.record-meta {
  font-size: 13px;
}

.record-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.favorite-card-actions {
  align-content: center;
}

.favorite-card-actions .primary-btn {
  background: var(--accent-2);
  color: #06120f;
}

.record-empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--muted);
  font-weight: 700;
  padding: 22px;
  text-align: center;
}

.favorite-empty {
  display: grid;
  min-height: 210px;
  place-items: center;
  gap: 10px;
  border-style: solid;
  background: radial-gradient(circle at 50% 0, rgba(40, 199, 167, 0.14), transparent 34%), var(--panel);
}

.favorite-empty strong {
  color: var(--text);
  font-size: 20px;
}

.favorite-empty span {
  color: var(--muted);
}

@media (max-width: 1020px) {
  .header-inner {
    grid-template-columns: auto auto 1fr;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    grid-column: 1 / -1;
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 14px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .history-link {
    display: none;
  }

  .hero-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .hero-carousel {
    min-height: 400px;
  }

  .hero-carousel .hero-stats {
    right: 390px;
    left: 18px;
  }

  .detail-poster {
    max-width: 260px;
  }

  .vod-grid,
  .compact-grid,
  .category-index {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .episode-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    --wrap: min(100vw - 24px, 1180px);
  }

  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: 8px;
    min-height: 62px;
    padding: 8px 0;
  }

  .site-header .brand {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    min-width: 0;
  }

  .site-header .brand img {
    width: 72px;
    height: 40px;
    max-width: 72px;
  }

  .brand-logo {
    flex: 0 0 72px;
    border-radius: 8px;
  }

  .nav-toggle {
    grid-column: 3;
    grid-row: 1;
    width: 38px;
    height: 38px;
    padding: 8px;
  }

  .user-menu {
    grid-column: 4;
    grid-row: 1;
  }

  .user-avatar {
    width: 38px;
    height: 38px;
  }

  .header-search {
    display: grid;
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
    min-width: 0;
    margin-bottom: 0;
  }

  .header-search-wrap {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .hot-search-panel {
    min-width: min(320px, calc(100vw - 24px));
  }

  .header-search input {
    padding: 9px 10px;
    font-size: 14px;
  }

  .header-search button {
    min-width: 76px;
    padding: 9px 12px;
    font-size: 15px;
  }

  .site-nav {
    grid-column: 1 / -1;
    grid-row: 3;
    padding-bottom: 4px;
  }

  .hero-grid {
    gap: 16px;
    padding: 18px 0 20px;
  }

  .hero-carousel {
    min-height: 372px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
  }

  .banner-bg {
    background-image: linear-gradient(180deg, rgba(16, 17, 19, 0.44) 0%, rgba(16, 17, 19, 0.92) 78%), var(--banner-bg);
  }

  .banner-copy {
    align-content: end;
    max-width: none;
    padding: 18px 16px 172px;
  }

  .banner-copy strong {
    display: -webkit-box;
    font-size: 29px;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .banner-copy small {
    font-size: 14px;
    line-height: 1.5;
    -webkit-line-clamp: 2;
  }

  .banner-poster {
    display: none;
  }

  .hero-carousel .hero-stats {
    right: 14px;
    bottom: 78px;
    left: 14px;
    max-width: none;
  }

  .banner-controls {
    right: 14px;
    bottom: 14px;
    left: 14px;
    justify-content: space-between;
    gap: 8px;
    min-height: 52px;
  }

  .hero-copy h1 {
    font-size: 32px;
  }

  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat-card {
    padding: 8px;
  }

  .stat-card strong {
    font-size: 18px;
  }

  .hero-rank .rank-item:nth-of-type(n+4) {
    display: none;
  }

  .hero-rank {
    margin-top: 4px;
    padding: 16px;
  }

  .page-title {
    padding: 24px 0 8px;
  }

  .system-page {
    min-height: auto;
    place-items: stretch;
    padding: 28px 0;
  }

  .system-box {
    padding: 20px;
  }

  .comment-layout .system-box {
    position: static;
  }

  .content-section {
    padding: 22px 0;
  }

  .quick-types {
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    margin-right: calc((100vw - var(--wrap)) / -2);
    margin-left: calc((100vw - var(--wrap)) / -2);
    padding: 14px calc((100vw - var(--wrap)) / 2) 2px;
    scrollbar-width: none;
    scroll-padding-inline: calc((100vw - var(--wrap)) / 2);
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .quick-types::-webkit-scrollbar {
    display: none;
  }

  .quick-types a {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .rank-item {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px 0;
  }

  .vod-grid,
  .compact-grid,
  .category-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .vod-card {
    padding: 6px;
  }

  .poster .score-badge {
    top: 8px;
    left: 8px;
    min-width: 30px;
    min-height: 26px;
    font-size: 12px;
  }

  .poster em,
  .poster .quality-badge,
  .detail-poster span {
    right: 8px;
    bottom: 8px;
    max-width: calc(100% - 16px);
    padding: 5px 8px;
  }

  .vod-card strong {
    margin-top: 8px;
    font-size: 15px;
  }

  .vod-card small {
    font-size: 12px;
  }

  .card-meta {
    gap: 5px;
    margin-top: 8px;
  }

  .card-meta span {
    padding: 2px 7px;
  }

  .history-timeline::before {
    left: 7px;
  }

  .record-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .record-actions,
  .record-item-actions {
    width: 100%;
  }

  .record-actions .ghost-btn,
  .record-item-actions .primary-btn,
  .record-item-actions .ghost-btn {
    flex: 1 1 120px;
    text-align: center;
  }

  .record-item {
    grid-template-columns: auto 64px minmax(0, 1fr);
    align-items: flex-start;
  }

  .favorite-card {
    grid-template-columns: auto 82px minmax(0, 1fr);
  }

  .record-poster {
    width: 64px;
  }

  .favorite-cover {
    width: 82px;
  }

  .favorite-title-link {
    font-size: 16px;
  }

  .record-item-actions {
    grid-column: 2 / -1;
    justify-content: stretch;
  }

  .filter-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .filter-panel {
    gap: 12px;
    padding: 14px;
  }

  .filter-panel div {
    row-gap: 8px;
  }

  .filter-panel strong {
    line-height: 1.2;
  }

  .filter-options {
    margin-right: -14px;
    padding-right: 14px;
    padding-bottom: 4px;
  }

  .filter-panel a {
    padding: 8px 11px;
  }

  .channel-search {
    grid-template-columns: minmax(0, 1fr) 74px;
    width: 100%;
  }

  .channel-search button {
    width: auto;
    min-width: 74px;
  }

  .filter-actions {
    justify-content: flex-start;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-left: 28px;
  }

  .timeline-dot {
    left: 2px;
    top: 16px;
  }

  .detail-interactions,
  .download-list,
  .comment-layout {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    padding: 28px 0;
  }

  .detail-actions .primary-btn,
  .detail-actions .ghost-btn {
    flex: 1 1 132px;
    text-align: center;
  }

  .download-list a {
    align-items: flex-start;
  }

  .device-card {
    grid-template-columns: 1fr;
  }

  .timeline-time {
    text-align: left;
  }

  .timeline-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .timeline-card img {
    width: 64px;
  }

  .page-title h1,
  .detail-main h1 {
    font-size: 28px;
    line-height: 1.15;
  }

  .list-item {
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
  }

  .list-item img {
    width: 86px;
  }

  .list-item small {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .list-item .card-meta {
    flex-wrap: wrap;
    gap: 6px;
  }

  .detail-data {
    grid-template-columns: 1fr;
  }

  .episode-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .player-head,
  .player-toolbar,
  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .player-toolbar-actions {
    width: 100%;
  }

  .player-toolbar-actions .ghost-btn {
    flex: 1 1 120px;
    text-align: center;
  }

  .player-shell {
    width: 100%;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .player-shell #MacPlayer,
  .player-shell iframe,
  .player-shell video,
  .player-shell embed,
  .player-shell object,
  .player-shell #MacPlayer > * {
    height: 100%;
    min-height: 0;
  }

  .player-shell #MacPlayer {
    height: 100%;
  }

  .paging {
    flex-wrap: wrap;
    justify-content: stretch;
    gap: 8px;
    margin-top: 22px;
  }

  .page-link,
  .page-state {
    flex: 1 1 88px;
    text-align: center;
  }

  .page-jump {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
  }

  .page-jump-input {
    width: 100%;
  }

  .page-jump-submit {
    min-width: 74px;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .player-page .wrap {
    width: 100%;
  }

  .player-head {
    display: none;
  }

  .player-toolbar {
    margin: 8px auto;
    width: var(--wrap);
  }

  .player-shell {
    height: calc(100vh - 64px);
    min-height: 0;
    aspect-ratio: auto;
    margin-bottom: 0;
  }

  .player-shell #MacPlayer,
  .player-shell iframe,
  .player-shell video,
  .player-shell embed,
  .player-shell object,
  .player-shell #MacPlayer > * {
    height: 100%;
    min-height: 0;
  }
}

@media (max-width: 520px) {
  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: 6px;
  }

  .site-header .brand img {
    width: 52px;
    height: 34px;
    max-width: 52px;
  }

  .brand-logo {
    flex-basis: 52px;
  }

  .nav-toggle {
    display: block;
    width: 44px;
    height: 44px;
    padding: 10px;
    grid-column: 3;
    grid-row: 1;
  }

  .mobile-shortcuts {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    margin-top: 4px;
  }

  .mobile-category-entry {
    display: inline-flex;
    min-height: 44px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .mobile-game-entry {
    display: inline-flex;
    min-height: 44px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .user-menu {
    grid-column: 4;
  }

  .header-search button {
    min-width: 74px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .hero-carousel {
    min-height: 356px;
  }

  .banner-copy {
    padding: 16px 14px 166px;
  }

  .banner-copy strong {
    font-size: 27px;
  }

  .banner-copy small {
    line-height: 1.45;
  }

  .filter-panel {
    padding: 12px;
  }

  .filter-options {
    margin-right: -12px;
    padding-right: 12px;
  }

  .vod-grid,
  .compact-grid,
  .category-index {
    gap: 12px;
  }

  .hero-carousel .hero-stats {
    right: 12px;
    left: 12px;
    bottom: 60px;
  }

  .banner-controls {
    right: 12px;
    bottom: 4px;
    left: 12px;
  }

  .hero-stats {
    min-width: 0;
    gap: 7px;
  }

  .stat-card {
    min-width: 0;
    padding: 7px 6px;
  }

  .stat-card strong {
    font-size: 16px;
  }

  .stat-card span {
    font-size: 11px;
  }

  .stat-card strong,
  .stat-card span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .card-meta {
    flex-wrap: nowrap;
    gap: 4px;
  }

  .card-meta span {
    min-width: 0;
    padding: 2px 6px;
  }
}
