:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-strong: #f1f5f9;
  --text: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --red: #dc2626;
  --orange: #f97316;
  --blue: #2563eb;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  backdrop-filter: blur(18px);
}

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

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

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 10px 20px rgba(220, 38, 38, 0.28);
}

.brand-copy {
  display: grid;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 21px;
  letter-spacing: -0.03em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

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

.nav-link,
.mobile-link {
  color: #334155;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--red);
  background: #fff1f2;
}

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

.header-search input,
.mobile-search input,
.big-search input,
.filter-panel input {
  width: 250px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.filter-panel input:focus {
  border-color: rgba(220, 38, 38, 0.55);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.header-search button,
.mobile-search button,
.big-search button,
.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 800;
  white-space: nowrap;
}

.header-search button,
.mobile-search button,
.big-search button,
.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.22);
}

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

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #f1f5f9;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #0f172a;
  border-radius: 999px;
}

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

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

.mobile-nav {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

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

.hero-track {
  position: relative;
  min-height: 620px;
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  min-height: 620px;
  object-fit: cover;
  transform: scale(1.03);
  transition: transform 6s ease;
}

.hero-slide.is-active .hero-image {
  transform: scale(1.09);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.72) 48%, rgba(15, 23, 42, 0.28)), linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 45%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 86px;
  max-width: 700px;
  color: #fff;
}

.hero-label,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fecaca;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-info h1 {
  margin: 10px 0;
  font-weight: 950;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-content h1,
.page-hero h1 {
  font-size: clamp(40px, 7vw, 76px);
}

.hero-content h2 {
  font-size: clamp(28px, 5vw, 54px);
}

.hero-content p,
.page-hero p,
.detail-one-line {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

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

.hero-tags {
  margin: 20px 0;
}

.hero-tags span,
.tag-row span,
.detail-tags a,
.filter-chip {
  border-radius: 999px;
  padding: 6px 10px;
  color: #991b1b;
  background: #fee2e2;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 23, 42, 0.35);
  font-size: 34px;
  backdrop-filter: blur(12px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 30px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

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

.quick-search-panel,
.content-section,
.page-main,
.detail-main {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.quick-search-panel {
  margin-top: -48px;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: center;
  padding-top: 26px;
  padding-bottom: 26px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.quick-search-panel h2,
.section-heading h2,
.story-box h2,
.category-overview-body h2,
.ranking-card h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.quick-search-panel p {
  margin: 6px 0 0;
  color: var(--muted);
}

.big-search input {
  width: min(440px, 52vw);
  padding: 14px 18px;
}

.big-search button {
  padding: 14px 24px;
}

.content-section {
  padding-top: 64px;
}

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

.section-heading h2 {
  font-size: 34px;
}

.section-kicker {
  color: var(--red);
}

.section-more {
  color: var(--red);
  font-weight: 900;
}

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

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

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(220, 38, 38, 0.22);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #0f172a;
}

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

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

.poster-badge,
.poster-year {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(220, 38, 38, 0.92);
}

.poster-badge {
  left: 12px;
}

.poster-year {
  right: 12px;
  background: rgba(15, 23, 42, 0.75);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: #475569;
  font-size: 13px;
  font-weight: 750;
}

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

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

.category-tile,
.category-overview-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  min-height: 190px;
  color: #fff;
  background: #0f172a;
  box-shadow: var(--soft-shadow);
}

.category-tile img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  opacity: 0.48;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
  opacity: 0.62;
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile span {
  display: block;
  margin: 90px 18px 8px;
  font-size: 22px;
  font-weight: 950;
}

.category-tile p {
  margin: 0 18px 18px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
}

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

.ranking-box {
  position: sticky;
  top: 96px;
  border-radius: 24px;
  background: #0f172a;
  color: #fff;
  padding: 22px;
  box-shadow: var(--shadow);
}

.ranking-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-weight: 950;
}

.ranking-head a {
  color: #fecaca;
  font-size: 14px;
}

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

.ranking-list a {
  display: grid;
  grid-template-columns: 38px 58px 1fr;
  gap: 12px;
  align-items: center;
}

.ranking-list img {
  width: 58px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-num {
  color: #fca5a5;
  font-weight: 950;
}

.ranking-list strong {
  display: block;
  line-height: 1.35;
}

.ranking-list p {
  margin: 4px 0 0;
  color: #cbd5e1;
  font-size: 12px;
}

.page-main {
  padding-top: 36px;
}

.page-hero {
  border-radius: 30px;
  padding: 58px;
  color: #fff;
  background: radial-gradient(circle at 15% 20%, rgba(249, 115, 22, 0.38), transparent 34%), linear-gradient(135deg, #0f172a, #7f1d1d 58%, #111827);
  box-shadow: var(--shadow);
}

.small-hero,
.category-hero {
  min-height: 260px;
  display: flex;
  align-items: center;
}

.filter-panel {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.filter-panel input {
  width: min(480px, 100%);
}

.filter-chip {
  border: 0;
  color: #334155;
  background: #f1f5f9;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

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

.category-overview-card {
  color: var(--text);
  background: #fff;
}

.category-overview-card a {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 210px;
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 10px;
  background: #0f172a;
}

.category-preview img {
  width: 100%;
  height: 92px;
  object-fit: cover;
  border-radius: 12px;
}

.category-overview-body {
  padding: 28px;
}

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

.category-overview-body span {
  color: var(--red);
  font-weight: 950;
}

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

.ranking-card {
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.ranking-card a {
  display: grid;
  grid-template-columns: 70px 110px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px;
}

.ranking-number {
  font-size: 32px;
  color: var(--red);
  font-weight: 950;
  text-align: center;
}

.ranking-card img {
  width: 110px;
  height: 150px;
  border-radius: 18px;
  object-fit: cover;
}

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

.detail-main {
  padding-top: 28px;
}

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

.breadcrumb a {
  color: var(--red);
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 34px;
  border-radius: 30px;
  color: #fff;
  background: radial-gradient(circle at 20% 10%, rgba(249, 115, 22, 0.35), transparent 34%), linear-gradient(135deg, #020617, #7f1d1d 58%, #0f172a);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.detail-info h1 {
  font-size: clamp(32px, 5vw, 58px);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}

.detail-meta span {
  border-radius: 14px;
  padding: 9px 12px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.1);
}

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

.player-section {
  padding-top: 34px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.82));
}

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

.play-icon {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-size: 34px;
  box-shadow: 0 18px 50px rgba(220, 38, 38, 0.35);
}

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

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

.story-box p {
  color: #334155;
}

.related-section {
  padding-top: 40px;
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.footer-brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.footer-brand strong {
  color: #fff;
  font-size: 20px;
}

.footer-brand p {
  margin: 8px 0 0;
  max-width: 620px;
}

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

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

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

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: var(--soft-shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

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

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

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

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

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

  .ranking-box {
    position: static;
  }
}

@media (max-width: 820px) {
  .header-inner {
    height: 66px;
    padding: 0 16px;
  }

  .brand-copy small {
    display: none;
  }

  .hero,
  .hero-track,
  .hero-image {
    min-height: 540px;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 72px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search-panel {
    grid-template-columns: 1fr;
    margin-top: 0;
    border-radius: 0;
  }

  .big-search {
    width: 100%;
  }

  .big-search input {
    width: 100%;
  }

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

  .category-overview-card a,
  .detail-hero,
  .ranking-card a {
    grid-template-columns: 1fr;
  }

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

  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

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

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

@media (max-width: 560px) {
  .quick-search-panel,
  .content-section,
  .page-main,
  .detail-main {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .page-hero,
  .detail-hero {
    padding: 28px;
    border-radius: 22px;
  }

  .story-box {
    padding: 22px;
  }
}
