* {
  box-sizing: border-box;
}

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #1e3a8a;
  --brand-light: #2563eb;
  --brand-deep: #172554;
  --accent: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.container-custom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(18px);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  gap: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand-deep), var(--brand-light));
  border-radius: 11px;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.logo-text {
  font-size: 20px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #334155;
  font-weight: 600;
}

.desktop-nav a,
.mobile-panel a {
  transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
  color: var(--brand);
}

.header-search {
  position: relative;
  width: 270px;
}

.header-search input,
.filter-input,
.filter-select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  padding: 10px 14px 10px 42px;
}

.header-search input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: var(--brand-light);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  color: #94a3b8;
  transform: translateY(-50%);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--brand);
  background: #eff6ff;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel-inner {
  display: grid;
  gap: 10px;
  padding: 14px 0 18px;
}

.mobile-panel a {
  padding: 12px 14px;
  border-radius: 12px;
  color: #334155;
  background: #f8fafc;
  font-weight: 600;
}

.mobile-panel .header-search {
  width: 100%;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  color: #ffffff;
  background: linear-gradient(135deg, #172554, #1d4ed8 58%, #2563eb);
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle at 18% 20%, rgba(245, 158, 11, 0.26), transparent 30%), radial-gradient(circle at 78% 18%, rgba(56, 189, 248, 0.25), transparent 36%);
  pointer-events: none;
}

.hero-track {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  transform: scale(1.02);
  background-position: center;
  background-size: cover;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(30, 58, 138, 0.7) 46%, rgba(15, 23, 42, 0.45));
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 380px;
  align-items: center;
  gap: 46px;
  padding: 92px 0 78px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 14px;
  margin-bottom: 18px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.hero h1,
.hero h2 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-lead {
  max-width: 720px;
  margin: 0 0 28px;
  color: #dbeafe;
  font-size: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: var(--brand-deep);
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(255, 255, 255, 0.18);
}

.btn-primary:hover {
  color: #0f172a;
  box-shadow: 0 18px 44px rgba(255, 255, 255, 0.28);
}

.btn-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #bfdbfe;
}

.hero-tags a,
.hero-tags span {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.22);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.5);
}

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

.hero-poster-badge {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 9px 13px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  font-weight: 800;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 36px;
  background: #ffffff;
}

.main-section {
  padding: 54px 0;
}

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

.section-title {
  margin: 0;
  color: var(--text);
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.2;
  font-weight: 900;
}

.section-subtitle {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
}

.more-link {
  color: var(--brand);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.video-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.video-card:hover {
  transform: translateY(-5px);
  border-color: #bfdbfe;
  box-shadow: var(--shadow);
}

.card-media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
}

.card-media img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video-card:hover .card-media img {
  transform: scale(1.06);
}

.card-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 45%, rgba(15, 23, 42, 0.78));
  opacity: 0.9;
}

.card-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.92);
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.3);
}

.card-chip {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 5px 9px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.7);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 15px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 9px;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.48;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.badge-region,
.badge-year,
.badge-type,
.badge-genre {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.badge-region {
  color: #1e3a8a;
  background: #dbeafe;
}

.badge-year {
  color: #92400e;
  background: #fef3c7;
}

.badge-type {
  color: #166534;
  background: #dcfce7;
}

.badge-genre {
  color: #6d28d9;
  background: #ede9fe;
}

.card-desc {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  padding: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand-deep), var(--brand-light));
  border-radius: 22px;
  box-shadow: 0 18px 38px rgba(30, 58, 138, 0.18);
}

.category-card::after {
  position: absolute;
  right: -28px;
  bottom: -38px;
  width: 132px;
  height: 132px;
  content: "";
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.category-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #dbeafe;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 84px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.rank-no {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), #ef4444);
  border-radius: 12px;
  font-weight: 900;
}

.rank-thumb {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  background: #dbeafe;
}

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

.rank-title {
  margin: 0 0 5px;
  font-size: 17px;
  font-weight: 900;
}

.rank-desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.rank-action {
  color: var(--brand);
  font-weight: 900;
}

.page-hero {
  padding: 68px 0;
  color: #ffffff;
  background: linear-gradient(135deg, #172554, #1d4ed8);
}

.page-hero h1 {
  max-width: 860px;
  margin: 0 0 12px;
  font-size: clamp(34px, 4vw, 50px);
  line-height: 1.15;
  font-weight: 900;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px 180px;
  gap: 12px;
  padding: 18px;
  margin: -30px auto 34px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.filter-input,
.filter-select {
  height: 46px;
  padding: 0 14px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--brand);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.player-panel {
  overflow: hidden;
  background: #020617;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.35);
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.62));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.94);
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  box-shadow: 0 18px 48px rgba(37, 99, 235, 0.45);
}

.player-title {
  padding: 18px 22px 22px;
  color: #ffffff;
}

.player-title h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.25;
  font-weight: 900;
}

.player-title p {
  margin: 0;
  color: #cbd5e1;
}

.detail-card,
.content-card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.detail-card img {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
}

.detail-meta {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.meta-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.meta-line strong {
  color: var(--text);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.tag-list span,
.tag-list a {
  padding: 6px 10px;
  color: #1e3a8a;
  background: #dbeafe;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.content-card h2 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 25px;
  font-weight: 900;
}

.content-card p {
  margin: 0 0 15px;
  color: #334155;
}

.related-section {
  margin-top: 34px;
}

.site-footer {
  margin-top: 60px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 28px;
  padding: 44px 0;
}

.footer-grid h3,
.footer-grid h4 {
  margin: 0 0 12px;
  color: #ffffff;
}

.footer-grid p,
.footer-grid a {
  margin: 0;
  color: #94a3b8;
  font-size: 14px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid #1e293b;
  color: #94a3b8;
  font-size: 14px;
}

.empty-state {
  display: none;
  padding: 30px;
  color: var(--muted);
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
}

body.has-no-results .empty-state {
  display: block;
}

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

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

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

@media (max-width: 860px) {
  .desktop-nav,
  .nav-bar > .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero,
  .hero-track {
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 74px 0 82px;
  }

  .hero-poster {
    width: min(260px, 70vw);
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

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

  .detail-card {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 18px;
  }

  .detail-card img {
    margin: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .container-custom {
    width: min(100% - 24px, 1180px);
  }

  .logo-text {
    font-size: 18px;
  }

  .hero h1,
  .hero h2 {
    font-size: 38px;
  }

  .hero-lead {
    font-size: 17px;
  }

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

  .category-strip {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 42px 64px minmax(0, 1fr);
  }

  .rank-action {
    display: none;
  }

  .detail-card {
    display: block;
  }

  .detail-card img {
    max-width: 220px;
    margin: 0 auto;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
