:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-soft: #f5f5f4;
  --text: #292524;
  --muted: #78716c;
  --line: #e7e5e4;
  --green: #16a34a;
  --green-dark: #15803d;
  --emerald: #047857;
  --gold: #f59e0b;
  --shadow: 0 22px 60px rgba(41, 37, 36, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(231, 229, 228, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 30px rgba(41, 37, 36, 0.06);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 16px;
  background: linear-gradient(135deg, var(--green), var(--emerald));
  box-shadow: 0 12px 28px rgba(22, 163, 74, 0.24);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.main-nav a {
  color: #57534e;
  font-weight: 700;
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--green);
}

.header-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.header-search input {
  width: 210px;
  border: 0;
  outline: 0;
  padding: 10px 14px;
  background: transparent;
  color: var(--text);
}

.header-search button {
  border: 0;
  color: #ffffff;
  background: var(--green);
  padding: 10px 17px;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text);
}

.hero-carousel {
  position: relative;
  height: 72vh;
  min-height: 540px;
  overflow: hidden;
  background: #111827;
}

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

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 18%, rgba(22, 163, 74, 0.35), transparent 30%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.56) 48%, rgba(0, 0, 0, 0.2) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.72) 0%, transparent 42%);
}

.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;
  align-items: flex-start;
  max-width: 1180px;
}

.hero-content h1 {
  max-width: 760px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-shadow: 0 12px 38px rgba(0, 0, 0, 0.5);
}

.hero-content p {
  max-width: 680px;
  margin: 22px 0 0;
  color: rgba(245, 245, 244, 0.9);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-tags,
.hero-meta,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-tags {
  margin-bottom: 18px;
}

.hero-tags span,
.hero-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 700;
}

.hero-tags span:first-child {
  background: var(--green);
}

.hero-meta {
  margin-top: 22px;
}

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

.primary-btn,
.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  min-height: 50px;
  padding: 0 24px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--green), var(--emerald));
  box-shadow: 0 18px 42px rgba(22, 163, 74, 0.28);
}

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

.ghost-btn {
  min-height: 50px;
  padding: 0 22px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 36px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-arrow.prev {
  left: 22px;
}

.hero-arrow.next {
  right: 22px;
}

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

.hero-dots button {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: #ffffff;
}

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

.page-main {
  padding: 40px 0 70px;
}

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

.section-heading.compact {
  align-items: flex-start;
  margin-bottom: 18px;
}

.section-heading.wide {
  display: block;
  margin-bottom: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 8px;
  color: var(--green);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h2,
.page-hero h1,
.category-preview h2,
.story-panel h2,
.detail-side h2 {
  margin: 0;
  color: var(--text);
  line-height: 1.14;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.section-heading p,
.page-hero p,
.category-preview p {
  max-width: 740px;
  margin: 10px 0 0;
  color: var(--muted);
}

.section-heading a,
.text-link {
  color: var(--green);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: center;
}

.quick-panel {
  display: grid;
  gap: 12px;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.quick-panel a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 800;
}

.quick-panel a:hover {
  color: #ffffff;
  background: var(--green);
}

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

.movie-grid.dense,
.preview-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 16px 44px rgba(41, 37, 36, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

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

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

.watch-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(22, 163, 74, 0.92);
  font-size: 13px;
  font-weight: 900;
}

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

.movie-card-body.compact {
  padding: 15px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

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

.movie-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-list span {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: #166534;
  background: #dcfce7;
  font-size: 12px;
  font-weight: 800;
}

.tag-list.large span {
  padding: 7px 12px;
  font-size: 13px;
}

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

.category-tile,
.category-preview,
.page-hero,
.story-panel,
.detail-side,
.ranking-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 52px rgba(41, 37, 36, 0.08);
}

.category-tile {
  min-height: 185px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

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

.category-tile p,
.category-tile em {
  margin: 10px 0 0;
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 30px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: var(--surface-soft);
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.rank-index {
  color: var(--green);
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}

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

.rank-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

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

.rank-copy strong {
  font-weight: 900;
}

.rank-copy em,
.rank-copy small {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 46px;
  margin-bottom: 34px;
  background:
    radial-gradient(circle at 80% 20%, rgba(22, 163, 74, 0.18), transparent 36%),
    linear-gradient(135deg, #ffffff 0%, #f5f5f4 100%);
}

.page-hero h1 {
  font-size: clamp(36px, 6vw, 62px);
}

.category-preview {
  padding: 28px;
  margin-bottom: 26px;
}

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

.category-preview h2 {
  font-size: 32px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.filter-bar button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--text);
  background: #ffffff;
  cursor: pointer;
  font-weight: 800;
}

.filter-bar button:hover,
.filter-bar button.is-active {
  color: #ffffff;
  border-color: var(--green);
  background: var(--green);
}

.search-panel {
  max-width: 680px;
  margin-top: 22px;
}

.search-panel input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  outline: 0;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.empty-state {
  display: none;
  padding: 36px;
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface-soft);
  text-align: center;
  font-weight: 800;
}

.empty-state.is-visible {
  display: block;
}

.ranking-wide {
  padding-top: 0;
}

.full-rank .rank-row {
  grid-template-columns: 70px 72px minmax(0, 1fr);
}

.full-rank .rank-row img {
  width: 72px;
  height: 96px;
}

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

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

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.1);
  transform: scale(1.08);
  opacity: 0.45;
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 0%, rgba(22, 163, 74, 0.3), transparent 30%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.52));
}

.detail-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  min-height: 560px;
  padding: 58px 0;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: rgba(255, 255, 255, 0.74);
  margin-bottom: 18px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.detail-copy h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.detail-copy p {
  max-width: 820px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 800;
}

.detail-copy .primary-btn {
  margin-top: 28px;
}

.player-section {
  padding: 54px 0 34px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.22);
}

.player-frame video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.62));
  cursor: pointer;
}

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

.player-cover span {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--green);
  box-shadow: 0 16px 42px rgba(22, 163, 74, 0.35);
  font-size: 28px;
  padding-left: 4px;
}

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

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding: 26px 0 32px;
}

.story-panel,
.detail-side {
  padding: 30px;
}

.story-panel h2,
.detail-side h2 {
  font-size: 26px;
  margin-bottom: 12px;
}

.story-panel p {
  margin: 0 0 24px;
  color: #57534e;
  font-size: 17px;
}

.detail-side dl {
  margin: 0;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px 14px;
}

.detail-side dt {
  color: var(--muted);
  font-weight: 800;
}

.detail-side dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.site-footer {
  margin-top: 50px;
  border-top: 1px solid var(--line);
  background: #1c1917;
  color: #ffffff;
}

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

.footer-inner strong {
  font-size: 22px;
}

.footer-inner p {
  margin: 8px 0 0;
  color: #d6d3d1;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.footer-inner a {
  color: #d6d3d1;
}

.footer-inner a:hover {
  color: #ffffff;
}

.is-filtered-out {
  display: none !important;
}

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

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

  .split-section,
  .intro-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .header-inner {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .main-nav {
    display: none;
    width: 100%;
    order: 10;
    margin: 0;
    padding: 12px 0 4px;
    border-top: 1px solid var(--line);
  }

  .main-nav.is-open {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .main-nav a {
    padding: 10px 8px;
    border-radius: 12px;
    background: var(--surface-soft);
    text-align: center;
    font-size: 14px;
  }

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

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

  .hero-content {
    padding: 40px 0 70px;
    justify-content: flex-end;
  }

  .hero-arrow {
    display: none;
  }

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

  .category-preview-head,
  .section-heading,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

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

  .page-hero {
    padding: 30px;
  }
}

@media (max-width: 560px) {
  .brand-copy small {
    display: none;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .main-nav.is-open {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-content h1 {
    font-size: 34px;
  }

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

  .movie-grid,
  .movie-grid.dense,
  .preview-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .story-panel,
  .detail-side,
  .category-preview {
    padding: 22px;
  }

  .rank-row,
  .full-rank .rank-row {
    grid-template-columns: 46px 58px minmax(0, 1fr);
  }

  .full-rank .rank-row img {
    width: 58px;
    height: 78px;
  }
}
