
:root {
  --deepblue-950: #07111f;
  --deepblue-900: #0b1b31;
  --deepblue-800: #143057;
  --ocean-900: #064e5f;
  --ocean-800: #075e72;
  --ocean-700: #087f95;
  --ocean-600: #0891a8;
  --ocean-100: #d7f7fb;
  --ocean-50: #effcff;
  --seagreen-700: #128064;
  --seagreen-600: #17a67f;
  --seagreen-50: #edfff8;
  --coral-600: #ec5d4f;
  --coral-500: #ff735f;
  --coral-400: #ff876f;
  --sand-50: #fff8ef;
  --text: #132238;
  --muted: #66788f;
  --card: #ffffff;
  --line: rgba(15, 47, 74, 0.12);
  --shadow: 0 20px 45px rgba(7, 17, 31, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, var(--sand-50), var(--ocean-50), var(--seagreen-50));
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--deepblue-800), var(--ocean-700), var(--seagreen-700));
  box-shadow: 0 12px 30px rgba(7, 17, 31, 0.22);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 76px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--deepblue-900);
  background: linear-gradient(135deg, var(--ocean-100), var(--coral-400));
  box-shadow: 0 8px 18px rgba(255, 115, 95, 0.32);
}

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

.main-nav a {
  color: rgba(255, 255, 255, 0.92);
  padding: 10px 14px;
  border-radius: 12px;
  transition: 0.2s ease;
}

.main-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.filter-input,
.filter-select {
  width: 260px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  padding: 11px 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  transition: 0.2s ease;
}

.header-search input::placeholder {
  color: rgba(215, 247, 251, 0.78);
}

.header-search input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: var(--coral-400);
  box-shadow: 0 0 0 4px rgba(255, 135, 111, 0.22);
}

.header-search button,
.primary-button,
.secondary-button,
.play-button,
.filter-button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: #ffffff;
  font-weight: 700;
  background: var(--coral-500);
  box-shadow: 0 12px 26px rgba(255, 115, 95, 0.28);
  cursor: pointer;
  transition: 0.22s ease;
}

.header-search button:hover,
.primary-button:hover,
.play-button:hover,
.filter-button:hover {
  transform: translateY(-1px) scale(1.02);
  background: var(--coral-600);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: none;
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  color: #ffffff;
  border: 0;
  border-radius: 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.12);
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(180deg, var(--deepblue-900), var(--ocean-800));
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.9s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.hero-slide img.image-missing,
.movie-card img.image-missing,
.detail-poster img.image-missing {
  opacity: 0;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 115, 95, 0.28), transparent 32%),
    radial-gradient(circle at 80% 35%, rgba(23, 166, 127, 0.25), transparent 34%),
    linear-gradient(0deg, rgba(11, 27, 49, 0.95), rgba(11, 27, 49, 0.55), rgba(11, 27, 49, 0.25));
}

.hero-content,
.hero-slide-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  min-height: 70vh;
  padding: 80px 24px;
  display: flex;
  align-items: center;
}

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

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

.eyebrow,
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--coral-400);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 18px;
  max-width: 820px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 740px;
  margin: 0 0 28px;
  color: rgba(215, 247, 251, 0.95);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.hero-tags,
.tag-row,
.meta-line,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags span,
.tag-row span,
.detail-tags span,
.meta-pill {
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--deepblue-900);
  font-size: 13px;
  font-weight: 700;
  background: rgba(215, 247, 251, 0.88);
}

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

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

.hero-dots button {
  width: 36px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.hero-dots button.active {
  background: var(--coral-400);
}

.page-main,
.detail-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
}

.section-block {
  margin-bottom: 64px;
}

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

.section-heading h2 {
  margin: 0;
  color: var(--deepblue-900);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  font-weight: 900;
}

.section-link {
  color: var(--ocean-700);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  transition: 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 55px rgba(7, 17, 31, 0.18);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 135, 111, 0.44), transparent 30%),
    linear-gradient(135deg, var(--deepblue-800), var(--ocean-700), var(--seagreen-600));
}

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

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

.poster-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(7, 17, 31, 0.78), transparent);
}

.year-chip,
.rank-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(8, 127, 149, 0.86);
  backdrop-filter: blur(10px);
}

.rank-badge {
  left: 12px;
  right: auto;
  top: 12px;
  bottom: auto;
  background: var(--coral-500);
}

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

.movie-card h3 {
  margin: 0 0 10px;
  color: var(--deepblue-900);
  font-size: 18px;
  line-height: 1.3;
  font-weight: 900;
}

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

.meta-line {
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--ocean-700);
  font-size: 13px;
  font-weight: 800;
}

.tag-row span {
  color: var(--ocean-800);
  background: rgba(8, 145, 168, 0.12);
}

.feature-panel,
.filter-panel,
.category-card,
.ranking-panel,
.detail-card {
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.feature-panel {
  padding: clamp(24px, 4vw, 48px);
  background: linear-gradient(135deg, rgba(239, 252, 255, 0.92), rgba(237, 255, 248, 0.92));
}

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

.category-card {
  padding: 24px;
  transition: 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 115, 95, 0.45);
}

.category-card h3 {
  margin: 0 0 10px;
  color: var(--deepblue-900);
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  color: var(--muted);
  line-height: 1.7;
}

.category-card strong {
  color: var(--coral-600);
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 14px;
  margin-bottom: 30px;
  padding: 18px;
}

.filter-input,
.filter-select {
  width: 100%;
  color: var(--deepblue-900);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.86);
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 72px 90px 1fr auto;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.88);
}

.ranking-no {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--coral-500), var(--ocean-700));
}

.ranking-row img {
  width: 74px;
  height: 98px;
  border-radius: 16px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--deepblue-800), var(--ocean-700));
}

.ranking-row h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.score-pill {
  border-radius: 999px;
  padding: 9px 14px;
  color: #ffffff;
  font-weight: 900;
  background: var(--ocean-700);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, var(--deepblue-900), var(--ocean-800));
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background-size: cover;
  background-position: center;
  filter: blur(2px);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(7, 17, 31, 0.96), rgba(7, 17, 31, 0.66));
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 36px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, var(--deepblue-800), var(--ocean-700));
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.36);
}

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

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
  font-weight: 950;
}

.detail-info p {
  max-width: 820px;
  color: rgba(215, 247, 251, 0.94);
  font-size: 18px;
  line-height: 1.9;
}

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

.player-section {
  margin-bottom: 46px;
}

.player-shell {
  overflow: hidden;
  border-radius: 32px;
  background: #020814;
  box-shadow: 0 30px 80px rgba(7, 17, 31, 0.36);
}

.video-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 115, 95, 0.24), transparent 28%),
    linear-gradient(135deg, #020814, #0b1b31 52%, #064e5f);
}

.video-box video {
  width: 100%;
  height: 100%;
  background: #020814;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #ffffff;
  text-align: center;
  background: rgba(2, 8, 20, 0.38);
}

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

.play-button {
  width: 88px;
  height: 88px;
  padding: 0;
  font-size: 34px;
}

.player-note {
  margin: 0;
  color: rgba(215, 247, 251, 0.82);
}

.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
}

.detail-card {
  padding: 28px;
}

.detail-card h2 {
  margin: 0 0 18px;
  color: var(--deepblue-900);
  font-size: 26px;
  font-weight: 900;
}

.detail-card p {
  color: var(--text);
  line-height: 1.9;
}

.info-list {
  display: grid;
  gap: 12px;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 12px;
}

.info-list span {
  color: var(--muted);
}

.site-footer {
  margin-top: 60px;
  color: var(--ocean-100);
  background: linear-gradient(180deg, var(--deepblue-900), var(--deepblue-950));
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 34px;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.footer-grid p,
.footer-grid a {
  display: block;
  color: rgba(215, 247, 251, 0.75);
  line-height: 1.8;
}

.footer-grid a:hover {
  color: var(--coral-400);
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  border-top: 1px solid rgba(215, 247, 251, 0.12);
  padding: 20px 24px 34px;
  color: rgba(215, 247, 251, 0.58);
}

.empty-message {
  display: none;
  border: 1px dashed var(--line);
  border-radius: 24px;
  padding: 26px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.7);
}

.empty-message.visible {
  display: block;
}

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

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

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

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 14px 16px;
  }

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

  .main-nav {
    display: none;
    order: 5;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
    padding-top: 10px;
  }

  .main-nav.open {
    display: flex;
  }

  .header-search {
    width: 100%;
    order: 6;
  }

  .header-search input {
    width: 100%;
  }

  .hero-content,
  .hero-slide-content {
    padding: 58px 18px 86px;
  }

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

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

  .ranking-row {
    grid-template-columns: 48px 70px 1fr;
  }

  .score-pill {
    grid-column: 2 / 4;
    justify-self: start;
  }

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

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

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

  .hero-actions {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    text-align: center;
  }
}
