* {
  box-sizing: border-box;
}

:root {
  --blue-950: #172554;
  --blue-900: #1e3a8a;
  --blue-800: #1e40af;
  --blue-700: #1d4ed8;
  --sky-500: #0ea5e9;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --amber: #f59e0b;
  --orange: #ea580c;
  --green: #059669;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 70px rgba(15, 23, 42, 0.18);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--slate-50);
  color: var(--slate-900);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.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(--slate-200);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 72px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--slate-900);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: var(--blue-900);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(30, 58, 138, 0.26);
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.nav-link {
  color: var(--slate-700);
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue-900);
}

.header-search {
  display: flex;
  align-items: center;
  width: 330px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  overflow: hidden;
  background: var(--white);
}

.header-search input,
.mobile-search input,
.hero-search input,
.page-search-form input,
.filter-panel input,
.filter-panel select,
.search-tools select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--slate-900);
  background: var(--white);
}

.header-search input {
  padding: 10px 12px 10px 18px;
}

.header-search button,
.hero-search button,
.mobile-search button,
.page-search-form button {
  flex-shrink: 0;
  border: 0;
  padding: 10px 16px;
  background: var(--blue-900);
  color: var(--white);
  font-weight: 700;
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--slate-800);
  font-size: 28px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--slate-200);
  background: var(--white);
}

.mobile-nav.open {
  display: block;
}

.mobile-nav-inner {
  display: grid;
  gap: 10px;
  padding: 16px 0;
}

.mobile-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--slate-700);
  font-weight: 650;
}

.mobile-link.active,
.mobile-link:hover {
  color: var(--blue-900);
  background: var(--slate-100);
}

.mobile-search {
  display: flex;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  overflow: hidden;
}

.mobile-search input {
  padding: 12px;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: var(--blue-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 410px);
  gap: 52px;
  align-items: center;
  padding: 72px max(32px, calc((100vw - 1180px) / 2)) 82px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.5s ease, transform 0.5s ease;
  color: var(--white);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 58, 138, 0.82), rgba(14, 165, 233, 0.36)), var(--hero-bg);
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 76% 16%, rgba(14, 165, 233, 0.32), transparent 30%), linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.42));
}

.hero-copy,
.hero-poster {
  position: relative;
  z-index: 2;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--blue-800);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow.light,
.hero-kicker {
  color: #bfdbfe;
}

.hero-copy h1 {
  margin: 0 0 22px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 710px;
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: 19px;
}

.hero-tags,
.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-tags a {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
}

.tag-row span {
  background: var(--slate-100);
  color: var(--slate-600);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.btn-primary,
.btn-ghost,
.btn-light,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  padding: 13px 24px;
  background: var(--white);
  color: var(--blue-900);
  box-shadow: 0 18px 35px rgba(255, 255, 255, 0.18);
}

.btn-ghost {
  padding: 12px 22px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: var(--white);
}

.btn-light {
  padding: 12px 22px;
  background: var(--white);
  color: var(--blue-900);
}

.btn-primary:hover,
.btn-ghost:hover,
.btn-light:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-poster {
  display: block;
  padding: 12px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
}

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

.hero-prev,
.hero-next,
.hero-dot {
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 30px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border-radius: 999px;
}

.hero-dot.active {
  width: 34px;
  background: var(--white);
}

.quick-search {
  margin-top: -36px;
  position: relative;
  z-index: 8;
}

.quick-search-inner {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 28px;
  align-items: center;
  padding: 28px;
  border-radius: 28px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.quick-search h2,
.section-heading h2,
.ranking-copy h2,
.article-panel h2,
.side-panel h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(26px, 3.5vw, 38px);
  line-height: 1.15;
}

.hero-search,
.page-search-form {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  background: var(--white);
}

.hero-search input,
.page-search-form input {
  padding: 15px 18px;
}

.content-section,
.page-content {
  padding: 60px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-more {
  padding: 10px 16px;
  color: var(--blue-900);
  background: #dbeafe;
}

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

.category-tile {
  position: relative;
  min-height: 198px;
  overflow: hidden;
  display: flex;
  align-items: end;
  border-radius: 22px;
  background: var(--slate-900);
  box-shadow: var(--shadow-sm);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.54;
  transition: transform 0.4s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile span {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 20px;
  color: var(--white);
}

.category-tile strong {
  font-size: 22px;
}

.category-tile small {
  color: #dbeafe;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--slate-200);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--slate-200);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.06);
}

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 46%, rgba(2, 6, 23, 0.78));
}

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--white);
  color: var(--blue-900);
  font-size: 13px;
  font-weight: 850;
}

.rank-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  min-width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: var(--orange);
  color: var(--white);
  font-weight: 900;
  box-shadow: 0 12px 25px rgba(234, 88, 12, 0.34);
}

.card-body {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--slate-500);
  font-size: 13px;
  font-weight: 700;
}

.card-meta a {
  color: var(--blue-800);
}

.card-body h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.28;
}

.card-body h3 a:hover {
  color: var(--blue-900);
}

.card-body p {
  min-height: 50px;
  margin: 0;
  color: var(--slate-600);
  font-size: 14px;
}

.ranking-panel {
  margin: 30px 0;
  padding: 70px 0;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-950), var(--blue-800) 58%, var(--sky-500));
}

.ranking-layout {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 40px;
  align-items: center;
}

.ranking-copy h2,
.ranking-copy p {
  color: var(--white);
}

.ranking-copy p {
  max-width: 560px;
  margin: 18px 0 26px;
  color: #dbeafe;
  font-size: 18px;
}

.ranking-list,
.mini-list {
  display: grid;
  gap: 12px;
}

.mini-card {
  display: grid;
  grid-template-columns: auto 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--slate-900);
  box-shadow: var(--shadow-sm);
}

.mini-card img {
  width: 58px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
}

.mini-card span {
  display: grid;
  gap: 4px;
}

.mini-card small {
  color: var(--slate-500);
}

.mini-rank {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: #dbeafe;
  color: var(--blue-900);
  font-weight: 900;
}

.page-hero {
  color: var(--white);
  padding: 72px 0;
}

.blue-hero {
  background: linear-gradient(135deg, var(--blue-950), var(--blue-700));
}

.slate-hero {
  background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
}

.orange-hero {
  background: linear-gradient(135deg, #9a3412, var(--orange));
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #e0f2fe;
  font-size: 19px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: #bfdbfe;
  font-weight: 700;
}

.breadcrumb a:hover {
  color: var(--white);
}

.category-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding: 60px 0;
}

.category-overview-card {
  padding: 20px;
  border: 1px solid var(--slate-200);
  border-radius: 28px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.category-overview-head {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.category-overview-head img {
  width: 150px;
  height: 210px;
  object-fit: cover;
  border-radius: 18px;
}

.category-overview-head h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.category-overview-head p {
  margin: 0 0 16px;
  color: var(--slate-600);
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.3fr repeat(4, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 30px;
  padding: 18px;
  border: 1px solid var(--slate-200);
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.filter-panel label,
.search-tools label {
  display: grid;
  gap: 6px;
  color: var(--slate-600);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select,
.search-tools select {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
}

.filter-panel button {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--slate-100);
  color: var(--slate-700);
  font-weight: 800;
}

.empty-state {
  padding: 46px 20px;
  border-radius: 24px;
  background: var(--white);
  color: var(--slate-600);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.search-tools {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}

.search-tools label {
  min-width: 220px;
}

.page-search-form {
  max-width: 680px;
  margin-top: 28px;
}

.detail-hero {
  padding: 34px 0 56px;
  background: linear-gradient(180deg, var(--white), var(--slate-50));
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(290px, 0.9fr);
  gap: 30px;
  align-items: start;
}

.player-card,
.detail-info,
.article-panel,
.side-panel {
  border: 1px solid var(--slate-200);
  border-radius: 28px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.player-card {
  padding: 14px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: var(--slate-950);
  aspect-ratio: 16 / 9;
}

.video-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--slate-950);
}

.video-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: var(--slate-950);
}

.video-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
}

.video-play-icon {
  position: relative;
  z-index: 2;
  width: 82px;
  height: 82px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--blue-900);
  font-size: 30px;
  box-shadow: var(--shadow-lg);
}

.video-shell.playing .video-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-info {
  padding: 28px;
}

.detail-info h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
}

.detail-one-line {
  margin: 0 0 24px;
  color: var(--slate-600);
  font-size: 17px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 20px;
}

.detail-meta div {
  padding: 12px;
  border-radius: 16px;
  background: var(--slate-100);
}

.detail-meta dt {
  color: var(--slate-500);
  font-size: 12px;
  font-weight: 800;
}

.detail-meta dd {
  margin: 4px 0 0;
  color: var(--slate-900);
  font-weight: 800;
}

.detail-tags a {
  background: #dbeafe;
  color: var(--blue-900);
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 26px;
  padding: 46px 0;
}

.article-panel,
.side-panel {
  padding: 30px;
}

.article-panel p {
  margin: 16px 0 28px;
  color: var(--slate-700);
  font-size: 17px;
}

.side-panel .mini-card {
  border: 1px solid var(--slate-200);
  box-shadow: none;
}

.related-section {
  padding: 56px 0;
  background: var(--slate-100);
}

.site-footer {
  padding-top: 44px;
  background: var(--slate-900);
  color: #cbd5e1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
  padding-bottom: 34px;
}

.footer-brand {
  color: var(--white);
  font-size: 22px;
}

.site-footer p {
  max-width: 620px;
  margin: 12px 0 0;
  color: #94a3b8;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 12px 22px;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 0;
  text-align: center;
  color: #94a3b8;
}

@media (max-width: 1100px) {
  .header-search {
    width: 260px;
  }

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

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

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

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

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

  .menu-toggle {
    display: inline-grid;
    margin-left: auto;
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 44px 22px 88px;
  }

  .hero-copy p {
    font-size: 16px;
  }

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

  .quick-search-inner,
  .category-overview-grid,
  .footer-grid,
  .category-overview-head {
    grid-template-columns: 1fr;
  }

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

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

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

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

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

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

  .hero-actions,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-search,
  .page-search-form {
    border-radius: 18px;
    flex-direction: column;
  }

  .category-grid,
  .movie-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .detail-info,
  .article-panel,
  .side-panel {
    padding: 22px;
  }

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

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