:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --green: #34d399;
  --green-deep: #059669;
  --amber: #fbbf24;
  --purple: #a855f7;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 10%, rgba(16, 185, 129, 0.18), transparent 32rem),
    radial-gradient(circle at 80% 0%, rgba(168, 85, 247, 0.18), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  width: min(1240px, calc(100% - 28px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--green), var(--purple));
  color: white;
  box-shadow: 0 12px 30px rgba(52, 211, 153, 0.2);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.desktop-nav::-webkit-scrollbar {
  display: none;
}

.desktop-nav a,
.mobile-nav a {
  color: var(--soft);
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover {
  color: white;
  background: rgba(52, 211, 153, 0.16);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  color: white;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 28px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.94);
}

.mobile-nav.open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.75s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.12);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.32) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.15) 45%, rgba(2, 6, 23, 0.66) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 72vh;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.5fr);
  align-items: center;
  gap: 42px;
  padding: 84px 0 64px;
}

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

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

.hero h1 {
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1.04;
  margin: 0 0 14px;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, white, #a7f3d0, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h2 {
  margin: 0 0 14px;
  font-size: clamp(24px, 3vw, 42px);
}

.hero p {
  margin: 0;
  max-width: 680px;
  color: var(--soft);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.75;
}

.hero-actions,
.home-search,
.filter-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

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

.btn,
.home-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.72);
  color: white;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover,
.home-search button:hover {
  transform: translateY(-2px);
  border-color: rgba(52, 211, 153, 0.52);
}

.btn.primary,
.home-search button {
  background: linear-gradient(135deg, var(--green-deep), var(--green));
  color: #04111d;
  border: 0;
}

.btn.ghost {
  background: rgba(15, 23, 42, 0.62);
}

.btn.small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.hero-poster {
  display: block;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

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

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

.hero-dots button.active {
  background: var(--green);
}

.search-hero-card,
.page-title-card,
.detail-hero,
.player-section,
.detail-article,
.detail-side,
.filter-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.search-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.56fr);
  gap: 24px;
  align-items: center;
  padding: 28px;
  margin-top: -42px;
  position: relative;
  z-index: 10;
}

.search-hero-card h2,
.page-title-card h1,
.section-heading h2,
.detail-copy h1,
.detail-article h2,
.detail-side h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  letter-spacing: -0.02em;
}

.search-hero-card p,
.page-title-card p,
.section-heading p,
.detail-copy p,
.detail-article p,
.detail-side dd,
.movie-desc,
.rank-info p,
.category-tile p {
  color: var(--soft);
  line-height: 1.75;
}

.home-search input,
.filter-panel input,
.filter-panel select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  color: white;
  background: rgba(2, 6, 23, 0.72);
  outline: none;
}

.home-search input {
  flex: 1;
  min-width: 220px;
}

.section {
  padding: 58px 0 0;
}

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

.section-link {
  color: var(--green);
  font-weight: 700;
  white-space: nowrap;
}

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

.movie-card {
  min-width: 0;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(52, 211, 153, 0.42);
  background: rgba(15, 23, 42, 0.94);
}

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 54%);
}

.play-pill {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.92);
  color: #04111d;
  font-size: 12px;
  font-weight: 800;
}

.rank-num {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--amber), #f97316);
  color: #111827;
}

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

.movie-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 46px;
  font-weight: 800;
  line-height: 1.45;
}

.movie-title:hover,
.rank-title:hover,
.detail-side a:hover {
  color: var(--green);
}

.movie-meta {
  margin: 7px 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.movie-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.movie-tags span {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.12);
  color: #a7f3d0;
  font-size: 12px;
}

.movie-tags.large-tags span {
  font-size: 13px;
  padding: 7px 10px;
}

.movie-desc {
  margin: 10px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
}

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

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

.category-tile {
  min-height: 160px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(52, 211, 153, 0.14), rgba(168, 85, 247, 0.12)),
    rgba(15, 23, 42, 0.78);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 211, 153, 0.46);
}

.category-tile span {
  display: block;
  color: white;
  font-size: 20px;
  font-weight: 800;
}

.category-tile strong {
  display: inline-flex;
  margin: 14px 0 8px;
  color: var(--amber);
  font-size: 30px;
}

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

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

.page-title-card {
  padding: 32px;
  margin-bottom: 24px;
}

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

.breadcrumb a:hover {
  color: var(--green);
}

.filter-panel {
  padding: 16px;
  margin-bottom: 24px;
}

.filter-panel input {
  flex: 1;
  min-width: 240px;
}

.filter-panel select {
  min-width: 150px;
}

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

.filter-card.hidden {
  display: none;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 84px 54px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
}

.rank-cover img {
  width: 84px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 16px;
}

.rank-index {
  font-size: 30px;
  font-weight: 900;
  color: var(--amber);
}

.rank-title {
  font-size: 19px;
  font-weight: 800;
}

.detail-main {
  display: grid;
  gap: 28px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  gap: 32px;
  padding: 28px;
  align-items: center;
}

.detail-poster {
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

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

.detail-copy p {
  font-size: 18px;
  max-width: 760px;
}

.player-section {
  padding: 18px;
}

.video-box {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.video-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(2, 6, 23, 0.5));
  cursor: pointer;
}

.video-start span {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  background: rgba(52, 211, 153, 0.92);
  color: #04111d;
  font-size: 34px;
  box-shadow: 0 20px 55px rgba(52, 211, 153, 0.28);
}

.video-start.is-hidden {
  display: none;
}

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

.detail-article,
.detail-side {
  padding: 26px;
}

.detail-article h2:not(:first-child) {
  margin-top: 28px;
}

.detail-article p {
  margin: 14px 0 0;
  font-size: 17px;
}

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

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

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

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.74);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 24px;
  padding: 34px 0;
}

.footer-logo {
  margin-bottom: 12px;
}

.site-footer p {
  color: var(--muted);
  max-width: 520px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--soft);
}

.footer-links a:hover {
  color: white;
  background: rgba(52, 211, 153, 0.16);
}

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

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

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

  .menu-button {
    display: inline-grid;
    place-items: center;
  }

  .hero,
  .hero-content {
    min-height: 78vh;
  }

  .hero-content,
  .search-hero-card,
  .detail-hero,
  .detail-content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

  .movie-grid,
  .ranking-strip,
  .related-grid,
  .category-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .rank-row .btn {
    grid-column: 2 / -1;
    justify-self: start;
  }

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

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

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

  .site-header-inner {
    width: min(100% - 22px, 1240px);
  }

  .logo span:last-child {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .search-hero-card,
  .page-title-card,
  .detail-hero,
  .player-section,
  .detail-article,
  .detail-side {
    border-radius: 20px;
    padding: 18px;
  }

  .movie-grid,
  .ranking-strip,
  .related-grid,
  .category-page-grid {
    gap: 12px;
  }

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

  .movie-title {
    min-height: 42px;
    font-size: 14px;
  }

  .movie-meta,
  .movie-tags span,
  .play-pill {
    font-size: 11px;
  }

  .filter-panel input,
  .filter-panel select,
  .home-search input,
  .home-search button {
    width: 100%;
  }
}
