:root {
  --bg: #f9fafb;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --orange: #f97316;
  --red: #ef4444;
  --pink: #ec4899;
  --green: #16a34a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  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;
  width: 100%;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.75);
  backdrop-filter: blur(18px);
}

.top-nav {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--red), var(--pink));
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.32);
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #374151;
  font-weight: 650;
  white-space: nowrap;
}

.nav-links a,
.mobile-menu a,
.footer-links a,
.text-link {
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.mobile-menu a:hover,
.footer-links a:hover,
.text-link:hover {
  color: var(--orange);
}

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

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #111827;
  border-radius: 999px;
}

.mobile-menu {
  display: none;
  padding: 8px 24px 18px;
  border-top: 1px solid var(--line);
}

.mobile-menu a {
  display: block;
  padding: 11px 12px;
  border-radius: 12px;
  font-weight: 650;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: 650px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444, #ec4899);
}

.hero-track {
  position: relative;
  min-height: 650px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  align-items: center;
  gap: 50px;
  padding: 96px max(24px, calc((100vw - 1280px) / 2 + 24px)) 82px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(32px) saturate(1.25);
  transform: scale(1.12);
  opacity: 0.32;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 15%, rgba(255, 255, 255, 0.24), transparent 28%),
    linear-gradient(105deg, rgba(249, 115, 22, 0.92), rgba(239, 68, 68, 0.86) 48%, rgba(236, 72, 153, 0.78));
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--orange);
}

.hero-content h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-summary {
  max-width: 760px;
  margin: 24px 0 0;
  font-size: clamp(18px, 2.4vw, 24px);
  color: rgba(255, 255, 255, 0.9);
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(10px);
}

.tag-row span {
  color: #7c2d12;
  background: #ffedd5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.primary-button,
.ghost-button,
.search-box button {
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  padding: 12px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  color: var(--orange);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(255, 255, 255, 0.25);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.search-box button:hover,
.category-pills a:hover,
.movie-card:hover,
.category-card:hover {
  transform: translateY(-2px);
}

.hero-poster {
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 35px 80px rgba(17, 24, 39, 0.34);
  transform: rotate(2deg);
}

.hero-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

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

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

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

.section-inner,
.section-block {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.home-search-section {
  margin-top: -42px;
  position: relative;
  z-index: 5;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 540px);
  align-items: center;
  gap: 28px;
  padding: 30px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.search-panel h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.content-card h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

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

.search-box {
  position: relative;
  display: flex;
  gap: 10px;
}

.search-box input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 16px;
  outline: none;
  background: #ffffff;
}

.search-box input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.search-box button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--red));
}

.search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  z-index: 20;
  display: none;
  max-height: 430px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.search-results.is-open {
  display: block;
}

.search-result-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid #f3f4f6;
}

.search-result-item:last-child {
  border-bottom: 0;
}

.search-result-item img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: #f3f4f6;
}

.search-result-item strong {
  display: block;
  margin-bottom: 4px;
}

.search-result-item span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.section-block {
  padding-top: 62px;
  padding-bottom: 20px;
}

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

.section-heading.compact {
  margin-bottom: 18px;
}

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

.text-link {
  color: var(--orange);
  font-weight: 800;
}

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

.category-pills a,
.category-card,
.content-card,
.rank-panel,
.recommend-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.category-pills a {
  padding: 20px;
  font-size: 18px;
  font-weight: 850;
}

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

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

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

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

.movie-card:hover {
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #fff7ed, #ffe4e6);
}

.poster-link img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.card-category {
  position: absolute;
  top: 10px;
  right: 10px;
  max-width: calc(100% - 20px);
  padding: 4px 9px;
  border-radius: 9px;
  color: #ffffff;
  background: rgba(22, 163, 74, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 14px;
}

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

.card-body h3 a:hover {
  color: var(--orange);
}

.card-meta,
.card-line {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.card-line {
  display: -webkit-box;
  min-height: 40px;
  margin-top: 8px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body .tag-row {
  margin-top: 12px;
}

.movie-card-dense .card-line,
.movie-card-dense .tag-row {
  display: none;
}

.split-section {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.rank-panel,
.recommend-panel {
  padding: 24px;
}

.rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-item a {
  display: grid;
  grid-template-columns: 42px 54px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
}

.rank-item:last-child a {
  border-bottom: 0;
}

.rank-number {
  color: var(--orange);
  font-size: 22px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.rank-item img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: #f3f4f6;
}

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

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

.rank-list-large {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 30px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.page-hero {
  padding: 92px 0 60px;
  color: #ffffff;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.24), transparent 28%),
    linear-gradient(135deg, #f97316, #ef4444, #ec4899);
}

.page-hero .section-inner {
  max-width: 960px;
}

.page-hero h1 {
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.08;
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.page-hero .search-box {
  max-width: 720px;
  margin-top: 28px;
}

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

.category-card {
  padding: 22px;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-card > a {
  display: block;
  margin-bottom: 16px;
}

.category-card span {
  display: block;
  color: var(--orange);
  font-size: 22px;
  font-weight: 900;
}

.category-card strong {
  color: var(--muted);
  font-weight: 600;
}

.category-card ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  margin: 0;
  padding-left: 18px;
}

.category-card li a:hover {
  color: var(--orange);
}

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

.detail-bg {
  position: absolute;
  inset: 0;
  background-image: var(--detail-image);
  background-size: cover;
  background-position: center;
  filter: blur(26px) saturate(1.2);
  transform: scale(1.1);
  opacity: 0.34;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.98), rgba(17, 24, 39, 0.78), rgba(17, 24, 39, 0.58));
}

.detail-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 74px 24px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

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

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

.breadcrumb {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.72);
}

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

.detail-info h1 {
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
}

.detail-line {
  max-width: 820px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 20px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.player-section {
  padding-top: 36px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.28);
}

.main-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  object-fit: contain;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.54));
  cursor: pointer;
}

.play-overlay.is-hidden {
  display: none;
}

.play-icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.play-icon::before {
  content: "";
  margin-left: 7px;
  border-left: 24px solid var(--orange);
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
}

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

.content-card {
  padding: 28px;
}

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

.site-footer {
  margin-top: 60px;
  color: #d1d5db;
  background: #111827;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
}

.footer-inner strong {
  color: #ffffff;
  font-size: 22px;
}

.footer-inner p {
  margin: 10px 0 0;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.copyright {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

  .mobile-menu-button {
    display: block;
  }

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

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

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

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

  .split-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .hero-carousel,
  .hero-track,
  .hero-slide {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 76px;
  }

  .hero-poster {
    width: min(58vw, 260px);
    justify-self: center;
  }

  .search-panel,
  .detail-inner,
  .detail-content,
  .category-overview-grid,
  .rank-list-large {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(58vw, 260px);
  }

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

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

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

@media (max-width: 560px) {
  .top-nav,
  .section-inner,
  .section-block,
  .detail-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .hero-slide {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .movie-grid,
  .movie-grid.full-grid,
  .movie-grid.small-grid,
  .category-pills {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .card-body {
    padding: 11px;
  }

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

  .rank-item a {
    grid-template-columns: 34px 48px 1fr;
  }
}
