:root {
  --red: #dc2626;
  --red-deep: #b91c1c;
  --orange: #f97316;
  --yellow: #facc15;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #fff7ed;
  --line: #e5e7eb;
  --shadow: 0 18px 40px rgba(17, 24, 39, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f9fafb;
  font-family: 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;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--yellow));
  box-shadow: 0 10px 30px rgba(185, 28, 28, 0.28);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--red);
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-4deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
  letter-spacing: 0.02em;
}

.brand-text span {
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.1;
}

.brand-text small {
  opacity: 0.9;
  font-size: 13px;
  font-weight: 600;
}

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

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover {
  color: #fff7ad;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 14px;
}

.mobile-nav {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 16px 16px;
}

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 700;
}

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

.hero {
  position: relative;
  height: 440px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.9), rgba(17, 24, 39, 0.58), rgba(185, 28, 28, 0.22));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 780px;
  color: #fff;
  padding-top: 24px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  color: #fff;
  background: linear-gradient(90deg, var(--red), var(--orange));
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2.2vw, 22px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

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

.primary-button {
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--red));
  box-shadow: 0 16px 28px rgba(220, 38, 38, 0.28);
}

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

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

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.hero-meta span {
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.36);
  border-radius: 999px;
  font-size: 36px;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.55);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

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

.section {
  padding: 72px 0;
}

.white-section {
  background: #fff;
}

.soft-section {
  background: linear-gradient(135deg, #fff7ed, #fff1f2);
}

.warm-section {
  background: linear-gradient(135deg, #fff7ed, #fee2e2);
}

.dark-section {
  color: #fff;
  background: radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.25), transparent 36%), linear-gradient(135deg, #111827, #030712);
}

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

.section-head.centered {
  justify-content: center;
  text-align: center;
}

.section-head h2,
.page-hero h1,
.detail-info h1 {
  margin: 12px 0 8px;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-head p,
.page-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.section-link {
  color: var(--red);
  background: #fff1f2;
  border: 1px solid #fecdd3;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #7f1d1d);
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.25s ease;
}

.movie-card:hover .card-cover img {
  transform: scale(1.08);
  opacity: 0.9;
}

.play-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: var(--red);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.85);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  color: #fff;
  background: linear-gradient(90deg, var(--red), var(--orange));
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 18px;
}

.compact-card .card-body {
  padding: 15px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
  font-weight: 850;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body h3 a:hover {
  color: var(--red);
}

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

.card-meta,
.rank-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.card-meta span,
.rank-meta span,
.rank-meta a,
.detail-meta span {
  padding: 5px 9px;
  color: #6b7280;
  background: #f3f4f6;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

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

.category-tile {
  display: block;
  overflow: hidden;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 12px 26px rgba(17, 24, 39, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-mosaic {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  height: 150px;
  background: #111827;
}

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

.category-tile h3 {
  margin: 18px 18px 8px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile p {
  margin: 0 18px 20px;
  color: var(--muted);
  font-size: 14px;
}

.stats-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 44px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 32px;
  backdrop-filter: blur(16px);
}

.stats-panel h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 42px);
}

.stats-panel p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
}

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

.page-hero,
.detail-hero {
  color: #fff;
  background: radial-gradient(circle at 18% 20%, rgba(250, 204, 21, 0.26), transparent 34%), linear-gradient(135deg, #991b1b, #f97316 52%, #111827);
}

.page-hero {
  padding: 74px 0 66px;
}

.page-hero h1,
.page-hero p {
  color: #fff;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  font-weight: 700;
}

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

.movie-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 30px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
}

.search-box {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 10px;
  min-width: 220px;
  padding: 0 14px;
  color: var(--muted);
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.search-box input {
  width: 100%;
  height: 44px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pills button {
  height: 42px;
  padding: 0 16px;
  border: 0;
  color: #374151;
  background: #f3f4f6;
  border-radius: 999px;
  font-weight: 800;
}

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

.category-preview {
  padding: 34px;
  margin-bottom: 28px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 30px;
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.08);
}

.compact-head {
  margin-bottom: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 132px 58px 1fr;
  align-items: center;
  gap: 18px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.rank-cover {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
  background: #111827;
}

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

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

.rank-content h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 900;
}

.rank-content h3 a:hover {
  color: var(--red);
}

.rank-content p {
  margin: 0 0 12px;
  color: var(--muted);
}

.detail-hero {
  padding: 44px 0 64px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 38px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.28);
}

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

.detail-info h1 {
  color: #fff;
  font-size: clamp(36px, 5vw, 62px);
}

.detail-one-line {
  max-width: 760px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
}

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

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

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.tag-list span {
  padding: 7px 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.28));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.big-play {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  color: var(--red);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  font-size: 38px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.player-overlay strong {
  max-width: min(760px, 86%);
  font-size: clamp(22px, 4vw, 38px);
  line-height: 1.2;
  text-align: center;
}

.detail-content {
  display: grid;
  gap: 24px;
}

.detail-block {
  padding: 32px;
  background: #fff;
  border-radius: 26px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
}

.detail-block h2 {
  margin: 0 0 14px;
  font-size: 28px;
  font-weight: 900;
}

.detail-block p {
  margin: 0;
  color: #374151;
  font-size: 17px;
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(180deg, #111827, #030712);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr;
  gap: 34px;
  padding: 52px 0 32px;
}

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

.footer-brand span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  border-radius: 999px;
}

.site-footer p {
  max-width: 440px;
  margin: 14px 0 0;
  color: #9ca3af;
}

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

.footer-links {
  display: grid;
  gap: 8px;
}

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

.footer-links a:hover {
  color: var(--orange);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0 26px;
  color: #9ca3af;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

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

@media (max-width: 1080px) {
  .card-grid,
  .featured-grid,
  .small-grid,
  .category-list,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .desktop-nav {
    gap: 14px;
    font-size: 14px;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero {
    height: 560px;
  }

  .hero-arrow {
    display: none;
  }

  .section-head,
  .stats-panel,
  .movie-tools,
  .footer-bottom {
    align-items: stretch;
    flex-direction: column;
  }

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

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

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

  .rank-item {
    grid-template-columns: 108px 48px 1fr;
  }
}

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

  .header-inner {
    min-height: 68px;
  }

  .brand-text small {
    display: none;
  }

  .hero {
    height: 600px;
  }

  .hero-copy {
    padding: 0 6px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .card-grid,
  .featured-grid,
  .small-grid,
  .category-list,
  .category-grid,
  .footer-grid,
  .mobile-nav {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 54px 0;
  }

  .category-preview,
  .stats-panel,
  .detail-block {
    padding: 24px;
    border-radius: 22px;
  }

  .rank-item {
    grid-template-columns: 92px 1fr;
    gap: 14px;
  }

  .rank-number {
    position: absolute;
    margin: 8px;
  }

  .rank-item {
    position: relative;
  }

  .rank-content {
    grid-column: 2;
  }

  .detail-hero {
    padding-top: 30px;
  }

  .page-hero {
    padding: 52px 0 48px;
  }
}
