:root {
  color-scheme: dark;
  --bg: #030712;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.72);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --brand: #10b981;
  --brand-strong: #059669;
  --brand-soft: rgba(16, 185, 129, 0.16);
  --blue-soft: rgba(59, 130, 246, 0.14);
  --purple-soft: rgba(168, 85, 247, 0.14);
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.12), transparent 34rem), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(17, 24, 39, 0.94);
  border-bottom: 1px solid rgba(31, 41, 55, 0.94);
  backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brand);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: white;
  background: linear-gradient(135deg, var(--brand), #22d3ee);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #d1d5db;
  font-size: 15px;
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--brand);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.82);
  color: var(--text);
}

.site-main {
  padding-top: 64px;
}

.page-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 64px;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 540px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  background-position: center;
  background-size: cover;
  transition: opacity 0.7s ease, transform 1.1s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #030712 0%, rgba(3, 7, 18, 0.78) 38%, rgba(3, 7, 18, 0.18) 100%);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding-bottom: 86px;
  max-width: 1180px;
}

.hero-content h1 {
  max-width: 780px;
  margin: 18px 0 18px;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 28px;
  color: #d1d5db;
  font-size: 18px;
  line-height: 1.8;
}

.pill,
.detail-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border: 1px solid rgba(16, 185, 129, 0.46);
  border-radius: 999px;
  background: var(--brand-soft);
  color: #34d399;
  font-size: 13px;
  font-weight: 700;
}

.hero-actions,
.subnav,
.footer-links,
.tag-row,
.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-btn,
.ghost-btn,
.quick-search button,
.filter-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  border: 0;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn,
.quick-search button {
  color: #ffffff;
  background: var(--brand-strong);
}

.ghost-btn {
  color: #e5e7eb;
  border: 1px solid rgba(229, 231, 235, 0.24);
  background: rgba(15, 23, 42, 0.52);
}

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

.hero-controls {
  position: absolute;
  right: max(16px, calc((100% - 1180px) / 2));
  bottom: 42px;
  display: flex;
  gap: 10px;
  z-index: 4;
}

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

.hero-dot.active {
  background: var(--brand);
}

.search-band,
.content-section,
.featured-section,
.category-section,
.mosaic-section,
.rank-section,
.page-hero,
.filter-panel,
.category-overview,
.ranking-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.search-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 28px;
  align-items: center;
  padding: 34px;
  margin-top: -42px;
  position: relative;
  z-index: 8;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-band h2,
.section-title h2,
.page-hero h1,
.related-aside h2,
.detail-copy h1 {
  margin: 0;
}

.search-band p,
.page-hero p,
.footer-inner p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.quick-search {
  display: flex;
  gap: 10px;
}

.quick-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.72);
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

.content-section,
.featured-section,
.category-section,
.mosaic-section,
.rank-section {
  padding: 72px 0 0;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.section-title h2 {
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-title a {
  color: var(--brand);
  font-weight: 700;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card {
  min-width: 0;
}

.poster-link {
  display: block;
  height: 100%;
}

.poster-wrap,
.wide-poster,
.mini-img {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--panel);
}

.poster-wrap {
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  margin-bottom: 12px;
}

.movie-card.compact .poster-wrap {
  aspect-ratio: 1 / 1;
}

.poster-wrap img,
.wide-poster img,
.mini-img img,
.category-preview img,
.ranking-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.movie-card:hover img,
.wide-card:hover img,
.mini-card:hover img,
.category-card:hover img,
.ranking-row:hover img {
  transform: scale(1.08);
}

.poster-gradient,
.feature-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.84), transparent 62%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-gradient,
.feature-large:hover .feature-overlay {
  opacity: 1;
}

.duration-badge,
.wide-poster span {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 8px;
  border-radius: 8px;
  color: white;
  background: rgba(0, 0, 0, 0.7);
  font-size: 12px;
  font-weight: 800;
}

.movie-info strong,
.wide-card strong,
.mini-card strong,
.ranking-copy strong {
  display: block;
  color: white;
  font-weight: 800;
  line-height: 1.45;
  transition: color 0.2s ease;
}

.movie-card:hover strong,
.wide-card:hover strong,
.mini-card:hover strong,
.ranking-row:hover strong {
  color: #34d399;
}

.movie-info small,
.wide-card small,
.mini-card small,
.ranking-copy small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 5px;
}

.movie-info em,
.ranking-copy em {
  display: block;
  margin-top: 8px;
  color: #9ca3af;
  font-size: 13px;
  line-height: 1.65;
  font-style: normal;
}

.featured-section {
  width: 100%;
  max-width: none;
  padding: 72px max(16px, calc((100% - 1180px) / 2)) 72px;
  background: rgba(17, 24, 39, 0.46);
}

.featured-section .section-title {
  width: min(1180px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.featured-layout {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 22px;
}

.feature-large {
  position: relative;
  min-height: 430px;
  border-radius: 22px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.feature-large::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.15));
}

.feature-text {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  z-index: 2;
}

.feature-text small {
  display: inline-block;
  margin-bottom: 12px;
  color: #34d399;
  font-weight: 800;
}

.feature-text strong {
  display: block;
  font-size: 30px;
  margin-bottom: 12px;
}

.feature-text em {
  color: #d1d5db;
  font-style: normal;
  line-height: 1.7;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mini-card {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 14px;
  align-items: center;
  background: rgba(31, 41, 55, 0.58);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: background 0.2s ease, transform 0.2s ease;
}

.mini-card:hover {
  background: rgba(31, 41, 55, 0.86);
  transform: translateY(-2px);
}

.mini-img {
  aspect-ratio: 16 / 10;
}

.wide-scroll {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-snap-type: x mandatory;
}

.wide-card {
  width: 286px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.wide-poster {
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  margin-bottom: 12px;
}

.tag-row span,
.subnav a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(31, 41, 55, 0.86);
  color: #d1d5db;
  font-size: 12px;
  font-style: normal;
}

.category-section {
  width: 100%;
  max-width: none;
  padding: 72px max(16px, calc((100% - 1180px) / 2));
  background: linear-gradient(to bottom, rgba(17, 24, 39, 0.9), #030712);
}

.category-section .section-title,
.category-grid {
  width: min(1180px, 100%);
  margin-left: auto;
  margin-right: auto;
}

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

.category-tile {
  min-height: 142px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(31, 41, 55, 0.74));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(16, 185, 129, 0.52);
}

.category-tile span {
  display: block;
  color: white;
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 10px;
}

.category-tile small {
  color: var(--muted);
  line-height: 1.7;
}

.mosaic-grid {
  display: grid;
  grid-template-columns: 2fr repeat(2, 1fr);
  gap: 18px;
}

.mosaic-grid .movie-card:first-child {
  grid-row: span 2;
}

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

.rank-list a {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-list a:hover {
  background: rgba(31, 41, 55, 0.82);
  transform: translateY(-2px);
}

.rank-list span,
.ranking-number {
  color: #34d399;
  font-size: 22px;
  font-weight: 900;
}

.rank-list strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.page-hero {
  margin-top: 42px;
  padding: 60px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.18), transparent 34rem), rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.compact-hero {
  padding: 46px;
}

.page-hero h1 {
  margin-top: 18px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.subnav {
  margin-top: 22px;
}

.subnav a:hover {
  color: #34d399;
}

.category-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding-top: 42px;
}

.category-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 185, 129, 0.42);
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 150px;
  overflow: hidden;
}

.category-copy {
  display: block;
  padding: 20px;
}

.category-copy strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
}

.category-copy small {
  color: var(--muted);
  line-height: 1.7;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(160px, 0.28fr));
  gap: 12px;
  margin-top: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.ranking-page {
  display: grid;
  gap: 14px;
  padding-top: 34px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 72px 138px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  overflow: hidden;
}

.ranking-row img {
  width: 138px;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
}

.detail-main {
  padding-top: 34px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.breadcrumb a {
  color: #34d399;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 30px;
  align-items: start;
}

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

.player-box video {
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay button {
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: var(--brand-strong);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 20px 48px rgba(16, 185, 129, 0.34);
}

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

.detail-copy {
  padding: 26px 0 0;
}

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

.detail-copy h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.one-line {
  margin: 18px 0 20px;
  color: #34d399;
  font-size: 18px;
  line-height: 1.8;
  font-style: italic;
}

.detail-copy h2,
.review-box h2 {
  margin: 28px 0 12px;
  font-size: 22px;
}

.detail-copy p,
.review-box p {
  color: #d1d5db;
  line-height: 1.9;
}

.tag-row.large {
  margin: 22px 0;
}

.review-box {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.82);
}

.related-aside {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 14px;
}

.related-aside h2 {
  font-size: 22px;
  margin-bottom: 4px;
}

.site-footer {
  margin-top: 84px;
  border-top: 1px solid rgba(31, 41, 55, 0.94);
  background: rgba(2, 6, 23, 0.72);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
  gap: 36px;
  padding: 42px 0;
}

.footer-links {
  align-content: start;
  justify-content: flex-end;
}

.footer-links a {
  color: #d1d5db;
  font-size: 14px;
}

.footer-links a:hover {
  color: #34d399;
}

.footer-copy {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
  color: #6b7280;
  text-align: center;
  font-size: 13px;
}

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

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

  .detail-layout,
  .featured-layout,
  .search-band,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .related-aside {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .related-aside h2 {
    grid-column: 1 / -1;
  }

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

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 12px;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    padding-bottom: 112px;
  }

  .hero-controls {
    left: 16px;
    right: auto;
  }

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

  .movie-grid.five,
  .movie-grid.four,
  .category-overview,
  .category-grid,
  .mosaic-grid,
  .rank-list,
  .related-aside {
    grid-template-columns: 1fr 1fr;
  }

  .mosaic-grid .movie-card:first-child {
    grid-row: auto;
  }

  .ranking-row {
    grid-template-columns: 52px 104px minmax(0, 1fr);
  }

  .ranking-row img {
    width: 104px;
  }

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

@media (max-width: 560px) {
  .movie-grid.five,
  .movie-grid.four,
  .category-overview,
  .category-grid,
  .mosaic-grid,
  .rank-list,
  .related-aside {
    grid-template-columns: 1fr;
  }

  .search-band {
    padding: 22px;
  }

  .feature-large {
    min-height: 360px;
  }

  .mini-card {
    grid-template-columns: 110px 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
