* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #171717;
  background: #f5f7fb;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #dc2626);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(2, 132, 199, 0.25);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.16;
}

.brand-text strong {
  font-size: 20px;
  color: #0f172a;
}

.brand-text small {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link,
.mobile-link {
  padding: 10px 15px;
  color: #475569;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #0369a1;
  background: #e0f2fe;
}

.header-search {
  display: flex;
  align-items: center;
  width: min(360px, 34vw);
  padding: 4px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-width: 0;
  color: #0f172a;
  background: transparent;
  border: 0;
  outline: 0;
  font: inherit;
}

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

.header-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.filter-panel button {
  cursor: pointer;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  transition: 0.2s ease;
}

.header-search button,
.mobile-search button,
.primary-button,
.filter-panel button {
  color: #ffffff;
  background: #0284c7;
  box-shadow: 0 12px 24px rgba(2, 132, 199, 0.2);
}

.header-search button {
  padding: 8px 13px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
}

.secondary-button {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.82);
}

.header-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.filter-panel button:hover {
  background: #0369a1;
  transform: translateY(-1px);
}

.secondary-button:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  cursor: pointer;
  color: #0f172a;
  background: #f1f5f9;
  border: 0;
  border-radius: 12px;
  font-size: 22px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid #e2e8f0;
}

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

.mobile-panel nav,
.mobile-search {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 14px 0 8px;
}

.mobile-search {
  display: flex;
  gap: 8px;
  padding: 0 0 16px;
}

.mobile-search input {
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.mobile-search button {
  padding: 0 16px;
}

.hero {
  position: relative;
  height: min(620px, 66vh);
  min-height: 420px;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-slide.active {
  opacity: 1;
}

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

.hero-slide::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.64), rgba(15, 23, 42, 0.08));
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(640px, 100%);
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 620px;
  margin: 0 0 24px;
  color: #e2e8f0;
  font-size: clamp(16px, 2vw, 20px);
}

.hero-meta,
.detail-meta,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hero-meta {
  margin-bottom: 24px;
}

.hero-meta span,
.detail-meta span,
.meta-row span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hero-meta span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.hero-meta span:first-child {
  background: #0284c7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  cursor: pointer;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.45);
  border: 0;
  border-radius: 999px;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
}

.hero-control:hover {
  background: rgba(15, 23, 42, 0.76);
}

.hero-control.prev {
  left: 18px;
}

.hero-control.next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  bottom: 22px;
  left: 50%;
  z-index: 4;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dots button {
  width: 10px;
  height: 10px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.58);
  border: 0;
  border-radius: 999px;
  transition: 0.2s ease;
}

.hero-dots button.active {
  width: 34px;
  background: #ffffff;
}

main {
  min-height: 70vh;
}

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

.section-block.compact {
  padding: 34px 0;
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.15;
}

.section-heading p {
  max-width: 700px;
  margin: 8px 0 0;
  color: #64748b;
}

.section-heading a {
  color: #0284c7;
  font-weight: 800;
  white-space: nowrap;
}

.rail {
  display: flex;
  gap: 18px;
  margin: 0 -16px;
  padding: 0 16px 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}

.carousel-card {
  flex: 0 0 210px;
  scroll-snap-align: start;
}

.carousel-card a,
.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: #dbeafe;
  border-radius: 18px;
}

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

.carousel-card:hover img,
.movie-card:hover img {
  transform: scale(1.06);
}

.carousel-shade,
.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.05) 58%);
}

.carousel-card strong,
.carousel-card small,
.poster-score,
.rank-mark {
  position: absolute;
  z-index: 2;
}

.carousel-card strong {
  right: 14px;
  bottom: 32px;
  left: 14px;
  color: #ffffff;
  font-size: 16px;
}

.carousel-card small {
  right: 14px;
  bottom: 12px;
  left: 14px;
  color: #e2e8f0;
}

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

.movie-card {
  min-width: 0;
}

.poster-score {
  right: 10px;
  bottom: 10px;
  padding: 4px 9px;
  color: #ffffff;
  background: rgba(2, 132, 199, 0.9);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.rank-mark {
  top: 10px;
  left: 10px;
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #dc2626, #f59e0b);
  border-radius: 12px;
  font-size: 14px;
}

.movie-info h2 {
  display: -webkit-box;
  margin: 12px 0 5px;
  overflow: hidden;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-info h2 a:hover {
  color: #0284c7;
}

.movie-info p {
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.meta-row {
  gap: 6px;
}

.meta-row span {
  color: #475569;
  background: #e2e8f0;
}

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

.category-card {
  min-height: 170px;
  padding: 22px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  transition: 0.2s ease;
}

.category-card:hover {
  border-color: #bae6fd;
  box-shadow: 0 22px 48px rgba(2, 132, 199, 0.12);
  transform: translateY(-2px);
}

.category-card strong {
  display: block;
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 20px;
}

.category-card p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.page-hero {
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.42), transparent 32%),
    linear-gradient(135deg, #0f172a, #1e293b 52%, #082f49);
}

.page-hero .section-heading h1,
.page-hero .section-heading p {
  color: #ffffff;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 180px 150px auto;
  gap: 12px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select {
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.filter-panel button {
  padding: 0 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: #0284c7;
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

.player-card,
.detail-panel,
.side-panel,
.text-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.08);
}

.player-card {
  overflow: hidden;
}

.player-wrap {
  position: relative;
  background: #020617;
}

.player-wrap video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(2, 6, 23, 0.72));
}

.player-layer.is-hidden {
  display: none;
}

.play-button {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #dc2626);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 18px 50px rgba(2, 132, 199, 0.35);
  font-size: 32px;
}

.player-caption,
.detail-panel,
.side-panel,
.text-panel {
  padding: 24px;
}

.player-caption h1,
.detail-panel h2,
.side-panel h2,
.text-panel h2 {
  margin: 0 0 12px;
  color: #0f172a;
  line-height: 1.25;
}

.player-caption h1 {
  font-size: clamp(28px, 4vw, 44px);
}

.player-caption p,
.detail-panel p,
.side-panel p,
.text-panel p {
  color: #475569;
}

.detail-meta span,
.tag-list span {
  color: #0369a1;
  background: #e0f2fe;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

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

.side-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  align-items: center;
}

.side-item img {
  width: 80px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.side-item strong {
  display: block;
  color: #0f172a;
  line-height: 1.35;
}

.side-item small {
  color: #64748b;
}

.text-panel {
  margin-top: 24px;
}

.ranking-list {
  display: grid;
  gap: 16px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 64px 90px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
}

.ranking-row b {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #ffffff;
  background: #0284c7;
  border-radius: 14px;
}

.ranking-row img {
  width: 90px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.ranking-row h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.ranking-row p {
  margin: 0;
  color: #64748b;
}

.ranking-row .primary-button {
  min-height: 38px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  padding: 48px 0;
}

.footer-brand .brand-text strong {
  color: #ffffff;
}

.footer-brand .brand-text small,
.footer-grid p {
  color: #94a3b8;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 17px;
}

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

.footer-links a:hover {
  color: #7dd3fc;
}

.footer-bottom {
  padding: 18px;
  text-align: center;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.is-hidden-by-filter {
  display: none !important;
}

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

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

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

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

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

  .hero {
    height: 560px;
  }

  .hero-control {
    display: none;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

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

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

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

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

  .ranking-row {
    grid-template-columns: 46px 76px 1fr;
  }

  .ranking-row .primary-button {
    grid-column: 2 / -1;
  }
}

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

  .brand-text small {
    display: none;
  }

  .hero {
    height: 520px;
    min-height: 520px;
  }

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

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

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

  .carousel-card {
    flex-basis: 168px;
  }

  .player-caption,
  .detail-panel,
  .side-panel,
  .text-panel {
    padding: 18px;
  }
}
