* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #050608;
  --bg-soft: #0f172a;
  --panel: rgba(17, 24, 39, 0.82);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --faint: #94a3b8;
  --red: #dc2626;
  --red-deep: #991b1b;
  --orange: #f97316;
  --blue: #38bdf8;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(220, 38, 38, 0.22), transparent 34rem),
    radial-gradient(circle at 85% 10%, rgba(249, 115, 22, 0.14), transparent 26rem),
    linear-gradient(180deg, #111827 0%, #050608 44%, #0f172a 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-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(31, 41, 55, 0.96), rgba(17, 24, 39, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #ef4444, #fb923c);
  -webkit-background-clip: text;
  color: transparent;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: white;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.35);
  font-size: 15px;
}

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

.nav-link {
  color: #d1d5db;
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  transform: translateY(-1px);
}

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

.header-search input,
.mobile-panel input,
.filter-panel input,
.filter-panel select {
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: white;
  background: rgba(31, 41, 55, 0.9);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.header-search input:focus,
.mobile-panel input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(239, 68, 68, 0.8);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}

.header-search button,
.mobile-panel button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
  cursor: pointer;
}

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

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 16px;
  background: #111827;
}

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

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.mobile-panel form {
  display: flex;
  gap: 8px;
}

.mobile-panel input {
  min-width: 0;
  width: 100%;
  padding: 11px 14px;
}

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

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.2)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.18) 62%, rgba(0, 0, 0, 0.22));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 72px;
  transform: translateX(-50%);
  max-width: 1180px;
}

.hero-label,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.eyebrow {
  margin: 0 0 14px;
  color: #fecaca;
  background: rgba(220, 38, 38, 0.22);
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.hero-content h1 {
  max-width: 820px;
  margin: 18px 0 16px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 690px;
  margin: 0 0 22px;
  color: #d1d5db;
  font-size: 19px;
  line-height: 1.7;
}

.hero-meta,
.detail-meta,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  color: var(--faint);
}

.hero-meta {
  margin-bottom: 26px;
  font-weight: 700;
}

.hero-meta span:first-child {
  color: #facc15;
}

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

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  padding: 12px 24px;
  color: white;
  background: linear-gradient(135deg, var(--red), #b91c1c);
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.28);
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.ghost-button {
  padding: 11px 22px;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.text-link {
  min-height: auto;
  color: #f87171;
}

.text-link.blue {
  color: #38bdf8;
}

.hero-dots {
  position: absolute;
  right: max(32px, calc((100vw - 1180px) / 2));
  bottom: 46px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

.page-stack {
  display: grid;
  gap: 48px;
  padding-block: 48px 68px;
}

.quick-categories,
.content-section,
.filter-panel,
.content-panel,
.overview-card {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.quick-categories {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.16), rgba(249, 115, 22, 0.08));
}

.quick-categories h2,
.section-title-row h2,
.page-hero h1,
.content-panel h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.quick-categories h2 {
  font-size: clamp(26px, 3vw, 36px);
}

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

.quick-links a {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 800;
}

.content-section {
  padding: 28px;
}

.tinted-section {
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.2), rgba(15, 23, 42, 0.72));
}

.blue-section {
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.22), rgba(88, 28, 135, 0.16));
}

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

.section-title-row h2 {
  font-size: clamp(28px, 4vw, 42px);
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  background: rgba(17, 24, 39, 0.78);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(239, 68, 68, 0.48);
  background: rgba(31, 41, 55, 0.92);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

.movie-card img,
.scroll-card img,
.rank-poster img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease;
}

.movie-card:hover img,
.scroll-card:hover img,
.ranking-row:hover img {
  transform: scale(1.08);
}

.poster-link::after,
.scroll-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.72));
}

.poster-badge,
.poster-time,
.scroll-poster span {
  position: absolute;
  z-index: 2;
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 9px;
}

.poster-badge {
  left: 10px;
  top: 10px;
  background: rgba(220, 38, 38, 0.92);
}

.poster-time,
.scroll-poster span {
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.75);
}

.movie-card-body {
  padding: 16px;
}

.movie-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-info h3 a:hover,
.overview-card a:hover {
  color: #f87171;
}

.movie-card p,
.rank-info p,
.overview-card p,
.content-panel p {
  color: #cbd5e1;
  line-height: 1.7;
}

.movie-card p {
  min-height: 58px;
  margin: 0 0 12px;
  font-size: 14px;
}

.meta-row {
  gap: 8px;
  font-size: 13px;
}

.meta-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 150px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.tag {
  color: #fed7aa;
  background: rgba(154, 52, 18, 0.32);
  border: 1px solid rgba(251, 146, 60, 0.22);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.scroll-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 6px 2px 16px;
  scrollbar-width: thin;
}

.scroll-card {
  flex: 0 0 245px;
  display: grid;
  gap: 10px;
}

.scroll-poster {
  position: relative;
  display: block;
  height: 142px;
  overflow: hidden;
  border-radius: 16px;
  background: #111827;
}

.scroll-card strong {
  line-height: 1.4;
}

.scroll-card em {
  color: var(--faint);
  font-style: normal;
  font-size: 13px;
}

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

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

.ranking-row {
  display: grid;
  grid-template-columns: 58px 126px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.68);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-row:hover {
  background: rgba(31, 41, 55, 0.92);
  transform: translateY(-2px);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.rank-poster {
  display: block;
  height: 78px;
  overflow: hidden;
  border-radius: 12px;
}

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.rank-info p {
  margin: 0 0 8px;
  font-size: 14px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

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

.category-card,
.overview-card {
  padding: 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.3), rgba(15, 23, 42, 0.86));
  border: 1px solid rgba(248, 113, 113, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.overview-card:hover {
  transform: translateY(-4px);
  border-color: rgba(248, 113, 113, 0.4);
}

.category-card span,
.overview-head span {
  display: block;
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 10px;
}

.category-card p,
.overview-card p {
  min-height: 78px;
  margin: 0 0 16px;
  font-size: 14px;
}

.category-card strong,
.overview-head strong {
  color: #fca5a5;
}

.page-hero,
.detail-hero {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 18% 10%, rgba(220, 38, 38, 0.22), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.92));
}

.page-hero .container {
  padding-block: 72px;
}

.page-hero h1 {
  max-width: 900px;
  margin-bottom: 16px;
  font-size: clamp(38px, 6vw, 64px);
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(130px, 0.9fr) minmax(220px, 2fr) repeat(3, minmax(140px, 1fr));
  gap: 14px;
  align-items: end;
  padding: 20px;
}

.filter-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--faint);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
}

.empty-state {
  display: none;
  padding: 60px 20px;
  color: var(--muted);
  text-align: center;
  font-size: 18px;
}

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

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

.overview-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.overview-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: #e5e7eb;
}

.detail-shell {
  padding-block: 34px 44px;
}

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

.breadcrumb a:hover {
  color: #f87171;
}

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

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 26px;
  border: 1px solid rgba(248, 113, 113, 0.22);
  box-shadow: var(--shadow);
  background: #111827;
}

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.detail-info .lead {
  max-width: 780px;
  color: #d1d5db;
  font-size: 19px;
  line-height: 1.8;
}

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

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.18);
}

.large-tags {
  margin-bottom: 24px;
}

.player-block {
  padding: 0;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #020617;
  box-shadow: var(--shadow);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
  z-index: 1;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.72));
  cursor: pointer;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 18px 40px rgba(220, 38, 38, 0.38);
  font-size: 36px;
  transform: translateX(3px);
}

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

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

.content-panel {
  padding: 24px;
}

.content-panel h2 {
  margin-bottom: 14px;
  font-size: 26px;
}

.content-panel p {
  margin: 0;
}

.detail-side dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.detail-side div {
  display: grid;
  gap: 5px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.detail-side dt {
  color: var(--faint);
  font-size: 13px;
  font-weight: 900;
}

.detail-side dd {
  margin: 0;
  color: white;
  line-height: 1.6;
}

.site-footer {
  margin-top: 30px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), #020617);
}

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

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.site-footer p {
  max-width: 520px;
  color: var(--faint);
  line-height: 1.75;
}

.site-footer section:not(:first-child) {
  display: grid;
  align-content: start;
  gap: 10px;
}

.site-footer a:not(.brand) {
  color: #cbd5e1;
}

.site-footer a:not(.brand):hover {
  color: #f87171;
}

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

.copyright {
  padding-block: 18px 28px;
  color: #64748b;
  font-size: 14px;
}

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

  .menu-toggle {
    display: block;
  }

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

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

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

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

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

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

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

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

  .brand {
    font-size: 20px;
  }

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

  .hero-content {
    bottom: 86px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .hero-dots {
    left: 16px;
    right: auto;
    bottom: 32px;
  }

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

  .quick-links {
    justify-content: flex-start;
  }

  .content-section,
  .quick-categories,
  .filter-panel,
  .content-panel {
    padding: 18px;
    border-radius: 20px;
  }

  .movie-grid,
  .featured-grid,
  .small-grid,
  .category-list,
  .category-grid,
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .movie-card-body {
    padding: 12px;
  }

  .movie-card h3 {
    font-size: 15px;
  }

  .movie-card p {
    min-height: auto;
    font-size: 13px;
  }

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

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

  .ranking-row .text-link {
    grid-column: 2 / -1;
    justify-content: flex-start;
  }

  .rank-number {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .rank-poster {
    height: 66px;
  }

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

  .detail-info h1 {
    font-size: 36px;
  }

  .detail-info .lead {
    font-size: 16px;
  }

  .play-overlay span {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }

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

@media (max-width: 460px) {
  .movie-grid,
  .featured-grid,
  .small-grid,
  .category-list,
  .category-grid,
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .poster-link {
    aspect-ratio: 16 / 9;
  }
}
