:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #0284c7;
  --accent-dark: #0369a1;
  --rose: #e11d48;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 45%, #f8fafc 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #ffffff;
  font-size: 13px;
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.28);
}

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

.nav-link,
.mobile-link {
  color: #475569;
  font-weight: 600;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 9px 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--accent-dark);
  background: #e0f2fe;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #334155;
  border-radius: 4px;
}

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

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

.mobile-link {
  padding: 12px 14px;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: linear-gradient(120deg, #020617, #334155);
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 24%, rgba(14, 165, 233, 0.42), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.68) 43%, rgba(2, 6, 23, 0.28) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, transparent 46%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: end;
  gap: 42px;
  padding: 92px 0 92px;
}

.hero-copy {
  max-width: 760px;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.9);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.eyebrow.dark {
  background: #e0f2fe;
  color: #0369a1;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 12px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.06em;
  text-shadow: 0 16px 34px rgba(0, 0, 0, 0.42);
}

.hero-copy strong {
  display: block;
  margin-bottom: 12px;
  color: #bae6fd;
  font-size: 26px;
}

.hero-copy p {
  max-width: 660px;
  margin: 0 0 22px;
  color: #e2e8f0;
  font-size: 18px;
}

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

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

.hero-meta span,
.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

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

.primary-button,
.ghost-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  min-height: 46px;
  padding: 0 22px;
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #ffffff;
  box-shadow: 0 18px 36px rgba(2, 132, 199, 0.35);
}

.ghost-button {
  min-height: 46px;
  padding: 0 22px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px);
}

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

.hero-card {
  align-self: end;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.hero-card span {
  display: block;
  padding: 16px;
  color: #ffffff;
  font-weight: 800;
}

.hero-control {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.52);
  color: #ffffff;
  font-size: 34px;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.section,
.quick-search,
.page-main {
  margin-top: 72px;
}

.quick-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 560px);
  gap: 28px;
  align-items: center;
  padding: 30px;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  transform: translateY(-36px);
  margin-bottom: -36px;
}

.quick-search h2,
.section-heading h2,
.page-hero h1,
.category-preview h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.quick-search h2 {
  font-size: clamp(24px, 3vw, 36px);
}

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

.search-form input,
.toolbar input,
.toolbar select {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  color: var(--text);
  outline: none;
}

.search-form input,
.toolbar input {
  width: 100%;
  padding: 0 16px;
}

.search-form button {
  min-width: 110px;
  border: 0;
  border-radius: 16px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.toolbar {
  padding: 18px;
  margin-bottom: 28px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.toolbar select {
  min-width: 150px;
  padding: 0 14px;
}

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

.section-heading.compact {
  align-items: start;
  margin-bottom: 20px;
}

.section-heading h2 {
  font-size: clamp(26px, 4vw, 40px);
}

.section-heading a,
.text-button {
  color: var(--accent-dark);
  font-weight: 800;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #e2e8f0;
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(2, 6, 23, 0.72) 100%);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.movie-card:hover .poster-gradient {
  opacity: 1;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--accent-dark);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.poster-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.66);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

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

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

.movie-card h3 a:hover,
.ranking-row h2 a:hover {
  color: var(--accent-dark);
}

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

.movie-meta {
  color: #64748b;
  font-size: 13px;
}

.movie-meta span + span::before {
  content: "•";
  margin-right: 10px;
  color: #cbd5e1;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-row span,
.detail-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.category-section {
  padding: 34px;
  border-radius: 34px;
  background: linear-gradient(135deg, #e0f2fe 0%, #eff6ff 52%, #ffffff 100%);
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 20px;
  border-radius: 24px;
  background: #0f172a;
  color: #ffffff;
  box-shadow: var(--soft-shadow);
}

.category-tile img,
.category-tile span {
  position: absolute;
  inset: 0;
}

.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.68;
  transition: transform 0.4s ease;
}

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

.category-tile span {
  background: linear-gradient(180deg, transparent 25%, rgba(2, 6, 23, 0.88) 100%);
}

.category-tile strong,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile strong {
  font-size: 22px;
}

.category-tile p {
  margin: 8px 0 0;
  color: #e2e8f0;
  font-size: 14px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 34px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.ranking-panel .ranking-row {
  grid-template-columns: 66px minmax(0, 1fr);
}

.ranking-panel .text-button {
  display: none;
}

.rank-poster {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 3 / 4;
}

.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-poster span {
  position: absolute;
  left: 6px;
  top: 6px;
  min-width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(225, 29, 72, 0.95);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.rank-content h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rank-content p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
}

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

.soft-hero {
  background:
    radial-gradient(circle at 88% 18%, rgba(56, 189, 248, 0.28), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #eff6ff 48%, #e0f2fe 100%);
  box-shadow: var(--soft-shadow);
}

.page-hero h1 {
  max-width: 760px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 740px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.category-preview {
  margin-top: 44px;
}

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

.breadcrumb a:hover {
  color: var(--accent-dark);
}

.detail-main {
  margin-top: 0;
}

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

.detail-backdrop,
.detail-backdrop-shade {
  position: absolute;
  inset: 0;
}

.detail-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(4px);
  transform: scale(1.04);
  opacity: 0.54;
}

.detail-backdrop-shade {
  background:
    radial-gradient(circle at 18% 18%, rgba(14, 165, 233, 0.42), transparent 30%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.62)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.94), transparent 60%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
  padding: 74px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow);
}

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

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-copy p {
  max-width: 820px;
  margin: 0 0 20px;
  color: #e2e8f0;
  font-size: 18px;
}

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

.detail-copy .primary-button {
  margin-top: 22px;
}

.watch-section,
.detail-content {
  margin-top: 54px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  background: radial-gradient(circle at center, rgba(2, 132, 199, 0.28), rgba(2, 6, 23, 0.58));
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-overlay span {
  width: 86px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-dark);
  font-size: 30px;
  box-shadow: 0 24px 46px rgba(0, 0, 0, 0.24);
}

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

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

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.story-card,
.info-card {
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.story-card h2,
.info-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.story-card p {
  margin: 0 0 24px;
  color: #334155;
  font-size: 17px;
}

.story-card p:last-child {
  margin-bottom: 0;
}

.info-card dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

.info-card dt {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.info-card dd {
  margin: -8px 0 0;
  color: #0f172a;
  font-weight: 700;
}

.info-card .text-button {
  margin-top: 22px;
}

.site-footer {
  margin-top: 86px;
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  border-top: 1px solid var(--line);
}

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

.footer-brand p {
  max-width: 520px;
  margin: 14px 0 0;
  color: #64748b;
}

.footer-block h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

.footer-block ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.footer-block a {
  color: #64748b;
}

.footer-block a:hover {
  color: var(--accent-dark);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.32);
}

[data-movie-card].is-hidden {
  display: none;
}

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

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

  .ranking-panel {
    position: static;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .hero-carousel {
    height: auto;
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-items: end;
    padding: 96px 0 84px;
  }

  .hero-card {
    display: none;
  }

  .quick-search,
  .detail-hero-inner,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

  .detail-poster {
    width: min(320px, 82vw);
  }
}

@media (max-width: 640px) {
  .site-nav {
    height: 62px;
  }

  .brand {
    font-size: 18px;
  }

  .brand-icon {
    width: 30px;
    height: 30px;
  }

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

  .hero-control {
    display: none;
  }

  .quick-search,
  .page-hero,
  .category-section,
  .story-card,
  .info-card {
    padding: 22px;
    border-radius: 22px;
  }

  .search-form,
  .toolbar {
    flex-direction: column;
  }

  .toolbar select {
    width: 100%;
  }

  .section-heading {
    display: block;
  }

  .section-heading a {
    display: inline-flex;
    margin-top: 10px;
  }

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

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

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

  .ranking-row .text-button {
    grid-column: 2;
    justify-content: flex-start;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
