:root {
  --bg: #0b0f19;
  --bg-soft: #111827;
  --panel: rgba(17, 24, 39, 0.82);
  --panel-strong: #151f32;
  --line: rgba(255, 255, 255, 0.10);
  --text: #f9fafb;
  --muted: #9ca3af;
  --red: #dc2626;
  --red-dark: #b91c1c;
  --blue: #2563eb;
  --purple: #9333ea;
  --cyan: #06b6d4;
  --gold: #f59e0b;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(147, 51, 234, 0.20), transparent 34rem),
    radial-gradient(circle at 80% 8%, rgba(220, 38, 38, 0.18), transparent 30rem),
    linear-gradient(180deg, #060912 0%, var(--bg) 42%, #090d16 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 9, 18, 0.78);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--red), var(--purple));
  box-shadow: 0 12px 32px rgba(220, 38, 38, 0.35);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a,
.mobile-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #d1d5db;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  gap: 8px;
  flex-wrap: wrap;
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
}

.hero-slider {
  position: relative;
  min-height: 680px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 390px);
  align-items: center;
  gap: 48px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0 80px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0 50% 0 auto;
  width: 66vw;
  min-width: 620px;
  border-radius: 0 0 42px 0;
  opacity: 0.34;
  overflow: hidden;
  filter: saturate(1.2);
}

.hero-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(6, 9, 18, 0.84), rgba(6, 9, 18, 0.58), rgba(6, 9, 18, 0.96)),
    linear-gradient(0deg, var(--bg), transparent 45%);
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #fca5a5;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero h2 {
  margin: 18px 0 0;
  font-size: clamp(24px, 3.5vw, 44px);
  line-height: 1.15;
}

.hero p,
.page-hero p,
.detail-copy .one-line {
  max-width: 760px;
  margin: 18px 0 0;
  color: #d1d5db;
  font-size: 18px;
}

.hero-tags,
.detail-tags,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.hero-tags span,
.detail-tags span,
.chip-row span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

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

.primary-btn,
.ghost-btn,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 16px 40px rgba(220, 38, 38, 0.32);
}

.ghost-btn,
.section-link {
  border: 1px solid var(--line);
  color: #f3f4f6;
  background: rgba(255, 255, 255, 0.07);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover,
.movie-card:hover,
.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-3px);
}

.hero-poster {
  position: relative;
  z-index: 2;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, #1f2937, #111827);
  box-shadow: var(--shadow);
}

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

.hero-poster span {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 800;
}

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

.hero-dots button {
  width: 36px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.22);
}

.hero-dots button.is-active {
  background: var(--red);
}

.quick-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-top: -52px;
  position: relative;
  z-index: 10;
}

.search-strip,
.hot-entry,
.side-panel,
.player-card,
.story-card,
.info-box,
.category-overview-card,
.year-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-strip {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
}

.search-strip label {
  font-weight: 900;
}

.search-strip input,
.search-box-large input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.search-strip input {
  height: 44px;
  padding: 0 14px;
}

.search-strip button,
.search-box-large button {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: var(--red);
  font-weight: 800;
}

.hot-entry {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
}

.hot-entry a {
  color: #ffffff;
  font-weight: 900;
}

.hot-entry span {
  color: var(--muted);
  font-size: 13px;
}

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

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.12;
}

.section-head p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

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

.category-tile {
  min-height: 138px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(220, 38, 38, 0.18), rgba(147, 51, 234, 0.13)),
    var(--panel);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile span {
  display: block;
  font-size: 20px;
  font-weight: 900;
}

.category-tile small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.78);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(220, 38, 38, 0.48);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.poster-link {
  position: relative;
  display: block;
}

.poster-shell {
  display: block;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(220, 38, 38, 0.20)),
    #111827;
}

.poster-shell img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.image-missing {
  visibility: hidden;
}

.play-mark {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.92);
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.35);
}

.movie-info {
  padding: 14px;
}

.movie-meta {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  color: #fca5a5;
  font-size: 12px;
  font-weight: 800;
}

.movie-info h3 {
  min-height: 3.1em;
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 1.35;
}

.movie-info p {
  display: -webkit-box;
  min-height: 4.8em;
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.chip-row {
  margin-top: 12px;
}

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

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

.ranking-item a {
  display: grid;
  grid-template-columns: 42px 64px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.rank-num {
  color: #fca5a5;
  font-size: 20px;
  font-weight: 900;
}

.rank-cover {
  overflow: hidden;
  border-radius: 12px;
  background: #111827;
}

.rank-cover img {
  width: 64px;
  height: 86px;
  object-fit: cover;
}

.rank-text strong,
.rank-text em {
  display: block;
}

.rank-text em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.side-panel {
  position: sticky;
  top: 96px;
  padding: 28px;
}

.side-panel h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.12;
}

.side-panel p {
  color: var(--muted);
}

.page-hero {
  position: relative;
  padding: 100px 0 72px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(220, 38, 38, 0.18), rgba(37, 99, 235, 0.12)),
    radial-gradient(circle at 75% 0%, rgba(147, 51, 234, 0.35), transparent 32rem);
}

.year-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.year-nav a {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.07);
}

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

.category-overview-card {
  padding: 24px;
}

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

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

.category-overview-card strong {
  display: inline-flex;
  margin-bottom: 12px;
  color: #fca5a5;
}

.category-overview-card ul,
.year-block ul {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.category-overview-card li a,
.year-block li a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #e5e7eb;
}

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

.year-block {
  padding: 20px;
}

.year-block h2 {
  margin: 0 0 14px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.hot-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.hot-table th,
.hot-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.hot-table th {
  color: #fca5a5;
  background: rgba(255, 255, 255, 0.05);
}

.search-box-large {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  max-width: 760px;
  margin-top: 28px;
}

.search-box-large input {
  height: 54px;
  padding: 0 18px;
}

.search-box-large button {
  padding: 0 20px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 64px;
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.26;
  filter: blur(4px) saturate(1.2);
}

.detail-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, var(--bg), rgba(11, 15, 25, 0.78), var(--bg));
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 38px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #111827;
  box-shadow: var(--shadow);
}

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

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

.breadcrumb a {
  color: #fca5a5;
}

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

.detail-main {
  display: grid;
  gap: 22px;
}

.player-card {
  overflow: hidden;
}

.video-frame {
  position: relative;
  background: #000000;
}

.video-frame video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.big-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 8px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.62));
}

.big-play span {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.92);
  box-shadow: 0 20px 45px rgba(220, 38, 38, 0.38);
  font-size: 28px;
}

.big-play.is-hidden {
  display: none;
}

.player-info,
.story-card,
.info-box {
  padding: 24px;
}

.player-info h2,
.story-card h2,
.info-box h2 {
  margin: 0 0 12px;
}

.player-info p,
.story-card p {
  margin: 0;
  color: #d1d5db;
}

.detail-sidebar {
  position: sticky;
  top: 96px;
}

.info-box dl {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px 14px;
  margin: 0;
}

.info-box dt {
  color: var(--muted);
}

.info-box dd {
  margin: 0;
}

.site-footer {
  margin-top: 80px;
  padding: 42px 0;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
}

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

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.footer-links a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d1d5db;
}

.is-filtered-out {
  display: none;
}

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

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

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

  .side-panel,
  .detail-sidebar {
    position: static;
  }
}

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

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .mobile-nav.is-open {
    display: flex;
  }

  .hero,
  .hero-slider {
    min-height: 780px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 72px;
  }

  .hero-poster {
    max-width: 260px;
  }

  .quick-search-panel,
  .search-strip,
  .detail-hero-inner,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 34px;
  }

  .movie-grid,
  .compact-grid {
    gap: 12px;
  }

  .movie-info {
    padding: 12px;
  }

  .movie-info h3 {
    font-size: 14px;
  }

  .movie-info p {
    font-size: 12px;
  }

  .detail-poster {
    max-width: 220px;
  }
}
