:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --dark: #0f172a;
  --dark-2: #1e293b;
  --emerald: #10b981;
  --emerald-dark: #059669;
  --teal: #14b8a6;
  --blue: #0ea5e9;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.34);
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-size: 22px;
  line-height: 1.1;
}

.brand-copy small {
  color: #cbd5e1;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #e2e8f0;
  font-weight: 600;
}

.desktop-nav a,
.mobile-nav a,
.site-footer a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.site-footer a:hover {
  color: #34d399;
}

.menu-button {
  display: none;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 8px 15px;
}

.mobile-nav {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 16px 16px;
  color: #e2e8f0;
}

.mobile-nav.open {
  display: grid;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  color: #ffffff;
  background: linear-gradient(135deg, #1e293b, #334155 48%, #065f46);
}

.hero-carousel {
  position: relative;
  min-height: 680px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  align-items: center;
  gap: 52px;
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
  padding-block: 76px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
  transform: translateY(18px);
}

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

.hero-backdrop {
  position: fixed;
  inset: 76px 0 auto 0;
  height: 680px;
  opacity: 0.2;
  filter: blur(1px) saturate(1.15);
  pointer-events: none;
}

.hero-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.72), rgba(6, 95, 70, 0.82));
}

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

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-bottom: 16px;
  color: #bbf7d0;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero h1,
.simple-hero h1,
.detail-article h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  margin: 22px 0 0;
  color: #e2e8f0;
  font-size: clamp(17px, 2.4vw, 22px);
}

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

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

.hero-tags span,
.tag-row span,
.chip {
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #d1fae5;
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-actions,
.hero-controls,
.section-heading,
.card-meta {
  display: flex;
  align-items: center;
}

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

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

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

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

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

.hero-poster {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.36);
  transform: rotate(1.5deg);
}

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

.hero-controls {
  position: absolute;
  z-index: 3;
  right: max(16px, calc((100vw - 1180px) / 2));
  bottom: 34px;
  gap: 12px;
}

.hero-controls button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  background: rgba(255, 255, 255, 0.35);
}

.hero-dots button.active {
  width: 28px;
  border-radius: 999px;
  background: #34d399;
}

.search-entry {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 520px);
  gap: 28px;
  align-items: center;
  margin-top: -54px;
  position: relative;
  z-index: 5;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}

.search-entry h2 {
  margin: 0 0 6px;
  font-size: clamp(24px, 4vw, 34px);
}

.search-entry p {
  margin: 0;
  color: #cbd5e1;
}

.home-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.home-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  padding: 13px 16px;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-top: 34px;
}

.category-tile,
.overview-card {
  display: grid;
  gap: 8px;
  min-height: 120px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.overview-card:hover,
.movie-card:hover,
.rank-card:hover {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.13);
  transform: translateY(-4px);
}

.category-tile span,
.overview-card span {
  color: var(--emerald-dark);
  font-size: 14px;
  font-weight: 800;
}

.category-tile strong,
.overview-card strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}

.page-stack {
  display: grid;
  gap: 34px;
  margin-top: 46px;
}

.section-block {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
  padding: clamp(22px, 4vw, 34px);
}

.tint-emerald {
  background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
}

.tint-blue {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.section-heading {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.15;
}

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

.section-more {
  color: var(--emerald-dark);
  background: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

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

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

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

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e2e8f0;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.type-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.68);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.poster-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: #ffffff;
  background: var(--emerald);
  border-radius: 50%;
  box-shadow: 0 18px 35px rgba(16, 185, 129, 0.35);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-content {
  padding: 15px;
}

.card-content h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.card-content h3 a:hover,
.rank-info h2 a:hover {
  color: var(--emerald-dark);
}

.card-line {
  display: -webkit-box;
  min-height: 44px;
  margin: 9px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: #475569;
  font-size: 13px;
}

.card-meta span {
  display: inline-flex;
  align-items: center;
}

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

.tag-row {
  margin-top: 12px;
}

.compact-card .card-content h3 {
  font-size: 15px;
}

.compact-card .card-line {
  min-height: 40px;
  font-size: 13px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 42px 62px 1fr;
  align-items: center;
  gap: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
}

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

.ranking-row img {
  width: 62px;
  height: 86px;
  object-fit: cover;
  border-radius: 12px;
}

.ranking-copy {
  display: grid;
  gap: 4px;
}

.ranking-copy small {
  color: var(--muted);
}

.simple-hero {
  color: #ffffff;
  background: linear-gradient(135deg, #1e293b, #334155 55%, #047857);
  padding: clamp(54px, 9vw, 88px) 0;
}

.simple-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: #dbeafe;
  font-size: 18px;
}

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

.overview-card em {
  color: var(--muted);
  font-style: normal;
}

.link-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.link-cloud a {
  color: #065f46;
  background: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.24);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 14px;
  align-items: end;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
  padding: 18px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.rank-grid {
  display: grid;
  gap: 16px;
}

.rank-card {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
  padding: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.rank-cover {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.rank-cover img {
  width: 128px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.rank-cover span {
  position: absolute;
  top: 8px;
  left: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 900;
}

.rank-info h2 {
  margin: 0;
  font-size: 24px;
}

.rank-info p {
  margin: 8px 0 0;
  color: var(--muted);
}

.detail-hero {
  padding: 34px 0 0;
}

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

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: #475569;
  font-weight: 800;
}

.back-link:hover {
  color: var(--emerald-dark);
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000000;
  border-radius: 24px;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.35);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.65));
  border: 0;
  transition: opacity 0.2s ease;
}

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

.play-core {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  border-radius: 50%;
  box-shadow: 0 20px 45px rgba(16, 185, 129, 0.42);
  font-size: 28px;
}

.detail-article,
.info-card {
  margin-top: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07);
  padding: clamp(22px, 4vw, 32px);
}

.detail-article h1 {
  font-size: clamp(30px, 5vw, 46px);
}

.lead-text {
  margin: 14px 0 0;
  color: #475569;
  font-size: 19px;
}

.detail-chips {
  margin: 22px 0;
}

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

.detail-article p {
  color: #334155;
  font-size: 16px;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.16);
}

.info-card {
  position: sticky;
  top: 100px;
}

.info-card h2 {
  margin: 0 0 18px;
}

.info-card dl {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px 14px;
  margin: 0;
}

.info-card dt {
  color: var(--muted);
  font-weight: 800;
}

.info-card dd {
  margin: 0;
}

.related-block {
  margin-bottom: 48px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding: 44px 0;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer p {
  margin: 0;
  color: #94a3b8;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px;
  color: #94a3b8;
  text-align: center;
}

@media (max-width: 1100px) {
  .small-grid,
  .listing-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

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

  .hero,
  .hero-carousel {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 26px;
    min-height: 760px;
    padding-block: 46px 100px;
  }

  .hero-poster {
    width: min(72vw, 280px);
    margin-inline: auto;
  }

  .search-entry,
  .home-search,
  .filter-panel,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-side {
    order: -1;
  }

  .info-card {
    position: static;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

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

  .brand-copy small {
    display: none;
  }

  .hero,
  .hero-carousel,
  .hero-slide {
    min-height: 700px;
  }

  .hero-actions,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

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

  .rank-card {
    grid-template-columns: 96px 1fr;
  }

  .rank-cover img {
    width: 96px;
  }
}
