:root {
  --bg: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --soft: #e2e8f0;
  --panel: #ffffff;
  --panel-dark: #111827;
  --sky: #0284c7;
  --sky-light: #38bdf8;
  --sky-deep: #0369a1;
  --amber: #f59e0b;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, 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,
video {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
  color: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2);
}

.site-header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark,
.footer-logo span {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--sky-light), var(--sky-deep));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(14, 165, 233, 0.35);
}

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

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.04em;
}

.brand-text small {
  margin-top: 4px;
  color: #bae6fd;
  font-size: 12px;
}

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

.nav-link {
  padding: 10px 16px;
  border-radius: 12px;
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: var(--sky);
  color: #fff;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 8px 0 18px;
}

.mobile-category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.mobile-category-link {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #dbeafe;
  font-size: 13px;
}

.hero {
  position: relative;
  height: min(76vh, 720px);
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.2s ease;
  pointer-events: none;
}

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 30%, rgba(14, 165, 233, 0.22), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(15, 23, 42, 0.72) 45%, rgba(15, 23, 42, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent 42%);
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #fff;
}

.eyebrow,
.section-heading span,
.page-hero-content span,
.ranking-copy span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--sky-light);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  width: min(760px, 100%);
  margin: 16px 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-content p {
  width: min(680px, 100%);
  margin: 0 0 30px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-actions,
.page-hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.primary-btn,
.ghost-btn,
.ghost-dark-btn,
.home-search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 0;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.home-search-form button {
  background: linear-gradient(135deg, var(--sky-light), var(--sky));
  color: #fff;
  box-shadow: 0 16px 32px rgba(2, 132, 199, 0.32);
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.ghost-dark-btn {
  color: #0f172a;
  background: #fff;
}

.primary-btn:hover,
.ghost-btn:hover,
.ghost-dark-btn:hover,
.home-search-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(2, 132, 199, 0.3);
}

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

.hero-tags {
  margin-top: 28px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: #e0f2fe;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 36px;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dots button {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dots button.active {
  background: #fff;
}

.home-search-panel,
.filter-panel {
  width: min(1180px, calc(100% - 32px));
  margin: -44px auto 54px;
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 540px);
  gap: 24px;
  align-items: center;
  padding: 26px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.home-search-panel h2 {
  margin: 0 0 6px;
  font-size: 28px;
}

.home-search-panel p {
  margin: 0;
  color: var(--muted);
}

.home-search-form {
  display: flex;
  gap: 12px;
}

.home-search-form input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 0 16px;
  outline: none;
  background: #f8fafc;
  color: var(--text);
}

.home-search-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.section-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 70px;
}

.no-top-gap {
  padding-top: 0;
}

.soft-section {
  padding-top: 70px;
}

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

.section-heading h2,
.ranking-copy h2,
.page-hero-content h1 {
  margin: 4px 0 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-heading a {
  color: var(--sky);
  font-weight: 900;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.category-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.09);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover,
.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 150px;
  background: #e2e8f0;
}

.category-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card-body {
  padding: 22px;
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-card p {
  min-height: 54px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.category-card span {
  color: var(--sky);
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-cover {
  position: relative;
  display: block;
  height: 310px;
  overflow: hidden;
  background: #dbeafe;
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.cover-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.1));
  opacity: 0;
  transition: opacity 0.22s ease;
}

.cover-mask strong {
  padding: 9px 16px;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
}

.movie-card:hover .cover-mask {
  opacity: 1;
}

.movie-card-body {
  padding: 18px;
}

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

.movie-meta-line span {
  color: var(--sky);
  font-size: 12px;
  font-weight: 900;
}

.movie-card h2 {
  margin: 0 0 9px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h2 a:hover {
  color: var(--sky);
}

.movie-card p {
  min-height: 68px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.compact-card {
  display: grid;
  grid-template-columns: 150px 1fr;
}

.compact-card .movie-cover {
  height: 100%;
  min-height: 210px;
}

.compact-card .movie-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber), #ef4444);
  color: #fff;
  font-style: normal;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.25);
}

.ranking-band {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 70px;
  display: grid;
  grid-template-columns: 0.85fr 1.35fr;
  gap: 26px;
  align-items: start;
  padding: 34px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 22% 18%, rgba(56, 189, 248, 0.26), transparent 34%),
    linear-gradient(135deg, #0f172a, #1e293b 58%, #0f172a);
  color: #fff;
  box-shadow: var(--shadow);
}

.ranking-copy {
  position: sticky;
  top: 104px;
}

.ranking-copy p {
  color: #cbd5e1;
  margin: 16px 0 28px;
}

.ranking-list,
.recommend-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.ranking-list .movie-card {
  background: rgba(255, 255, 255, 0.96);
}

.page-main {
  min-height: 60vh;
}

.page-hero {
  min-height: 360px;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 75% 22%, rgba(56, 189, 248, 0.26), transparent 32%),
    linear-gradient(135deg, #0f172a, #1e293b 55%, #020617);
  color: #fff;
}

.category-hero {
  background:
    radial-gradient(circle at 80% 20%, rgba(250, 204, 21, 0.17), transparent 30%),
    linear-gradient(135deg, #0f172a, #075985 65%, #0f172a);
}

.ranking-hero {
  background:
    radial-gradient(circle at 78% 22%, rgba(245, 158, 11, 0.22), transparent 32%),
    linear-gradient(135deg, #111827, #7c2d12 62%, #0f172a);
}

.search-hero {
  background:
    radial-gradient(circle at 78% 22%, rgba(34, 197, 94, 0.18), transparent 32%),
    linear-gradient(135deg, #0f172a, #064e3b 62%, #0f172a);
}

.compact-hero {
  min-height: 320px;
}

.page-hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0;
}

.page-hero-content p {
  width: min(720px, 100%);
  margin: 16px 0 0;
  color: #dbeafe;
  font-size: 18px;
}

.filter-panel {
  grid-template-columns: 1fr 220px 220px;
  margin-top: -38px;
  margin-bottom: 36px;
}

.strong-filter {
  grid-template-columns: 1fr 220px 220px;
}

.detail-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 70px;
}

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

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

.detail-hero {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 34px;
  align-items: stretch;
  padding: 28px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 85% 0%, rgba(14, 165, 233, 0.14), transparent 34%),
    #fff;
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: #dbeafe;
}

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

.detail-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-intro h1 {
  margin: 14px 0 14px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-one-line {
  margin: 0 0 20px;
  color: #334155;
  font-size: 19px;
}

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

.detail-meta div {
  padding: 14px 16px;
  border-radius: 16px;
  background: #f1f5f9;
}

.detail-meta dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.detail-meta dd {
  margin: 4px 0 0;
  font-weight: 900;
}

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #020617;
  object-fit: contain;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.24));
}

.play-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sky-light), var(--sky));
  color: #fff;
  font-size: 34px;
  box-shadow: 0 22px 44px rgba(2, 132, 199, 0.34);
}

.play-cover strong {
  font-size: 20px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 34px;
}

.content-card {
  padding: 28px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 25px;
}

.content-card p {
  margin: 0;
  color: #334155;
  font-size: 16px;
}

.related-section {
  width: 100%;
  padding-bottom: 0;
}

.site-footer {
  margin-top: 40px;
  background: linear-gradient(180deg, #1e293b, #0f172a);
  color: #cbd5e1;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 20px;
}

.footer-brand p {
  max-width: 440px;
  margin: 16px 0 0;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 18px;
}

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

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

.is-filtered-out {
  display: none;
}

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

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

  .ranking-copy {
    position: static;
  }

  .detail-poster img {
    max-height: 620px;
  }
}

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

  .menu-toggle {
    display: flex;
  }

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

  .mobile-nav .nav-link {
    display: block;
    margin: 4px 0;
  }

  .hero {
    height: auto;
    min-height: 640px;
  }

  .hero-content {
    padding: 60px 0 90px;
  }

  .hero-control {
    display: none;
  }

  .home-search-panel,
  .filter-panel,
  .strong-filter {
    grid-template-columns: 1fr;
    margin-top: -28px;
    padding: 20px;
  }

  .home-search-form {
    flex-direction: column;
  }

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

  .movie-grid,
  .category-grid,
  .ranking-list,
  .recommend-grid,
  .detail-content,
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 560px) {
  .site-header-inner {
    height: 64px;
  }

  .brand-text strong {
    font-size: 17px;
  }

  .brand-text small {
    display: none;
  }

  .hero {
    min-height: 600px;
  }

  .hero-content h1 {
    font-size: 42px;
  }

  .hero-actions,
  .page-hero-actions {
    width: 100%;
  }

  .primary-btn,
  .ghost-btn,
  .ghost-dark-btn {
    width: 100%;
  }

  .movie-grid,
  .category-grid,
  .ranking-list,
  .recommend-grid,
  .detail-content,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .compact-card {
    grid-template-columns: 118px 1fr;
  }

  .compact-card .movie-cover {
    min-height: 180px;
  }

  .movie-cover {
    height: 290px;
  }

  .detail-main {
    width: min(100% - 20px, 1180px);
  }

  .detail-hero {
    padding: 16px;
    border-radius: 24px;
  }

  .detail-poster img {
    min-height: 420px;
  }

  .player-box {
    border-radius: 22px;
  }
}
