:root {
  --red: #dc2626;
  --orange: #f97316;
  --gold: #facc15;
  --blue: #2563eb;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --dark: #0b1120;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: #f3f4f6;
  font-family: Inter, 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 {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

.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, #dc2626 0%, #f97316 54%, #facc15 100%);
  box-shadow: 0 12px 30px rgba(153, 27, 27, 0.24);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--red);
  background: #fff;
  border-radius: 999px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 25px;
  letter-spacing: 0.04em;
}

.brand-text small {
  margin-top: 4px;
  font-size: 12px;
  opacity: 0.9;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

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

.nav-link:hover,
.nav-link.is-active {
  color: #fff7cc;
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fff;
  border-radius: 2px;
}

.hero-carousel {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: linear-gradient(135deg, #dc2626 0%, #f97316 100%);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

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

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

.hero-overlay,
.detail-hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.44) 52%, rgba(0, 0, 0, 0.12));
}

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

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

.hero-kicker,
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
  margin-bottom: 16px;
}

.hero-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #f3f4f6;
  font-size: clamp(17px, 2.2vw, 22px);
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  font-size: 13px;
  backdrop-filter: blur(8px);
}

.tag-row span {
  color: var(--orange);
  background: #fff7ed;
  border-color: #fed7aa;
}

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

.primary-button,
.secondary-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 900;
  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 14px 32px rgba(220, 38, 38, 0.32);
}

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

.text-button {
  color: #fff7cc;
  padding-inline: 8px;
}

.primary-button:hover,
.secondary-button:hover,
.text-button:hover {
  transform: translateY(-2px) scale(1.02);
}

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

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.58);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.search-band {
  position: relative;
  z-index: 4;
  margin-top: -44px;
}

.search-panel,
.filter-panel {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  align-items: center;
  gap: 24px;
  padding: 26px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel h2,
.section-heading h2,
.rank-head h2,
.detail-card h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(26px, 3.6vw, 40px);
  line-height: 1.15;
}

.search-panel p,
.section-heading p,
.page-hero p {
  margin: 8px 0 0;
  color: var(--muted);
}

.global-search {
  display: flex;
  gap: 10px;
}

.global-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 16px;
  color: var(--text);
  background: #fff;
  outline: none;
}

.global-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.global-search button,
.filter-reset {
  min-height: 48px;
  border: 0;
  padding: 0 22px;
  color: #fff;
  background: linear-gradient(90deg, var(--red), var(--orange));
  border-radius: 14px;
  font-weight: 900;
  cursor: pointer;
}

.section-block {
  padding: 72px 0;
  background: linear-gradient(180deg, #f3f4f6 0%, #ffffff 100%);
}

.section-block.white {
  background: #fff;
}

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

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

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

.category-card {
  position: relative;
  min-height: 196px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  color: #fff;
  border-radius: var(--radius);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.14);
  isolation: isolate;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.2);
}

.category-card::before,
.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
}

.category-card::before {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.9), rgba(249, 115, 22, 0.78));
}

.category-card::after {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.1));
}

.category-card img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  transition: transform 0.45s ease;
}

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

.category-icon {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.category-card strong {
  font-size: 22px;
  line-height: 1.2;
}

.category-card em {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-style: normal;
  font-size: 14px;
}

.movie-grid {
  display: grid;
  gap: 24px;
}

.movie-grid.four {
  grid-template-columns: repeat(4, 1fr);
}

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

.movie-card {
  overflow: hidden;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #1f2937, #111827);
}

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

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

.movie-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 56%);
  opacity: 0.78;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: var(--red);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.year-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 9px;
  color: #fff;
  background: rgba(0, 0, 0, 0.48);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.movie-info {
  padding: 18px;
}

.movie-card.compact .movie-info {
  padding: 15px;
}

.movie-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.movie-info h2 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.rank-panel {
  padding: 22px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.sticky-rank {
  position: sticky;
  top: 96px;
}

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

.rank-head h2 {
  font-size: 26px;
}

.rank-head a {
  color: var(--red);
  font-weight: 900;
}

.rank-list {
  display: grid;
  gap: 12px;
}

.rank-item {
  display: grid;
  grid-template-columns: 34px 82px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: #f9fafb;
  border-radius: 16px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: #fff7ed;
  transform: translateX(3px);
}

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

.rank-item img {
  width: 82px;
  height: 54px;
  object-fit: cover;
  border-radius: 11px;
}

.rank-item strong {
  display: block;
  line-height: 1.35;
}

.rank-item em {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #991b1b, #f97316);
}

.small-hero {
  padding: 74px 0;
}

.small-hero h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.05;
}

.small-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.rank-hero {
  background: radial-gradient(circle at top left, rgba(250, 204, 21, 0.4), transparent 35%), linear-gradient(135deg, #7f1d1d, #f97316);
}

.filter-section {
  padding: 26px 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.filter-panel {
  grid-template-columns: 1fr 180px 180px auto;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
}

.filter-panel.wide {
  grid-template-columns: 1fr 160px 170px 180px auto;
}

.empty-state {
  margin-top: 20px;
  padding: 26px;
  color: var(--muted);
  text-align: center;
  background: #f9fafb;
  border-radius: 18px;
}

.detail-hero {
  min-height: 430px;
}

.detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

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

.detail-hero h1 {
  max-width: 900px;
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.06;
}

.detail-hero p {
  max-width: 820px;
  margin: 0 0 20px;
  color: #f3f4f6;
  font-size: 20px;
}

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

.detail-layout-section {
  padding-top: 40px;
}

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

.detail-main,
.detail-side {
  display: grid;
  gap: 22px;
}

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

.movie-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.26), rgba(0, 0, 0, 0.68));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-play-icon {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  color: var(--red);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  font-size: 38px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.28);
}

.player-cover strong {
  max-width: 80%;
  font-size: clamp(20px, 4vw, 34px);
  line-height: 1.2;
}

.detail-card,
.side-poster {
  overflow: hidden;
  padding: 24px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.side-poster {
  padding: 0;
}

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

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.detail-meta-grid span {
  padding: 16px;
  background: #f9fafb;
  border-radius: 16px;
  font-weight: 900;
}

.detail-meta-grid em {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.prose-card p {
  color: #374151;
  font-size: 17px;
  line-height: 1.9;
}

.related-grid {
  margin-top: 18px;
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(180deg, #111827, #000000);
  padding: 58px 0 22px;
}

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

.footer-brand .brand-mark {
  width: 38px;
  height: 38px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

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

.site-footer p {
  margin: 12px 0 0;
  color: #9ca3af;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 8px;
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 18px;
  color: #6b7280;
  border-top: 1px solid #1f2937;
  font-size: 14px;
}

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

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

  .sticky-rank {
    position: static;
  }

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

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

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: calc(100% + 10px);
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    background: linear-gradient(135deg, #dc2626, #f97316);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    border-radius: 12px;
  }

  .hero-carousel {
    min-height: 520px;
  }

  .hero-arrow {
    display: none;
  }

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

  .global-search {
    flex-direction: column;
  }

  .category-grid,
  .category-grid.large,
  .movie-grid.four,
  .movie-grid.three {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .detail-meta-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .brand-text small {
    display: none;
  }

  .brand-text strong {
    font-size: 21px;
  }

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

  .hero-copy h1,
  .detail-hero h1,
  .small-hero h1 {
    font-size: 38px;
  }

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

  .category-grid,
  .category-grid.large,
  .movie-grid.four,
  .movie-grid.three {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 30px 72px 1fr;
  }

  .rank-item img {
    width: 72px;
    height: 48px;
  }

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