:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --orange: #f97316;
  --shadow: 0 24px 70px rgba(8, 47, 73, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: #06141b;
  background: linear-gradient(135deg, var(--cyan), #67e8f9);
  font-weight: 900;
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.34);
  transition: transform 0.5s ease;
}

.brand:hover .brand-mark {
  transform: rotate(180deg);
}

.brand-copy {
  display: grid;
  line-height: 1.1;
}

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

.brand-subtitle {
  margin-top: 3px;
  color: var(--cyan);
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  color: #cbd5e1;
  transition: color 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--cyan);
}

.nav-search {
  position: relative;
  width: 210px;
}

.nav-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select,
.search-page-form input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  outline: none;
  color: white;
  background: rgba(15, 23, 42, 0.85);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search input {
  padding: 10px 16px;
}

.nav-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.search-page-form input:focus {
  border-color: rgba(34, 211, 238, 0.9);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.92);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: white;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.98);
}

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

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

.mobile-search {
  padding: 16px 0 8px;
}

.mobile-search input {
  padding: 11px 16px;
}

.mobile-nav {
  display: grid;
  gap: 2px;
  padding: 8px 0 16px;
}

.mobile-link {
  padding: 10px 0;
}

.hero-slider {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-image,
.detail-hero-bg,
.page-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 34%, rgba(34, 211, 238, 0.26), transparent 30%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.74) 38%, rgba(2, 6, 23, 0.12) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.08) 42%, rgba(2, 6, 23, 0.22) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(680px, 100%);
  padding-top: 24px;
}

.hero-kicker,
.section-heading span,
.page-hero span,
.search-promo span {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: white;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy h1 {
  max-width: 680px;
  font-size: clamp(42px, 7vw, 76px);
}

.hero-copy p {
  max-width: 640px;
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: 17px;
  line-height: 1.85;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  color: #cffafe;
  background: rgba(8, 145, 178, 0.16);
  font-size: 12px;
}

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

.primary-btn,
.ghost-btn,
.search-page-form button,
.search-promo button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn,
.search-page-form button,
.search-promo button {
  border: 0;
  color: #041014;
  background: linear-gradient(135deg, var(--cyan), #67e8f9);
  box-shadow: 0 18px 40px rgba(34, 211, 238, 0.22);
  cursor: pointer;
}

.ghost-btn {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(12px);
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-dots,
.hero-arrows {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

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

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

.hero-arrows button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(10px);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.site-section {
  padding: 72px 0;
}

.tinted-section {
  background: rgba(15, 23, 42, 0.35);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  color: white;
}

.section-heading a {
  color: var(--cyan);
  font-weight: 800;
}

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

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

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

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

.movie-card-link {
  display: block;
}

.poster-shell {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  background: #0f172a;
  box-shadow: 0 14px 40px rgba(2, 6, 23, 0.28);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.poster-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.9) 100%);
  transition: opacity 0.28s ease;
}

.poster-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .poster-shell {
  transform: scale(1.035);
  box-shadow: 0 22px 46px rgba(34, 211, 238, 0.18);
}

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

.movie-card:hover .poster-shell::after {
  opacity: 1;
}

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.year-badge {
  top: 10px;
  right: 10px;
  min-width: 46px;
  min-height: 26px;
  padding: 3px 9px;
  background: rgba(6, 182, 212, 0.9);
}

.rank-badge {
  left: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  background: rgba(249, 115, 22, 0.94);
}

.movie-card-body {
  display: grid;
  gap: 7px;
  padding: 12px 2px 0;
}

.movie-card-body strong {
  color: #f8fafc;
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-card:hover strong {
  color: var(--cyan);
}

.movie-card-body small,
.line-clamp {
  color: var(--muted);
  font-size: 13px;
}

.line-clamp {
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  gap: 5px;
}

.tag-row span {
  min-height: 22px;
  padding: 2px 7px;
  font-size: 11px;
}

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

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

.category-card a {
  position: relative;
  display: block;
  min-height: 248px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.category-card-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.24), transparent 32%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.2) 0%, rgba(2, 6, 23, 0.92) 100%);
}

.category-card-content {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  gap: 10px;
  padding: 22px;
}

.category-card-content strong {
  color: white;
  font-size: 24px;
}

.category-card-content small,
.sample-links a {
  color: #cbd5e1;
  line-height: 1.65;
}

.sample-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sample-links a {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  color: #cffafe;
  font-size: 12px;
}

.split-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 34px;
  align-items: start;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 54px 62px 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 78px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-card);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.ranking-row:hover {
  border-color: rgba(34, 211, 238, 0.46);
  transform: translateX(4px);
}

.ranking-row span {
  color: var(--orange);
  font-size: 22px;
  font-weight: 900;
}

.ranking-row img {
  width: 54px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-row strong {
  color: white;
}

.ranking-row small {
  color: var(--muted);
}

.search-promo {
  position: sticky;
  top: 92px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 36%),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.search-promo h2 {
  margin: 0;
  color: white;
  font-size: 28px;
  line-height: 1.2;
}

.search-promo p {
  color: #cbd5e1;
  line-height: 1.75;
}

.search-promo form,
.search-page-form {
  display: flex;
  gap: 10px;
}

.search-promo input,
.search-page-form input {
  flex: 1;
  min-width: 0;
  padding: 0 17px;
}

.page-hero {
  position: relative;
  min-height: 330px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #020617;
}

.compact-hero {
  min-height: 300px;
  background:
    radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.18), transparent 32%),
    linear-gradient(135deg, #020617 0%, #0f172a 100%);
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.65) 52%, rgba(2, 6, 23, 0.3) 100%),
    linear-gradient(0deg, #020617 0%, transparent 55%);
}

.page-hero .site-container {
  position: relative;
  z-index: 2;
}

.page-hero h1 {
  font-size: clamp(38px, 6vw, 64px);
}

.page-hero p {
  max-width: 720px;
  margin: 18px 0 0;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.8;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 32px;
}

.filter-bar input,
.filter-bar select {
  min-height: 46px;
  padding: 0 16px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  background: #020617;
}

.detail-hero-bg {
  filter: blur(2px);
  transform: scale(1.04);
}

.detail-hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 76% 24%, rgba(34, 211, 238, 0.22), transparent 32%),
    linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.92) 42%, rgba(2, 6, 23, 0.56) 100%),
    linear-gradient(0deg, #020617 0%, transparent 54%);
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  min-height: 560px;
  padding: 52px 0;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.44);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #94a3b8;
  font-size: 14px;
}

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

.detail-info h1 {
  max-width: 850px;
  font-size: clamp(40px, 6vw, 72px);
}

.detail-one-line {
  max-width: 780px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.detail-tags {
  margin-top: 18px;
}

.player-section {
  padding-top: 44px;
}

.player-section h2 {
  margin: 0 0 18px;
  font-size: clamp(26px, 4vw, 38px);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: black;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.55);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 14px;
  border: 0;
  color: white;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.16), transparent 34%),
    rgba(2, 6, 23, 0.42);
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-icon {
  display: inline-grid;
  place-items: center;
  width: 86px;
  height: 86px;
  margin: 0 auto;
  border-radius: 999px;
  color: #06141b;
  background: linear-gradient(135deg, var(--cyan), #67e8f9);
  font-size: 34px;
  box-shadow: 0 0 60px rgba(34, 211, 238, 0.34);
}

.player-overlay strong {
  font-size: 20px;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  align-items: start;
}

.detail-article,
.detail-side {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.66);
  box-shadow: var(--shadow);
}

.detail-article {
  padding: 32px;
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 16px;
  color: white;
  font-size: 25px;
}

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

.detail-article p {
  margin: 0;
  color: #cbd5e1;
  line-height: 2;
  font-size: 16px;
}

.detail-side {
  padding: 26px;
}

.detail-side dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-side dt {
  color: var(--cyan);
  font-weight: 800;
}

.detail-side dd {
  margin: -8px 0 4px;
  color: #cbd5e1;
  line-height: 1.65;
}

.search-page-form {
  margin-bottom: 18px;
}

.search-page-form input {
  min-height: 50px;
}

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

.search-status {
  min-height: 28px;
  margin-bottom: 24px;
  color: #cbd5e1;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 38px;
  padding: 54px 0;
}

.footer-brand p,
.site-footer a,
.site-footer li {
  color: #94a3b8;
}

.footer-brand p {
  max-width: 520px;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 16px;
  color: white;
}

.site-footer ul {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-footer a:hover {
  color: var(--cyan);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 20px 0;
  color: #64748b;
  text-align: center;
}

.is-hidden-by-filter {
  display: none;
}

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

  .menu-toggle {
    display: inline-block;
  }

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

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

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

  .search-promo {
    position: static;
  }
}

@media (max-width: 760px) {
  .site-container {
    width: min(100% - 24px, 1180px);
  }

  .hero-slider {
    height: 620px;
  }

  .hero-copy p {
    font-size: 15px;
    -webkit-line-clamp: 5;
  }

  .hero-controls {
    align-items: flex-end;
  }

  .hero-arrows {
    display: none;
  }

  .site-section {
    padding: 48px 0;
  }

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

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

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

  .line-clamp,
  .tag-row {
    display: none;
  }

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

  .category-card a {
    min-height: 220px;
  }

  .ranking-row {
    grid-template-columns: 42px 54px 1fr;
  }

  .ranking-row small {
    display: none;
  }

  .filter-bar,
  .search-filters {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    gap: 26px;
    min-height: auto;
    padding: 42px 0;
  }

  .detail-poster {
    width: min(260px, 80%);
  }

  .detail-info h1 {
    font-size: 38px;
  }

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

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

  .footer-grid {
    grid-template-columns: 1fr;
    padding: 40px 0;
  }

  .search-promo form,
  .search-page-form {
    flex-direction: column;
  }
}
