:root {
  color-scheme: dark;
  --site-bg: #020617;
  --panel: rgba(15, 23, 42, 0.76);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(248, 113, 113, 0.45);
  --text: #ffffff;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --red: #ef4444;
  --red-deep: #b91c1c;
  --orange: #f97316;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius-xl: 28px;
  --radius-lg: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(239, 68, 68, 0.20), transparent 34rem),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.13), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #07111f 45%, #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 {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.84);
  backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.site-logo-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.32);
}

.site-logo-text {
  font-size: 20px;
}

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

.nav-link,
.mobile-link {
  color: var(--soft);
  border: 1px solid transparent;
  transition: all 0.22s ease;
}

.nav-link {
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 14px;
}

.nav-link:hover,
.nav-link-active,
.mobile-link:hover {
  color: white;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(239, 68, 68, 0.14);
}

.top-search {
  width: min(320px, 28vw);
  display: flex;
  align-items: center;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.top-search input,
.mobile-search input,
.wide-search input,
.inline-filter input {
  width: 100%;
  min-width: 0;
  color: white;
  border: 0;
  outline: 0;
  background: transparent;
}

.top-search input {
  padding: 8px 12px;
  font-size: 14px;
}

.top-search button,
.mobile-search button,
.wide-search button,
.inline-filter button {
  flex: none;
  color: white;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  box-shadow: 0 10px 28px rgba(239, 68, 68, 0.24);
  cursor: pointer;
}

.top-search button {
  padding: 8px 14px;
  font-size: 14px;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
}

.mobile-menu-button span {
  width: 18px;
  height: 2px;
  display: block;
  margin: 4px auto;
  border-radius: 2px;
  background: white;
}

.mobile-panel {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-strong);
}

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

.mobile-panel nav {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.mobile-link {
  padding: 12px;
  border-radius: 14px;
}

.mobile-search,
.wide-search,
.inline-filter {
  display: flex;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}

.mobile-search,
.inline-filter {
  padding: 6px;
  border-radius: 18px;
}

.mobile-search input,
.inline-filter input {
  padding: 12px;
}

.mobile-search button,
.inline-filter button {
  padding: 11px 18px;
}

.hero {
  position: relative;
  min-height: clamp(680px, 88vh, 920px);
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.9s ease;
}

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.28) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.30) 42%, rgba(2, 6, 23, 0.76) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.56fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
  padding: 96px 0 72px;
}

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

.eyebrow,
.section-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #fecaca;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before,
.section-kicker::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--orange));
}

.hero h1,
.page-hero h1 {
  margin: 0;
  color: white;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.96;
  font-weight: 950;
  letter-spacing: -0.08em;
}

.hero p,
.page-hero p {
  max-width: 780px;
  margin: 22px 0 0;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

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

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

.hero-tags span,
.detail-tags span,
.movie-tags span {
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.12);
}

.hero-tags span,
.detail-tags span {
  padding: 7px 11px;
  font-size: 13px;
}

.movie-tags span {
  padding: 5px 8px;
  font-size: 12px;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  box-shadow: 0 18px 40px rgba(239, 68, 68, 0.28);
}

.ghost-button {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}

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

.ghost-button:hover {
  border-color: var(--line-strong);
}

.hero-poster {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  border: 1px solid rgba(248, 113, 113, 0.24);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hero-poster:hover img {
  transform: scale(1.05);
}

.hero-poster span {
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: 62px;
  height: 62px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.94);
  box-shadow: 0 16px 40px rgba(239, 68, 68, 0.36);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 5;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 38px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  transition: all 0.22s ease;
}

.hero-dot.is-active {
  width: 64px;
  background: linear-gradient(90deg, var(--red), var(--orange));
}

.search-panel,
.section-block {
  margin-top: 72px;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 1.2fr);
  gap: 24px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.72));
  box-shadow: var(--shadow);
}

.search-panel h2,
.section-heading h2,
.ranking-side h2,
.detail-article h2,
.detail-aside h2 {
  margin: 0;
  color: white;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.search-panel h2,
.section-heading h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.wide-search {
  padding: 8px;
  border-radius: 999px;
}

.wide-search input {
  padding: 14px 18px;
  font-size: 16px;
}

.wide-search button {
  padding: 14px 24px;
  font-weight: 800;
}

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

.section-heading a {
  color: #fecaca;
  font-weight: 800;
}

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

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

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  background: rgba(15, 23, 42, 0.88);
}

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

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.92);
}

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

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

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

.movie-play-dot,
.rank-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
}

.movie-play-dot {
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.92);
  box-shadow: 0 12px 26px rgba(239, 68, 68, 0.28);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f97316, #dc2626);
  font-size: 13px;
}

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

.movie-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.movie-card h2 {
  margin: 0;
  color: white;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.movie-card p {
  display: -webkit-box;
  min-height: 46px;
  margin: 10px 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.split-layout,
.ranking-layout,
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.ranking-side,
.detail-aside {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.ranking-side {
  padding: 22px;
}

.ranking-sticky {
  position: sticky;
  top: 96px;
}

.compact-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.compact-card {
  display: grid;
  grid-template-columns: auto 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.10);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.36);
  transition: border-color 0.22s ease, transform 0.22s ease;
}

.compact-card:hover {
  transform: translateX(4px);
  border-color: var(--line-strong);
}

.compact-card img {
  width: 82px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
}

.compact-card strong,
.compact-card small {
  display: block;
}

.compact-card strong {
  overflow: hidden;
  color: white;
  font-size: 14px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-card small {
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-rank {
  min-width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: white;
  background: rgba(239, 68, 68, 0.72);
  font-size: 12px;
  font-weight: 900;
}

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

.category-tile,
.category-overview-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.68);
}

.category-tile {
  padding: 22px;
}

.category-tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.category-tile-head span {
  font-size: 24px;
  font-weight: 950;
}

.category-tile-head small {
  color: #fecaca;
  font-weight: 800;
}

.category-tile p {
  margin: 12px 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

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

.page-main {
  padding-top: 46px;
  padding-bottom: 86px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 7vw, 70px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(239, 68, 68, 0.22), transparent 34rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.68));
  box-shadow: var(--shadow);
}

.compact-page-hero h1,
.category-page-hero h1,
.ranking-page-hero h1,
.search-page-hero h1 {
  max-width: 820px;
}

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

.category-overview-card {
  min-height: 260px;
}

.category-overview-card img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

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

.category-overview-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.18));
}

.category-overview-copy {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
}

.category-overview-copy strong {
  display: block;
  font-size: 30px;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.category-overview-copy small {
  display: block;
  max-width: 620px;
  margin-top: 10px;
  color: var(--soft);
  font-size: 15px;
  line-height: 1.7;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #fecaca;
}

.inline-filter {
  width: min(720px, 100%);
  margin-top: 30px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.62fr);
  gap: 28px;
  align-items: stretch;
}

.player-shell {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: var(--radius-xl);
  background: #000000;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: block;
  object-fit: cover;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: white;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.80), rgba(2, 6, 23, 0.22));
  cursor: pointer;
}

.player-overlay[hidden],
.player-shell.is-playing .player-overlay {
  display: none;
}

.player-button-icon {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  box-shadow: 0 18px 44px rgba(239, 68, 68, 0.38);
  font-size: 28px;
}

.player-overlay strong {
  font-size: 18px;
  letter-spacing: 0.12em;
}

.detail-copy {
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.detail-copy h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.detail-one-line {
  margin: 18px 0 0;
  color: var(--soft);
  font-size: 17px;
  line-height: 1.8;
}

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

.detail-meta span {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(2, 6, 23, 0.30);
  font-size: 13px;
}

.detail-layout {
  margin-top: 28px;
}

.detail-article,
.detail-aside {
  padding: clamp(24px, 3vw, 34px);
}

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

.detail-article h2 {
  margin-top: 26px;
  font-size: 28px;
}

.detail-article h2:first-child {
  margin-top: 0;
}

.detail-article p {
  margin: 14px 0 0;
  color: var(--soft);
  font-size: 16px;
  line-height: 1.95;
}

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

.search-main-form {
  max-width: 820px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 240px 240px;
  gap: 28px;
  padding: 46px 0;
}

.footer-logo {
  font-size: 24px;
}

.site-footer p {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: white;
  font-size: 16px;
  font-weight: 900;
}

.site-footer a:not(.footer-logo) {
  display: block;
  margin-top: 9px;
  color: var(--muted);
}

.site-footer a:hover {
  color: #fecaca;
}

@media (max-width: 1120px) {
  .top-search,
  .site-nav {
    display: none;
  }

  .mobile-menu-button {
    display: block;
  }

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

  .ranking-sticky {
    position: static;
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: 820px;
  }

  .hero-content {
    padding-top: 82px;
  }

  .hero-poster {
    min-height: 340px;
  }

  .hero-poster img {
    min-height: 340px;
  }

  .search-panel,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .site-header-inner {
    height: 64px;
  }

  .site-logo-text {
    font-size: 17px;
  }

  .hero {
    min-height: 760px;
  }

  .hero-content {
    width: min(100% - 24px, 1280px);
    gap: 22px;
    padding-bottom: 70px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 40px;
  }

  .hero p,
  .page-hero p {
    font-size: 15px;
  }

  .hero-actions,
  .section-heading,
  .wide-search,
  .inline-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-poster,
  .hero-poster img {
    min-height: 270px;
  }

  .movie-grid,
  .featured-grid,
  .ranking-grid,
  .category-mini-list {
    grid-template-columns: 1fr;
  }

  .search-panel,
  .page-hero,
  .detail-copy,
  .detail-article,
  .detail-aside,
  .ranking-side {
    padding: 20px;
    border-radius: 22px;
  }

  .movie-video,
  .player-shell {
    min-height: 260px;
  }

  .compact-card {
    grid-template-columns: auto 76px minmax(0, 1fr);
  }
}
