:root {
  --red-950: #3b0808;
  --red-900: #641111;
  --red-800: #8a1616;
  --red-700: #b91c1c;
  --amber-700: #b45309;
  --amber-500: #f59e0b;
  --amber-300: #fcd34d;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f9fafb;
  --line: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(43, 16, 16, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #fffaf2 0%, #ffffff 26%, #fff 100%);
  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 {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

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

.container.narrow {
  width: min(880px, calc(100% - 32px));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: #fff;
  background: linear-gradient(90deg, var(--red-900), var(--red-700) 52%, var(--amber-700));
  box-shadow: 0 12px 28px rgba(65, 14, 14, 0.22);
}

.header-inner {
  width: min(1200px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--red-900);
  font-size: 26px;
  font-weight: 900;
  background: linear-gradient(135deg, #fcd34d, #f59e0b);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease;
}

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

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

.brand-text strong {
  font-size: 23px;
  letter-spacing: 0.08em;
}

.brand-text small {
  color: #fde68a;
  font-size: 12px;
}

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

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fde68a;
  transform: translateY(-1px);
}

.header-search,
.mobile-search,
.hero-search {
  display: flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.header-search input,
.mobile-search input,
.hero-search input,
.page-filter {
  min-width: 0;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
}

.header-search input {
  width: 190px;
  color: #fff;
  padding: 10px 12px;
}

.header-search input::placeholder,
.mobile-search input::placeholder,
.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.header-search button,
.mobile-search button,
.hero-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: var(--red-900);
  font-weight: 900;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #fff;
  font-size: 28px;
  background: transparent;
}

.mobile-panel {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-links {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.mobile-links a {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
}

.home-hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  color: #fff;
  background: var(--red-950);
}

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

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(22px) saturate(1.15);
  transform: scale(1.08);
  opacity: 0.42;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 32%, rgba(245, 158, 11, 0.38), transparent 34%),
    linear-gradient(90deg, rgba(39, 8, 8, 0.94), rgba(92, 18, 18, 0.8) 52%, rgba(20, 10, 6, 0.64));
}

.hero-content {
  position: relative;
  min-height: 570px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center;
  gap: 56px;
  padding: 64px 0 120px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #fcd34d;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-summary {
  max-width: 720px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

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

.hero-tags span,
.card-tags span,
.detail-tags a {
  border-radius: 999px;
  padding: 6px 10px;
  color: #7f1d1d;
  font-size: 12px;
  font-weight: 900;
  background: #fde68a;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
  color: var(--red-900);
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 14px 26px rgba(245, 158, 11, 0.32);
}

.btn.ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.13);
}

.btn.text {
  color: #fde68a;
}

.hero-poster {
  border-radius: 32px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 310px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: center;
}

.hero-thumbs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.hero-thumb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-thumb.active,
.hero-thumb:hover {
  background: rgba(245, 158, 11, 0.38);
  transform: translateY(-2px);
}

.hero-thumb img {
  width: 42px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 10px;
  object-fit: cover;
}

.hero-thumb span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
}

.hero-search {
  color: #fff;
}

.hero-search input {
  width: 100%;
  padding: 13px 16px;
}

.section {
  padding: 64px 0;
}

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

.section-heading h2,
.rank-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-heading a,
.rank-head a,
.category-card-large span {
  color: var(--red-700);
  font-weight: 900;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 172px;
  border-radius: 26px;
  padding: 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--red-800), var(--amber-700));
  box-shadow: var(--shadow);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: auto -20px -45px auto;
  width: 170px;
  height: 170px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.category-tile span,
.category-tile strong {
  position: relative;
  z-index: 1;
  display: block;
}

.category-tile span {
  color: #fde68a;
  font-weight: 900;
}

.category-tile strong {
  margin-top: 8px;
  font-size: 20px;
}

.category-tile div {
  position: absolute;
  right: 16px;
  bottom: 14px;
  display: flex;
  direction: rtl;
}

.category-tile img {
  width: 54px;
  height: 76px;
  margin-right: -16px;
  border: 3px solid rgba(255, 255, 255, 0.62);
  border-radius: 14px;
  object-fit: cover;
}

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

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

.movie-card,
.ranking-card,
.content-card,
.player-card,
.rank-panel,
.category-card-large {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.movie-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px rgba(43, 16, 16, 0.18);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #7f1d1d, #f59e0b);
}

.poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster em {
  position: absolute;
  right: 10px;
  top: 10px;
  border-radius: 999px;
  padding: 4px 9px;
  color: #fff;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  background: rgba(127, 29, 29, 0.86);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 10px 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.card-body p {
  min-height: 50px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: #991b1b;
  font-size: 13px;
  font-weight: 800;
}

.rank-panel {
  padding: 20px;
}

.sticky-side {
  position: sticky;
  top: 100px;
}

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

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

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

.rank-num {
  color: var(--red-700);
  font-size: 20px;
  font-weight: 900;
}

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

.rank-info strong,
.rank-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info small {
  color: var(--muted);
  font-size: 12px;
}

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

.movie-card-wide {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
}

.movie-card-wide .poster img {
  height: 100%;
}

.page-hero {
  color: #fff;
  background:
    radial-gradient(circle at 72% 26%, rgba(245, 158, 11, 0.28), transparent 30%),
    linear-gradient(135deg, var(--red-950), var(--red-700) 62%, var(--amber-700));
}

.page-hero .container {
  padding: 84px 0;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
}

.page-hero p:last-child {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

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

.category-card-large a {
  display: grid;
  gap: 12px;
  padding: 22px;
}

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

.category-posters img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  object-fit: cover;
}

.category-card-large h2 {
  margin: 0;
  font-size: 28px;
}

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

.toolbar {
  position: sticky;
  top: 76px;
  z-index: 10;
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
  border: 1px solid rgba(229, 231, 235, 0.86);
  border-radius: 24px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 36px rgba(43, 16, 16, 0.09);
  backdrop-filter: blur(16px);
}

.page-filter {
  width: 100%;
  border-radius: 999px;
  padding: 12px 16px;
  color: var(--ink);
  background: #f3f4f6;
}

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

.filter-buttons button {
  border: 0;
  border-radius: 999px;
  padding: 8px 13px;
  color: #7f1d1d;
  font-weight: 900;
  background: #ffedd5;
  cursor: pointer;
}

.filter-buttons button.active,
.filter-buttons button:hover {
  color: #fff;
  background: var(--red-700);
}

.ranking-grid {
  display: grid;
  gap: 14px;
}

.ranking-link {
  display: grid;
  grid-template-columns: 56px 84px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 14px;
}

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

.ranking-link img {
  width: 84px;
  height: 112px;
  border-radius: 16px;
  object-fit: cover;
}

.ranking-copy {
  display: grid;
  gap: 5px;
}

.ranking-copy strong {
  font-size: 20px;
}

.ranking-copy small,
.ranking-copy span {
  color: var(--muted);
}

.ranking-copy em {
  color: var(--red-700);
  font-style: normal;
  font-weight: 900;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--red-950);
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--detail-image);
  background-size: cover;
  background-position: center;
  filter: blur(24px) saturate(1.08);
  transform: scale(1.08);
  opacity: 0.35;
}

.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(35, 5, 5, 0.96), rgba(88, 16, 16, 0.82) 58%, rgba(69, 29, 5, 0.76));
}

.detail-head {
  position: relative;
  padding: 36px 0 58px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

.breadcrumbs a {
  color: #fde68a;
}

.detail-top {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-cover {
  width: 260px;
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  object-fit: cover;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
}

.detail-info p {
  max-width: 800px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

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

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

.video-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #111;
}

.video-wrap video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.62));
  cursor: pointer;
}

.play-cover span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 5px;
  color: var(--red-900);
  font-size: 34px;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

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

.content-card {
  padding: 24px;
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

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

.meta-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.meta-card div {
  border-radius: 18px;
  padding: 12px 14px;
  background: #fff7ed;
}

.meta-card dt {
  color: var(--muted);
  font-size: 13px;
}

.meta-card dd {
  margin: 2px 0 0;
  font-weight: 900;
}

.side-related {
  display: grid;
  gap: 14px;
}

.side-related .movie-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  box-shadow: none;
}

.side-related .poster img {
  height: 100%;
}

.side-related .card-body {
  padding: 12px;
}

.side-related .card-body p {
  display: none;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 30px;
  padding: 44px 0 26px;
}

.footer-logo {
  display: inline-block;
  margin-bottom: 8px;
  color: #f59e0b;
  font-size: 24px;
  font-weight: 900;
}

.footer-inner p,
.copyright {
  margin: 0;
  color: #9ca3af;
}

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

.footer-links a {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.06);
}

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

.copyright {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 0 30px;
  text-align: center;
}

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

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

  .mobile-toggle {
    display: block;
  }

  .site-header.open .mobile-panel {
    display: block;
  }

  .home-hero {
    min-height: 760px;
  }

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

  .hero-controls {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    padding-bottom: 24px;
  }

  .hero-content {
    min-height: auto;
    padding: 44px 0 28px;
  }

  .hero-poster {
    width: 240px;
  }

  .hero-poster img {
    width: 220px;
  }

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

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

  .sticky-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .container,
  .container.narrow,
  .header-inner,
  .footer-inner,
  .copyright,
  .mobile-panel {
    width: min(100% - 24px, 1200px);
  }

  .brand {
    min-width: 0;
  }

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

  .home-hero {
    min-height: 820px;
  }

  .hero-content {
    gap: 26px;
  }

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

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

  .hero-search {
    display: grid;
    border-radius: 24px;
  }

  .hero-search button {
    width: 100%;
  }

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

  .movie-card-wide,
  .ranking-link,
  .detail-top,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    width: min(260px, 100%);
  }

  .meta-card dl {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .category-grid,
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 42px 0;
  }
}
