
:root {
  --bg: #07111c;
  --bg-soft: #0f1f2e;
  --panel: #ffffff;
  --panel-soft: #f5f8fb;
  --text: #102033;
  --muted: #667085;
  --light: #ffffff;
  --line: rgba(16, 32, 51, 0.1);
  --emerald: #10b981;
  --emerald-dark: #047857;
  --orange: #f59e0b;
  --shadow: 0 18px 45px rgba(7, 17, 28, 0.13);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, #f8fbff 0%, #eef5f2 48%, #f7fafc 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

body.nav-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(7, 17, 28, 0.88);
  backdrop-filter: blur(18px);
  color: var(--light);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--emerald), #34d399 48%, #f59e0b);
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.35);
}

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

.main-nav a {
  padding: 9px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 15px;
  transition: all 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-search {
  width: 245px;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
  padding: 7px 10px;
}

.nav-search input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.nav-search button,
.primary-btn,
.ghost-btn,
.big-search button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 700;
}

.nav-search button {
  padding: 7px 13px;
  color: #06251b;
  background: #34d399;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
}

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

.hero {
  position: relative;
  min-height: 690px;
  overflow: hidden;
  color: #ffffff;
  background: var(--bg);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 26%, rgba(52, 211, 153, 0.36), transparent 32%),
    radial-gradient(circle at 80% 16%, rgba(245, 158, 11, 0.22), transparent 30%);
  z-index: 2;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 52px;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  z-index: 4;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
  z-index: -1;
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 17, 28, 0.25), rgba(7, 17, 28, 0.96));
}

.hero-content {
  max-width: 730px;
  padding-top: 50px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #34d399;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 19px;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.11);
  color: var(--emerald-dark);
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #d1fae5;
  background: rgba(255, 255, 255, 0.13);
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  color: #052e22;
  background: linear-gradient(135deg, #34d399, #a7f3d0);
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.25);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.hero-poster {
  justify-self: end;
  width: 330px;
  transform: rotate(2deg);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.86), rgba(7, 17, 28, 0.92)),
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.28), transparent 28%);
  box-shadow: var(--shadow);
}

.poster-wrap.large {
  border-radius: 30px;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.45);
}

.poster-wrap.xlarge {
  border-radius: 32px;
}

.poster-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}

.poster-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(24px, 5vw, 46px);
  font-weight: 900;
  text-align: center;
  letter-spacing: 0.08em;
  z-index: 1;
}

.score-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 3;
  padding: 4px 8px;
  border-radius: 999px;
  color: #1f1300;
  background: #fbbf24;
  font-size: 12px;
  font-weight: 800;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 118px;
  z-index: 10;
  display: flex;
  gap: 10px;
  width: min(1220px, calc(100% - 32px));
  transform: translateX(-50%);
}

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

.hero-dots button.active {
  background: #34d399;
}

.hero-stats {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 10;
  width: min(1220px, calc(100% - 32px));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  transform: translateX(-50%);
}

.hero-stats div,
.search-panel,
.content-panel,
.category-tile,
.category-overview-card,
.ranking-card,
.movie-card {
  border: 1px solid rgba(16, 32, 51, 0.08);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 22px;
  border-radius: 18px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
}

.hero-stats strong {
  font-size: 28px;
  line-height: 1;
}

.hero-stats span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.page-section {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 74px 0 0;
}

.compact-section {
  padding-top: 46px;
}

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

.section-heading h2,
.inner-hero h1,
.detail-info h1,
.search-panel h2,
.content-panel h2 {
  margin: 6px 0 0;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-heading h2,
.search-panel h2,
.content-panel h2 {
  font-size: clamp(26px, 4vw, 42px);
}

.section-heading p,
.search-panel p,
.inner-hero p,
.content-panel p,
.detail-line {
  color: var(--muted);
}

.section-more {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--emerald-dark);
  background: rgba(16, 185, 129, 0.1);
  font-weight: 800;
}

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

.category-tile,
.category-overview-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 158px;
  padding: 22px;
  border-radius: var(--radius);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-overview-card {
  min-height: 238px;
}

.category-tile:hover,
.category-overview-card:hover,
.movie-card:hover,
.ranking-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 60px rgba(7, 17, 28, 0.18);
}

.category-title {
  font-size: 20px;
  font-weight: 900;
}

.category-desc,
.category-overview-card p,
.category-overview-card small {
  color: var(--muted);
  font-size: 14px;
}

.category-count,
.category-info span {
  display: inline-flex;
  width: max-content;
  margin-top: auto;
  padding: 6px 10px;
  border-radius: 999px;
  color: #065f46;
  background: #d1fae5;
  font-size: 12px;
  font-weight: 800;
}

.category-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card.compact {
  box-shadow: none;
}

.movie-card .poster-wrap {
  border-radius: 0;
  box-shadow: none;
}

.poster-link {
  display: block;
}

.movie-card-body {
  display: flex;
  min-height: 205px;
  flex-direction: column;
  padding: 14px;
}

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.movie-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
}

.movie-meta span + span::before,
.detail-meta span + span::before {
  content: "";
  width: 4px;
  height: 4px;
  margin-right: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
}

.movie-card h3 {
  margin: 8px 0 8px;
  font-size: 17px;
  line-height: 1.25;
}

.movie-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.movie-card .tag-row {
  margin-top: auto;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.85fr);
  gap: 28px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  transition: transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
}

.rank-num {
  font-size: 20px;
  font-weight: 900;
  color: var(--emerald-dark);
}

.rank-title {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

.search-panel,
.content-panel {
  border-radius: var(--radius);
  padding: 28px;
}

.big-search {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.big-search input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 13px 16px;
  outline: none;
}

.big-search button {
  color: #052e22;
  background: #34d399;
  padding: 0 20px;
}

.inner-hero {
  position: relative;
  overflow: hidden;
  padding: 88px max(16px, calc((100vw - 1220px) / 2)) 68px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(7, 17, 28, 0.96), rgba(4, 120, 87, 0.82)),
    radial-gradient(circle at 75% 18%, rgba(245, 158, 11, 0.3), transparent 28%);
}

.inner-hero h1 {
  max-width: 900px;
  font-size: clamp(34px, 6vw, 64px);
}

.inner-hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 18px;
}

.listing-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.listing-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.listing-toolbar input,
.listing-toolbar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
  color: var(--text);
  background: #f8fafc;
  outline: none;
}

.result-count {
  min-width: 118px;
  padding: 11px 12px;
  border-radius: 14px;
  color: #065f46;
  background: #d1fae5;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
  border-radius: var(--radius);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-card .poster-wrap {
  border-radius: 16px;
  box-shadow: none;
}

.ranking-number {
  color: var(--emerald-dark);
  font-weight: 900;
}

.ranking-content h2 {
  margin: 4px 0 6px;
  font-size: 24px;
  line-height: 1.2;
}

.ranking-content p {
  margin: 0 0 10px;
  color: var(--muted);
}

.breadcrumb {
  width: min(1220px, calc(100% - 32px));
  margin: 26px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--emerald-dark);
  font-weight: 700;
}

.detail-hero {
  width: min(1220px, calc(100% - 32px));
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 34px;
  border-radius: 34px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(7, 17, 28, 0.96), rgba(7, 17, 28, 0.84)),
    radial-gradient(circle at 82% 20%, rgba(16, 185, 129, 0.34), transparent 34%);
  box-shadow: var(--shadow);
}

.detail-info h1 {
  margin-top: 10px;
  font-size: clamp(34px, 6vw, 64px);
}

.detail-line {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.detail-meta {
  color: rgba(255, 255, 255, 0.7);
}

.detail-tags span {
  color: #d1fae5;
  background: rgba(255, 255, 255, 0.12);
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 8px;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.65)),
    radial-gradient(circle at 50% 40%, rgba(16, 185, 129, 0.25), transparent 28%);
  border: 0;
  cursor: pointer;
}

.play-overlay span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #052e22;
  background: #34d399;
  font-size: 30px;
  box-shadow: 0 18px 45px rgba(16, 185, 129, 0.35);
}

.play-overlay strong {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.play-overlay.hidden {
  display: none;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 24px;
}

.content-panel p {
  margin: 16px 0 0;
}

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

.site-footer {
  margin-top: 80px;
  padding: 36px 0;
  color: rgba(255, 255, 255, 0.72);
  background: #07111c;
}

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

.footer-shell strong {
  color: #ffffff;
}

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

.footer-links a {
  color: rgba(255, 255, 255, 0.82);
}

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

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

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

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .hero-poster {
    width: 280px;
  }
}

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

  .main-nav,
  .nav-search {
    display: none;
  }

  body.nav-open .main-nav,
  body.nav-open .nav-search {
    position: fixed;
    left: 16px;
    right: 16px;
    display: flex;
    z-index: 80;
  }

  body.nav-open .main-nav {
    top: 82px;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 22px;
    background: rgba(7, 17, 28, 0.96);
    box-shadow: var(--shadow);
  }

  body.nav-open .nav-search {
    top: 288px;
    width: auto;
    background: rgba(7, 17, 28, 0.96);
  }

  .hero {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 24px;
    padding-top: 56px;
  }

  .hero-content {
    padding-top: 0;
  }

  .hero-poster {
    justify-self: start;
    width: 210px;
  }

  .hero-dots {
    bottom: 150px;
  }

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

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

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

  .listing-toolbar {
    grid-template-columns: 1fr;
  }

  .footer-shell {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .page-section {
    width: min(100% - 24px, 1220px);
    padding-top: 42px;
  }

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

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

  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .rank-meta {
    grid-column: 2;
  }

  .ranking-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .ranking-content h2 {
    font-size: 18px;
  }

  .detail-hero {
    width: min(100% - 24px, 1220px);
    padding: 20px;
    border-radius: 24px;
  }

  .breadcrumb {
    width: min(100% - 24px, 1220px);
  }

  .detail-info h1,
  .hero-content h1 {
    letter-spacing: -0.04em;
  }

  .big-search {
    flex-direction: column;
  }

  .big-search button {
    min-height: 44px;
  }
}
