:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: #1e293b;
  --panel-strong: #243145;
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --red: #ef4444;
  --red-dark: #b91c1c;
  --orange: #f97316;
  --amber: #f59e0b;
  --blue: #3b82f6;
  --green: #22c55e;
  --purple: #a855f7;
  --radius: 24px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(239, 68, 68, 0.18), transparent 28rem),
    radial-gradient(circle at 90% 12%, rgba(249, 115, 22, 0.12), transparent 24rem),
    linear-gradient(180deg, #0f172a 0%, #111827 38%, #0f172a 100%);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.35);
}

.brand-text {
  display: grid;
  gap: 1px;
}

.brand-text strong,
.footer-brand {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-text em {
  font-style: normal;
  color: var(--subtle);
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #fff;
  background: rgba(239, 68, 68, 0.18);
}

.header-search {
  width: 300px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.72);
}

.header-search input,
.mobile-search input,
.big-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.header-search button,
.mobile-search button,
.big-search button {
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.8);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 4px;
  background: #fff;
}

.mobile-panel {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-panel.open {
  display: grid;
  gap: 10px;
}

.mobile-search {
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.8);
}

.hero-carousel {
  position: relative;
  height: 640px;
  overflow: hidden;
  background: linear-gradient(110deg, #7f1d1d, #991b1b 52%, #9a3412);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.8s ease;
  background-image:
    linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(127, 29, 29, 0.78) 48%, rgba(15, 23, 42, 0.52) 100%),
    var(--hero-img);
  background-size: cover;
  background-position: center;
}

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

.hero-shade {
  position: absolute;
  inset: auto 0 0;
  height: 160px;
  background: linear-gradient(0deg, var(--bg), transparent);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  max-width: 780px;
  padding-top: 56px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #fecaca;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-summary,
.page-hero p,
.intro-strip p,
.detail-content .lead {
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.78;
}

.hero-summary {
  max-width: 720px;
  margin: 24px 0;
}

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

.hero-tags span,
.card-tags span,
.tag-cloud a {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 6px 11px;
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.55);
}

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

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

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 18px 44px rgba(239, 68, 68, 0.32);
}

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

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

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

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

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

.section-wrap {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.section-band {
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.82));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.section-head.simple {
  margin-bottom: 20px;
}

.section-head h2,
.intro-strip h2,
.detail-content h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.08;
}

.section-head a {
  color: #fca5a5;
  font-weight: 800;
}

.intro-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 460px);
  gap: 32px;
  align-items: center;
}

.big-search {
  display: flex;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.72);
  box-shadow: var(--shadow);
}

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

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

.small-gap {
  gap: 16px;
}

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.94));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, border 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(248, 113, 113, 0.52);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
}

.movie-card-link {
  display: grid;
  height: 100%;
}

.poster-wrap {
  position: relative;
  height: 230px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.8), rgba(30, 41, 59, 0.8));
}

.compact-card .poster-wrap {
  height: 170px;
}

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

.movie-card:hover .poster-wrap img {
  transform: scale(1.08);
  filter: saturate(1.12) brightness(0.78);
}

.poster-wrap::after {
  position: absolute;
  inset: 0;
  content: '';
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.74));
}

.card-badge,
.card-year,
.rank-badge,
.poster-play {
  position: absolute;
  z-index: 2;
}

.card-badge {
  top: 14px;
  left: 14px;
  max-width: calc(100% - 100px);
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(220, 38, 38, 0.9);
}

.card-year {
  top: 14px;
  right: 14px;
  padding: 6px 9px;
  border-radius: 10px;
  color: #fff;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.62);
}

.rank-badge {
  left: 14px;
  bottom: 14px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.36);
}

.poster-play {
  right: 16px;
  bottom: 16px;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  opacity: 0;
  background: rgba(239, 68, 68, 0.9);
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translateY(0);
}

.card-body {
  padding: 20px;
}

.card-body h2,
.card-body h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.25;
}

.card-meta,
.card-line {
  margin: 0;
  color: var(--subtle);
  font-size: 14px;
}

.card-line {
  display: -webkit-box;
  min-height: 3.25em;
  margin: 10px 0 14px;
  overflow: hidden;
  line-height: 1.62;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-tags span {
  padding: 4px 8px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(51, 65, 85, 0.82);
}

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

.category-tile,
.category-card > a {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  display: grid;
  align-content: end;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background-image:
    linear-gradient(135deg, rgba(127, 29, 29, 0.86), rgba(249, 115, 22, 0.74)),
    var(--tile-img);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, filter 0.25s ease;
}

.category-card > a {
  min-height: 280px;
}

.category-tile:hover,
.category-card > a:hover {
  transform: translateY(-6px) scale(1.01);
  filter: saturate(1.1);
}

.category-tile span,
.category-name {
  font-size: 26px;
  font-weight: 900;
}

.category-tile strong,
.category-card p {
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  line-height: 1.6;
}

.category-links {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.category-links a {
  color: #fff;
  font-size: 14px;
  opacity: 0.9;
}

.tone-orange {
  --tone-a: rgba(194, 65, 12, 0.88);
  --tone-b: rgba(249, 115, 22, 0.72);
}

.tone-blue {
  --tone-a: rgba(30, 64, 175, 0.88);
  --tone-b: rgba(14, 165, 233, 0.72);
}

.tone-purple {
  --tone-a: rgba(88, 28, 135, 0.88);
  --tone-b: rgba(168, 85, 247, 0.72);
}

.tone-green {
  --tone-a: rgba(20, 83, 45, 0.88);
  --tone-b: rgba(34, 197, 94, 0.72);
}

.tone-cyan {
  --tone-a: rgba(21, 94, 117, 0.88);
  --tone-b: rgba(6, 182, 212, 0.72);
}

.tone-amber {
  --tone-a: rgba(146, 64, 14, 0.88);
  --tone-b: rgba(245, 158, 11, 0.72);
}

.tone-pink {
  --tone-a: rgba(157, 23, 77, 0.88);
  --tone-b: rgba(236, 72, 153, 0.72);
}

.tone-indigo {
  --tone-a: rgba(49, 46, 129, 0.88);
  --tone-b: rgba(99, 102, 241, 0.72);
}

.tone-red {
  --tone-a: rgba(127, 29, 29, 0.88);
  --tone-b: rgba(239, 68, 68, 0.72);
}

.category-tile,
.category-card > a,
.category-hero {
  background-image:
    linear-gradient(135deg, var(--tone-a, rgba(127, 29, 29, 0.88)), var(--tone-b, rgba(249, 115, 22, 0.72))),
    var(--tile-img);
}

.two-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 24px;
}

.panel-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  background: rgba(30, 41, 59, 0.6);
  box-shadow: var(--shadow);
}

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

.rank-item a {
  display: grid;
  grid-template-columns: auto 72px minmax(0, 1fr) minmax(140px, 0.35fr);
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.rank-item a:hover {
  transform: translateX(4px);
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(30, 41, 59, 0.9);
}

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

.rank-item img {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(51, 65, 85, 0.9);
}

.rank-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rank-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-main em,
.rank-main small,
.rank-tags {
  color: var(--subtle);
  font-style: normal;
  font-size: 13px;
}

.rank-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-tags {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

.page-hero {
  width: min(1280px, calc(100% - 32px));
  min-height: 320px;
  display: grid;
  align-items: center;
  margin: 0 auto;
  padding: 80px 0 48px;
}

.page-hero > div {
  max-width: 820px;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 42px;
  background:
    linear-gradient(135deg, rgba(127, 29, 29, 0.68), rgba(15, 23, 42, 0.78)),
    rgba(30, 41, 59, 0.76);
  box-shadow: var(--shadow);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 16px;
  background: rgba(30, 41, 59, 0.62);
}

.filter-panel label {
  display: grid;
  gap: 8px;
}

.filter-panel span {
  color: var(--subtle);
  font-size: 13px;
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  padding: 0 14px;
  background: rgba(15, 23, 42, 0.8);
}

.filter-panel select option {
  color: #111827;
}

.breadcrumb {
  width: min(1280px, calc(100% - 32px));
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px auto 0;
  color: var(--subtle);
}

.breadcrumb a {
  color: #fca5a5;
}

.detail-layout {
  width: min(1280px, calc(100% - 32px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  margin: 28px auto 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(248, 113, 113, 0.32);
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  text-align: center;
  background: radial-gradient(circle at center, rgba(127, 29, 29, 0.72), rgba(2, 6, 23, 0.90));
}

.player-overlay.hidden {
  display: none;
}

.play-circle {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  padding-left: 6px;
  color: #fff;
  font-size: 36px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 18px 50px rgba(239, 68, 68, 0.36);
}

.player-overlay strong {
  font-size: clamp(24px, 4vw, 40px);
}

.player-overlay em {
  font-style: normal;
  color: #fecaca;
}

.detail-content,
.detail-side {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  background: rgba(30, 41, 59, 0.66);
  box-shadow: var(--shadow);
}

.detail-content {
  margin-top: 24px;
}

.detail-content h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
}

.detail-content h2 {
  margin-top: 30px;
  margin-bottom: 12px;
  font-size: 28px;
}

.detail-content p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}

.detail-side {
  position: sticky;
  top: 98px;
  align-self: start;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 22px;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.8), rgba(30, 41, 59, 0.8));
}

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

.meta-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.meta-list span {
  color: var(--subtle);
}

.meta-list strong {
  text-align: right;
}

.detail-related {
  padding-top: 54px;
}

.site-footer {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.38);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  margin: 0 auto;
  padding: 28px 0;
  color: var(--subtle);
}

.footer-brand {
  color: #fff;
  font-weight: 900;
}

.footer-inner p {
  margin: 0;
}

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

.footer-inner nav a {
  color: #fca5a5;
}

@media (max-width: 1180px) {
  .movie-grid,
  .compact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .header-search {
    display: none;
  }
}

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

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

  .hero-carousel {
    height: 620px;
  }

  .intro-strip,
  .two-columns,
  .detail-layout,
  .filter-panel,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }

  .rank-item a {
    grid-template-columns: auto 64px minmax(0, 1fr);
  }

  .rank-tags {
    grid-column: 2 / -1;
    text-align: left;
  }
}

@media (max-width: 700px) {
  .header-inner {
    width: min(100% - 24px, 1280px);
    gap: 12px;
  }

  .brand-text em {
    display: none;
  }

  .hero-content,
  .section-wrap,
  .page-hero,
  .detail-layout,
  .breadcrumb,
  .footer-inner {
    width: min(100% - 24px, 1280px);
  }

  .hero-content {
    padding-top: 28px;
  }

  .hero-actions,
  .big-search,
  .mobile-search {
    align-items: stretch;
    flex-direction: column;
    border-radius: 22px;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

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

  .poster-wrap,
  .compact-card .poster-wrap {
    height: 240px;
  }

  .page-hero > div,
  .detail-content,
  .detail-side,
  .panel-card {
    padding: 22px;
    border-radius: 22px;
  }

  .section-wrap {
    padding: 46px 0;
  }
}
