:root {
  --page: #07111f;
  --page-soft: #0f1f33;
  --card: rgba(15, 23, 42, 0.82);
  --card-solid: #111c2f;
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(34, 211, 238, 0.28);
  --text: #f8fafc;
  --muted: #b6c4d8;
  --soft: #8aa0bc;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --pink: #ec4899;
  --amber: #f59e0b;
  --shadow: 0 24px 80px rgba(2, 8, 23, 0.48);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(34, 211, 238, 0.22), transparent 30rem),
    radial-gradient(circle at 85% 10%, rgba(59, 130, 246, 0.22), transparent 34rem),
    linear-gradient(180deg, #07111f 0%, #0b1424 42%, #08111f 100%);
  min-height: 100vh;
}

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 var(--line);
  background: rgba(7, 17, 31, 0.82);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #06101c;
  background: linear-gradient(135deg, var(--cyan), #a7f3d0 50%, #60a5fa);
  box-shadow: 0 14px 40px rgba(34, 211, 238, 0.32);
}

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

.desktop-nav a,
.mobile-nav a {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
  color: var(--text);
  background: rgba(34, 211, 238, 0.12);
}

.menu-toggle {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 4px;
  background: var(--text);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.9);
}

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

.hero {
  position: relative;
  min-height: 620px;
  margin: 36px 0 28px;
  border: 1px solid var(--line);
  border-radius: 34px;
  overflow: hidden;
  background: #081426;
  box-shadow: var(--shadow);
}

.hero-slider {
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 42px;
  align-items: center;
  padding: 64px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: blur(26px) saturate(1.2);
  transform: scale(1.1);
  opacity: 0.42;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 17, 31, 0.94) 0%, rgba(7, 17, 31, 0.72) 54%, rgba(7, 17, 31, 0.36) 100%),
    radial-gradient(circle at 76% 24%, rgba(34, 211, 238, 0.22), transparent 22rem);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.sub-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-summary {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
}

.hero-tags,
.tag-row,
.detail-meta,
.sub-actions,
.hero-actions,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags,
.hero-actions,
.detail-actions {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d7e3f3;
  background: rgba(148, 163, 184, 0.1);
  font-size: 13px;
  font-weight: 700;
}

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

.primary-button,
.home-search button,
.filter-bar button {
  color: #05101e;
  background: linear-gradient(135deg, var(--cyan), #a7f3d0);
  box-shadow: 0 16px 40px rgba(34, 211, 238, 0.25);
}

.ghost-button,
.section-link {
  color: var(--text);
  border: 1px solid var(--line-strong);
  background: rgba(34, 211, 238, 0.1);
}

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

.hero-poster {
  display: block;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(2, 8, 23, 0.68);
}

.hero-poster img,
.movie-card img,
.category-tile img,
.category-cover img,
.rank-thumb img,
.play-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-dots {
  position: absolute;
  left: 64px;
  bottom: 36px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
}

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

.search-band,
.content-section,
.sub-hero,
.detail-hero {
  margin: 28px 0;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 18px 60px rgba(2, 8, 23, 0.24);
}

.search-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  align-items: center;
  gap: 24px;
  padding: 30px;
}

.search-band h2,
.section-heading h2,
.site-footer h2,
.movie-card h2,
.rank-row h2,
.category-overview-card h2,
.detail-copy h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.home-search,
.filter-bar {
  display: flex;
  gap: 12px;
}

.home-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: rgba(7, 17, 31, 0.8);
  outline: none;
  padding: 0 16px;
}

.home-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.content-section {
  padding: 30px;
}

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

.small-heading {
  align-items: center;
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 24px;
  overflow: hidden;
  background: var(--card-solid);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 17, 31, 0.15), rgba(7, 17, 31, 0.92));
}

.category-tile img {
  position: absolute;
  inset: 0;
  opacity: 0.62;
  transition: transform 0.35s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile span,
.category-tile small {
  position: relative;
  z-index: 2;
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile small {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
}

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

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

.movie-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(8, 18, 32, 0.86);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: 0 20px 60px rgba(2, 8, 23, 0.32);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0b1525;
}

.poster-link img {
  transition: transform 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #05101e;
  background: var(--cyan);
  font-size: 12px;
  font-weight: 900;
}

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

.movie-meta {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h2 {
  font-size: 20px;
  line-height: 1.25;
}

.movie-card p:not(.movie-meta) {
  color: var(--muted);
  line-height: 1.75;
}

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

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 24px;
}

.ranking-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px;
  background: rgba(7, 17, 31, 0.56);
}

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

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

.rank-number {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #05101e;
  background: linear-gradient(135deg, var(--amber), var(--cyan));
  font-weight: 900;
}

.rank-thumb {
  display: block;
  width: 76px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
}

.rank-row h2 {
  font-size: 17px;
}

.rank-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

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

.sub-hero,
.detail-hero {
  padding: 46px;
}

.sub-hero p {
  max-width: 780px;
  color: var(--muted);
  line-height: 1.85;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 16px;
  background: rgba(7, 17, 31, 0.58);
}

.category-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 18px;
}

.category-overview-card p {
  color: var(--muted);
  line-height: 1.75;
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.inline-links a {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}

.filter-bar {
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.filter-bar input {
  flex: 1 1 280px;
}

.filter-bar select {
  flex: 0 1 180px;
}

.large-filter input {
  flex-basis: 420px;
}

.is-filtered-out {
  display: none !important;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  margin-bottom: 28px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 34px;
  align-items: center;
}

.player-card {
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  padding: 12px;
  background: rgba(7, 17, 31, 0.74);
  box-shadow: var(--shadow);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  overflow: hidden;
  background: #020617;
}

.video-frame video,
.play-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-frame video {
  z-index: 1;
  object-fit: contain;
  background: #020617;
}

.play-cover {
  z-index: 2;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.42);
}

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

.play-button {
  position: relative;
  z-index: 3;
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), #a7f3d0);
  box-shadow: 0 24px 70px rgba(34, 211, 238, 0.42);
  cursor: pointer;
}

.play-button span {
  display: block;
  width: 0;
  height: 0;
  margin-left: 34px;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 25px solid #05101e;
}

.detail-info h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.detail-one-line {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
}

.detail-meta {
  margin-top: 20px;
}

.detail-tags span {
  background: rgba(34, 211, 238, 0.1);
}

.detail-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.detail-copy article {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  background: rgba(7, 17, 31, 0.5);
}

.detail-copy p {
  color: var(--muted);
  line-height: 2;
}

.site-footer {
  margin-top: 46px;
  border-top: 1px solid var(--line);
  background: rgba(2, 8, 23, 0.4);
}

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

.site-footer p,
.site-footer a {
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-brand {
  color: var(--text) !important;
}

@media (max-width: 1080px) {
  .hero-slide,
  .detail-layout,
  .split-layout {
    grid-template-columns: 1fr;
  }

  .hero-slide {
    padding: 42px;
  }

  .hero-poster {
    width: min(320px, 100%);
  }

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

  .tight-grid,
  .full-rank-list,
  .category-overview-grid,
  .detail-copy {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  main,
  .nav-shell,
  .mobile-nav,
  .footer-grid {
    width: min(100% - 24px, 1180px);
  }

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

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

  .hero,
  .hero-slider {
    min-height: 720px;
  }

  .hero-slide {
    padding: 28px;
    align-content: center;
  }

  .hero-dots {
    left: 28px;
    bottom: 24px;
  }

  .search-band,
  .footer-grid,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

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

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

  .content-section,
  .sub-hero,
  .detail-hero {
    padding: 22px;
  }

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

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

@media (max-width: 520px) {
  .movie-grid,
  .category-tile-grid {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .sub-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .hero-summary,
  .detail-one-line {
    font-size: 16px;
  }

  .filter-bar {
    flex-direction: column;
  }

  .filter-bar select,
  .filter-bar input {
    flex-basis: auto;
  }
}
