:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-soft: #0d1b2e;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --border: rgba(255, 255, 255, 0.1);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --red: #ef4444;
  --blue: #60a5fa;
  --purple: #a78bfa;
  --yellow: #facc15;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(239, 68, 68, 0.22), transparent 32rem),
    radial-gradient(circle at 82% 16%, rgba(96, 165, 250, 0.18), transparent 34rem),
    linear-gradient(135deg, #020617 0%, #07111f 42%, #111827 100%);
}

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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--red), #7c3aed);
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.28);
}

.brand-text {
  font-size: 20px;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #ffffff, #93c5fd 54%, #fca5a5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: var(--muted-strong);
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: white;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 280px;
}

.header-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  outline: none;
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.header-search input {
  padding: 10px 14px;
}

.header-search button,
.search-panel button,
.filter-panel button {
  border: 0;
  border-radius: 999px;
  color: white;
  cursor: pointer;
  background: linear-gradient(135deg, var(--red), #7c3aed);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.header-search button {
  padding: 10px 16px;
}

.header-search button:hover,
.search-panel button:hover,
.filter-panel button:hover,
.primary-btn:hover,
.primary-wide:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--border);
  padding: 10px 16px 18px;
  background: rgba(2, 6, 23, 0.96);
}

.mobile-panel a {
  display: block;
  padding: 12px 8px;
  color: var(--muted-strong);
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  transition: opacity 900ms ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.44), rgba(2, 6, 23, 0.18)),
    linear-gradient(0deg, #07111f 0%, transparent 42%);
}

.hero-copy {
  position: absolute;
  left: 50%;
  bottom: 76px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  transform: translateX(-50%);
}

.hero-kicker {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 8px 14px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hero-copy strong {
  max-width: 760px;
  font-size: clamp(42px, 7vw, 80px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  text-shadow: 0 6px 22px rgba(0, 0, 0, 0.54);
}

.hero-copy em {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 2vw, 21px);
  font-style: normal;
  line-height: 1.75;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

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

.primary-btn,
.ghost-btn,
.primary-wide {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-height: 46px;
  padding: 0 22px;
  font-weight: 700;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.primary-btn,
.primary-wide {
  background: linear-gradient(135deg, var(--red), #7c3aed);
  color: white;
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: white;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: white;
}

.quick-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  margin-top: -38px;
  position: relative;
  z-index: 5;
}

.search-panel,
.quick-links,
.glass-panel,
.ranking-box,
.category-card,
.filter-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.search-panel {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.search-panel label {
  color: white;
  font-size: 18px;
  font-weight: 800;
}

.search-panel div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.search-panel input {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 14px 18px;
  outline: none;
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.search-panel button {
  padding: 0 24px;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  min-width: 300px;
  padding: 18px;
}

.quick-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 14px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}

.quick-links a:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.page-section {
  padding: 64px 0;
}

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

.section-kicker,
.page-hero span {
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-heading h2,
.ranking-head h2,
.page-hero h1 {
  margin: 8px 0 0;
  color: white;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
}

.section-heading p,
.page-hero p,
.category-card p,
.site-footer p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-more,
.strip-title a,
.ranking-head a {
  color: #bfdbfe;
  font-weight: 700;
}

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

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

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

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

.card-poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  background: #0f172a;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.card-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 56%);
  opacity: 0.72;
  transition: opacity 0.3s ease;
}

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

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

.card-duration {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 9px;
  color: white;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(8px);
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  color: white;
  opacity: 0;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 12px 2px 0;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  color: white;
  font-weight: 800;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

.movie-card:hover .card-title {
  color: #93c5fd;
}

.card-line {
  display: -webkit-box;
  overflow: hidden;
  min-height: 42px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  color: #94a3b8;
  font-size: 12px;
}

.card-meta span:first-child,
.ranking-score {
  color: var(--yellow);
}

.movie-card-featured .card-poster {
  aspect-ratio: 16 / 9;
}

.movie-card-featured .card-title {
  font-size: 19px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  align-items: start;
}

.ranking-box {
  position: sticky;
  top: 92px;
  padding: 24px;
}

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

.ranking-row,
.ranking-page-row {
  display: grid;
  grid-template-columns: 32px 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-radius: 16px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-row:hover,
.ranking-page-row:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.ranking-row img,
.ranking-page-row img {
  width: 62px;
  height: 46px;
  border-radius: 10px;
  object-fit: cover;
}

.ranking-num {
  color: #fca5a5;
  font-size: 18px;
  font-weight: 900;
}

.ranking-title,
.ranking-page-info strong {
  overflow: hidden;
  color: white;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-strip {
  margin-bottom: 42px;
}

.page-main {
  padding-top: 34px;
  padding-bottom: 70px;
}

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

.breadcrumb a {
  color: #bfdbfe;
}

.breadcrumb span::before,
.breadcrumb a + a::before,
.breadcrumb a + span::before {
  content: "/";
  margin-right: 10px;
  color: rgba(255, 255, 255, 0.3);
}

.page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  margin-bottom: 28px;
  padding: 44px;
  background:
    radial-gradient(circle at 10% 0%, rgba(239, 68, 68, 0.2), transparent 28rem),
    radial-gradient(circle at 90% 20%, rgba(96, 165, 250, 0.18), transparent 28rem),
    var(--panel-strong);
  box-shadow: var(--shadow);
}

.small-hero h1 {
  max-width: 860px;
}

.small-hero p {
  max-width: 760px;
}

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

.category-card {
  padding: 24px;
}

.category-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: white;
  font-size: 24px;
  font-weight: 900;
}

.category-card-head strong {
  border-radius: 999px;
  padding: 8px 12px;
  color: #dbeafe;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.1);
}

.rank-mini {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.rank-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-radius: 14px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.rank-card img {
  grid-row: span 2;
  width: 74px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-card span,
.rank-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-card span {
  color: white;
  font-weight: 800;
}

.rank-card small {
  color: var(--muted);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(140px, 180px)) auto;
  gap: 12px;
  margin: 28px 0;
  padding: 18px;
}

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

.filter-panel button {
  padding: 0 20px;
}

.filter-empty {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.06);
}

.page-grid {
  margin-top: 28px;
}

.ranking-page-list {
  margin-top: 30px;
}

.ranking-page-row {
  grid-template-columns: 44px 98px minmax(0, 1fr) auto;
  padding: 14px;
}

.ranking-page-row img {
  width: 98px;
  height: 64px;
}

.ranking-num.large {
  font-size: 24px;
}

.ranking-page-info {
  min-width: 0;
}

.ranking-page-info small {
  display: block;
  overflow: hidden;
  margin-top: 6px;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: black;
  box-shadow: var(--shadow);
}

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

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

.player-mask.is-hidden {
  display: none;
}

.player-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), #7c3aed);
  box-shadow: 0 18px 42px rgba(239, 68, 68, 0.36);
}

.player-mask strong {
  max-width: 80%;
  font-size: 22px;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.48);
}

.detail-info {
  margin-top: 24px;
  padding: 28px;
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
}

.detail-info h2 {
  margin: 28px 0 12px;
  font-size: 22px;
}

.detail-info p {
  color: var(--muted-strong);
  line-height: 1.9;
}

.lead-text {
  margin-top: 22px;
  color: white !important;
  font-size: 18px;
}

.detail-meta,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.detail-meta span,
.tag-list span {
  border-radius: 999px;
  padding: 7px 12px;
  color: #dbeafe;
  background: rgba(96, 165, 250, 0.14);
}

.detail-meta span:first-child {
  color: #fef3c7;
  background: rgba(250, 204, 21, 0.14);
}

.tag-list span:nth-child(2n) {
  color: #ede9fe;
  background: rgba(167, 139, 250, 0.14);
}

.next-prev {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 32px;
}

.next-prev a {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  color: #dbeafe;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.06);
}

.detail-side {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 20px;
}

.side-cover,
.side-list {
  padding: 18px;
}

.side-cover img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  object-fit: cover;
}

.primary-wide {
  width: 100%;
  margin-top: 16px;
}

.side-list h2 {
  margin: 0 0 16px;
}

.related-section {
  padding-bottom: 0;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 22px;
  background: rgba(2, 6, 23, 0.66);
}

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

.footer-brand {
  margin-bottom: 14px;
}

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

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

.site-footer a:hover {
  color: white;
}

.footer-copy {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 0;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  color: #64748b;
  text-align: center;
}

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

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

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

  .ranking-box,
  .detail-side {
    position: static;
  }

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

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

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

  .hero-carousel {
    height: 64vh;
    min-height: 500px;
  }

  .hero-copy {
    bottom: 76px;
  }

  .hero-copy strong {
    font-size: clamp(34px, 11vw, 54px);
  }

  .hero-arrow {
    display: none;
  }

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

  .quick-links {
    min-width: 0;
  }

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

  .rank-mini {
    grid-template-columns: 1fr;
  }
}

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

  .page-section {
    padding: 42px 0;
  }

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

  .card-line {
    display: none;
  }

  .card-title {
    min-height: 40px;
    font-size: 14px;
  }

  .card-meta {
    gap: 7px;
  }

  .search-panel div,
  .filter-panel,
  .next-prev {
    grid-template-columns: 1fr;
  }

  .quick-links {
    grid-template-columns: 1fr;
  }

  .page-hero {
    border-radius: 22px;
    padding: 30px 22px;
  }

  .detail-info {
    padding: 22px;
  }

  .ranking-page-row {
    grid-template-columns: 36px 76px minmax(0, 1fr);
  }

  .ranking-page-row .ranking-score {
    grid-column: 3;
  }

  .ranking-page-row img {
    width: 76px;
    height: 54px;
  }
}
