:root {
  color-scheme: light;
  --page: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #dc2626;
  --brand-dark: #991b1b;
  --brand-warm: #f97316;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.09);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: var(--page);
  color: var(--ink);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-warm));
  box-shadow: 0 10px 25px rgba(220, 38, 38, 0.35);
}

.brand-name {
  font-size: 1.18rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 700;
  color: #334155;
}

.desktop-nav a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover {
  color: var(--brand);
}

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

.header-search input,
.mobile-search input,
.big-search input,
.inline-filter input,
.inline-filter select {
  border: 1px solid #cbd5e1;
  outline: none;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 240px;
  border-radius: 999px;
  padding: 11px 16px;
}

.header-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.inline-filter input:focus,
.inline-filter select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.13);
}

.header-search button,
.mobile-search button,
.big-search button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-warm));
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  width: 42px;
  height: 42px;
  background: #f1f5f9;
  cursor: pointer;
}

.mobile-panel {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px 22px;
  border-top: 1px solid var(--line);
}

.mobile-panel a {
  display: block;
  padding: 12px 0;
  font-weight: 800;
  color: #334155;
}

.mobile-search {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.mobile-search input {
  flex: 1;
  border-radius: 999px;
  padding: 12px 16px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.75s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.hero-bg,
.detail-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 35%, rgba(248, 113, 113, 0.24), transparent 30%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.76) 46%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent 52%);
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 1280px;
  min-height: 720px;
  margin: 0 auto;
  padding: 96px 24px 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #fff;
}

.hero-kicker,
.section-heading span,
.page-hero span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 8px 14px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--brand), var(--brand-warm));
}

.hero-content h1,
.hero-content h2 {
  max-width: 760px;
  margin: 18px 0 18px;
  font-size: clamp(2.7rem, 7vw, 6.2rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 26px;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.hero-meta span,
.detail-meta span {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
}

.hero-actions,
.detail-copy .btn {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-warm));
  box-shadow: 0 16px 35px rgba(220, 38, 38, 0.34);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(12px);
}

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

.hero-dots button {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: #fff;
}

.section-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px;
}

.quick-search {
  margin-top: -56px;
  position: relative;
  z-index: 8;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

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

.section-heading.compact,
.section-heading.align-left {
  display: block;
}

.section-heading h2,
.page-hero h1 {
  margin: 12px 0 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.section-heading p,
.page-hero p {
  color: var(--muted);
  line-height: 1.8;
}

.section-heading a {
  color: var(--brand);
  font-weight: 900;
}

.big-search {
  display: flex;
  gap: 12px;
  margin-top: 26px;
}

.big-search input {
  flex: 1;
  border-radius: 999px;
  padding: 17px 22px;
  font-size: 1.02rem;
}

.big-search button {
  padding-inline: 28px;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.category-chips a {
  border-radius: 999px;
  padding: 10px 15px;
  background: #fff1f2;
  color: #9f1239;
  font-weight: 800;
}

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

.movie-card {
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.16);
}

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

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

.movie-info {
  padding: 18px;
}

.movie-title {
  display: -webkit-box;
  min-height: 2.7em;
  overflow: hidden;
  color: #0f172a;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 900;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 11px 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.movie-info p {
  display: -webkit-box;
  min-height: 4.8em;
  margin: 0 0 14px;
  overflow: hidden;
  color: #475569;
  line-height: 1.6;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

.tag-row span {
  border-radius: 999px;
  padding: 6px 9px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 800;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
  gap: 36px;
}

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

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

.category-card {
  display: block;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  height: 150px;
  background: #0f172a;
}

.category-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-copy {
  padding: 18px;
}

.category-copy strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.2rem;
  font-weight: 900;
}

.category-copy span {
  color: var(--muted);
  line-height: 1.65;
}

.ranking-panel {
  align-self: start;
  border-radius: 26px;
  padding: 24px;
  background: #0f172a;
  color: #fff;
  box-shadow: var(--shadow);
}

.ranking-panel .section-heading a {
  color: #fed7aa;
}

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

.rank-item a {
  display: grid;
  grid-template-columns: 42px 64px 1fr;
  align-items: center;
  gap: 12px;
  border-radius: 18px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item a:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateX(4px);
}

.rank-number {
  color: #f97316;
  font-weight: 1000;
  font-size: 1.05rem;
}

.rank-item img {
  width: 64px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
}

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

.rank-copy strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 900;
}

.rank-copy em {
  margin-top: 4px;
  color: #cbd5e1;
  font-size: 0.82rem;
  font-style: normal;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.page-main {
  min-height: 60vh;
}

.page-hero {
  min-height: 330px;
  padding: 86px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 80% 20%, rgba(248, 113, 113, 0.22), transparent 28%),
    linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  text-align: center;
}

.page-hero > div,
.page-hero form {
  max-width: 820px;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.78);
}

.page-hero.search-hero {
  display: grid;
  gap: 24px;
}

.page-hero .big-search {
  width: min(860px, 100%);
  margin: 0 auto;
}

.inline-filter {
  margin-bottom: 24px;
  display: flex;
  gap: 12px;
}

.inline-filter input,
.inline-filter select {
  border-radius: 999px;
  padding: 13px 16px;
}

.inline-filter input {
  min-width: 280px;
}

.ranking-page .rank-list.big {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ranking-page .rank-item a {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.ranking-page .rank-copy em {
  color: var(--muted);
}

.detail-main {
  background: #f8fafc;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #fff;
  background: #020617;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  filter: blur(6px) saturate(1.15);
  transform: scale(1.04);
  opacity: 0.56;
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 28%, rgba(248, 113, 113, 0.22), transparent 30%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.74));
}

.detail-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px 76px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 34px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 42px;
  align-items: center;
}

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

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

.detail-copy h1 {
  margin: 0 0 20px;
  max-width: 820px;
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.detail-copy .lead-text {
  max-width: 840px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.22rem;
  line-height: 1.8;
}

.detail-tags {
  margin: 22px 0 28px;
}

.detail-tags span {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
}

.player-wrap {
  padding-top: 56px;
}

.player-box {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.3), rgba(2, 6, 23, 0.65));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  width: 92px;
  height: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding-left: 6px;
  color: #fff;
  font-size: 2.1rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-warm));
  box-shadow: 0 18px 45px rgba(220, 38, 38, 0.42);
}

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

.content-card {
  border-radius: 26px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.content-card h2 {
  margin: 0 0 16px;
  font-size: 1.5rem;
}

.content-card p {
  margin: 0;
  color: #475569;
  line-height: 1.9;
}

.site-footer {
  margin-top: 48px;
  background: #0f172a;
  color: #cbd5e1;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}

.footer-brand {
  margin-bottom: 14px;
  color: #fff;
  font-size: 1.25rem;
}

.site-footer p {
  max-width: 520px;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 1rem;
}

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

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

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

.is-hidden-card {
  display: none !important;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed #cbd5e1;
  border-radius: 24px;
  padding: 36px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

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

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

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

  .movie-grid,
  .category-grid,
  .category-grid.large,
  .ranking-page .rank-list.big,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 640px) {
  .header-inner {
    padding-inline: 16px;
  }

  .brand-name {
    font-size: 1rem;
  }

  .hero-carousel,
  .hero-content {
    min-height: 590px;
  }

  .hero-content {
    padding: 72px 18px 88px;
  }

  .section-wrap {
    padding: 42px 16px;
  }

  .quick-search {
    margin-top: 0;
    border-radius: 0;
  }

  .big-search,
  .inline-filter,
  .mobile-search {
    flex-direction: column;
  }

  .big-search button,
  .mobile-search button {
    width: 100%;
  }

  .movie-grid,
  .category-grid,
  .category-grid.large,
  .ranking-page .rank-list.big,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .detail-inner {
    padding-inline: 16px;
  }

  .rank-item a {
    grid-template-columns: 36px 56px 1fr;
  }
}
