:root {
  --color-bg: #f8fafc;
  --color-bg-soft: #ecfeff;
  --color-card: #ffffff;
  --color-text: #0f172a;
  --color-muted: #64748b;
  --color-line: #ccfbf1;
  --color-primary: #0d9488;
  --color-primary-deep: #0f766e;
  --color-cyan: #0891b2;
  --color-dark: #0f172a;
  --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 30px rgba(13, 148, 136, 0.14);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--color-text);
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.18), transparent 34rem),
    linear-gradient(135deg, #f8fafc 0%, #f0fdfa 52%, #ecfeff 100%);
}

img {
  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: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--color-line);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.site-header__inner {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--color-primary), var(--color-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-logo__icon {
  width: 34px;
  height: 34px;
  color: var(--color-primary);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.nav-link,
.mobile-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  color: #334155;
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: var(--color-primary-deep);
  background: #f0fdfa;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: #ffffff;
}

.header-search input {
  width: 170px;
  border: 0;
  outline: 0;
  padding: 8px 10px;
  background: transparent;
}

.header-search button,
.quick-search button {
  border: 0;
  border-radius: 999px;
  padding: 9px 15px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--color-primary), var(--color-cyan));
  cursor: pointer;
}

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

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

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 14px;
  border-top: 1px solid var(--color-line);
}

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

.hero-slider {
  position: relative;
  height: min(72vh, 720px);
  min-height: 560px;
  overflow: hidden;
  background: var(--color-dark);
}

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

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

.hero-slide__image,
.detail-hero__background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-slide__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.88)),
    linear-gradient(90deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.2));
}

.hero-slide__content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding-bottom: 90px;
  color: #ffffff;
}

.hero-slide__badges,
.detail-badges,
.movie-card__tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-slide__badges span,
.detail-badges span,
.movie-card__tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: 999px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 12px;
  font-weight: 700;
}

.hero-slide__badges span {
  color: #ffffff;
  background: rgba(20, 184, 166, 0.86);
}

.hero-slide h1 {
  max-width: 760px;
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-slide p {
  max-width: 700px;
  margin: 0 0 28px;
  color: #e2e8f0;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.75;
}

.hero-slide__actions,
.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
.inline-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 13px;
  font-weight: 750;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover,
.inline-links a:hover {
  transform: translateY(-2px);
}

.button--primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--color-primary), var(--color-cyan));
  box-shadow: 0 14px 34px rgba(13, 148, 136, 0.35);
}

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

.button--small {
  min-height: 38px;
  padding: 0 14px;
  color: #ffffff;
  background: var(--color-primary);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
}

.hero-arrow--prev {
  left: 24px;
}

.hero-arrow--next {
  right: 24px;
}

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

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

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

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

.quick-search {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  align-items: center;
  margin-top: -44px;
  padding: 28px;
  position: relative;
  z-index: 4;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.quick-search h2,
.section-heading h2,
.page-hero h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.quick-search p,
.page-hero p,
.category-tile p,
.category-overview-card p {
  color: var(--color-muted);
  line-height: 1.75;
}

.quick-search form {
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: #ffffff;
}

.quick-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 12px;
  background: transparent;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--color-primary-deep);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.section-shell {
  margin-top: 70px;
}

.section-shell--wide {
  width: min(1280px, calc(100% - 32px));
}

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

.section-heading a {
  color: var(--color-primary-deep);
  font-weight: 800;
}

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

.category-tile,
.category-overview-card,
.content-card,
.filter-panel {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.category-tile {
  min-height: 180px;
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.category-tile::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -36px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.16);
}

.category-tile span {
  display: block;
  font-size: 20px;
  font-weight: 850;
}

.category-tile strong {
  display: block;
  margin-top: 8px;
  color: var(--color-primary);
  font-size: 34px;
}

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

.movie-grid--catalog {
  margin-top: 24px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(204, 251, 241, 0.9);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
}

.movie-card__poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #0f766e, #0f172a);
}

.movie-card__poster img,
.ranking-item__poster img,
.detail-cover img,
.player-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.movie-card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 32px;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.7));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .movie-card__play {
  opacity: 1;
}

.movie-card__body {
  padding: 16px;
}

.movie-card__meta,
.ranking-item__meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--color-primary-deep);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3,
.ranking-item h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.ranking-item h3 a:hover {
  color: var(--color-primary-deep);
}

.movie-card p,
.ranking-item p {
  margin: 0 0 12px;
  min-height: 48px;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.65;
}

.movie-card__tags span {
  min-height: 24px;
  padding: 4px 9px;
  font-size: 11px;
}

.movie-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 18px;
}

.movie-card--rail {
  width: 320px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.page-shell {
  padding-top: 42px;
}

.page-shell--narrow {
  width: min(920px, calc(100% - 32px));
}

.page-hero {
  margin-bottom: 28px;
  padding: 34px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.18), transparent 24rem),
    rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.page-hero p {
  max-width: 760px;
  margin-bottom: 0;
}

.filter-panel {
  padding: 20px;
}

.filter-panel__row {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 14px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid #99f6e4;
  border-radius: 13px;
  outline: 0;
  padding: 12px 13px;
  background: #ffffff;
  color: var(--color-text);
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

.filter-count {
  margin: 14px 0 0;
  color: var(--color-muted);
  font-weight: 700;
}

.category-overview-list {
  display: grid;
  gap: 24px;
}

.category-overview-card {
  padding: 24px;
}

.category-overview-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 72px 180px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.ranking-item__rank {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-cyan));
  font-size: 22px;
  font-weight: 900;
}

.ranking-item__poster {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  background: #0f172a;
}

.ranking-item__tags {
  color: var(--color-primary-deep);
  font-size: 13px;
  font-weight: 700;
}

.detail-page {
  padding-bottom: 40px;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.detail-hero__background {
  position: absolute;
  inset: 0;
}

.detail-hero__background::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.94)),
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.28));
  backdrop-filter: blur(1px);
}

.detail-hero__inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 64px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: #5eead4;
}

.detail-hero__layout {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 42px;
  align-items: end;
}

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #0f766e, #0f172a);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.detail-info h1 {
  margin: 18px 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 720px;
  color: #e2e8f0;
  font-size: 19px;
  line-height: 1.8;
}

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

.player-section {
  width: min(1180px, calc(100% - 32px));
  margin: -72px auto 46px;
  position: relative;
  z-index: 5;
}

.video-player {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(204, 251, 241, 0.7);
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.38);
}

.site-video,
.player-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.site-video {
  z-index: 1;
  object-fit: contain;
  background: #020617;
}

.player-poster {
  z-index: 2;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #020617;
}

.player-poster.is-hidden {
  display: none;
}

.player-poster__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.78));
}

.player-poster__button {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-cyan));
  box-shadow: 0 18px 45px rgba(13, 148, 136, 0.45);
  font-size: 40px;
  transform: translate(-50%, -50%);
}

.detail-content {
  display: grid;
  gap: 20px;
}

.content-card {
  padding: 28px;
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 25px;
}

.content-card p {
  margin: 0;
  color: #334155;
  font-size: 17px;
  line-height: 1.9;
}

.related-section {
  margin-top: 60px;
}

.inline-links a {
  color: var(--color-primary-deep);
  background: #ccfbf1;
}

.site-footer {
  margin-top: 80px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a 0%, #134e4a 54%, #164e63 100%);
}

.site-footer__inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 42px;
  padding: 48px 0;
}

.footer-logo {
  color: #ffffff;
  background: none;
}

.footer-logo .site-logo__icon {
  color: #5eead4;
}

.footer-brand p {
  max-width: 520px;
  color: #cbd5e1;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 18px;
}

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

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

.footer-copy {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0;
  border-top: 1px solid rgba(94, 234, 212, 0.24);
  color: #94a3b8;
  text-align: center;
}

.movie-item.is-hidden {
  display: none;
}

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

  .mobile-menu-button {
    display: block;
    margin-left: auto;
  }

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

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

@media (max-width: 760px) {
  .site-header__inner {
    height: 64px;
  }

  .site-logo {
    font-size: 19px;
  }

  .hero-slider {
    min-height: 520px;
  }

  .hero-slide__content {
    padding-bottom: 80px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search {
    grid-template-columns: 1fr;
    margin-top: 20px;
    padding: 22px;
  }

  .quick-search form {
    border-radius: 18px;
    flex-direction: column;
  }

  .quick-search input {
    min-height: 42px;
  }

  .section-heading,
  .category-overview-card__header {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .movie-card__body {
    padding: 13px;
  }

  .movie-card h3 {
    font-size: 16px;
  }

  .movie-card p {
    min-height: auto;
    font-size: 13px;
  }

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

  .ranking-item {
    grid-template-columns: 52px 96px 1fr;
    gap: 12px;
  }

  .ranking-item__rank {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 17px;
  }

  .ranking-item p,
  .ranking-item__tags {
    display: none;
  }

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

  .detail-cover {
    width: min(78vw, 340px);
  }

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

  .player-poster__button {
    width: 70px;
    height: 70px;
    font-size: 30px;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

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

  .movie-card--rail {
    width: 82vw;
  }

  .page-hero,
  .content-card,
  .category-overview-card {
    padding: 22px;
  }

  .hero-slide h1,
  .detail-info h1 {
    letter-spacing: -0.04em;
  }
}
