:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: #111827;
  --panel-deep: #0b1120;
  --panel-border: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-deep: #64748b;
  --blue: #2563eb;
  --blue-soft: #3b82f6;
  --cyan: #67e8f9;
  --green: #22c55e;
  --purple: #a855f7;
  --yellow: #facc15;
  --red: #ef4444;
  --radius: 18px;
  --shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(51, 65, 85, 0.72);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(103, 232, 249, 0.75));
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.brand-name {
  display: block;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-subtitle {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 650;
}

.desktop-nav a,
.mobile-menu a,
.footer-link {
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.desktop-nav a:hover,
.mobile-menu a:hover,
.footer-link:hover {
  color: #60a5fa;
}

.header-search {
  position: relative;
  width: min(270px, 28vw);
}

.header-search input,
.search-panel input,
.search-panel select,
.category-filter input {
  width: 100%;
  border: 1px solid #334155;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.92);
  color: var(--text);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.header-search input {
  height: 40px;
  padding: 0 14px 0 40px;
  font-size: 14px;
}

.header-search input:focus,
.search-panel input:focus,
.search-panel select:focus,
.category-filter input:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--blue-soft);
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 13px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.menu-button {
  display: none;
  border: 0;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.78);
  color: var(--text);
  padding: 8px 10px;
}

.mobile-menu {
  display: none;
  padding: 14px 0 18px;
  border-top: 1px solid #334155;
  background: rgba(15, 23, 42, 0.98);
}

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

.mobile-menu .mobile-nav-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mobile-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #dbeafe;
}

main {
  min-height: 60vh;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 540px;
  overflow: hidden;
  background: var(--bg);
}

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

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #111827, #0f172a);
}

.hero-overlay-vertical,
.hero-overlay-horizontal {
  position: absolute;
  inset: 0;
}

.hero-overlay-vertical {
  background: linear-gradient(to top, #020617 3%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.08));
}

.hero-overlay-horizontal {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.05));
}

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

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.94);
  color: white;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-title {
  margin: 0 0 16px;
  max-width: 760px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.hero-desc {
  max-width: 620px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.meta-pill,
.tag,
.small-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: #e2e8f0;
  border: 1px solid rgba(51, 65, 85, 0.72);
}

.meta-pill {
  padding: 7px 12px;
  font-size: 14px;
}

.tag {
  padding: 5px 9px;
  color: #93c5fd;
  font-size: 12px;
}

.small-pill {
  padding: 5px 8px;
  color: #cbd5e1;
  font-size: 12px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 12px 22px;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.primary-button {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 16px 35px rgba(37, 99, 235, 0.28);
}

.secondary-button {
  background: rgba(30, 41, 59, 0.8);
  color: #e2e8f0;
  border: 1px solid rgba(51, 65, 85, 0.8);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.primary-button:hover {
  background: #1d4ed8;
}

.secondary-button:hover {
  background: #1e293b;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: white;
  transition: background 180ms ease, transform 180ms ease;
}

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

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

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

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  transition: width 180ms ease, background 180ms ease;
}

.hero-dot.is-active {
  width: 32px;
  background: var(--blue-soft);
}

.section {
  padding: 66px 0;
}

.section-deep {
  background: linear-gradient(180deg, #020617, #0f172a);
}

.section-mid {
  background: #0f172a;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.14);
  color: #60a5fa;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(25px, 4vw, 34px);
  line-height: 1.1;
}

.section-heading p,
.muted {
  color: var(--muted);
}

.view-more {
  color: #93c5fd;
  font-weight: 750;
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.86);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  transform: translateY(0);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.movie-card:hover {
  border-color: rgba(59, 130, 246, 0.85);
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}

.card-media {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.card-media.large {
  height: 310px;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease, opacity 200ms ease;
}

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

.card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.08), transparent);
}

.card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.card-genre {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  width: fit-content;
  max-width: calc(100% - 20px);
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.card-title {
  margin: 0 0 8px;
  color: #fff;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 180ms ease;
}

.movie-card:hover .card-title {
  color: #60a5fa;
}

.card-desc {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 14px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  color: var(--muted-deep);
  font-size: 12px;
}

.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #1e293b;
  color: #dbeafe;
  border: 1px solid #334155;
  font-weight: 720;
  transition: background 180ms ease, transform 180ms ease;
}

.category-chip:hover,
.category-chip.active {
  background: #2563eb;
  color: #fff;
  transform: translateY(-1px);
}

.stats-band {
  text-align: center;
}

.stats-title {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.08;
}

.stats-desc {
  margin: 0 auto 28px;
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

.stat-card {
  padding: 26px;
  border-radius: 16px;
  background: #1e293b;
}

.stat-number {
  margin-bottom: 4px;
  color: #60a5fa;
  font-size: 32px;
  font-weight: 900;
}

.footer {
  border-top: 1px solid #1e293b;
  background: linear-gradient(90deg, #0f172a, #111827, #0f172a);
  color: #cbd5e1;
}

.footer-inner {
  padding: 46px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
}

.footer h3,
.footer h4 {
  margin: 0 0 14px;
  color: #fff;
}

.footer p {
  margin: 0;
  color: var(--muted);
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 28px;
  margin-top: 30px;
  border-top: 1px solid #334155;
  color: var(--muted);
  font-size: 14px;
}

.page-hero {
  padding: 64px 0 42px;
  background:
    radial-gradient(circle at 18% 10%, rgba(37, 99, 235, 0.28), transparent 32%),
    radial-gradient(circle at 80% 0%, rgba(103, 232, 249, 0.16), transparent 28%),
    linear-gradient(180deg, #020617, #0f172a);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

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

.panel {
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.22);
}

.category-overview {
  padding: 46px 0 72px;
  background: #020617;
}

.category-filter {
  margin-bottom: 26px;
}

.category-filter input {
  height: 48px;
  padding: 0 16px;
}

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

.category-section h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

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

.category-card {
  padding: 20px;
  border-radius: 18px;
  border: 1px solid #1e293b;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
  transition: transform 180ms ease, border-color 180ms ease;
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: #3b82f6;
}

.category-card strong {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-size: 18px;
}

.category-card span {
  color: var(--muted);
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 160px 160px 140px;
  gap: 12px;
  margin-bottom: 28px;
  padding: 18px;
}

.search-panel input,
.search-panel select {
  min-height: 46px;
  padding: 0 14px;
}

.search-summary {
  margin-bottom: 20px;
  color: var(--muted);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 34px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  min-width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #dbeafe;
  font-weight: 750;
}

.pagination .current {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 58px 110px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid #1e293b;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.86);
  transition: border-color 180ms ease, transform 180ms ease;
}

.ranking-item:hover {
  border-color: #3b82f6;
  transform: translateY(-2px);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #1e293b;
  color: #facc15;
  font-size: 20px;
  font-weight: 900;
}

.ranking-poster {
  width: 110px;
  height: 70px;
  overflow: hidden;
  border-radius: 12px;
  background: #1e293b;
}

.ranking-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-title {
  margin: 0 0 4px;
  color: #fff;
  font-size: 18px;
}

.ranking-meta {
  color: var(--muted);
  font-size: 13px;
}

.heat-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(234, 179, 8, 0.14);
  color: #fde68a;
  font-weight: 900;
}

.detail-wrap {
  padding: 42px 0 72px;
  background: #020617;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.85fr);
  gap: 32px;
  align-items: start;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: #93c5fd;
  font-weight: 750;
}

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

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.54));
  color: white;
  transition: opacity 180ms ease, visibility 180ms ease;
}

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

.play-button-big {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.94);
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.35);
  font-size: 34px;
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  display: none;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.86);
  color: #cbd5e1;
  font-size: 13px;
}

.player-message.is-visible {
  display: block;
}

.detail-title {
  margin: 24px 0 12px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.08;
}

.detail-lead {
  margin: 0 0 20px;
  color: #cbd5e1;
  font-size: 18px;
}

.info-section {
  margin-top: 26px;
  padding: 24px;
}

.info-section h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.info-section p {
  margin: 0;
  color: #cbd5e1;
}

.poster-card {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid #1e293b;
  background: #0f172a;
}

.poster-card img {
  width: 100%;
  max-height: 470px;
  object-fit: cover;
}

.aside-panel {
  margin-top: 18px;
  padding: 20px;
}

.aside-panel h3 {
  margin: 0 0 14px;
}

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

.info-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.58);
  padding-bottom: 10px;
  color: var(--muted);
}

.info-line strong {
  color: #fff;
  text-align: right;
}

.related-section {
  margin-top: 38px;
}

.no-results {
  padding: 54px 24px;
  text-align: center;
  color: var(--muted);
}

.simple-content {
  padding: 50px 0 72px;
}

.simple-content .panel {
  padding: 28px;
}

.simple-content h2 {
  margin: 0 0 12px;
}

.simple-content p {
  color: #cbd5e1;
}

@media (max-width: 1060px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-button {
    display: inline-flex;
  }

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

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

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

  .hero-arrow {
    display: none;
  }

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

  .section-title-row,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .ranking-item {
    grid-template-columns: 44px 88px minmax(0, 1fr);
  }

  .ranking-item .heat-score {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .ranking-poster {
    width: 88px;
    height: 62px;
  }
}

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

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

  .hero {
    height: 76vh;
    min-height: 620px;
  }

  .hero-copy {
    padding-top: 20px;
  }

  .meta-row {
    gap: 8px;
  }

  .grid-4,
  .grid-3,
  .grid-2,
  .category-cards {
    grid-template-columns: 1fr;
  }

  .card-media,
  .card-media.large {
    height: 240px;
  }

  .section {
    padding: 48px 0;
  }

  .page-hero {
    padding-top: 44px;
  }
}
