:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-100: #f1f5f9;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --red-600: #dc2626;
  --red-500: #ef4444;
  --orange-500: #f97316;
  --amber-500: #f59e0b;
  --white: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.1);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
  box-shadow: 0 14px 32px rgba(2, 6, 23, 0.3);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--red-600), var(--orange-500));
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.32);
  transition: transform 0.2s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.08) rotate(-3deg);
}

.brand-title {
  display: block;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 800;
  background: linear-gradient(90deg, #f87171, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-subtitle {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: #cbd5e1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1 1 auto;
}

.nav-link {
  color: #f8fafc;
  font-size: 15px;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fb7185;
}

.nav-categories {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-categories a {
  font-size: 13px;
  color: #cbd5e1;
}

.nav-categories a:hover {
  color: #fed7aa;
}

.header-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.header-search input,
.page-search input,
.filter-panel input,
.filter-panel select {
  border: 0;
  outline: 0;
  font: inherit;
}

.header-search input {
  width: min(22vw, 260px);
  padding: 11px 15px;
  color: var(--white);
  background: transparent;
}

.header-search input::placeholder {
  color: #94a3b8;
}

.header-search button,
.page-search button {
  border: 0;
  cursor: pointer;
  font-weight: 700;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-600), var(--orange-500));
}

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

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: var(--white);
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.hero-slider {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-600), var(--orange-500), var(--amber-500));
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.65s ease, visibility 0.65s ease;
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(127, 29, 29, 0.62), rgba(249, 115, 22, 0.28)), var(--hero-image);
  background-size: cover;
  background-position: center;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12), transparent 28%), linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.72));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 48px;
  align-items: center;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff7ed;
  background: rgba(239, 68, 68, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}

.eyebrow.dark {
  color: var(--red-600);
  background: #fee2e2;
  border-color: #fecaca;
}

.hero-copy h1,
.page-hero h1,
.detail-hero h1 {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy h1 {
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  text-shadow: 0 12px 36px rgba(0, 0, 0, 0.32);
}

.hero-copy p {
  margin: 22px 0 0;
  max-width: 680px;
  font-size: clamp(18px, 2.3vw, 25px);
  color: #ffedd5;
}

.hero-tags,
.detail-tags,
.tag-row {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.detail-tags a,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
}

.hero-tags span {
  padding: 8px 13px;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn.primary {
  color: var(--red-600);
  background: var(--white);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.btn.ghost {
  color: var(--white);
  background: rgba(239, 68, 68, 0.24);
  border: 2px solid rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  transform: rotate(2deg);
  transition: transform 0.25s ease;
}

.hero-poster:hover {
  transform: rotate(0deg) scale(1.02);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--red-600), var(--orange-500));
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
}

.hero-prev,
.hero-next,
.hero-dot {
  border: 0;
  color: var(--white);
  cursor: pointer;
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 30px;
  line-height: 1;
  background: rgba(15, 23, 42, 0.54);
  backdrop-filter: blur(10px);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 30px;
  background: var(--white);
}

.hero-after {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 18px;
  margin-top: -36px;
  position: relative;
  z-index: 6;
}

.category-strip,
.mini-ranking {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.category-strip {
  flex-wrap: wrap;
}

.category-strip a {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--red-600);
  font-weight: 800;
  background: #fee2e2;
}

.mini-ranking {
  overflow-x: auto;
}

.mini-ranking a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
  font-weight: 700;
  color: var(--gray-700);
}

.mini-ranking span {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-600), var(--orange-500));
}

.section-block {
  padding: 68px 0 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 3.6vw, 42px);
  letter-spacing: -0.03em;
  color: var(--gray-800);
}

.section-link {
  color: var(--red-600);
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 160px 160px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--gray-700);
  background: var(--gray-100);
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

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

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

.poster-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: var(--white);
}

.poster-chip {
  right: 12px;
  top: 12px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--red-600), var(--orange-500));
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.28);
}

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

.movie-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  color: var(--gray-800);
}

.movie-title:hover {
  color: var(--red-600);
}

.movie-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
  font-size: 13px;
  color: var(--gray-500);
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--gray-500);
  font-size: 14px;
  line-height: 1.55;
}

.tag-row span {
  padding: 6px 9px;
  color: var(--red-600);
  background: #fee2e2;
}

.movie-card.compact .movie-card-body p {
  display: none;
}

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

.category-card,
.category-overview-card,
.content-card,
.side-card {
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.category-card {
  min-height: 160px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 2px solid transparent;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--red-500);
  box-shadow: var(--shadow);
}

.category-card span,
.category-overview-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--gray-800);
}

.category-card p,
.category-overview-card p {
  color: var(--gray-500);
}

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

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

.category-overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.category-overview-links a {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--red-600);
  background: #fee2e2;
  font-size: 13px;
  font-weight: 700;
}

.page-hero {
  padding: 92px 0;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-600), var(--orange-500));
}

.category-hero {
  background: linear-gradient(135deg, #7f1d1d, var(--red-600), var(--orange-500));
}

.ranking-hero {
  background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
}

.search-hero {
  background: linear-gradient(135deg, var(--slate-800), var(--gray-800));
}

.page-hero h1 {
  font-size: clamp(38px, 6vw, 64px);
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  font-size: 20px;
  color: #ffedd5;
}

.page-search {
  display: flex;
  max-width: 720px;
  margin-top: 28px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-soft);
}

.page-search input {
  flex: 1;
  min-width: 0;
  padding: 16px 20px;
  color: var(--gray-800);
  background: transparent;
}

.page-search button {
  padding: 0 28px;
}

.detail-hero {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: end;
  color: var(--white);
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(127, 29, 29, 0.5)), var(--detail-image);
  background-size: cover;
  background-position: center;
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.86));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 78px 0 58px;
}

.breadcrumb {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #ffedd5;
  background: rgba(239, 68, 68, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.detail-hero h1 {
  max-width: 900px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
}

.detail-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  font-size: 20px;
  color: #ffedd5;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding: 46px 0 0;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  cursor: pointer;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.24), rgba(2, 6, 23, 0.54));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover span {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  font-size: 38px;
  background: linear-gradient(135deg, var(--red-600), var(--orange-500));
  box-shadow: 0 18px 45px rgba(239, 68, 68, 0.35);
}

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

.content-card {
  margin-top: 24px;
  padding: 30px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  color: var(--gray-800);
}

.content-card p {
  margin: 0 0 24px;
  color: var(--gray-700);
  font-size: 17px;
  line-height: 1.88;
}

.detail-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.detail-poster {
  width: 100%;
  border-radius: 24px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--slate-900);
  box-shadow: var(--shadow);
}

.side-card {
  padding: 22px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px 12px;
  margin: 0;
}

.side-card dt {
  color: var(--gray-500);
}

.side-card dd {
  margin: 0;
  color: var(--gray-800);
  font-weight: 700;
}

.detail-tags {
  margin-top: 18px;
}

.detail-tags a {
  padding: 7px 10px;
  color: var(--red-600);
  background: #fee2e2;
  font-weight: 700;
}

.filter-empty {
  display: none;
  padding: 40px;
  border-radius: 22px;
  text-align: center;
  color: var(--gray-500);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.site-footer {
  margin-top: 78px;
  color: #cbd5e1;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-800), var(--slate-900));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1.2fr 1fr;
  gap: 28px;
  padding: 46px 0;
}

.footer-brand {
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 900;
  color: var(--white);
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
  color: var(--white);
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

.site-footer a:hover {
  color: #fb7185;
}

.footer-links {
  columns: 2;
}

.footer-bottom {
  padding: 18px;
  text-align: center;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 1080px) {
  .header-search {
    display: none;
  }

  .nav-categories {
    display: none;
  }

  .hero-content {
    grid-template-columns: 1fr 280px;
  }

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

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

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

@media (max-width: 820px) {
  .header-inner {
    min-height: 68px;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 68px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 24px 24px;
    background: var(--slate-900);
    box-shadow: 0 22px 38px rgba(2, 6, 23, 0.32);
  }

  .site-nav.open {
    display: flex;
  }

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

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

  .hero-content {
    grid-template-columns: 1fr;
    gap: 26px;
    align-content: center;
    padding: 90px 0 80px;
  }

  .hero-poster {
    width: min(260px, 70vw);
    margin: 0 auto;
  }

  .hero-after {
    grid-template-columns: 1fr;
    margin-top: 18px;
  }

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

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

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

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

  .detail-side {
    order: -1;
  }

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

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

  .brand-title {
    font-size: 19px;
  }

  .brand-subtitle {
    display: none;
  }

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

  .hero-copy p,
  .page-hero p,
  .detail-hero p {
    font-size: 16px;
  }

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

  .category-strip,
  .mini-ranking {
    padding: 14px;
  }

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

  .page-search {
    flex-direction: column;
    border-radius: 20px;
  }

  .page-search button {
    min-height: 48px;
  }
}
