:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --slate: #0f172a;
  --slate-soft: #1e293b;
  --emerald: #10b981;
  --emerald-dark: #059669;
  --cyan: #22d3ee;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f8fafc 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #0f172a, #1e293b 52%, #0f172a);
  color: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.32);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #042f2e;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.38);
}

.brand-text,
.footer-brand {
  font-size: 1.22rem;
  background: linear-gradient(135deg, #34d399, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.mobile-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #6ee7b7;
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.hero-section {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  color: #ffffff;
}

.hero-background,
.hero-background img,
.hero-overlay {
  position: absolute;
  inset: 0;
}

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

.hero-overlay {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(15, 23, 42, 0.58) 48%, rgba(15, 23, 42, 0.18)), linear-gradient(0deg, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.08));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 70vh;
  margin: 0 auto;
  padding: 72px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 40px;
}

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

.section-kicker,
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--emerald);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.hero-copy h1 em {
  color: #34d399;
  font-style: normal;
}

.hero-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
}

.hero-copy p {
  max-width: 620px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
  line-height: 1.8;
}

.hero-tags,
.info-strip,
.movie-meta,
.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.info-strip span,
.tag-row span {
  border: 1px solid rgba(16, 185, 129, 0.24);
  border-radius: 999px;
  padding: 7px 12px;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.12);
  font-size: 0.86rem;
  font-weight: 700;
}

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

.primary-button,
.ghost-button,
.search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-form button {
  color: #052e2b;
  background: linear-gradient(135deg, #34d399, #67e8f9);
  box-shadow: 0 16px 34px rgba(16, 185, 129, 0.36);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
}

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

.hero-panel {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  padding: 22px;
  background: rgba(15, 23, 42, 0.52);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.hero-panel h3 {
  margin: 0 0 16px;
  font-size: 1.2rem;
}

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

.hero-mini-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: center;
  gap: 12px;
  border-radius: 18px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-mini-card:hover {
  background: rgba(16, 185, 129, 0.2);
  transform: translateX(3px);
}

.hero-mini-card img {
  width: 88px;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  object-fit: cover;
}

.hero-mini-card span {
  font-weight: 800;
  line-height: 1.4;
}

.search-band {
  background: var(--slate);
}

.search-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  align-items: center;
  gap: 24px;
  color: #ffffff;
}

.search-shell h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.search-form {
  display: flex;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.search-form input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
  padding: 0 12px;
  font: inherit;
}

.search-form input::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

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

.muted-section {
  background: #f1f5f9;
}

.editor-section {
  background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.14), transparent 34%), #ffffff;
}

.content-shell,
.footer-shell,
.page-hero-inner,
.detail-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.narrow-shell {
  max-width: 980px;
}

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

.section-heading h2,
.panel-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-more {
  flex: 0 0 auto;
  color: var(--emerald-dark);
  font-weight: 900;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.34);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #0f172a, #334155);
}

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #052e2b;
  background: #6ee7b7;
  font-size: 0.78rem;
  font-weight: 900;
}

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

.movie-meta {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.movie-meta span + span::before {
  content: "·";
  margin-right: 8px;
  color: #cbd5e1;
}

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

.movie-card h3 a:hover,
.rank-title:hover,
.category-card-samples a:hover,
.related-card:hover span {
  color: var(--emerald-dark);
}

.movie-card p {
  display: -webkit-box;
  min-height: 3.3em;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row span {
  color: var(--emerald-dark);
  background: rgba(16, 185, 129, 0.08);
}

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

.category-tile,
.category-card-large {
  display: block;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 22px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-card-large:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-tile span,
.category-card-large h2 {
  display: block;
  margin: 0 0 10px;
  font-size: 1.18rem;
  font-weight: 900;
}

.category-tile small,
.category-card-large p {
  color: var(--muted);
  line-height: 1.6;
}

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

.category-card-link {
  display: block;
}

.category-card-samples {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.category-card-samples a {
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--slate);
  font-weight: 700;
}

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

.rank-panel {
  position: sticky;
  top: 94px;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 96px 54px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 14px;
}

.compact-rank .rank-item {
  grid-template-columns: 72px 38px minmax(0, 1fr);
  border-radius: 18px;
  box-shadow: none;
}

.rank-poster {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 10;
  background: var(--slate-soft);
}

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

.rank-number {
  color: var(--emerald-dark);
  font-size: 1.2rem;
  font-weight: 950;
}

.rank-title {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 1.05rem;
  font-weight: 900;
}

.rank-content p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.6;
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.34), transparent 34%), linear-gradient(135deg, #0f172a, #1e293b);
}

.slim-hero,
.channel-hero {
  padding: 78px 0;
}

.page-hero-inner h1 {
  max-width: 820px;
  margin: 0 0 14px;
  font-size: clamp(2.4rem, 5vw, 4.7rem);
  letter-spacing: -0.055em;
}

.page-hero-inner p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.08rem;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.breadcrumb a:hover {
  color: #6ee7b7;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(160px, 0.7fr));
  gap: 14px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  color: var(--text);
  background: var(--surface-soft);
  font: inherit;
  outline: 0;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 70px 0 56px;
  color: #ffffff;
  background: #020617;
}

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

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

.detail-backdrop div {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.72)), linear-gradient(0deg, #020617, transparent 42%);
}

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

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

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 3 / 4;
  background: var(--slate-soft);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

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

.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 5vw, 5rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.16rem;
  line-height: 1.8;
}

.player-section {
  padding: 54px 0 0;
  background: #020617;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 16px;
  color: #ffffff;
  text-align: center;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(2, 6, 23, 0.76));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
  width: 78px;
  height: 78px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #34d399, #67e8f9);
  box-shadow: 0 20px 48px rgba(16, 185, 129, 0.4);
  cursor: pointer;
}

.play-button span {
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 22px solid #052e2b;
}

.player-overlay strong {
  display: block;
  max-width: min(680px, 90%);
  font-size: 1.28rem;
}

.detail-content-section {
  padding-top: 54px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}

.detail-article,
.related-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  background: #ffffff;
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
}

.detail-article h2,
.related-panel h2 {
  margin: 28px 0 12px;
  font-size: 1.5rem;
}

.detail-article h2:first-of-type,
.related-panel h2:first-child {
  margin-top: 0;
}

.detail-article p {
  margin: 0;
  color: #334155;
  line-height: 1.9;
  font-size: 1.02rem;
}

.info-strip span {
  color: var(--emerald-dark);
}

.large-tags {
  margin-top: 8px;
}

.prev-next {
  display: grid;
  gap: 12px;
  margin-top: 30px;
}

.prev-next a {
  border-radius: 16px;
  padding: 14px 16px;
  background: var(--surface-soft);
  color: var(--slate);
  font-weight: 800;
}

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

.related-panel {
  position: sticky;
  top: 94px;
}

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

.related-card {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 12px;
  align-items: center;
  border-radius: 18px;
  padding: 10px;
  background: var(--surface-soft);
}

.related-card img {
  width: 108px;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  object-fit: cover;
}

.related-card span {
  display: block;
  font-weight: 900;
  line-height: 1.4;
}

.related-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
}

.site-footer {
  color: rgba(255, 255, 255, 0.78);
  background: #0f172a;
}

.footer-shell {
  padding: 42px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-shell p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.62);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-weight: 800;
}

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

@media (max-width: 1080px) {
  .movie-grid,
  .listing-grid,
  .feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .rank-panel,
  .related-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .mobile-link {
    display: block;
  }

  .hero-content {
    padding: 46px 0;
  }

  .hero-panel {
    display: none;
  }

  .search-shell,
  .filter-panel,
  .detail-intro {
    grid-template-columns: 1fr;
  }

  .search-form {
    border-radius: 22px;
    flex-direction: column;
  }

  .search-form input,
  .search-form button {
    min-height: 46px;
  }

  .movie-grid,
  .small-grid,
  .listing-grid,
  .feature-grid,
  .category-grid,
  .category-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 560px) {
  .nav-shell,
  .content-shell,
  .footer-shell,
  .page-hero-inner,
  .detail-shell,
  .search-shell {
    width: min(100% - 24px, 1180px);
  }

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

  .movie-grid,
  .small-grid,
  .listing-grid,
  .feature-grid,
  .category-grid,
  .category-list-grid {
    grid-template-columns: 1fr;
  }

  .rank-item,
  .compact-rank .rank-item {
    grid-template-columns: 82px 44px minmax(0, 1fr);
    gap: 12px;
  }

  .related-card {
    grid-template-columns: 92px 1fr;
  }

  .related-card img {
    width: 92px;
  }

  .detail-article,
  .related-panel {
    padding: 20px;
  }
}
