:root {
  --red-900: #7f1d1d;
  --red-800: #991b1b;
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --red-500: #ef4444;
  --orange-500: #f97316;
  --gold: #f59e0b;
  --ink: #1f2937;
  --muted: #6b7280;
  --soft: #f8fafc;
  --line: #e5e7eb;
  --shadow: 0 24px 70px rgba(127, 29, 29, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #fff7f7 0%, #f8fafc 42%, #fff 100%);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 4px solid var(--red-600);
  box-shadow: 0 14px 40px rgba(127, 29, 29, 0.11);
  backdrop-filter: blur(18px);
}

.nav-shell {
  max-width: 1240px;
  min-height: 78px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  font-size: 22px;
  background: linear-gradient(135deg, var(--red-600), var(--red-800));
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.32);
}

.brand-text strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: transparent;
  background: linear-gradient(90deg, var(--red-600), var(--red-800));
  -webkit-background-clip: text;
  background-clip: text;
}

.brand-text small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

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

.main-nav > a,
.nav-drop > a {
  position: relative;
  font-weight: 700;
  color: #374151;
  padding: 28px 0;
}

.main-nav > a::after,
.nav-drop > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 20px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red-600), var(--red-800));
  transition: width 0.24s ease;
}

.main-nav > a:hover,
.nav-drop:hover > a {
  color: var(--red-700);
}

.main-nav > a:hover::after,
.nav-drop:hover > a::after {
  width: 100%;
}

.nav-drop {
  position: relative;
}

.drop-menu {
  position: absolute;
  left: -18px;
  top: 74px;
  width: 210px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: 0.2s ease;
}

.nav-drop:hover .drop-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.drop-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #4b5563;
  font-size: 14px;
}

.drop-menu a:hover {
  color: var(--red-700);
  background: linear-gradient(90deg, #fff1f2, #fee2e2);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(360px, 30vw);
}

.top-search input,
.page-search input {
  width: 100%;
  border: 1px solid #fecaca;
  border-radius: 999px;
  padding: 11px 16px;
  background: #fff;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.top-search input:focus,
.page-search input:focus {
  border-color: var(--red-500);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.top-search button,
.page-search button {
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--red-600), var(--red-800));
  padding: 11px 18px;
  font-weight: 800;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: var(--red-700);
  background: #fee2e2;
  font-size: 22px;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--red-600), var(--red-800) 56%, #7f1d1d);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background:
    radial-gradient(circle at 16% 20%, rgba(255, 255, 255, 0.45) 0 2px, transparent 3px),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.36) 0 2px, transparent 3px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.13) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.13) 1px, transparent 1px);
  background-size: auto, auto, 64px 64px, 64px 64px;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 150px;
  background: linear-gradient(0deg, #fff7f7, transparent);
}

.hero-glow {
  position: absolute;
  width: 540px;
  height: 540px;
  right: 10%;
  top: 12%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  filter: blur(40px);
}

.hero-slide {
  position: absolute;
  inset: 0;
  max-width: 1240px;
  margin: 0 auto;
  padding: 76px 22px 110px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: 48px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease, visibility 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.hero h1,
.hero h2 {
  margin: 0 0 22px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 760px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(18px, 2.2vw, 25px);
}

.hero-tags,
.detail-meta,
.movie-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-tags span,
.detail-meta span,
.tag-row span {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 800;
}

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

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

.primary-btn,
.ghost-btn,
.ghost-dark-btn,
.small-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: var(--red-700);
  background: #fff;
  padding: 14px 26px;
  box-shadow: 0 18px 35px rgba(127, 29, 29, 0.26);
}

.primary-btn:hover,
.ghost-btn:hover,
.ghost-dark-btn:hover,
.small-btn:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  color: #fff;
  padding: 12px 22px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.14);
}

.ghost-dark-btn {
  color: var(--red-700);
  padding: 12px 22px;
  border: 2px solid #fecaca;
  background: #fff5f5;
}

.hero-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border: 10px solid rgba(255, 255, 255, 0.22);
  border-radius: 34px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
  box-shadow: 0 36px 90px rgba(39, 12, 12, 0.45);
  transform: rotate(2deg);
}

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

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

.hero-dots button {
  width: 46px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.hero-dots button span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

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

.section-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 22px;
}

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

.section-head span,
.side-panel > span,
.page-hero > span {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--red-700);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.section-head h2,
.side-panel h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
}

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

.section-head.light span,
.section-head.light a,
.section-head.light h2 {
  color: #fff;
}

.section-head.compact {
  align-items: center;
}

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

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

.category-card {
  min-height: 210px;
  padding: 22px;
  border: 1px solid #fee2e2;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 18px 52px rgba(127, 29, 29, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.category-card-head span {
  font-size: 22px;
  font-weight: 900;
  color: var(--red-800);
}

.category-card-head strong {
  color: #fff;
  border-radius: 999px;
  padding: 6px 11px;
  background: linear-gradient(135deg, var(--red-600), var(--red-800));
  font-size: 12px;
}

.category-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.category-samples {
  display: grid;
  gap: 6px;
}

.category-samples a {
  color: #4b5563;
  font-size: 14px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.category-samples a:hover {
  color: var(--red-700);
}

.featured-panel {
  max-width: none;
  padding-left: max(22px, calc((100vw - 1240px) / 2 + 22px));
  padding-right: max(22px, calc((100vw - 1240px) / 2 + 22px));
  background: linear-gradient(135deg, #b91c1c, #7f1d1d);
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #fee2e2;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 45px rgba(127, 29, 29, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-thumb {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #fee2e2, #fff7ed);
}

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

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

.movie-score {
  position: absolute;
  right: 10px;
  top: 10px;
  color: #fff;
  border-radius: 999px;
  padding: 5px 9px;
  background: linear-gradient(135deg, var(--gold), var(--orange-500));
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.movie-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px;
}

.movie-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.movie-meta span + span::before {
  content: "·";
  margin-right: 8px;
  color: #cbd5e1;
}

.movie-card h3 {
  margin: 10px 0 8px;
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

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

.movie-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  margin-top: auto;
}

.tag-row span {
  color: var(--red-700);
  background: #fff1f2;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 34px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 84px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid #fee2e2;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(127, 29, 29, 0.07);
}

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

.rank-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
  background: #fee2e2;
}

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

.rank-info h3 {
  margin: 0 0 5px;
  font-size: 18px;
  font-weight: 900;
}

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

.rank-info p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
}

.small-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--red-600), var(--red-800));
  padding: 9px 15px;
  font-size: 13px;
}

.side-panel {
  align-self: start;
  position: sticky;
  top: 110px;
  border-radius: 28px;
  padding: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

.side-grid .movie-card p,
.side-grid .tag-row,
.side-grid .movie-meta {
  display: none;
}

.side-grid .movie-card h3 {
  margin-bottom: 0;
  font-size: 14px;
}

.page-hero {
  max-width: 1240px;
  margin: 34px auto 0;
  padding: 72px 22px 56px;
}

.simple-hero,
.category-hero,
.search-hero {
  max-width: none;
  margin: 0;
  padding-left: max(22px, calc((100vw - 1240px) / 2 + 22px));
  padding-right: max(22px, calc((100vw - 1240px) / 2 + 22px));
  color: #fff;
  background: linear-gradient(135deg, var(--red-600), var(--red-800));
}

.page-hero h1 {
  max-width: 900px;
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
}

.page-hero > span {
  color: rgba(255, 255, 255, 0.82);
}

.page-search {
  display: flex;
  max-width: 620px;
  gap: 10px;
  margin-top: 28px;
}

.result-line {
  min-height: 24px;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 800;
}

.detail-hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 22px;
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(135deg, #fee2e2, #fff7ed);
  box-shadow: var(--shadow);
}

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

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

.crumbs a:hover {
  color: var(--red-700);
}

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.lead {
  max-width: 800px;
  margin: 0 0 22px;
  color: #4b5563;
  font-size: 20px;
}

.detail-meta span {
  color: #374151;
  background: #fff;
  box-shadow: 0 8px 22px rgba(127, 29, 29, 0.08);
}

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

.watch-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px 36px;
}

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

.player-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0f172a;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  gap: 10px;
  border: 0;
  color: #fff;
  text-align: center;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.78));
}

.player-cover strong {
  font-size: clamp(22px, 4vw, 42px);
}

.player-cover small {
  font-size: 16px;
  opacity: 0.88;
}

.play-symbol {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  margin: 0 auto 4px;
  border-radius: 50%;
  color: var(--red-700);
  background: #fff;
  font-size: 34px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
}

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

.narrow {
  max-width: 980px;
}

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

.content-card {
  border: 1px solid #fee2e2;
  border-radius: 26px;
  padding: 26px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(127, 29, 29, 0.08);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.content-card p {
  margin: 0;
  color: #374151;
  font-size: 18px;
}

.info-table dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px 18px;
  margin: 0;
}

.info-table dt {
  color: var(--muted);
  font-weight: 900;
}

.info-table dd {
  margin: 0;
}

.site-footer {
  margin-top: 30px;
  color: #fff;
  background: linear-gradient(135deg, #111827, #7f1d1d);
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 42px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.footer-logo {
  font-size: 24px;
  font-weight: 900;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-inner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
}

[hidden],
.is-hidden {
  display: none !important;
}

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

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

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

  .two-col {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .nav-shell {
    min-height: 72px;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .main-nav {
    display: none;
    width: 100%;
    margin: 0;
    padding: 0 0 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

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

  .main-nav > a,
  .nav-drop > a {
    padding: 12px 0;
  }

  .drop-menu {
    position: static;
    width: 100%;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: #fff7f7;
  }

  .hero {
    min-height: 780px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 46px;
  }

  .hero-poster {
    max-width: 280px;
    margin: 0 auto;
  }

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

  .rank-row {
    grid-template-columns: 44px 68px minmax(0, 1fr);
  }

  .rank-row .small-btn {
    grid-column: 2 / -1;
    justify-self: start;
  }

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

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

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .brand-text strong {
    font-size: 20px;
  }

  .section-shell,
  .page-hero,
  .watch-section,
  .detail-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-slide {
    padding-left: 16px;
    padding-right: 16px;
  }

  .category-grid,
  .category-grid.large,
  .movie-grid,
  .catalog-grid,
  .side-grid {
    grid-template-columns: 1fr;
  }

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

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

  .rank-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .rank-poster {
    display: none;
  }

  .rank-info,
  .rank-row .small-btn {
    grid-column: 2;
  }

  .info-table dl {
    grid-template-columns: 1fr;
  }
}
