* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1f2937;
  background: #ffffff;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(16, 185, 129, 0.14);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f766e;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, #059669, #14b8a6);
  box-shadow: 0 14px 30px rgba(5, 150, 105, 0.24);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #374151;
  font-weight: 600;
}

.main-nav a {
  position: relative;
  padding: 8px 0;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  border-radius: 99px;
  background: #10b981;
  transition: right 0.25s ease;
}

.main-nav a:hover {
  color: #059669;
}

.main-nav a:hover::after {
  right: 0;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #ecfdf5;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: #059669;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #022c22;
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.05);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 24%, rgba(20, 184, 166, 0.38), transparent 36%),
    linear-gradient(90deg, rgba(2, 44, 34, 0.93) 0%, rgba(6, 78, 59, 0.76) 42%, rgba(2, 44, 34, 0.24) 100%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0) 34%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 640px;
  margin: 0 auto;
  padding: 118px 0 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.16);
  color: #d1fae5;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-content h1 {
  max-width: 760px;
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 32px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.85;
}

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

.btn-primary,
.btn-soft,
.home-search button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary,
.home-search button {
  color: #ffffff;
  background: linear-gradient(135deg, #059669, #14b8a6);
  box-shadow: 0 18px 36px rgba(5, 150, 105, 0.28);
}

.btn-soft,
.section-more {
  color: #065f46;
  background: rgba(236, 253, 245, 0.88);
  border: 1px solid rgba(16, 185, 129, 0.18);
}

.btn-primary:hover,
.btn-soft:hover,
.home-search button:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-side-card {
  position: absolute;
  right: max(24px, calc((100% - 1180px) / 2));
  bottom: 86px;
  z-index: 5;
  width: min(360px, calc(100% - 48px));
  padding: 26px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  background: rgba(2, 44, 34, 0.54);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(2, 44, 34, 0.32);
}

.hero-side-card span,
.eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  color: #059669;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-side-card span {
  color: #99f6e4;
}

.hero-side-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.2;
}

.hero-side-card p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
}

.hero-side-card a {
  color: #a7f3d0;
  font-weight: 800;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
}

.hero-prev,
.hero-next,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  color: #064e3b;
  font-size: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
}

.hero-dots {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
}

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

.hero-dot.is-active {
  width: 28px;
  background: #10b981;
}

.search-band,
.content-section,
.detail-content,
.player-section,
.filter-bar {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.search-band {
  position: relative;
  z-index: 10;
  margin-top: -72px;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 520px);
  gap: 28px;
  align-items: center;
  padding: 30px;
  border: 1px solid rgba(16, 185, 129, 0.18);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 26px 70px rgba(15, 118, 110, 0.16);
}

.search-panel h2,
.section-head h1,
.section-head h2,
.text-panel h2,
.page-hero h1 {
  margin: 0;
  color: #111827;
  letter-spacing: -0.04em;
}

.search-panel h2 {
  font-size: 28px;
}

.search-panel p,
.section-head p,
.page-hero p,
.text-panel p {
  color: #5b6472;
  line-height: 1.8;
}

.home-search,
.filter-bar {
  display: flex;
  gap: 12px;
}

.home-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  color: #111827;
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 16px;
  background: #ffffff;
  outline: none;
}

.content-section {
  padding: 86px 0;
}

.content-section.top-tight {
  padding-top: 32px;
}

.soft-bg {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100% - 1180px) / 2));
  padding-right: max(16px, calc((100% - 1180px) / 2));
  background: linear-gradient(135deg, #ecfdf5, #f0fdfa 48%, #fffbeb);
}

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

.section-head h1,
.section-head h2 {
  margin-bottom: 10px;
  font-size: clamp(28px, 4vw, 42px);
}

.section-head p {
  max-width: 720px;
  margin: 0;
}

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

.featured-grid .movie-card:first-child {
  grid-column: span 2;
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(16, 185, 129, 0.14);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.32);
  box-shadow: 0 22px 58px rgba(15, 118, 110, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #ecfdf5;
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 44, 34, 0.52), transparent 48%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.poster-play,
.rank-badge {
  position: absolute;
  z-index: 2;
  color: #ffffff;
  font-weight: 900;
}

.poster-play {
  left: 50%;
  top: 50%;
  display: inline-grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.86);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  padding: 6px 9px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  text-align: center;
}

.movie-info {
  padding: 18px;
}

.movie-info h2 {
  margin: 0 0 9px;
  color: #111827;
  font-size: 18px;
  line-height: 1.3;
}

.movie-info h2 a:hover {
  color: #059669;
}

.movie-info p {
  min-height: 48px;
  margin: 0 0 14px;
  color: #667085;
  font-size: 14px;
  line-height: 1.7;
}

.movie-meta {
  margin-bottom: 12px;
}

.movie-meta span {
  background: #f3f4f6;
  color: #4b5563;
}

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

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

.category-tile {
  min-height: 190px;
  padding: 24px;
  border: 1px solid rgba(16, 185, 129, 0.16);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 42px rgba(15, 118, 110, 0.08);
  transition: transform 0.25s ease, background 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  background: #ffffff;
}

.category-tile span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  color: #ffffff;
  font-weight: 900;
  border-radius: 14px;
  background: linear-gradient(135deg, #059669, #14b8a6);
}

.category-tile h2 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 22px;
}

.category-tile p {
  margin: 0;
  color: #667085;
  line-height: 1.7;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.wide-panel {
  padding: 28px;
  border: 1px solid rgba(16, 185, 129, 0.14);
  border-radius: 30px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.wide-panel .section-head {
  display: block;
  margin-bottom: 20px;
}

.rank-list,
.mini-list {
  display: grid;
  gap: 10px;
}

.rank-row,
.mini-list a {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background 0.25s ease, transform 0.25s ease;
}

.rank-row {
  grid-template-columns: 42px 1fr 50px;
}

.rank-row:hover,
.mini-list a:hover {
  transform: translateX(4px);
  background: #ecfdf5;
}

.rank-row span {
  color: #059669;
  font-weight: 900;
}

.rank-row strong {
  color: #111827;
}

.rank-row em,
.mini-list em {
  color: #f59e0b;
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.mini-list a {
  grid-template-columns: 58px 1fr 56px;
}

.mini-list img {
  width: 58px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 85% 20%, rgba(20, 184, 166, 0.22), transparent 30%),
    linear-gradient(135deg, #ecfdf5, #ffffff 56%, #f0fdfa);
}

.page-hero > div {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.page-hero h1 {
  max-width: 760px;
  font-size: clamp(38px, 6vw, 66px);
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  font-size: 18px;
}

.filter-bar {
  margin-top: 30px;
  padding: 18px;
  border: 1px solid rgba(16, 185, 129, 0.14);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 44px rgba(15, 118, 110, 0.08);
}

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

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

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px) saturate(1.05);
  transform: scale(1.05);
  opacity: 0.38;
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 12%, rgba(16, 185, 129, 0.3), transparent 30%),
    linear-gradient(90deg, rgba(2, 44, 34, 0.96), rgba(6, 78, 59, 0.78));
}

.detail-wrap {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  padding: 72px 0;
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 30px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #a7f3d0;
  font-weight: 700;
}

.detail-intro h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 70px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.detail-intro p {
  max-width: 760px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.85;
}

.detail-meta span,
.detail-tags span {
  color: #d1fae5;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.detail-tags {
  margin: 18px 0 28px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000000;
  box-shadow: 0 28px 80px rgba(2, 44, 34, 0.2);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #ffffff;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.16));
  cursor: pointer;
}

.play-cover span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  padding-left: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, #059669, #14b8a6);
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.32);
  font-size: 36px;
}

.play-cover strong {
  font-size: 20px;
}

.player-shell.is-playing .play-cover {
  opacity: 0;
  pointer-events: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 42px 0;
}

.text-panel {
  padding: 30px;
  border: 1px solid rgba(16, 185, 129, 0.14);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.06);
}

.text-panel h2 {
  margin-bottom: 14px;
  font-size: 28px;
}

.text-panel p {
  margin: 0;
}

.detail-related {
  padding-top: 36px;
}

.related-grid,
.rank-grid,
.category-page-grid,
.search-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.site-footer {
  margin-top: 40px;
  padding: 58px 0 24px;
  background: linear-gradient(180deg, #f8fafc, #ecfdf5);
  border-top: 1px solid rgba(16, 185, 129, 0.14);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-grid p {
  max-width: 460px;
  color: #667085;
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 18px;
}

.footer-grid a:not(.footer-logo) {
  display: block;
  margin: 9px 0;
  color: #4b5563;
}

.footer-grid a:hover {
  color: #059669;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 20px;
  color: #6b7280;
  border-top: 1px solid rgba(16, 185, 129, 0.14);
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1120px) {
  .movie-grid,
  .related-grid,
  .rank-grid,
  .category-page-grid,
  .search-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid rgba(16, 185, 129, 0.14);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 20px 50px rgba(15, 118, 110, 0.14);
  }

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

  .main-nav a {
    padding: 12px 14px;
    border-radius: 12px;
  }

  .main-nav a:hover {
    background: #ecfdf5;
  }

  .main-nav a::after {
    display: none;
  }

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

  .hero-content {
    padding: 92px 0 170px;
  }

  .hero-side-card {
    left: 16px;
    right: 16px;
    bottom: 82px;
    width: auto;
    padding: 20px;
  }

  .search-panel,
  .split-section,
  .detail-wrap,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .home-search,
  .filter-bar {
    flex-direction: column;
  }

  .section-head {
    display: block;
  }

  .section-more {
    margin-top: 16px;
  }

  .detail-wrap {
    padding-top: 42px;
  }

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

@media (max-width: 640px) {
  .nav-wrap {
    width: min(100% - 24px, 1180px);
  }

  .logo {
    font-size: 18px;
  }

  .hero-content,
  .search-band,
  .content-section,
  .detail-content,
  .player-section,
  .filter-bar,
  .footer-grid,
  .footer-bottom,
  .page-hero > div,
  .detail-wrap {
    width: min(100% - 24px, 1180px);
  }

  .movie-grid,
  .featured-grid,
  .related-grid,
  .rank-grid,
  .category-page-grid,
  .search-grid,
  .category-grid,
  .category-grid.large {
    grid-template-columns: 1fr;
  }

  .featured-grid .movie-card:first-child {
    grid-column: auto;
  }

  .content-section {
    padding: 58px 0;
  }

  .soft-bg {
    padding-left: 12px;
    padding-right: 12px;
  }

  .search-panel,
  .wide-panel,
  .text-panel {
    padding: 20px;
    border-radius: 22px;
  }

  .category-tile {
    min-height: 160px;
  }
}
