:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --indigo: #4f46e5;
  --green: #16a34a;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f3f4f6;
  --page: #f9fafb;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  backdrop-filter: blur(16px);
  box-shadow: 0 5px 20px rgba(17, 24, 39, 0.04);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
  font-size: 15px;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  color: #374151;
  font-weight: 650;
  transition: color 0.2s ease;
}

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

.mobile-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: #374151;
  font-size: 28px;
  cursor: pointer;
}

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

.mobile-menu a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: #374151;
  font-weight: 650;
}

.mobile-menu a:hover {
  background: #eff6ff;
  color: var(--blue);
}

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

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.03);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.18));
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
  color: #fff;
  padding: 96px 0 112px;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.hero-copy p {
  margin: 0 0 24px;
  max-width: 660px;
  color: rgba(243, 244, 246, 0.92);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: #fff;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.pill.primary {
  background: var(--blue);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 13px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

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

.btn-primary:hover {
  background: var(--blue-dark);
}

.btn-soft {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.btn-light {
  color: var(--blue);
  background: #fff;
  box-shadow: var(--shadow);
}

.main-wrap {
  padding: 64px 0;
}

.section {
  margin-bottom: 68px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-desc {
  margin: 6px 0 0;
  color: var(--muted);
}

.more-link {
  color: var(--blue);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.85);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.card-cover {
  position: relative;
  display: block;
  height: 0;
  padding-top: 134%;
  overflow: hidden;
  background: #0f172a;
}

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

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

.heat-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.heat-badge {
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  background: rgba(0, 0, 0, 0.72);
}

.rank-badge {
  left: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.24);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 850;
}

.card-body h3 a:hover {
  color: var(--blue);
}

.card-body p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  overflow: hidden;
  color: #4b5563;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.card-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f3f4f6;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  color: #4b5563;
  font-size: 12px;
}

.tag-row span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef2ff;
}

.category-panel {
  padding: 32px;
  border-radius: 26px;
  background: linear-gradient(135deg, #eff6ff, #eef2ff);
}

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

.category-box {
  padding: 24px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.category-box h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.category-box p {
  margin: 0 0 18px;
  color: var(--muted);
}

.small-list {
  display: grid;
  gap: 13px;
}

.small-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.small-row:hover {
  background: #f9fafb;
}

.small-row img {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  background: #0f172a;
}

.small-info {
  min-width: 0;
}

.small-info strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.small-info em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.small-rank {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-weight: 850;
  font-size: 12px;
}

.page-hero {
  padding: 70px 0 42px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.20), transparent 28%),
    linear-gradient(135deg, #0f172a, #1e3a8a);
  color: #fff;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(241, 245, 249, 0.86);
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.8fr) repeat(3, minmax(140px, 1fr)) minmax(180px, auto);
  gap: 14px;
  align-items: end;
  padding: 18px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #111827;
  background: #fff;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.filter-status {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--muted);
  background: #f9fafb;
  font-size: 14px;
  font-weight: 700;
}

.movie-card.is-hidden {
  display: none;
}

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

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

.breadcrumb a {
  color: var(--blue);
  font-weight: 800;
}

.player-panel,
.info-panel,
.side-panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.player-panel {
  overflow: hidden;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  background: #000;
}

.player-wrap video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background-position: center;
  background-size: cover;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.34));
}

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

.play-stack {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 12px;
}

.play-circle {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.36);
  font-size: 28px;
}

.play-label {
  font-size: 18px;
  font-weight: 900;
}

.player-title {
  padding: 18px 20px;
}

.player-title h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.25;
}

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

.info-panel h2 {
  margin: 28px 0 10px;
  font-size: 23px;
}

.info-panel h2:first-child {
  margin-top: 0;
}

.info-panel p {
  color: #374151;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 24px;
}

.meta-line span {
  padding: 6px 11px;
  border-radius: 999px;
  color: #374151;
  background: #f3f4f6;
  font-size: 14px;
  font-weight: 750;
}

.side-panel {
  padding: 20px;
  margin-bottom: 24px;
}

.side-poster {
  overflow: hidden;
  border-radius: 16px;
  background: #0f172a;
}

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

.side-panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

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

.category-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.category-card h2 {
  margin: 0;
  font-size: 25px;
}

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

.category-card .btn {
  justify-self: start;
}

.empty-state {
  display: none;
  padding: 38px;
  border: 1px dashed var(--line);
  border-radius: 20px;
  text-align: center;
  color: var(--muted);
  background: #fff;
}

.empty-state.is-visible {
  display: block;
}

.site-footer {
  margin-top: 40px;
  padding: 48px 0 24px;
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.footer-logo {
  margin-bottom: 12px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #fff;
}

.footer-grid p {
  margin: 0;
  color: #9ca3af;
}

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

.footer-links a {
  color: #9ca3af;
}

.footer-links a:hover {
  color: #60a5fa;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(156, 163, 175, 0.22);
  color: #9ca3af;
  font-size: 14px;
}

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

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

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

  .filter-status {
    grid-column: 1 / -1;
  }
}

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

  .mobile-toggle {
    display: inline-grid;
  }

  .hero,
  .hero-inner {
    min-height: 620px;
  }

  .movie-grid,
  .movie-grid.wide,
  .category-grid,
  .category-overview,
  .related-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .main-wrap {
    padding: 42px 0;
  }

  .hero-copy {
    padding: 82px 0 108px;
  }

  .category-panel,
  .category-box,
  .info-panel,
  .side-panel {
    padding: 18px;
  }

  .movie-grid,
  .movie-grid.wide {
    gap: 16px;
  }
}
