:root {
  --green: #16a34a;
  --green-dark: #15803d;
  --amber: #f59e0b;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-700: #44403c;
  --stone-900: #1c1917;
  --shadow: 0 18px 45px rgba(28, 25, 23, 0.10);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--stone-900);
  background: linear-gradient(180deg, #fff 0%, var(--stone-50) 42%, #fff 100%);
  line-height: 1.6;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(231, 229, 228, 0.82);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--stone-900);
  white-space: nowrap;
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--green), #22c55e);
  box-shadow: 0 12px 24px rgba(22, 163, 74, 0.30);
}

.logo-text {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  font-weight: 650;
  color: var(--stone-700);
}

.site-nav a:hover {
  color: var(--green);
}

.header-search {
  width: 280px;
  display: flex;
  align-items: center;
  border: 1px solid var(--stone-200);
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
}

.header-search input,
.large-search input,
.filter-row input,
.filter-row select,
.search-page-form input,
.search-tools select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--stone-900);
  font: inherit;
}

.header-search input {
  padding: 10px 4px 10px 16px;
}

.header-search button,
.large-search button,
.search-page-form button {
  border: 0;
  color: #fff;
  background: var(--green);
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--stone-100);
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--stone-900);
}

.hero {
  position: relative;
  height: min(70vh, 760px);
  min-height: 520px;
  overflow: hidden;
  background: #111;
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 800ms ease;
}

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

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

.hero-shade {
  background:
    radial-gradient(circle at 70% 20%, rgba(245, 158, 11, 0.32), transparent 28%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.56) 48%, rgba(0, 0, 0, 0.12) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.42), transparent 52%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
  margin-left: max(16px, calc((100% - 1180px) / 2));
  color: #fff;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--amber);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-kicker span {
  color: #fff;
  background: var(--green);
  border-radius: 999px;
  padding: 5px 12px;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 720px;
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 660px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags span,
.detail-tags a,
.tag-row span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.20);
  color: #fff;
  padding: 6px 12px;
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.section-more,
.rank-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  box-shadow: 0 16px 28px rgba(22, 163, 74, 0.28);
}

.primary-btn:hover,
.rank-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 34px rgba(22, 163, 74, 0.32);
}

.ghost-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 34px;
  background: #fff;
}

.quick-search-panel,
.page-hero,
.filter-panel,
.search-page-panel,
.detail-article,
.player-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--stone-200);
  box-shadow: var(--shadow);
}

.quick-search-panel {
  position: relative;
  z-index: 5;
  margin-top: -56px;
  padding: 26px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 560px);
  gap: 20px;
  align-items: center;
}

.quick-search-panel h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1,
.detail-article h2 {
  margin: 0;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.quick-search-panel h2 {
  font-size: clamp(24px, 3vw, 38px);
}

.large-search,
.search-page-form {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--stone-200);
  border-radius: 999px;
  background: var(--stone-50);
}

.large-search input,
.search-page-form input {
  padding: 16px 20px;
}

.large-search button,
.search-page-form button {
  padding-inline: 26px;
}

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

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

.section-heading h2 {
  font-size: clamp(24px, 3vw, 36px);
}

.section-intro {
  max-width: 780px;
  margin: 8px 0 0;
  color: #78716c;
}

.section-more {
  min-height: 40px;
  color: var(--green);
  background: #ecfdf5;
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--stone-200);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(28, 25, 23, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(22, 163, 74, 0.28);
  box-shadow: var(--shadow);
}

.poster-link,
.detail-poster,
.rank-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #14532d, #1c1917);
}

.poster-link {
  aspect-ratio: 2 / 3;
}

.poster-link img,
.detail-poster img,
.rank-cover img {
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

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

.poster-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  padding: 20px;
  color: #fff;
  text-align: center;
  font-weight: 800;
  background: linear-gradient(135deg, #14532d, #1c1917);
}

.image-missing + .poster-fallback,
.poster-link img.image-missing ~ .poster-fallback,
.detail-poster img.image-missing + .poster-fallback,
.rank-cover img.image-missing + .poster-fallback {
  display: grid;
}

.play-pill {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 6px 11px;
  color: #fff;
  background: rgba(22, 163, 74, 0.92);
  font-weight: 800;
  font-size: 13px;
}

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

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #78716c;
  font-size: 13px;
  font-weight: 700;
}

.card-meta span,
.detail-meta span {
  border-radius: 999px;
  background: var(--stone-100);
  padding: 4px 9px;
}

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.movie-card h3 a:hover,
.rank-content h2 a:hover {
  color: var(--green);
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  overflow: hidden;
  color: #57534e;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row span {
  color: #166534;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.card-category {
  display: inline-block;
  margin-top: 12px;
  color: var(--green);
  font-size: 14px;
  font-weight: 800;
}

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

.category-tile,
.category-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 150px;
  padding: 20px;
  border: 1px solid var(--stone-200);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 12%, rgba(22, 163, 74, 0.16), transparent 34%),
    #fff;
  box-shadow: 0 12px 28px rgba(28, 25, 23, 0.06);
}

.category-tile:hover,
.category-panel:hover {
  border-color: rgba(22, 163, 74, 0.34);
  transform: translateY(-3px);
}

.category-tile span,
.category-panel span {
  font-size: 20px;
  font-weight: 900;
}

.category-tile strong,
.category-panel strong {
  color: var(--green);
  font-size: 28px;
}

.category-tile em,
.category-panel p {
  color: #78716c;
  font-style: normal;
}

.page-main {
  padding-block: 28px 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  color: #78716c;
  font-size: 14px;
}

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

.breadcrumb span::before,
.breadcrumb a + a::before,
.breadcrumb a + span::before {
  content: "/";
  margin-right: 8px;
  color: #a8a29e;
}

.breadcrumb.light {
  color: rgba(255, 255, 255, 0.82);
}

.breadcrumb.light a + a::before,
.breadcrumb.light a + span::before {
  color: rgba(255, 255, 255, 0.55);
}

.compact-hero {
  padding: 34px;
  margin-bottom: 34px;
  background:
    radial-gradient(circle at top right, rgba(22, 163, 74, 0.18), transparent 34%),
    #fff;
}

.compact-hero h1 {
  font-size: clamp(32px, 5vw, 56px);
}

.compact-hero p {
  max-width: 780px;
  margin: 12px 0 0;
  color: #57534e;
}

.filter-panel,
.search-page-panel,
.player-section,
.detail-article {
  padding: 24px;
}

.filter-row,
.search-tools {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(150px, 0.6fr));
  gap: 12px;
  margin-bottom: 12px;
}

.filter-row input,
.filter-row select,
.search-tools select {
  min-height: 46px;
  border: 1px solid var(--stone-200);
  border-radius: 999px;
  padding: 0 16px;
  background: #fff;
}

.filter-count {
  color: #78716c;
  margin: 0 0 20px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--stone-200);
  border-radius: 20px;
  background: #fff;
}

.rank-no {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  background: var(--stone-900);
  font-weight: 900;
}

.rank-cover {
  width: 96px;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
}

.rank-content h2 {
  margin: 0 0 6px;
  font-size: 21px;
}

.rank-content p {
  margin: 0 0 10px;
  color: #57534e;
}

.rank-action {
  color: #fff;
  background: var(--green);
}

.search-page-form {
  margin-bottom: 14px;
}

.search-tools {
  grid-template-columns: repeat(2, minmax(160px, 220px));
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #fff;
  background: #111;
}

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

.detail-hero-bg {
  height: 100%;
  object-fit: cover;
  filter: blur(3px) saturate(1.1);
  transform: scale(1.06);
}

.detail-hero-overlay {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.44)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 55%);
}

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

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

.detail-poster {
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

.detail-copy h1 {
  margin-bottom: 18px;
  font-size: clamp(38px, 6vw, 72px);
}

.detail-one-line {
  max-width: 860px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 20px;
}

.detail-meta {
  margin-bottom: 18px;
}

.detail-meta span {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.detail-tags {
  margin-bottom: 26px;
}

.detail-layout {
  margin-top: -42px;
  position: relative;
  z-index: 4;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(22, 163, 74, 0.18), rgba(0, 0, 0, 0.66));
  cursor: pointer;
}

.player-overlay.is-hidden {
  display: none;
}

.play-circle {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--green);
  font-size: 30px;
  box-shadow: 0 18px 34px rgba(22, 163, 74, 0.34);
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 12px;
  margin: 0;
  color: #fff;
  text-align: center;
}

.detail-article {
  margin-top: 28px;
}

.detail-article h2 {
  margin-top: 10px;
  font-size: 28px;
}

.detail-article p {
  color: #44403c;
  font-size: 17px;
}

.site-footer {
  background: var(--stone-900);
  color: #fff;
  margin-top: 72px;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  color: rgba(255, 255, 255, 0.72);
  margin: 8px 0 0;
}

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

.footer-links a:hover {
  color: #86efac;
}

[data-card].is-hidden {
  display: none;
}

@media (max-width: 980px) {
  .header-search {
    display: none;
  }

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

  .quick-search-panel {
    grid-template-columns: 1fr;
  }

  .filter-row {
    grid-template-columns: 1fr 1fr;
  }

  .detail-info-grid {
    grid-template-columns: 210px minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .header-inner {
    min-height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 64px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    border: 1px solid var(--stone-200);
    border-radius: 20px;
    background: #fff;
    overflow: hidden;
    box-shadow: var(--shadow);
  }

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

  .site-nav a {
    padding: 14px 18px;
    border-bottom: 1px solid var(--stone-100);
  }

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

  .hero {
    min-height: 620px;
    height: 76vh;
  }

  .hero-content {
    justify-content: end;
    padding-bottom: 96px;
  }

  .hero-actions,
  .large-search,
  .search-page-form,
  .footer-inner {
    flex-direction: column;
  }

  .large-search,
  .search-page-form {
    border-radius: 22px;
  }

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

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

  .filter-row,
  .search-tools {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 38px 72px 1fr;
  }

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

  .rank-cover {
    width: 72px;
  }

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

  .detail-poster {
    width: 210px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .dense-grid,
  .category-grid,
  .category-panel-grid {
    grid-template-columns: 1fr;
  }
}
