* {
  box-sizing: border-box;
}

:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #06b6d4;
  --orange: #f97316;
  --red: #ef4444;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --card: #ffffff;
  --dark: #111827;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--soft);
  font-family: -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;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--blue);
  white-space: nowrap;
}

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.24);
}

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

.nav-link,
.mobile-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  color: #374151;
  border-radius: 12px;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: var(--blue);
  background: #eff6ff;
}

.top-search,
.mobile-search,
.search-hero-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.search-hero-form input,
.filter-input,
.filter-select {
  width: 240px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 10px 16px;
  color: #111827;
  background: #ffffff;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.search-hero-form input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.top-search button,
.mobile-search button,
.search-hero-form button,
.primary-button {
  border: 0;
  color: #ffffff;
  background: var(--blue);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.search-hero-form button:hover,
.primary-button:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #374151;
}

.mobile-nav {
  display: none;
  padding: 14px 16px 18px;
  border-top: 1px solid var(--line);
}

.hero-slider {
  position: relative;
  min-height: 570px;
  color: #ffffff;
  overflow: hidden;
  background: linear-gradient(135deg, #1d4ed8, #06b6d4);
}

.hero-backgrounds,
.hero-bg,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-bg {
  opacity: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  transition: opacity 0.6s ease, transform 0.8s ease;
}

.hero-bg.is-active {
  opacity: 0.45;
  transform: scale(1);
}

.hero-shade {
  background:
    radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.26), transparent 32%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.58) 48%, rgba(15, 23, 42, 0.2));
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 48px;
  align-items: center;
  min-height: 570px;
  padding: 64px 0;
}

.hero-copy-wrap {
  position: relative;
  min-height: 360px;
}

.hero-copy {
  position: absolute;
  inset: 0 auto auto 0;
  width: min(760px, 100%);
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-copy.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: #bfdbfe;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.hero-copy h1,
.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.16;
}

.hero-copy p,
.page-hero p {
  max-width: 680px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

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

.hero-tags span,
.detail-meta span,
.tag-row span,
.detail-tags a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.14);
}

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

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  color: #ffffff;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.hero-panel {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.42);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 800;
}

.hero-panel-head a {
  color: #93c5fd;
  font-size: 14px;
}

.hero-thumb {
  display: grid;
  width: 100%;
  grid-template-columns: 68px 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
  padding: 10px;
  color: #ffffff;
  text-align: left;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-thumb:hover,
.hero-thumb.is-active {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.hero-thumb img {
  width: 68px;
  height: 74px;
  object-fit: cover;
  border-radius: 12px;
}

.hero-thumb strong,
.hero-thumb em {
  display: block;
}

.hero-thumb strong {
  overflow: hidden;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hero-thumb em {
  color: #cbd5e1;
  font-style: normal;
  font-size: 13px;
}

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

.slim-section {
  padding-top: 24px;
}

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

.section-head h2 {
  margin: 0 0 6px;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.18;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.section-head a {
  color: var(--blue);
  font-weight: 800;
}

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

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

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

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

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

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  max-width: calc(100% - 24px);
  padding: 5px 10px;
  color: #ffffff;
  background: var(--blue);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.32);
}

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

.movie-meta-line {
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

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

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

.movie-card p {
  display: -webkit-box;
  min-height: 46px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row span {
  color: var(--blue);
  background: #eff6ff;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.ranking-band {
  padding: 56px 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--red));
}

.ranking-band .section-head p,
.ranking-band .section-head a {
  color: rgba(255, 255, 255, 0.86);
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: auto 82px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
}

.rank-num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.36);
  border-radius: 999px;
  font-weight: 900;
}

.rank-item img {
  width: 82px;
  height: 70px;
  object-fit: cover;
  border-radius: 12px;
  background: #dbeafe;
}

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  font-weight: 900;
}

.rank-info em {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.78);
  font-style: normal;
  font-size: 13px;
}

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

.category-tile,
.category-card {
  position: relative;
  display: flex;
  min-height: 190px;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 22px;
  color: #ffffff;
  border-radius: 20px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: var(--shadow);
}

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

.category-tile:hover img,
.category-card:hover img {
  transform: scale(1.06);
}

.category-tile span,
.category-tile strong,
.category-card span,
.category-card p {
  position: relative;
  z-index: 1;
}

.category-tile span,
.category-card span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile strong,
.category-card p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

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

.chip-card {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
  transition: border 0.2s ease, transform 0.2s ease;
}

.chip-card:hover {
  border-color: #93c5fd;
  transform: translateY(-2px);
}

.chip-card span,
.chip-card em {
  display: block;
}

.chip-card span {
  font-weight: 900;
}

.chip-card em {
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.page-hero {
  padding: 62px 0;
  color: #ffffff;
}

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

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

.breadcrumb-section {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.breadcrumb-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 16px;
  padding-bottom: 16px;
  color: #64748b;
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding-top: 28px;
  padding-bottom: 64px;
}

.player-card,
.detail-card,
.aside-card {
  overflow: hidden;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.player-box {
  position: relative;
  overflow: hidden;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.hls-player {
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #ffffff;
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-cover span {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  color: #ffffff;
  background: var(--blue);
  border-radius: 999px;
  font-size: 30px;
  box-shadow: 0 18px 35px rgba(37, 99, 235, 0.35);
}

.play-cover strong {
  max-width: 84%;
  font-size: 20px;
  text-align: center;
}

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

.detail-card {
  margin-top: 26px;
  padding: 26px;
}

.detail-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
}

.detail-poster {
  width: 220px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  background: #dbeafe;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
}

.detail-card .eyebrow {
  color: var(--blue);
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.16;
}

.detail-meta span {
  color: #1d4ed8;
  background: #eff6ff;
}

.detail-one-line {
  margin: 18px 0;
  color: #374151;
  font-size: 17px;
}

.detail-tags a {
  color: #374151;
  background: #f3f4f6;
}

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

.text-block {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.text-block h2,
.aside-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.text-block p {
  margin: 0 0 14px;
  color: #374151;
}

.review-block {
  border-left: 4px solid var(--blue);
  border-top: 0;
  border-radius: 0 16px 16px 0;
  padding: 18px 20px;
  background: #eff6ff;
}

.detail-aside {
  position: relative;
}

.aside-card {
  position: sticky;
  top: 94px;
  padding: 20px;
}

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

.aside-rank .rank-item {
  grid-template-columns: auto 70px 1fr;
  padding: 10px;
  color: var(--text);
  background: #f8fafc;
}

.aside-rank .rank-item:hover {
  background: #eff6ff;
}

.aside-rank .rank-num {
  width: 28px;
  height: 28px;
  background: var(--blue);
}

.aside-rank .rank-info em {
  color: var(--muted);
}

.aside-rank .rank-item img {
  width: 70px;
  height: 58px;
}

.related-section {
  padding-bottom: 0;
}

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

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.filter-input {
  flex: 1 1 280px;
  width: auto;
}

.filter-select {
  width: 180px;
}

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

.empty-state.is-visible {
  display: block;
}

.search-hero-form {
  max-width: 640px;
}

.search-hero-form input {
  flex: 1;
  width: auto;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

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

.footer-brand {
  margin-bottom: 14px;
  color: #ffffff;
}

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

.site-footer p,
.site-footer a {
  display: block;
  margin: 0 0 8px;
  color: #d1d5db;
  font-size: 14px;
}

.site-footer a:hover {
  color: #93c5fd;
}

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

.scroll-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: none;
  width: 46px;
  height: 46px;
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.scroll-top.is-visible {
  display: block;
}

@media (max-width: 1080px) {
  .top-search {
    display: none;
  }

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

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

  .hero-panel {
    max-width: 760px;
  }

  .detail-aside .aside-card {
    position: static;
  }
}

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

  .menu-button {
    display: block;
    margin-left: auto;
  }

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

  .header-inner {
    min-height: 62px;
  }

  .hero-inner {
    min-height: auto;
    padding: 48px 0;
  }

  .hero-copy-wrap {
    min-height: 430px;
  }

  .movie-grid,
  .featured-grid,
  .category-grid,
  .category-card-grid,
  .chip-grid,
  .rank-grid,
  .rank-grid-large,
  .related-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .detail-head {
    grid-template-columns: 150px 1fr;
  }

  .detail-poster {
    width: 150px;
  }
}

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

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

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

  .hero-copy-wrap {
    min-height: 480px;
  }

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

  .hero-panel {
    padding: 12px;
  }

  .hero-thumb {
    grid-template-columns: 58px 1fr;
  }

  .hero-thumb img {
    width: 58px;
    height: 64px;
  }

  .section-head,
  .detail-head,
  .filter-bar {
    display: block;
  }

  .filter-select,
  .filter-input {
    width: 100%;
    margin-top: 10px;
  }

  .movie-grid,
  .featured-grid,
  .category-grid,
  .category-card-grid,
  .chip-grid,
  .rank-grid,
  .rank-grid-large,
  .related-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: 100%;
    max-width: 230px;
    margin-bottom: 18px;
  }

  .detail-card {
    padding: 18px;
  }

  .rank-item {
    grid-template-columns: auto 70px 1fr;
  }
}
