:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --emerald: #34d399;
  --blue: #60a5fa;
  --rose: #fb7185;
  --amber: #fbbf24;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(16, 185, 129, 0.18), transparent 30%),
    radial-gradient(circle at 92% 8%, rgba(59, 130, 246, 0.18), transparent 28%),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  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 {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #04111c;
  background: linear-gradient(135deg, var(--emerald), var(--blue));
  box-shadow: 0 16px 36px rgba(52, 211, 153, 0.25);
}

.brand-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  color: var(--soft);
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: rgba(51, 65, 85, 0.72);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search {
  margin-left: auto;
}

.header-search input,
.mobile-search input,
.big-search input,
.filter-input-wrap input,
.advanced-filter input,
.advanced-filter select {
  border: 1px solid var(--line);
  outline: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.82);
  border-radius: 999px;
  transition: 0.2s ease;
}

.header-search input {
  width: 220px;
  height: 40px;
  padding: 0 16px;
}

.header-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.filter-input-wrap input:focus,
.advanced-filter input:focus,
.advanced-filter select:focus {
  border-color: rgba(52, 211, 153, 0.72);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
}

.header-search button,
.mobile-search button,
.big-search button {
  height: 40px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  color: #03111f;
  font-weight: 800;
  background: linear-gradient(135deg, var(--emerald), var(--blue));
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.85);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-menu-button span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #e2e8f0;
}

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

.mobile-nav.is-open {
  display: block;
}

.mobile-link {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--soft);
}

.mobile-link:hover {
  background: rgba(51, 65, 85, 0.68);
  color: #ffffff;
}

.mobile-search {
  margin-top: 10px;
}

.mobile-search input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  width: min(1200px, calc(100% - 32px));
  margin: 34px auto 0;
  min-height: 620px;
  border-radius: 36px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: rgba(15, 23, 42, 0.72);
}

.hero-ring {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 999px;
  filter: blur(30px);
  opacity: 0.26;
  pointer-events: none;
}

.hero-ring-one {
  top: -90px;
  right: 20%;
  background: var(--emerald);
}

.hero-ring-two {
  bottom: -100px;
  left: 10%;
  background: var(--blue);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 42px;
  align-items: center;
  padding: 72px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(22px) saturate(1.15);
  transform: scale(1.08);
  opacity: 0.24;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.62) 48%, rgba(15, 23, 42, 0.84)),
    radial-gradient(circle at 74% 38%, rgba(52, 211, 153, 0.18), transparent 30%);
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.24);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 18px 0 18px;
  max-width: 760px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.hero p,
.page-hero p,
.detail-copy p {
  max-width: 720px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.9;
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span,
.movie-meta-line span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(96, 165, 250, 0.22);
  font-size: 12px;
}

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

.primary-button,
.ghost-button,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-button {
  color: #03111f;
  background: linear-gradient(135deg, var(--emerald), var(--blue));
  box-shadow: 0 16px 36px rgba(52, 211, 153, 0.22);
}

.primary-button:hover,
.big-search button:hover,
.header-search button:hover {
  transform: translateY(-2px);
}

.ghost-button,
.section-link {
  color: var(--text);
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid var(--line);
}

.ghost-button:hover,
.section-link:hover {
  border-color: rgba(52, 211, 153, 0.5);
  background: rgba(30, 41, 59, 0.84);
}

.hero-poster {
  display: block;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.22);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
  transform: rotate(1.5deg);
}

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

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

.hero-dots button {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.42);
}

.hero-dots button.is-active {
  width: 56px;
  background: linear-gradient(90deg, var(--emerald), var(--blue));
}

.search-hero-panel,
.section-wrap,
.split-section,
.page-hero,
.detail-content {
  width: min(1200px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.search-hero-panel {
  margin-top: 26px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  display: grid;
  grid-template-columns: 1fr minmax(300px, 520px);
  gap: 28px;
  align-items: center;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: var(--shadow);
}

.search-hero-panel h2,
.section-heading h2,
.story-card h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.15;
  font-weight: 900;
}

.search-hero-panel p,
.section-heading p,
.story-card p,
.category-tile em {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
  font-style: normal;
}

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

.big-search input {
  min-width: 0;
  flex: 1;
  height: 52px;
  padding: 0 18px;
}

.big-search button {
  border: 0;
  height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  color: #03111f;
  font-weight: 900;
  background: linear-gradient(135deg, var(--emerald), var(--blue));
}

.section-wrap,
.split-section {
  margin-top: 70px;
}

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

.section-heading > span,
.compact-heading > span {
  width: 7px;
  height: 46px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--emerald), var(--blue));
  flex: 0 0 auto;
}

.section-heading > div {
  margin-right: auto;
}

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

.compact-heading a {
  color: var(--emerald);
  font-weight: 800;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.35);
}

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

.poster-wrap img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

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

.play-chip,
.rank-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  color: #03111f;
  background: linear-gradient(135deg, var(--emerald), var(--blue));
}

.rank-badge {
  left: 12px;
  top: 12px;
  color: #ffffff;
  background: rgba(244, 63, 94, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.movie-meta-line {
  margin-bottom: 10px;
}

.movie-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-card h3 a:hover {
  color: var(--emerald);
}

.movie-card p {
  min-height: 48px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 14px;
  font-size: 14px;
}

.tag-row span {
  color: #fecdd3;
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(251, 113, 133, 0.22);
}

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

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

.category-tile {
  position: relative;
  min-height: 178px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 24px;
  background:
    radial-gradient(circle at 90% 10%, rgba(52, 211, 153, 0.2), transparent 32%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.72));
  transition: 0.24s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(96, 165, 250, 0.45);
}

.category-glow {
  position: absolute;
  width: 120px;
  height: 120px;
  right: -40px;
  top: -40px;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.2);
  filter: blur(10px);
}

.category-tile strong {
  position: relative;
  z-index: 1;
  font-size: 24px;
  font-weight: 900;
}

.category-tile em,
.category-arrow {
  position: relative;
  z-index: 1;
}

.category-arrow {
  margin-top: 18px;
  color: var(--emerald);
  font-weight: 900;
}

.page-hero {
  margin-top: 34px;
  border: 1px solid var(--line);
  border-radius: 34px;
  padding: 58px;
  background:
    radial-gradient(circle at 92% 10%, rgba(52, 211, 153, 0.2), transparent 28%),
    radial-gradient(circle at 20% 10%, rgba(96, 165, 250, 0.17), transparent 28%),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.slim-hero {
  min-height: 300px;
  display: flex;
  align-items: center;
}

.filter-panel,
.advanced-filter {
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.62);
}

.filter-input-wrap input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
}

.filter-hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.advanced-filter {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 160px 150px;
  gap: 12px;
}

.advanced-filter input,
.advanced-filter select {
  width: 100%;
  height: 50px;
  padding: 0 16px;
}

.advanced-filter select {
  appearance: none;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.96)),
    var(--detail-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.15);
}

.detail-inner {
  position: relative;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 44px;
  align-items: center;
  padding: 60px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(226, 232, 240, 0.22);
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  margin-bottom: 8px;
}

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

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

.player-section {
  width: min(1100px, calc(100% - 32px));
  margin: 52px auto 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: #000000;
  box-shadow: var(--shadow);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  cursor: pointer;
}

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border: 0;
  border-radius: 999px;
  color: #03111f;
  background: linear-gradient(135deg, var(--emerald), var(--blue));
  font-weight: 900;
  box-shadow: 0 20px 52px rgba(52, 211, 153, 0.35);
  z-index: 3;
}

.player-start.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.player-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.7);
}

.story-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  background: rgba(15, 23, 42, 0.66);
  margin-bottom: 20px;
}

.story-card p {
  font-size: 17px;
  color: var(--soft);
}

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

.footer-grid {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 34px;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 16px;
}

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

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

.footer-links a {
  color: var(--soft);
}

.footer-links a:hover {
  color: var(--emerald);
}

.footer-bottom {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 34px;
  border-top: 1px solid var(--line);
}

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

@media (max-width: 1100px) {
  .header-search {
    display: none;
  }

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

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

  .hero-slide {
    grid-template-columns: 1fr 280px;
    padding: 54px;
  }
}

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

  .mobile-menu-button {
    display: inline-flex;
    margin-left: auto;
  }

  .hero {
    min-height: 720px;
    border-radius: 28px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 34px;
    align-content: center;
  }

  .hero-poster {
    width: min(240px, 60vw);
    transform: none;
  }

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: clamp(34px, 10vw, 54px);
  }

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

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

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

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

  .advanced-filter {
    grid-template-columns: 1fr 1fr;
  }

  .detail-inner {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(280px, 72vw);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .mobile-nav,
  .hero,
  .search-hero-panel,
  .section-wrap,
  .split-section,
  .page-hero,
  .detail-content,
  .player-section,
  .footer-grid,
  .footer-bottom,
  .detail-inner {
    width: min(100% - 20px, 1200px);
  }

  .brand-text {
    font-size: 18px;
  }

  .hero {
    margin-top: 18px;
    min-height: 760px;
  }

  .hero-slide {
    padding: 24px;
  }

  .hero p,
  .page-hero p,
  .detail-copy p {
    font-size: 16px;
  }

  .page-hero {
    padding: 34px 24px;
    border-radius: 26px;
  }

  .movie-grid,
  .full-grid,
  .compact-grid,
  .category-grid,
  .category-grid-large,
  .advanced-filter {
    grid-template-columns: 1fr;
  }

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

  .movie-card p {
    min-height: auto;
  }

  .player-start {
    padding: 12px 16px;
  }
}
