* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --green-950: #052e1c;
  --green-900: #064e3b;
  --green-800: #065f46;
  --green-700: #047857;
  --green-600: #059669;
  --green-500: #10b981;
  --green-100: #d1fae5;
  --green-50: #ecfdf5;
  --teal-900: #134e4a;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f1f5f9 100%);
  color: #172033;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--green-900), var(--green-700));
  color: var(--white);
  box-shadow: 0 12px 30px rgba(6, 78, 59, 0.22);
}

.nav-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  font-size: 15px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 15px;
  font-weight: 600;
}

.main-nav a,
.mobile-nav a {
  opacity: 0.94;
  transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.mobile-nav a:hover {
  color: var(--green-100);
  opacity: 1;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mobile-nav.open {
  display: grid;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.4), transparent 38%), linear-gradient(120deg, var(--green-950), var(--teal-900));
  color: var(--white);
}

.hero-track {
  position: relative;
  min-height: 620px;
}

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

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

.hero-slide > img,
.detail-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px) saturate(1.08);
  opacity: 0.34;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 46, 28, 0.92) 0%, rgba(6, 78, 59, 0.78) 44%, rgba(15, 23, 42, 0.55) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 54px;
  align-items: center;
  padding: 72px 0 92px;
}

.hero-copy {
  max-width: 780px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.18);
  color: #bbf7d0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  margin: 0 0 28px;
  font-size: clamp(17px, 2vw, 22px);
  color: rgba(255, 255, 255, 0.9);
}

.hero-tags,
.tag-row,
.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  font-size: 13px;
  font-weight: 700;
}

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

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

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  background: var(--green-500);
  color: var(--white);
  box-shadow: 0 14px 28px rgba(16, 185, 129, 0.35);
}

.btn.primary:hover {
  background: var(--green-600);
}

.btn.glass {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
}

.btn.ghost {
  color: var(--white);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.42);
}

.hero-poster {
  position: relative;
  display: block;
  min-height: 460px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.38);
  transform: rotate(1.2deg);
}

.hero-poster img,
.detail-poster img,
.poster-wrap img,
.list-cover img,
.category-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.36s ease;
}

.hero-poster:hover img,
.movie-card:hover .poster-wrap img,
.list-card:hover .list-cover img,
.category-card:hover .category-cover img {
  transform: scale(1.06);
}

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: rgba(16, 185, 129, 0.88);
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

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

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

.hero-prev,
.hero-next {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  font-size: 28px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

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

.home-search {
  margin-top: -44px;
  position: relative;
  z-index: 8;
}

.search-panel {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
}

.search-panel label {
  display: block;
  margin-bottom: 10px;
  color: var(--slate-700);
  font-weight: 800;
}

.search-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.filter-input {
  min-height: 50px;
  width: 100%;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  padding: 0 16px;
  outline: none;
  color: var(--slate-800);
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-input:focus {
  border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.clear-search {
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  padding: 0 18px;
  color: var(--white);
  background: var(--green-700);
  cursor: pointer;
}

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

.soft-bg {
  background: linear-gradient(180deg, var(--green-50), #ffffff);
}

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

.section-heading h2 {
  margin: 0 0 6px;
  color: var(--slate-900);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-heading p {
  margin: 0;
  color: var(--slate-500);
}

.section-more {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--green-700);
  background: var(--green-100);
  font-weight: 800;
  white-space: nowrap;
}

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

.category-tile {
  min-height: 172px;
  padding: 22px;
  border-radius: var(--radius-lg);
  color: var(--white);
  background: linear-gradient(145deg, var(--green-800), var(--green-500));
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:nth-child(2n) {
  background: linear-gradient(145deg, var(--slate-800), var(--green-700));
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 45px rgba(6, 95, 70, 0.22);
}

.category-tile span,
.category-tile strong,
.category-tile small {
  display: block;
}

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

.category-tile strong {
  margin: 16px 0 6px;
  font-size: 16px;
}

.category-tile small {
  color: rgba(255, 255, 255, 0.82);
}

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

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

.movie-card,
.list-card,
.category-card,
.text-panel {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.movie-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover,
.list-card:hover,
.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.16);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--slate-800);
}

.featured-card .poster-wrap {
  aspect-ratio: 4 / 3;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.68) 100%);
  opacity: 0.8;
}

.play-icon,
.duration,
.rank-badge {
  position: absolute;
  color: var(--white);
}

.play-icon {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.9);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

.duration {
  right: 12px;
  bottom: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-weight: 900;
}

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

.movie-card h2,
.list-card h2,
.category-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.movie-card h2 a:hover,
.list-card h2 a:hover,
.category-card h2 a:hover,
.category-samples a:hover {
  color: var(--green-700);
}

.movie-card p,
.list-card p,
.category-card p {
  display: -webkit-box;
  margin: 0 0 14px;
  color: var(--slate-600);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  margin-bottom: 12px;
  color: var(--slate-500);
}

.movie-meta span,
.tag-row span {
  background: var(--slate-100);
  color: var(--slate-600);
}

.tag-row span {
  background: var(--green-50);
  color: var(--green-700);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 34px;
  align-items: start;
}

.side-column {
  position: sticky;
  top: 96px;
}

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

.list-card {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 16px;
  padding: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.full-list .list-card {
  grid-template-columns: 160px minmax(0, 1fr);
}

.list-cover {
  display: block;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  border-radius: 14px;
  background: var(--slate-800);
}

.list-body h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.list-rank,
.list-dot {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: var(--green-600);
  font-size: 13px;
  font-weight: 900;
}

.list-dot {
  width: 12px;
  height: 12px;
  color: transparent;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0;
  color: var(--white);
  background: radial-gradient(circle at 20% 10%, rgba(16, 185, 129, 0.45), transparent 35%), linear-gradient(135deg, var(--green-950), var(--slate-900));
}

.compact-hero,
.search-hero,
.ranking-hero,
.category-hero {
  padding: 72px 0 48px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--green-100);
}

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

.category-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-cover {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 4 / 3;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-samples a {
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--green-700);
  background: var(--green-50);
  font-size: 13px;
  font-weight: 700;
}

.detail-hero {
  min-height: 540px;
  padding: 54px 0 70px;
}

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

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(6, 78, 59, 0.78));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
}

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

.detail-poster {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
  aspect-ratio: 3 / 4;
  background: var(--slate-800);
}

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

.large-tags {
  gap: 8px;
}

.player-section {
  margin-top: -52px;
  position: relative;
  z-index: 4;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #000000;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.3);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.68));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover strong {
  font-size: clamp(22px, 4vw, 42px);
  text-align: center;
}

.player-cover em {
  font-style: normal;
  color: #bbf7d0;
  font-weight: 800;
}

.play-circle {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--green-500);
  box-shadow: 0 18px 42px rgba(16, 185, 129, 0.36);
  font-size: 30px;
}

.player-box.is-playing .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-content {
  padding-top: 88px;
}

.detail-text-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 320px;
  gap: 22px;
}

.text-panel {
  padding: 24px;
}

.text-panel h2 {
  margin: 0 0 14px;
  color: var(--slate-900);
}

.text-panel p {
  margin: 0;
  color: var(--slate-600);
}

.info-panel dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

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

.info-panel dt {
  color: var(--slate-500);
}

.info-panel dd {
  margin: 0;
  color: var(--slate-800);
  font-weight: 700;
}

.detail-neighbors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.detail-neighbors a {
  padding: 16px;
  border-radius: 16px;
  color: var(--green-800);
  background: var(--white);
  box-shadow: var(--shadow-card);
  font-weight: 800;
}

.site-footer {
  color: #d8e0ea;
  background: linear-gradient(180deg, var(--slate-800), var(--slate-950));
}

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

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

.site-footer p {
  margin: 16px 0 0;
  color: #b9c3d2;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #d8e0ea;
}

.footer-links a:hover {
  color: var(--white);
  background: rgba(16, 185, 129, 0.24);
}

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

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

@media (max-width: 1080px) {
  .main-nav {
    gap: 12px;
    font-size: 14px;
  }

  .hero-content,
  .split-layout,
  .detail-text-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .side-column {
    display: none;
  }

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

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

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

  .hero-content {
    padding: 54px 0 86px;
  }

  .movie-grid,
  .featured-grid,
  .category-grid,
  .category-list,
  .footer-grid,
  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }

  .category-card {
    grid-template-columns: 150px minmax(0, 1fr);
  }

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

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

  .brand {
    font-size: 18px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 36px;
  }

  .search-line,
  .movie-grid,
  .featured-grid,
  .category-grid,
  .category-list,
  .footer-grid,
  .detail-grid,
  .detail-neighbors {
    grid-template-columns: 1fr;
  }

  .category-card,
  .list-card,
  .full-list .list-card {
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 12px;
  }

  .category-cover,
  .list-cover {
    aspect-ratio: 3 / 4;
  }

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

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

  .page-hero,
  .detail-hero {
    padding: 46px 0;
  }

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