:root {
  --cyan: #06b6d4;
  --blue: #2563eb;
  --deep: #0f172a;
  --muted: #64748b;
  --card: #ffffff;
  --soft: #f8fafc;
  --ring: rgba(6, 182, 212, 0.22);
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: #111827;
  background: linear-gradient(180deg, #f8fafc 0%, #eef8ff 48%, #ffffff 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.22);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-icon {
  font-size: 30px;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.18));
}

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

.inline-brand .brand-text {
  color: #fff;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 1;
}

.nav-link,
.nav-dropdown button {
  border: 0;
  color: rgba(255, 255, 255, 0.92);
  background: transparent;
  font: inherit;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-dropdown button:hover,
.nav-link.active {
  color: #ecfeff;
  transform: translateY(-1px);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 14px);
  left: -18px;
  width: 210px;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  color: #0f172a;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #334155;
}

.dropdown-panel a:hover {
  color: var(--blue);
  background: #ecfeff;
}

.header-search {
  display: flex;
  align-items: center;
  width: 290px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  padding: 4px;
  backdrop-filter: blur(12px);
}

.header-search input,
.inline-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
}

.header-search input {
  padding: 8px 12px;
  color: #fff;
}

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

.header-search button,
.inline-search button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  color: #0f172a;
  background: #fff;
  font-weight: 700;
  padding: 8px 16px;
}

.menu-button {
  display: none;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  width: 42px;
  height: 42px;
  font-size: 22px;
}

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

.mobile-nav.open {
  display: grid;
  gap: 10px;
}

.mobile-nav a {
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
}

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

.hero-section {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #0f172a;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(34, 211, 238, 0.34), transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.42), transparent 28%),
    linear-gradient(135deg, #0f172a 0%, #155e75 48%, #1d4ed8 100%);
}

.hero-shell {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  padding: 42px 0 52px;
}

.hero-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.hero-topline span,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 8px 14px;
  color: #cffafe;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  font-size: 14px;
  font-weight: 700;
}

.hero-topline a {
  color: #e0f2fe;
  font-weight: 700;
}

.hero-carousel {
  position: relative;
  min-height: 468px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
  gap: 44px;
  align-items: center;
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}

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

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

.hero-copy p {
  max-width: 720px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.9;
}

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

.hero-tags {
  margin: 22px 0 28px;
}

.hero-tags span,
.tag-row span {
  border-radius: 999px;
  padding: 6px 10px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 700;
}

.hero-actions,
.detail-info .primary-btn {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-btn,
.secondary-btn,
.watch-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(90deg, #f97316, #ef4444);
  box-shadow: 0 14px 30px rgba(239, 68, 68, 0.32);
}

.secondary-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.primary-btn:hover,
.secondary-btn:hover,
.watch-link:hover {
  transform: translateY(-2px);
}

.hero-visual {
  position: relative;
  display: block;
  border-radius: 34px;
  isolation: isolate;
}

.hero-visual img {
  aspect-ratio: 4 / 5;
  height: min(500px, 62vw);
  border-radius: 34px;
  object-fit: cover;
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.38);
}

.hero-glow {
  position: absolute;
  inset: auto 8% -22px;
  z-index: -1;
  height: 90px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.34);
  filter: blur(30px);
}

.hero-dots {
  position: absolute;
  bottom: 2px;
  left: 0;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.28);
}

.hero-dot.active {
  background: #fff;
}

.hero-category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-category-strip a {
  border-radius: 16px;
  padding: 12px 16px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

main {
  width: 100%;
}

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

.content-section {
  padding: 64px 0;
}

.no-pad-top {
  padding-top: 24px;
}

.tinted-section {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100% - 1180px) / 2));
  padding-right: max(16px, calc((100% - 1180px) / 2));
  background: linear-gradient(180deg, #ecfeff, #f8fafc);
}

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

.section-title h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
}

.section-title h2::after {
  content: "";
  display: block;
  width: 76px;
  height: 4px;
  border-radius: 999px;
  margin-top: 12px;
  background: linear-gradient(90deg, #f97316, #ef4444);
}

.section-title p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-title > a,
.category-heading > a {
  color: var(--blue);
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.09);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  display: block;
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.poster-frame img,
.rank-thumb img,
.detail-poster img,
.category-covers img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-frame img {
  transform: scale(1.08);
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.compact .card-body {
  padding: 13px;
}

.card-meta,
.rank-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.card-meta {
  justify-content: space-between;
}

.card-body h3 {
  margin: 10px 0 8px;
  font-size: 17px;
  line-height: 1.45;
}

.compact .card-body h3 {
  font-size: 15px;
}

.card-body h3 a:hover,
.rank-info h2 a:hover {
  color: var(--blue);
}

.card-body p {
  margin: 0 0 12px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
}

.compact .card-body p {
  display: none;
}

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

.category-card {
  overflow: hidden;
  border-radius: 24px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: 0.25s ease;
}

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

.category-covers {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  grid-template-rows: repeat(2, 80px);
  gap: 8px;
  margin-bottom: 14px;
}

.category-covers img {
  border-radius: 14px;
  background: #dbeafe;
}

.category-covers img:first-child {
  grid-row: span 2;
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

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

.page-main {
  padding: 34px 0 72px;
}

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

.breadcrumb a {
  color: var(--blue);
  font-weight: 700;
}

.page-hero {
  overflow: hidden;
  border-radius: 32px;
  margin-bottom: 28px;
  padding: 48px;
  color: #fff;
  background:
    radial-gradient(circle at right top, rgba(125, 211, 252, 0.42), transparent 32%),
    linear-gradient(135deg, #0f172a, #0e7490 52%, #2563eb);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #dbeafe;
  line-height: 1.9;
  font-size: 17px;
}

.filter-panel {
  border-radius: 26px;
  padding: 20px;
  margin-bottom: 28px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.inline-search {
  display: flex;
  gap: 10px;
  border-radius: 18px;
  padding: 8px;
  background: #f1f5f9;
}

.inline-search input {
  padding: 10px 12px;
  color: #0f172a;
}

.inline-search button {
  color: #fff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.filter-groups {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.filter-groups div {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: start;
  gap: 12px;
}

.filter-groups strong {
  padding-top: 6px;
  color: #0f172a;
}

.filter-groups span {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-groups button {
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  color: #475569;
  background: #eef6ff;
}

.filter-groups button.active,
.filter-groups button:hover {
  color: #fff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.empty-state {
  display: none;
  text-align: center;
  border-radius: 18px;
  padding: 30px;
  color: #64748b;
  background: #fff;
}

.empty-state.show {
  display: block;
}

.category-overview-block {
  margin-bottom: 42px;
}

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

.category-heading h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.category-heading p {
  margin: 0;
  color: var(--muted);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
}

.rank-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 900;
}

.rank-thumb {
  overflow: hidden;
  height: 128px;
  border-radius: 16px;
  background: #dbeafe;
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 21px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.7;
}

.watch-link {
  color: #fff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.detail-main {
  width: min(1120px, calc(100% - 32px));
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  border-radius: 34px;
  padding: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 80% 10%, rgba(34, 211, 238, 0.38), transparent 26%),
    linear-gradient(135deg, #0f172a, #155e75 48%, #2563eb);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  aspect-ratio: 3 / 4;
  background: #dbeafe;
  box-shadow: 0 26px 50px rgba(0, 0, 0, 0.28);
}

.detail-info h1 {
  margin: 20px 0 14px;
  font-size: clamp(32px, 5vw, 54px);
}

.detail-one {
  max-width: 760px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.9;
}

.detail-meta {
  margin: 18px 0;
  color: #e0f2fe;
}

.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.13);
}

.detail-tags {
  margin-bottom: 22px;
}

.player-section {
  padding: 42px 0 18px;
}

.slim-title {
  margin-bottom: 18px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

.player-box video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.36), rgba(2, 6, 23, 0.76));
}

.player-cover.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.big-play {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-size: 34px;
  box-shadow: 0 18px 38px rgba(239, 68, 68, 0.34);
}

.player-cover strong {
  font-size: clamp(22px, 4vw, 36px);
}

.player-cover em {
  font-style: normal;
  color: #cffafe;
  font-weight: 700;
}

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

.content-card h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.content-card h2 + p {
  margin-top: 0;
}

.content-card p {
  color: #475569;
  line-height: 2;
  font-size: 16px;
}

.related-section {
  width: 100%;
}

.site-footer {
  color: #fff;
  background: linear-gradient(180deg, #1f2937, #0f172a);
}

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

.footer-brand p,
.footer-bottom {
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-links h3 {
  margin: 0 0 8px;
}

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #67e8f9;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px 0 24px;
  font-size: 14px;
}

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

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 26px;
  }

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

  .hero-visual img {
    height: 420px;
  }

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

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

  .detail-hero {
    grid-template-columns: 240px 1fr;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: 62px;
  }

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

  .hero-shell {
    min-height: 720px;
    padding-top: 28px;
  }

  .hero-topline {
    align-items: start;
    flex-direction: column;
  }

  .hero-copy p,
  .page-hero p,
  .detail-one {
    font-size: 15px;
  }

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

  .hero-visual img {
    height: 320px;
    border-radius: 24px;
  }

  .hero-dots {
    bottom: -8px;
  }

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

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

  .card-body {
    padding: 12px;
  }

  .card-body p,
  .tag-row {
    display: none;
  }

  .page-hero {
    padding: 30px 22px;
    border-radius: 24px;
  }

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

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

  .rank-thumb {
    height: 96px;
  }

  .watch-link {
    grid-column: 2 / 4;
  }

  .rank-info p,
  .rank-meta,
  .rank-info .tag-row {
    display: none;
  }

  .detail-hero {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .detail-poster {
    max-width: 270px;
  }

  .content-card {
    padding: 22px;
  }

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

@media (max-width: 430px) {
  .movie-grid,
  .hot-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

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

  .inline-search {
    flex-direction: column;
  }

  .inline-search button {
    width: 100%;
  }
}
