:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #ecfdf5;
  --emerald: #059669;
  --emerald-dark: #047857;
  --teal: #0d9488;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.12), transparent 34rem), var(--bg);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, #d1fae5, #ccfbf1);
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
}

.nav-shell {
  max-width: 1200px;
  height: 70px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

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

.brand-mark,
.footer-brand span {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.28);
}

.brand-text {
  font-size: 1.35rem;
  background: linear-gradient(135deg, var(--emerald-dark), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #334155;
  font-weight: 650;
  white-space: nowrap;
}

.desktop-nav a {
  position: relative;
  transition: color 0.22s ease;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--emerald), var(--teal));
  transition: width 0.22s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--emerald-dark);
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #f1f5f9;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #334155;
}

.mobile-nav {
  display: none;
  padding: 12px 24px 20px;
  border-top: 1px solid var(--line);
}

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

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  font-weight: 700;
}

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

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

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: saturate(1.08);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 72% 20%, rgba(20, 184, 166, 0.35), transparent 28rem), linear-gradient(0deg, rgba(2, 44, 34, 0.72), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  min-height: 640px;
  margin: 0 auto;
  padding: 92px 24px 126px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  gap: 54px;
  color: #ffffff;
}

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

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

.hero-tags span,
.movie-tags span,
.detail-tags span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

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

.hero-copy h1 {
  margin: 20px 0 18px;
  font-size: clamp(2.5rem, 7vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

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

.primary-btn,
.ghost-btn,
.section-more,
.panel-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 18px 34px rgba(5, 150, 105, 0.32);
}

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

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

.hero-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster span,
.detail-poster span,
.play-badge {
  position: absolute;
  inset: auto 18px 18px auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #064e3b;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.hero-panel {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 26px;
  width: min(1152px, calc(100% - 48px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.hero-search,
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
}

.hero-search {
  width: min(560px, 100%);
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.hero-search input,
.filter-bar input {
  min-width: 0;
  flex: 1;
  height: 46px;
  border: 0;
  outline: 0;
  border-radius: 12px;
  padding: 0 16px;
  color: var(--ink);
  background: #f8fafc;
}

.hero-search button,
.filter-chips button {
  height: 46px;
  border: 0;
  border-radius: 12px;
  padding: 0 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  font-weight: 800;
  cursor: pointer;
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: width 0.22s ease, background 0.22s ease;
}

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

.section-block {
  max-width: 1200px;
  margin: 0 auto;
  padding: 58px 24px;
}

.quick-entry {
  margin-top: -28px;
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding-top: 0;
}

.quick-entry a {
  display: grid;
  gap: 6px;
  padding: 22px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease;
}

.quick-entry a:hover {
  transform: translateY(-4px);
}

.quick-entry strong {
  font-size: 1.12rem;
}

.quick-entry span {
  color: var(--muted);
  font-size: 0.92rem;
}

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

.kicker {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--emerald-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h2,
.rank-head h2,
.story-card h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.story-card p,
.category-overview-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more,
.panel-link {
  color: var(--emerald-dark);
  background: #d1fae5;
}

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

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

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

.movie-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 1fr);
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 14px;
  scroll-snap-type: x mandatory;
}

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #ecfdf5, #ccfbf1);
}

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

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

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

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

.score-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  color: #064e3b;
  background: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
}

.play-badge {
  z-index: 3;
  opacity: 0;
  transform: scale(0.82);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-tags span {
  color: var(--emerald-dark);
  background: var(--soft);
}

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 1.02rem;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--emerald-dark);
}

.movie-card p {
  min-height: 3.4em;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #64748b;
  font-size: 0.82rem;
}

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

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

.category-tile {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: 22px;
  color: #ffffff;
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.84), rgba(2, 6, 23, 0.12));
}

.category-tile span,
.category-tile small {
  position: relative;
  z-index: 2;
  display: block;
  padding: 0 18px;
}

.category-tile span {
  margin-top: 96px;
  font-size: 1.35rem;
  font-weight: 900;
}

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

.category-tile:hover img {
  transform: scale(1.08);
}

.rank-panel,
.story-card,
.category-overview-card,
.filter-bar,
.watch-area {
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.rank-panel {
  position: sticky;
  top: 92px;
  padding: 24px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 38px 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background 0.22s ease, transform 0.22s ease;
}

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

.rank-no {
  color: var(--emerald-dark);
  font-size: 1.18rem;
  font-weight: 900;
}

.rank-row img {
  width: 54px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-info {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.rank-info strong,
.rank-info small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info small {
  color: var(--muted);
}

.rank-row em {
  color: var(--emerald-dark);
  font-style: normal;
  font-weight: 900;
}

.panel-link {
  width: 100%;
  margin-top: 18px;
}

.page-hero {
  min-height: 300px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #ecfdf5, #ccfbf1 45%, #f8fafc);
}

.page-hero > div {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 64px 24px;
}

.page-hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 720px;
  font-size: 1.1rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.78);
}

.page-hero .breadcrumb {
  color: var(--muted);
}

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

.filter-bar {
  margin-bottom: 24px;
  padding: 14px;
  flex-wrap: wrap;
}

.sticky-filter {
  position: sticky;
  top: 86px;
  z-index: 20;
}

.filter-chips button {
  color: var(--emerald-dark);
  background: #d1fae5;
}

.filter-chips button.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
}

.empty-state {
  display: none;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border-radius: 20px;
  background: #ffffff;
}

.empty-state.show {
  display: block;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  padding: 18px;
}

.category-cover {
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 16 / 10;
}

.category-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.mini-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--emerald-dark);
  background: var(--soft);
  font-weight: 700;
}

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

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

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 55%);
}

.detail-shell {
  position: relative;
  z-index: 2;
  width: min(1200px, 100%);
  min-height: 560px;
  margin: 0 auto;
  padding: 70px 24px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  align-items: center;
  gap: 42px;
}

.detail-poster {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.42);
}

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

.detail-info h1 {
  margin: 16px 0;
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.detail-line {
  max-width: 790px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.12rem;
}

.detail-meta span,
.detail-meta strong {
  padding: 8px 12px;
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.detail-meta strong {
  color: #064e3b;
  background: #ffffff;
}

.detail-tags {
  margin-top: 18px;
}

.detail-tags span {
  color: #d1fae5;
  background: rgba(255, 255, 255, 0.12);
}

.player-section {
  margin-top: -90px;
  position: relative;
  z-index: 6;
}

.watch-area {
  position: relative;
  overflow: hidden;
  padding: 10px;
  background: #020617;
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 16px;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 10px;
  border: 0;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #064e3b;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.1));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
  font-size: 2rem;
}

.watch-area.playing .play-overlay {
  opacity: 0;
  visibility: hidden;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 24px;
}

.story-card {
  padding: 30px;
}

.story-card p {
  font-size: 1.02rem;
}

.accent-card {
  background: linear-gradient(135deg, #ffffff, #ecfdf5);
}

.movie-card-wide .movie-card-body p {
  min-height: 4.8em;
}

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

.site-footer {
  margin-top: 40px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 50px 24px 34px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 36px;
}

.footer-brand {
  color: #ffffff;
  font-size: 1.25rem;
}

.site-footer p {
  max-width: 420px;
  color: #94a3b8;
}

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

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

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #34d399;
}

.footer-bottom {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 20px 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}

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

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

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

  .hero-poster,
  .detail-poster {
    width: min(320px, 100%);
  }

  .rank-panel {
    position: static;
  }

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

@media (max-width: 760px) {
  .nav-shell {
    height: 64px;
    padding: 0 16px;
  }

  .brand-text {
    font-size: 1.12rem;
  }

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

  .hero-content {
    padding: 64px 18px 150px;
    gap: 26px;
  }

  .hero-panel {
    flex-direction: column;
    align-items: stretch;
    bottom: 18px;
    width: calc(100% - 28px);
  }

  .hero-search {
    width: 100%;
  }

  .quick-entry,
  .category-grid,
  .footer-grid,
  .rank-list-page {
    grid-template-columns: 1fr;
  }

  .section-block {
    padding: 42px 16px;
  }

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

  .movie-grid,
  .compact-grid,
  .search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

  .movie-card p {
    min-height: auto;
  }

  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-shell {
    padding: 46px 16px 110px;
  }

  .detail-poster {
    width: min(240px, 86%);
  }

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

  .story-card {
    padding: 22px;
  }
}

@media (max-width: 430px) {
  .movie-grid,
  .compact-grid,
  .search-grid {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 32px 48px minmax(0, 1fr) auto;
  }

  .rank-row img {
    width: 48px;
    height: 64px;
  }
}
