:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --cyan: #0891b2;
  --cyan-dark: #0e7490;
  --blue: #2563eb;
  --dark: #020617;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.brand__mark {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 8px 22px rgba(8, 145, 178, 0.32);
}

.brand__text {
  font-size: 20px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav,
.mobile-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

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

.nav-link:hover,
.nav-link.active {
  color: var(--cyan-dark);
  background: #ecfeff;
}

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

.header-search input,
.mobile-search input,
.search-page-form input {
  width: 240px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 10px 14px;
  outline: none;
  background: #ffffff;
}

.header-search input:focus,
.mobile-search input:focus,
.search-page-form input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

.header-search button,
.mobile-search button,
.search-page-form button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #ffffff;
  background: var(--cyan);
  cursor: pointer;
}

.menu-button {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 8px 11px;
  background: #f1f5f9;
  color: #334155;
  cursor: pointer;
}

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

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

.mobile-nav {
  align-items: stretch;
  flex-direction: column;
  margin-top: 12px;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide__image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
}

.hero-slide__poster {
  position: absolute;
  right: clamp(28px, 8vw, 120px);
  bottom: 70px;
  width: min(30vw, 330px);
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.hero-slide__content {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  bottom: 86px;
  width: min(640px, calc(100% - 48px));
  color: #ffffff;
}

.hero-pill,
.section-kicker {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  color: #ffffff;
  background: rgba(8, 145, 178, 0.94);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(40px, 6vw, 70px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 620px;
  margin: 0 0 28px;
  color: #dbeafe;
  font-size: 19px;
  line-height: 1.78;
}

.hero-actions,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

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

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 28px rgba(8, 145, 178, 0.3);
}

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

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

.section-more {
  padding: 10px 18px;
  color: var(--cyan-dark);
  background: #ecfeff;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.hero-arrow--left {
  left: 22px;
}

.hero-arrow--right {
  right: 22px;
}

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

.hero-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 36px;
  background: #ffffff;
}

.page-stack {
  padding: 56px 0 80px;
}

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

.category-tile {
  display: grid;
  gap: 10px;
  min-height: 128px;
  padding: 24px;
  border-radius: 28px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #0891b2);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease;
}

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

.category-tile span {
  font-size: 24px;
  font-weight: 900;
}

.category-tile strong {
  color: #cffafe;
  font-size: 14px;
}

.content-section {
  margin-bottom: 76px;
}

.content-section.soft-section {
  margin-left: -22px;
  margin-right: -22px;
  padding: 34px 22px 40px;
  border-radius: 34px;
  background: linear-gradient(135deg, #ecfeff, #eff6ff);
}

.content-section.dark-section {
  margin-left: -22px;
  margin-right: -22px;
  padding: 34px 22px 40px;
  border-radius: 34px;
  color: #ffffff;
  background: #0f172a;
}

.dark-section .section-heading h2,
.dark-section .movie-card__body h3,
.dark-section .movie-card__body h3 a {
  color: #ffffff;
}

.dark-section .movie-card__body p,
.dark-section .movie-card__meta {
  color: #cbd5e1;
}

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

.section-heading h2 {
  margin: 12px 0 0;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-kicker {
  color: var(--cyan-dark);
  background: #cffafe;
}

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

.movie-card {
  min-width: 0;
}

.movie-card__cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  background: #0f172a;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}

.movie-card--large .movie-card__cover {
  aspect-ratio: 21 / 9;
}

.cover-bg,
.movie-card__cover img,
.detail-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-bg {
  background-size: cover;
  background-position: center;
}

.movie-card__cover img {
  transition: transform 0.45s ease;
}

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

.movie-card__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 26%, rgba(2, 6, 23, 0.74));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .movie-card__cover::after {
  opacity: 1;
}

.movie-card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--cyan-dark);
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.25s ease;
}

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

.movie-card__category,
.movie-card__duration,
.rank-badge {
  position: absolute;
  z-index: 3;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 800;
}

.movie-card__category {
  left: 12px;
  top: 12px;
}

.movie-card__duration {
  right: 12px;
  top: 12px;
}

.rank-badge {
  left: 12px;
  bottom: 12px;
  background: rgba(8, 145, 178, 0.9);
}

.movie-card__body {
  padding-top: 12px;
}

.movie-card__body h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
}

.movie-card__body h3 a:hover {
  color: var(--cyan-dark);
}

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

.movie-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #64748b;
  font-size: 13px;
}

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

.movie-card__tags span,
.tag-row span {
  border-radius: 999px;
  padding: 5px 9px;
  color: #0e7490;
  background: #ecfeff;
  font-size: 12px;
  font-weight: 750;
}

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

.page-hero--cyan {
  background: linear-gradient(135deg, #0891b2, #2563eb);
}

.page-hero--dark {
  background: radial-gradient(circle at 20% 20%, rgba(8, 145, 178, 0.45), transparent 34%), #020617;
}

.page-hero h1 {
  margin: 12px 0;
  font-size: clamp(36px, 5vw, 58px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 680px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.75;
}

.listing-wrap {
  padding: 52px 0 82px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 50px;
}

.pagination a,
.pagination span {
  min-width: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  text-align: center;
  background: #ffffff;
}

.pagination .current {
  color: #ffffff;
  border-color: transparent;
  background: var(--cyan);
}

.category-more {
  display: flex;
  justify-content: center;
  margin-top: 42px;
}

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

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.detail-hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 42px;
  align-items: end;
  min-height: 560px;
  padding: 82px 0 64px;
}

.detail-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  background: #0f172a;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.detail-info h1 {
  margin: 18px 0 16px;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: 19px;
  line-height: 1.75;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.detail-meta span {
  border-radius: 999px;
  padding: 8px 12px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  font-weight: 750;
}

.player-section {
  padding: 54px 0 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 25px 80px rgba(2, 6, 23, 0.28);
}

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

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 50%;
  color: var(--cyan-dark);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.player-start:hover {
  transform: translate(-50%, -50%) scale(1.04);
}

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

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

.text-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  background: #ffffff;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

.text-panel h2 {
  margin: 0 0 14px;
  font-size: 25px;
}

.text-panel p {
  margin: 0;
  color: #334155;
  font-size: 16px;
  line-height: 1.9;
}

.related-section {
  padding: 22px 0 82px;
}

.search-page-form {
  margin-top: 26px;
}

.search-page-form input {
  width: min(520px, 100%);
  padding: 14px 18px;
}

.search-page-form button {
  padding: 14px 22px;
}

.search-title {
  margin-bottom: 24px;
  font-size: 26px;
  font-weight: 900;
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
}

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

.footer-brand {
  color: #ffffff;
  font-size: 20px;
}

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

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

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 9px 0;
  color: #cbd5e1;
}

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

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

@media (max-width: 980px) {
  .main-nav,
  .header-search {
    display: none;
  }

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

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

  .category-strip,
  .movie-grid,
  .footer-grid,
  .detail-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-slide__poster {
    display: none;
  }

  .detail-hero__inner {
    grid-template-columns: 190px 1fr;
  }
}

@media (max-width: 680px) {
  .container,
  .site-header__inner {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    min-height: 560px;
  }

  .hero-slide__content {
    left: 18px;
    bottom: 76px;
    width: calc(100% - 36px);
  }

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

  .hero-arrow {
    display: none;
  }

  .category-strip,
  .movie-grid,
  .footer-grid,
  .detail-content,
  .detail-hero__inner {
    grid-template-columns: 1fr;
  }

  .detail-hero__inner {
    padding-top: 48px;
  }

  .detail-poster {
    width: 210px;
  }

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

  .content-section.soft-section,
  .content-section.dark-section {
    margin-left: 0;
    margin-right: 0;
  }
}
