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

:root {
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --line: #e5e7eb;
  --text: #111827;
  --text-soft: #6b7280;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --danger: #ef4444;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1200px;
}

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

body {
  margin: 0;
  color: var(--text);
  background: #f3f4f6;
  font: 14px/1.7 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  word-break: break-word;
}

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

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

button,
input {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

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

.site-header {
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
  color: #fff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0 14px;
}

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

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex: 0 0 auto;
}

.brand-text {
  display: inline-block;
  max-width: 100%;
}

.site-domain {
  display: block;
  margin-top: 4px;
  color: rgba(255,255,255,.72);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-form {
  width: min(100%, 420px);
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.1);
  color: #fff;
  border-radius: 999px;
  padding: 0 16px;
  outline: none;
}

.search-input::placeholder {
  color: rgba(255,255,255,.55);
}

.search-btn {
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.search-btn:hover {
  background: var(--primary-hover);
}

.main-nav {
  display: flex;
  gap: 10px;
  padding: 0 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-item {
  flex: 0 0 auto;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.9);
  transition: .2s ease;
}

.nav-item:hover {
  background: rgba(255,255,255,.16);
  color: #fff;
}

.hero-section {
  padding: 18px 0 0;
}

.hero-slider {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  background: transparent;
}

.hero-slide {
  position: relative;
  min-height: 340px;
  border-radius: 24px;
  overflow: hidden;
  background: #dbe4f0;
}

.hero-cover,
.hero-cover img {
  width: 100%;
  height: 100%;
}

.hero-cover img {
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 15%, rgba(15, 23, 42, .82) 100%);
}

.hero-content {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  color: #fff;
  z-index: 2;
}

.hero-title {
  display: block;
  font-size: 20px;
  line-height: 1.4;
  margin-bottom: 6px;
}

.hero-meta,
.hero-desc {
  display: block;
  opacity: .9;
}

.hero-desc {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.section-block {
  padding: 24px 0;
}

.section-block.alt-bg {
  background: #eef2ff;
}

.section-block.no-padding {
  padding-top: 0;
}

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

.section-head h2,
.block-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
}

.section-more {
  color: var(--primary);
  font-weight: 600;
}

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

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

.video-card,
.rank-card,
.detail-card,
.keyword-panel,
.player-card,
.play-episodes {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.video-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.video-thumb {
  position: relative;
  display: block;
  background: #e5e7eb;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .74);
  color: #fff;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-info {
  padding: 12px;
  min-width: 0;
}

.video-title {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.5;
}

.video-title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-meta,
.video-text,
.rank-meta,
.rank-desc,
.detail-desc,
.page-banner-inner p {
  color: var(--text-soft);
}

.video-meta,
.rank-meta {
  font-size: 12px;
  margin: 0 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-text,
.rank-desc,
.detail-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-banner {
  padding: 22px 0 0;
}

.page-banner-inner {
  background: linear-gradient(135deg, #1d4ed8, #1e293b);
  color: #fff;
  padding: 28px 24px;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.page-banner-inner h1 {
  margin: 0 0 6px;
  font-size: 30px;
  line-height: 1.25;
}

.page-banner-inner p {
  margin: 0;
  color: rgba(255,255,255,.78);
}

.keyword-panel {
  padding: 18px;
  margin-bottom: 18px;
}

.keyword-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.keyword-list a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  max-width: 100%;
}

.keyword-list.big-keywords a {
  background: #eef2ff;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding-top: 24px;
}

.pagination a {
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.rank-grid {
  display: grid;
  gap: 16px;
}

.rank-card {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  overflow: hidden;
}

.rank-thumb {
  display: block;
  height: 100%;
  background: #e5e7eb;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-body {
  padding: 18px;
  min-width: 0;
}

.rank-title {
  margin: 0 0 10px;
  font-size: 20px;
}

.play-page {
  padding: 22px 0 24px;
}

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

.play-main,
.play-sidebar {
  min-width: 0;
}

.player-card {
  padding: 16px;
  margin-bottom: 18px;
}

.player-box {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
}

.player-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-status {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  max-width: calc(100% - 24px);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .72);
  color: #fff;
  font-size: 13px;
  text-align: center;
}

.play-episodes {
  padding: 16px;
  margin-bottom: 18px;
}

.episode-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.episode-list a {
  min-width: 88px;
  max-width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  background: #f3f4f6;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.episode-list a:hover {
  background: #dbeafe;
  color: #1d4ed8;
}

.detail-card {
  padding: 16px;
}

.detail-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.detail-poster {
  width: 120px;
  flex: 0 0 120px;
  border-radius: 14px;
  overflow: hidden;
  background: #e5e7eb;
  aspect-ratio: 3 / 4;
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-summary {
  min-width: 0;
  flex: 1;
}

.detail-summary h1 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.4;
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.meta-list span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  background: #f3f4f6;
  border-radius: 999px;
  font-size: 12px;
}

.detail-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.detail-list li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}

.detail-list li:last-child {
  border-bottom: 0;
}

.site-footer {
  margin-top: 20px;
  background: #111827;
  color: #fff;
  padding: 30px 0;
}

.footer-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.friend-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.friend-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.88);
}

.footer-copy {
  margin-top: 20px;
  color: rgba(255,255,255,.7);
  font-size: 13px;
}

.footer-copy p {
  margin: 6px 0 0;
}

.mobile-show {
  display: none;
}

.desktop-show {
  display: block;
}

@media (max-width: 1199px) {
  .video-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .play-layout {
    grid-template-columns: 1fr 320px;
  }
}

@media (max-width: 991px) {
  .header-top {
    flex-direction: column;
    align-items: stretch;
  }

  .search-form {
    width: 100%;
  }

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

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

  .play-layout {
    grid-template-columns: 1fr;
  }

  .desktop-show {
    display: none;
  }

  .mobile-show {
    display: block;
    margin-bottom: 18px;
  }
}

@media (max-width: 767px) {
  body {
    font-size: 13px;
  }

  .container {
    width: min(100% - 16px, var(--container));
  }

  .site-brand {
    font-size: 22px;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .main-nav {
    gap: 8px;
    padding-bottom: 12px;
  }

  .nav-item {
    padding: 8px 14px;
  }

  .hero-track {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hero-slide {
    min-height: 230px;
  }

  .section-block {
    padding: 18px 0;
  }

  .section-head h2,
  .block-head h2 {
    font-size: 20px;
  }

  .page-banner-inner {
    padding: 22px 16px;
    border-radius: 18px;
  }

  .page-banner-inner h1 {
    font-size: 24px;
  }

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

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

  .rank-thumb {
    aspect-ratio: 16 / 9;
  }

  .detail-head {
    flex-direction: column;
  }

  .detail-poster {
    width: 120px;
  }

  .episode-list a {
    flex: 1 1 calc(50% - 10px);
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .search-form {
    gap: 8px;
  }

  .search-input {
    height: 42px;
    padding: 0 14px;
  }

  .search-btn {
    height: 42px;
    padding: 0 14px;
  }

  .video-grid,
  .video-grid.small-grid {
    grid-template-columns: 1fr;
  }

  .video-thumb {
    aspect-ratio: 16 / 9;
  }

  .episode-list a {
    flex-basis: 100%;
  }

  .keyword-list a,
  .friend-links a {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}