* {
  box-sizing: border-box;
}

:root {
  --bg: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --card: #ffffff;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --deep: #020617;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 42%, #ecfeff 100%);
}

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

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

button,
input {
  font: inherit;
}

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

.nav-shell,
.footer-shell,
.content-section,
.search-shell,
.detail-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-shell {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 15px 25px rgba(37, 99, 235, 0.24);
}

.brand-name {
  font-size: 22px;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #2563eb, #0891b2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav,
.mobile-nav {
  display: flex;
  gap: 8px;
}

.nav-link {
  padding: 10px 16px;
  border-radius: 14px;
  color: #334155;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
  transform: translateY(-1px);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.mobile-menu-button span {
  width: 20px;
  height: 2px;
  background: #0f172a;
  border-radius: 999px;
}

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

.hero-section {
  position: relative;
  min-height: 680px;
  color: #ffffff;
  background: #020617;
  overflow: hidden;
}

.hero-carousel,
.hero-slide,
.hero-bg {
  position: absolute;
  inset: 0;
}

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

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

.hero-bg {
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.34), transparent 32%), linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.18) 48%, rgba(2, 6, 23, 0.88));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 54px;
  align-items: center;
  padding: 80px 0 98px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #0891b2;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  letter-spacing: -0.05em;
  line-height: 1.06;
}

.hero-copy h1 {
  max-width: 820px;
  font-size: clamp(44px, 8vw, 88px);
}

.hero-summary {
  width: min(760px, 100%);
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.85;
}

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

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

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 10px;
  color: #0f172a;
  border-radius: 999px;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span,
.detail-tags span {
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.18);
  border: 1px solid rgba(125, 211, 252, 0.28);
}

.hero-actions,
.detail-info .btn-primary {
  margin-top: 30px;
}

.btn-primary,
.btn-ghost,
.search-box button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary,
.search-box button {
  color: #ffffff;
  border: 0;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.26);
}

.btn-primary:hover,
.search-box button:hover,
.btn-ghost:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  margin-left: 12px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.hero-poster {
  display: block;
  overflow: hidden;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 35px 70px rgba(0, 0, 0, 0.36);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #22d3ee;
}

.search-band {
  margin-top: -34px;
  position: relative;
  z-index: 4;
}

.search-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-shell h2,
.section-heading h2,
.feature-copy h2,
.catalog-body h2,
.article-panel h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.search-box {
  flex: 1;
  max-width: 580px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.search-box input,
.page-search input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  outline: none;
  background: #ffffff;
}

.search-box input:focus,
.page-search input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

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

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

.section-more,
.text-link {
  color: #2563eb;
  font-weight: 800;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(14, 165, 233, 0.45);
  box-shadow: var(--shadow);
}

.poster-link,
.poster-frame {
  position: relative;
  display: block;
}

.poster-frame {
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a, #0891b2);
}

.poster-frame img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.32s ease, filter 0.32s ease;
}

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

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #0891b2;
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 9px 0 7px;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: #2563eb;
}

.movie-card p {
  min-height: 48px;
  margin: 0 0 12px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

.feature-split {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 34px;
  align-items: center;
}

.feature-copy {
  padding: 32px;
  border-radius: 28px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #1e3a8a 52%, #0891b2);
  box-shadow: var(--shadow);
}

.feature-copy h2,
.feature-copy p {
  color: #ffffff;
}

.feature-copy p:not(.eyebrow) {
  line-height: 1.8;
}

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

.category-card {
  position: relative;
  min-height: 148px;
  overflow: hidden;
  padding: 22px;
  border-radius: 24px;
  color: #ffffff;
  background: #0f172a;
  box-shadow: var(--soft-shadow);
}

.category-card:hover {
  transform: translateY(-4px);
}

.category-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.82;
  transition: transform 0.3s ease;
}

.category-card:hover .category-image {
  transform: scale(1.08);
}

.category-card strong,
.category-card em {
  position: relative;
  z-index: 1;
  display: block;
}

.category-card strong {
  margin-top: 38px;
  font-size: 24px;
}

.category-card em {
  max-width: 290px;
  margin-top: 8px;
  color: #dbeafe;
  font-style: normal;
  line-height: 1.55;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

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

.rank-list {
  display: grid;
  gap: 10px;
  position: sticky;
  top: 92px;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 2px 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.rank-row:hover {
  border-color: #7dd3fc;
  transform: translateX(3px);
}

.rank-row span {
  grid-row: 1 / span 2;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 900;
}

.rank-row strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-row em {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.page-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: 58px;
  color: #ffffff;
  border-radius: 34px;
  background: radial-gradient(circle at 18% 10%, rgba(34, 211, 238, 0.34), transparent 30%), linear-gradient(135deg, #0f172a, #1d4ed8 56%, #0891b2);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 880px;
  font-size: clamp(34px, 6vw, 64px);
}

.page-hero p:not(.eyebrow) {
  max-width: 820px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

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

.catalog-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 22px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--soft-shadow);
}

.catalog-cover {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

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

.catalog-body p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.7;
}

.filter-panel {
  margin-bottom: 26px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr);
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--soft-shadow);
}

.page-search span,
.filter-group strong {
  display: block;
  margin-bottom: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.filter-group strong {
  margin: 0 10px 0 0;
}

.filter-group button {
  min-height: 34px;
  padding: 0 12px;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  cursor: pointer;
}

.filter-group button:hover,
.filter-group button.is-active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.empty-state {
  padding: 36px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed #94a3b8;
  border-radius: 24px;
  background: #ffffff;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #020617;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.38));
}

.detail-shell {
  position: relative;
  z-index: 1;
  padding: 44px 0 64px;
}

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

.breadcrumb a:hover {
  color: #ffffff;
}

.detail-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 35px 70px rgba(0, 0, 0, 0.38);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-info h1 {
  max-width: 900px;
  font-size: clamp(38px, 7vw, 76px);
}

.detail-one-line {
  max-width: 840px;
  margin: 20px 0 0;
  color: #dbeafe;
  font-size: 19px;
  line-height: 1.8;
}

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

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 820px;
  margin-top: 24px;
}

.detail-meta span {
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.48);
}

.player-section {
  padding-bottom: 20px;
}

.cinema-player {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 35px 80px rgba(15, 23, 42, 0.28);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #ffffff;
  border: 0;
  background: radial-gradient(circle at center, rgba(14, 165, 233, 0.18), rgba(2, 6, 23, 0.64));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-button {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 20px 40px rgba(14, 165, 233, 0.35);
  font-size: 34px;
}

.play-overlay strong {
  font-size: 18px;
}

.article-panel {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--soft-shadow);
}

.article-panel h2 + p {
  margin-top: 12px;
}

.article-panel p {
  color: #334155;
  font-size: 17px;
  line-height: 1.95;
}

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

.site-footer {
  margin-top: 40px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #020617, #0f172a 58%, #083344);
}

.footer-shell {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
  padding: 50px 0 34px;
}

.footer-brand p {
  max-width: 420px;
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #67e8f9;
  font-size: 16px;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin: 9px 0;
}

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

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

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

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

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

  .mobile-menu-button {
    display: inline-flex;
  }

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

  .hero-content,
  .detail-grid,
  .feature-split,
  .rank-layout,
  .footer-shell,
  .catalog-card,
  .search-shell {
    grid-template-columns: 1fr;
  }

  .hero-content {
    min-height: 720px;
    gap: 28px;
    padding-top: 54px;
  }

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

  .search-shell {
    align-items: stretch;
  }

  .search-box,
  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .rank-list {
    position: static;
  }

  .detail-grid {
    align-items: start;
  }

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

@media (max-width: 640px) {
  .brand-name {
    font-size: 18px;
  }

  .hero-section,
  .hero-content {
    min-height: 650px;
  }

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

  .hero-summary,
  .page-hero p:not(.eyebrow),
  .detail-one-line {
    font-size: 16px;
  }

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

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

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

  .card-body {
    padding: 12px;
  }

  .movie-card p {
    min-height: auto;
  }

  .tag-row span {
    font-size: 11px;
  }

  .search-box {
    grid-template-columns: 1fr;
  }

  .btn-ghost {
    margin: 10px 0 0;
  }

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

  .article-panel {
    padding: 24px;
  }
}