:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: #1e293b;
  --panel-strong: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --blue: #3b82f6;
  --orange: #fb923c;
  --green: #4ade80;
  --ring: rgba(34, 211, 238, 0.55);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  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;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(8, 145, 178, 0.24), transparent 34rem),
    linear-gradient(180deg, #0f172a 0%, #020617 62%, #020617 100%);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.96), rgba(51, 65, 85, 0.96), rgba(30, 41, 59, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.32);
}

.brand-text,
.footer-brand {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-search,
.mobile-search,
.large-search {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-search {
  flex: 1 1 420px;
  max-width: 430px;
}

.nav-search input,
.mobile-search input,
.large-search input,
.filter-panel input,
.search-panel-main input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.18);
  outline: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: var(--text);
  padding: 12px 18px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search input:focus,
.mobile-search input:focus,
.large-search input:focus,
.filter-panel input:focus,
.search-panel-main input:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
  background: rgba(15, 23, 42, 0.96);
}

.nav-search button,
.mobile-search button,
.large-search button,
.primary-btn,
.ghost-btn,
.text-link {
  border: 0;
  border-radius: 999px;
  padding: 11px 20px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.nav-search button,
.mobile-search button,
.large-search button,
.primary-btn {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #001018;
}

.nav-search button:hover,
.mobile-search button:hover,
.large-search button:hover,
.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover {
  transform: translateY(-1px);
}

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

.nav-link,
.mobile-link {
  color: #cbd5e1;
  font-weight: 650;
  transition: color 0.18s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover {
  color: #ffffff;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-menu.open {
  display: grid;
  gap: 14px;
}

main {
  min-height: 70vh;
}

.hero-carousel {
  position: relative;
  height: min(72vh, 660px);
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.1) brightness(0.74);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.7) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 42%);
}

.hero-content {
  position: relative;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 28px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  padding: 7px 14px;
  background: rgba(34, 211, 238, 0.92);
  color: #001018;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 0 38px rgba(34, 211, 238, 0.28);
}

.hero-content h1 {
  max-width: 820px;
  margin: 20px 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 700px;
  margin: 0 0 24px;
  color: #d1d5db;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #bae6fd;
  padding: 6px 10px;
  font-size: 13px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.ghost-btn,
.text-link {
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.66);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.04);
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--cyan);
}

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

.quick-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 28px;
  align-items: center;
  margin-top: -58px;
  position: relative;
  z-index: 5;
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search-panel h2,
.page-title-block h1,
.section-heading h2 {
  margin: 0;
}

.quick-search-panel p,
.page-title-block p,
.section-heading p {
  color: var(--muted);
  line-height: 1.8;
}

.content-section {
  padding: 56px 0 0;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.section-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan);
  font-weight: 900;
}

.scroll-row {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scroll-snap-type: x proximity;
}

.scroll-row .movie-card {
  flex: 0 0 310px;
  scroll-snap-align: start;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.88);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: var(--ring);
  box-shadow: 0 20px 58px rgba(8, 145, 178, 0.18);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

.card-cover img,
.list-thumb img,
.detail-poster img,
.podium-card img,
.category-thumb-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease;
}

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 55%);
  opacity: 0.85;
}

.play-mark {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 46px;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
  transform: scale(1.04);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #fb923c);
}

.card-body {
  padding: 16px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.card-meta span,
.detail-meta span {
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.62);
  padding: 4px 8px;
}

.card-body h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h3 a:hover,
.list-info h3 a:hover,
.podium-card h2 a:hover,
.category-card-large h2 a:hover {
  color: var(--cyan);
}

.card-body p,
.list-info p,
.podium-card p,
.story-block p,
.info-panel dd {
  color: #cbd5e1;
  line-height: 1.75;
}

.card-body p {
  min-height: 3.5em;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-tile {
  min-height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(59, 130, 246, 0.08)),
    rgba(30, 41, 59, 0.86);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: var(--ring);
}

.category-tile span {
  font-size: 21px;
  font-weight: 800;
}

.category-tile small {
  color: var(--muted);
  line-height: 1.7;
}

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

.ranking-main,
.list-stack,
.ranking-list {
  display: grid;
  gap: 14px;
}

.list-card {
  display: grid;
  grid-template-columns: auto 160px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.list-rank {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(34, 211, 238, 0.16);
  color: var(--cyan);
  font-weight: 900;
}

.list-thumb {
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #0f172a;
}

.list-info h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.list-info p {
  margin: 0 0 10px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ranking-side,
.info-panel,
.story-block,
.filter-panel,
.category-card-large,
.podium-card {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.82);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.18);
}

.ranking-side {
  position: sticky;
  top: 94px;
  align-self: start;
  padding: 22px;
}

.ranking-side a,
.footer-links a {
  display: block;
  margin-top: 12px;
  color: #bae6fd;
}

.page-wrap {
  padding-top: 34px;
  padding-bottom: 72px;
}

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

.breadcrumb a {
  color: #bae6fd;
}

.breadcrumb span::before,
.breadcrumb a + a::before {
  content: "/";
  color: #475569;
  margin-right: 10px;
}

.page-title-block {
  margin-bottom: 28px;
  padding: 32px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 26rem),
    rgba(15, 23, 42, 0.72);
}

.page-title-block h1 {
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.04em;
}

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

.category-card-large {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
}

.category-thumb-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 4px;
  border-radius: 16px;
  overflow: hidden;
  background: #0f172a;
}

.category-card-large h2 {
  margin: 4px 0 10px;
}

.filter-panel {
  display: grid;
  gap: 18px;
  padding: 20px;
  margin-bottom: 26px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 8px 14px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.68);
  cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
  color: #001018;
  background: var(--cyan);
  border-color: var(--cyan);
}

.empty-state {
  display: none;
  margin: 32px 0;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.65);
}

.empty-state.show {
  display: block;
}

.podium-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 28px;
}

.podium-card {
  overflow: hidden;
  padding-bottom: 20px;
}

.podium-card img {
  aspect-ratio: 16 / 9;
}

.podium-card span {
  display: inline-flex;
  margin: 18px 18px 0;
  color: var(--orange);
  font-weight: 900;
}

.podium-card h2,
.podium-card p {
  margin-left: 18px;
  margin-right: 18px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
  margin-bottom: 34px;
  padding: 30px;
  border-radius: 30px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 28rem),
    rgba(15, 23, 42, 0.76);
}

.detail-poster {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 24px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.detail-intro h1 {
  margin: 18px 0;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-intro p {
  color: #d1d5db;
  font-size: 18px;
  line-height: 1.8;
}

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

.player-section {
  margin-bottom: 34px;
}

.player-section h2 {
  margin: 0 0 16px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow);
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000000;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.66));
  cursor: pointer;
}

.play-overlay span {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #001018;
  font-size: 42px;
  box-shadow: 0 0 58px rgba(34, 211, 238, 0.42);
}

.play-overlay strong {
  font-size: 18px;
}

.play-overlay.hidden {
  display: none;
}

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

.story-block {
  padding: 24px;
}

.story-block + .story-block {
  margin-top: 22px;
}

.story-block h2,
.info-panel h2 {
  margin-top: 0;
}

.info-panel {
  align-self: start;
  padding: 24px;
}

.info-panel dl {
  display: grid;
  gap: 14px;
}

.info-panel dt {
  color: var(--muted);
  font-size: 13px;
}

.info-panel dd {
  margin: 2px 0 0;
}

.related-section {
  width: 100%;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.78);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  gap: 12px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

@media (max-width: 1100px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .ranking-side {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero-carousel {
    min-height: 590px;
  }

  .quick-search-panel,
  .category-card-large {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 640px) {
  .top-nav {
    width: min(100% - 22px, 1280px);
    height: 64px;
  }

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

  .hero-carousel {
    min-height: 560px;
  }

  .hero-content h1 {
    font-size: 42px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-actions,
  .large-search,
  .mobile-search {
    align-items: stretch;
    flex-direction: column;
  }

  .quick-search-panel,
  .page-title-block,
  .detail-hero {
    padding: 22px;
    border-radius: 22px;
  }

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

  .list-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .list-rank {
    grid-row: span 2;
  }

  .list-thumb {
    grid-column: 1 / -1;
  }

  .scroll-row .movie-card {
    flex-basis: 82vw;
  }
}
