:root {
  --teal-950: #042f2e;
  --teal-900: #134e4a;
  --teal-800: #115e59;
  --teal-700: #0f766e;
  --teal-600: #0d9488;
  --teal-100: #ccfbf1;
  --amber-500: #f59e0b;
  --gray-950: #111827;
  --gray-900: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;
  --shadow-md: 0 8px 22px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 24px 60px rgba(15, 23, 42, 0.18);
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: linear-gradient(180deg, var(--gray-50), var(--white));
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--teal-700), var(--teal-950));
  color: var(--white);
  box-shadow: 0 10px 30px rgba(4, 47, 46, 0.28);
}

.nav-shell {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: var(--teal-950);
  background: var(--teal-100);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.45);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  color: var(--white);
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--teal-100);
}

.header-search {
  position: relative;
  margin-left: auto;
  width: min(320px, 32vw);
}

.site-search-input,
[data-filter-input] {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 12px 18px;
  color: var(--gray-900);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 0 0 1px rgba(13, 148, 136, 0.14);
}

.site-search-results {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(440px, 92vw);
  max-height: 460px;
  overflow: auto;
  padding: 10px;
  border-radius: 18px;
  color: var(--gray-900);
  background: var(--white);
  box-shadow: var(--shadow-xl);
}

.search-result-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 12px;
}

.search-result-item:hover {
  background: var(--gray-50);
}

.search-result-item strong {
  color: var(--teal-700);
}

.search-result-item span {
  color: var(--gray-500);
  font-size: 0.875rem;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: var(--teal-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 47, 46, 0.94), rgba(4, 47, 46, 0.58), rgba(4, 47, 46, 0.9)),
    radial-gradient(circle at 72% 30%, rgba(20, 184, 166, 0.5), transparent 32%);
  backdrop-filter: blur(2px);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 56px;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin-inline: auto;
  color: var(--white);
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--teal-100);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.hero-kicker span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.hero-copy h1 {
  max-width: 760px;
  margin: 18px 0 16px;
  font-size: clamp(2.3rem, 6vw, 5rem);
  line-height: 1.05;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.2rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 28px;
}

.hero-meta span,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--teal-800);
  background: var(--teal-100);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 11px 22px;
  color: var(--white);
  background: var(--teal-600);
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: var(--teal-700);
  box-shadow: var(--shadow-md);
}

.btn.primary {
  background: linear-gradient(90deg, var(--teal-600), var(--teal-800));
}

.btn.ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.btn.ghost-dark {
  color: var(--teal-800);
  background: var(--teal-100);
}

.btn.small {
  min-height: 38px;
  padding: 8px 16px;
}

.btn.block {
  width: 100%;
  margin-top: 10px;
}

.hero-poster {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.34);
  transform: rotate(2deg);
}

.hero-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-50%);
  font-size: 2rem;
}

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

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

.hero-dots {
  position: absolute;
  z-index: 3;
  right: 48px;
  bottom: 32px;
  display: flex;
  gap: 8px;
}

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

.hero-dot.active {
  width: 34px;
  background: var(--white);
}

.quick-search {
  margin-top: -34px;
  position: relative;
  z-index: 4;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  align-items: center;
  gap: 24px;
  padding: 24px;
  border-radius: var(--radius-2xl);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-xl);
}

.search-panel.slim {
  margin-bottom: 28px;
  box-shadow: var(--shadow-md);
}

.search-panel h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
}

.search-panel p {
  margin: 0;
  color: var(--gray-600);
}

.content-section {
  margin-top: 56px;
}

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

.section-head h2 {
  margin: 0;
  color: var(--gray-900);
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.section-head p {
  margin: 6px 0 0;
  color: var(--gray-600);
}

.section-more {
  color: var(--teal-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(6, minmax(0, 1fr));
  gap: 18px;
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-md);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--teal-100), var(--gray-100));
}

.movie-card.card-wide .poster-link {
  aspect-ratio: 16 / 10;
}

.poster-link img {
  transition: transform 0.35s ease;
}

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

.poster-badge,
.poster-play {
  position: absolute;
  border-radius: 999px;
  color: var(--white);
  font-weight: 800;
}

.poster-badge {
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  background: rgba(15, 118, 110, 0.92);
}

.poster-play {
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: rgba(0, 0, 0, 0.68);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: scale(1);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--gray-500);
  font-size: 0.82rem;
  font-weight: 700;
}

.card-body h3 {
  margin: 8px 0 8px;
  font-size: 1.08rem;
  line-height: 1.3;
}

.card-body h3 a:hover,
.rank-info h3 a:hover {
  color: var(--teal-700);
}

.card-body p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--gray-600);
  font-size: 0.92rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-tags .pill {
  min-height: 26px;
  padding: 4px 9px;
  font-size: 0.78rem;
}

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

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

.category-tile {
  display: grid;
  gap: 14px;
  min-height: 190px;
  padding: 18px;
  border-radius: var(--radius-2xl);
  color: var(--gray-900);
  background: linear-gradient(135deg, var(--white), #f0fdfa);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  height: 96px;
}

.category-covers img {
  border-radius: 12px;
  background: var(--gray-100);
}

.category-tile strong {
  color: var(--teal-800);
  font-size: 1.15rem;
}

.category-tile span {
  color: var(--gray-600);
  font-size: 0.92rem;
}

.page-main {
  padding-bottom: 64px;
}

.page-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 78% 10%, rgba(45, 212, 191, 0.32), transparent 30%),
    linear-gradient(135deg, var(--teal-900), var(--teal-950));
}

.compact-hero .container {
  padding: 70px 0;
}

.page-hero h1 {
  max-width: 900px;
  margin: 10px 0 12px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.1;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.1rem;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 56px 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.rank-no {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  color: var(--white);
  background: var(--teal-700);
  font-weight: 900;
}

.rank-poster {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
  background: var(--gray-100);
}

.rank-info h3 {
  margin: 0 0 4px;
  font-size: 1.12rem;
}

.rank-info p {
  margin: 0 0 8px;
  color: var(--gray-600);
}

.detail-main {
  padding-bottom: 64px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background-image: var(--detail-image);
  background-position: center;
  background-size: cover;
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 47, 46, 0.96), rgba(4, 47, 46, 0.64)),
    linear-gradient(0deg, rgba(4, 47, 46, 0.9), transparent 45%);
  backdrop-filter: blur(2px);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 44px 0 72px;
}

.crumb,
.crumb-sep {
  display: inline-flex;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.crumb:hover {
  color: var(--teal-100);
}

.crumb-sep {
  margin-inline: 8px;
}

.detail-top {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-cover {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow-xl);
}

.detail-title-block h1 {
  margin: 10px 0 14px;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 1.05;
}

.detail-title-block p {
  max-width: 820px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.12rem;
}

.detail-tags .pill {
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
}

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

.detail-primary,
.detail-side {
  display: grid;
  gap: 22px;
}

.player-card,
.article-card,
.side-card {
  overflow: hidden;
  border-radius: var(--radius-2xl);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--gray-950);
}

.player-shell video {
  width: 100%;
  height: 100%;
  background: #000;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.72));
  text-align: center;
}

.play-cover[hidden] {
  display: none;
}

.play-ring {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: var(--teal-600);
  box-shadow: 0 0 0 12px rgba(13, 148, 136, 0.24);
  font-size: 2rem;
}

.play-cover strong {
  max-width: 80%;
  font-size: 1.2rem;
}

.article-card,
.side-card {
  padding: 24px;
}

.article-card h2,
.side-card h2 {
  margin: 0 0 14px;
  color: var(--teal-800);
}

.article-card p {
  margin: 0;
  color: var(--gray-700);
  font-size: 1.02rem;
}

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

.side-card dl div {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
}

.side-card dt {
  color: var(--gray-500);
  font-weight: 800;
}

.side-card dd {
  margin: 0;
  color: var(--gray-900);
}

.site-footer {
  margin-top: 72px;
  color: rgba(255, 255, 255, 0.8);
  background: var(--gray-950);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
  padding: 48px 0;
}

.footer-grid p {
  max-width: 460px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.64);
}

.footer-grid h3 {
  margin: 0 0 12px;
  color: var(--white);
}

.footer-grid a:not(.footer-logo) {
  display: block;
  margin: 8px 0;
  color: rgba(255, 255, 255, 0.72);
}

.footer-grid a:hover {
  color: var(--teal-100);
}

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
}

.no-results {
  padding: 28px;
  border-radius: var(--radius-xl);
  color: var(--gray-600);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

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

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

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
}

@media (max-width: 820px) {
  .nav-shell {
    flex-wrap: wrap;
    min-height: auto;
    padding-block: 14px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: 12px;
  }

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

  .nav-link {
    padding: 10px 0;
  }

  .header-search {
    order: 4;
    width: 100%;
    margin-left: 0;
  }

  .hero,
  .hero-content {
    min-height: 700px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 30px;
  }

  .hero-poster {
    width: min(220px, 62vw);
    justify-self: start;
  }

  .hero-arrow {
    display: none;
  }

  .hero-dots {
    right: auto;
    left: 24px;
  }

  .search-panel,
  .detail-layout,
  .footer-grid,
  .detail-top {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    width: min(240px, 68vw);
  }

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

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

  .rank-row .btn {
    grid-column: 2 / -1;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .hero-copy h1,
  .detail-title-block h1,
  .page-hero h1 {
    font-size: 2.15rem;
  }

  .hero-copy p,
  .detail-title-block p {
    font-size: 1rem;
  }

  .movie-grid,
  .movie-grid.compact,
  .category-grid,
  .category-grid.large {
    grid-template-columns: 1fr;
  }

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

  .category-covers {
    height: 120px;
  }
}
