:root {
  --emerald: #10b981;
  --emerald-dark: #059669;
  --teal: #0d9488;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --white: #ffffff;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--slate-900);
  background: var(--slate-50);
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--slate-200);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.site-header-inner {
  max-width: 1280px;
  height: 66px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.28);
  font-size: 16px;
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: var(--slate-700);
  font-weight: 650;
  transition: color 0.2s ease;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--slate-100);
  color: var(--slate-800);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--slate-200);
  padding: 12px 20px 18px;
  background: var(--white);
}

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

.mobile-link {
  padding: 9px 4px;
  color: var(--slate-700);
  font-weight: 650;
}

.hero {
  position: relative;
  height: 600px;
  min-height: 520px;
  overflow: hidden;
  background: var(--slate-900);
}

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

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

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

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.62) 46%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 60px;
  width: min(1180px, calc(100% - 40px));
  transform: translateX(-50%);
  color: var(--white);
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #a7f3d0;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 760px;
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 700px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.hero-tags,
.tag-row,
.quick-links,
.detail-actions,
.hero-actions,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags span,
.tag-row span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-actions {
  margin-top: 26px;
}

.primary-button,
.ghost-button,
.search-clear,
.home-search-form button,
.filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-button,
.home-search-form button {
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 16px 30px rgba(16, 185, 129, 0.26);
}

.primary-button:hover,
.home-search-form button:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--emerald-dark), var(--teal));
}

.ghost-button {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
}

.ghost-button.dark {
  color: var(--emerald-dark);
  border-color: rgba(16, 185, 129, 0.25);
  background: rgba(16, 185, 129, 0.08);
}

.hero-dots {
  position: absolute;
  right: max(20px, calc((100% - 1180px) / 2));
  bottom: 44px;
  display: flex;
  gap: 8px;
}

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

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

.home-search {
  margin-top: -44px;
  position: relative;
  z-index: 2;
  padding: 0 20px;
}

.home-search-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.home-search-inner h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.home-search-inner p {
  margin: 0 0 18px;
  color: var(--slate-600);
}

.home-search-form,
.search-row {
  display: flex;
  gap: 12px;
}

.home-search-form input,
.search-row input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  color: var(--slate-900);
  background: var(--white);
  outline: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-search-form input:focus,
.search-row input:focus {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.quick-links {
  margin-top: 16px;
}

.quick-links a {
  color: var(--emerald-dark);
  font-weight: 750;
}

.page-shell {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0 70px;
}

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

.content-section.no-margin {
  margin-bottom: 0;
}

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

.section-heading h2,
.content-section h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

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

.section-more {
  color: var(--emerald-dark);
  font-weight: 800;
  white-space: nowrap;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.44);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.poster-play {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 3px;
  border-radius: 50%;
  color: var(--white);
  background: rgba(16, 185, 129, 0.92);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.year-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  border-radius: 8px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.year-badge {
  right: 10px;
  padding: 7px 9px;
  background: var(--emerald);
}

.rank-badge {
  left: 10px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.82);
}

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

.movie-card h3 {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--slate-900);
  font-size: 15px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.movie-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--slate-500);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
}

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

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

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 22px;
  background: var(--slate-900);
  box-shadow: var(--soft-shadow);
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-card:hover img {
  transform: scale(1.06);
}

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

.category-content {
  position: absolute;
  inset: auto 18px 18px;
  color: var(--white);
}

.category-content strong {
  display: block;
  margin-bottom: 8px;
  font-size: 24px;
}

.category-content em {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  font-style: normal;
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 28px;
  margin-bottom: 56px;
}

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

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

.ranking-item {
  display: grid;
  grid-template-columns: 42px 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 78px;
  padding: 10px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.ranking-number {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  font-weight: 900;
}

.ranking-item img {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--slate-100);
}

.ranking-text {
  min-width: 0;
}

.ranking-text strong,
.ranking-text em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-text strong {
  color: var(--slate-900);
}

.ranking-text em {
  margin-top: 2px;
  color: var(--slate-500);
  font-style: normal;
  font-size: 13px;
}

.page-hero,
.detail-hero,
.search-panel,
.watch-section,
.detail-copy,
.prev-next {
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.small-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding: 34px;
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.18), transparent 30%), var(--white);
}

.small-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
}

.small-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--slate-600);
}

.small-hero .eyebrow,
.detail-info .eyebrow {
  color: var(--emerald-dark);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--slate-500);
  font-size: 14px;
}

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

.search-panel {
  margin-bottom: 24px;
  padding: 22px;
}

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

.search-clear {
  color: var(--slate-700);
  background: var(--slate-100);
}

.search-clear:hover,
.filter-chip:hover,
.filter-chip.is-active {
  color: var(--white);
  background: var(--emerald);
}

.filter-row {
  margin: -4px 0 28px;
}

.filter-chip {
  min-height: 38px;
  padding: 0 14px;
  color: var(--slate-700);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.detail-hero {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 30px;
  margin-bottom: 30px;
  padding: 28px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  background: var(--slate-100);
  box-shadow: var(--soft-shadow);
}

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

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.1;
}

.detail-one-line {
  max-width: 820px;
  margin: 0 0 20px;
  color: var(--slate-600);
  font-size: 18px;
}

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

.detail-list div {
  padding: 14px;
  border-radius: 16px;
  background: var(--slate-50);
}

.detail-list dt {
  margin-bottom: 3px;
  color: var(--slate-500);
  font-size: 13px;
}

.detail-list dd {
  margin: 0;
  color: var(--slate-900);
  font-weight: 800;
}

.detail-info .tag-row span {
  color: var(--emerald-dark);
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.14);
}

.detail-actions {
  margin-top: 24px;
}

.watch-section {
  margin-bottom: 30px;
  padding: 24px;
}

.watch-section h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

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

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-ring {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  border-radius: 50%;
  color: var(--white);
  background: var(--emerald);
  box-shadow: 0 18px 46px rgba(16, 185, 129, 0.36);
  font-size: 24px;
}

.detail-copy {
  padding: 28px;
}

.detail-copy h2 {
  margin: 0 0 12px;
}

.detail-copy h2 + p {
  margin: 0 0 22px;
  color: var(--slate-700);
  font-size: 17px;
}

.prev-next {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
}

.prev-next a {
  color: var(--emerald-dark);
  font-weight: 800;
}

.site-footer {
  color: var(--slate-300);
  background: var(--slate-900);
}

.site-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 20px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
}

.footer-brand {
  margin-bottom: 14px;
  color: var(--white);
  font-size: 20px;
}

.footer-about p {
  max-width: 560px;
  margin: 0;
  color: var(--slate-400);
}

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

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a:hover {
  color: #6ee7b7;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding: 16px 20px 22px;
  color: var(--slate-500);
  text-align: center;
}

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

@media (max-width: 1180px) {
  .movie-grid,
  .compact-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .two-column-section {
    grid-template-columns: 1fr;
  }

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

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

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

  .hero {
    height: 540px;
    min-height: 500px;
  }

  .hero-content {
    bottom: 74px;
  }

  .hero-dots {
    left: 20px;
    right: auto;
    bottom: 32px;
  }

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

  .detail-hero {
    grid-template-columns: 1fr;
  }

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

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

  .site-footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header-inner {
    height: 62px;
    padding: 0 14px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-text {
    font-size: 18px;
  }

  .hero {
    height: 520px;
  }

  .hero-content {
    width: calc(100% - 28px);
  }

  .hero-content p {
    font-size: 16px;
  }

  .home-search {
    padding: 0 14px;
  }

  .home-search-inner,
  .small-hero,
  .detail-hero,
  .watch-section,
  .detail-copy {
    padding: 20px;
    border-radius: 20px;
  }

  .home-search-form,
  .search-row,
  .small-hero,
  .prev-next {
    flex-direction: column;
    align-items: stretch;
  }

  .page-shell {
    width: calc(100% - 28px);
    padding-top: 28px;
  }

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

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

  .category-grid,
  .large-category-grid,
  .wide-ranking {
    grid-template-columns: 1fr;
  }

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

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

  .detail-list {
    grid-template-columns: 1fr;
  }

  .ranking-item {
    grid-template-columns: 36px 54px minmax(0, 1fr);
  }
}
