:root {
  --red-900: #7f1d1d;
  --red-800: #991b1b;
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --red-500: #ef4444;
  --orange-500: #f97316;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --shadow-soft: 0 18px 50px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 10px 30px rgba(15, 23, 42, 0.10);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--slate-900);
  background: linear-gradient(180deg, var(--slate-50), var(--slate-100));
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--red-900), var(--red-700));
  box-shadow: 0 12px 30px rgba(127, 29, 29, 0.25);
}

.nav-shell {
  max-width: var(--max-width);
  height: 66px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--red-800);
  background: var(--white);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.brand-text {
  font-size: 20px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link,
.mobile-link {
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
  font-weight: 650;
  padding: 10px 14px;
  border-radius: 12px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: var(--white);
}

.mobile-menu {
  display: none;
  padding: 8px 18px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-menu.open {
  display: grid;
  gap: 8px;
}

.hero-slider {
  position: relative;
  min-height: 590px;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, rgba(239, 68, 68, 0.42), transparent 32%), linear-gradient(120deg, #111827, #020617);
}

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

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

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transform: scale(1.04);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.74) 48%, rgba(15, 23, 42, 0.18)), linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 108px 22px 145px;
  color: var(--white);
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--red-600);
  box-shadow: 0 14px 30px rgba(220, 38, 38, 0.36);
  font-size: 14px;
  font-weight: 800;
}

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

.hero-content p {
  max-width: 720px;
  margin: 0 0 24px;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.82);
}

.hero-meta,
.hero-tags,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hero-meta span,
.hero-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 650;
}

.hero-tags {
  margin-top: 14px;
}

.hero-actions {
  margin-top: 30px;
}

.primary-button,
.ghost-button,
.filter-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 13px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: var(--white);
  background: linear-gradient(135deg, var(--red-600), var(--red-700));
  box-shadow: 0 14px 34px rgba(220, 38, 38, 0.34);
}

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

.primary-button.full {
  width: 100%;
}

.ghost-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(14px);
  font-size: 38px;
  line-height: 1;
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dot.active {
  width: 34px;
  background: var(--red-500);
}

.hero-search {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 82px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(220px, 420px) 96px;
  width: min(620px, calc(100% - 44px));
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.hero-search input,
.hero-search button,
.filter-bar input,
.filter-bar select {
  border: 0;
  outline: 0;
  border-radius: 12px;
}

.hero-search input {
  min-width: 0;
  padding: 0 16px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.10);
}

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

.hero-search button {
  color: var(--white);
  background: var(--red-600);
  font-weight: 800;
}

.category-strip {
  background: var(--white);
  box-shadow: 0 1px 0 rgba(148, 163, 184, 0.25);
}

.category-strip-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 22px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
}

.category-strip a {
  flex: 0 0 auto;
  padding: 10px 15px;
  border-radius: 999px;
  background: var(--slate-100);
  color: var(--slate-700);
  font-weight: 750;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.category-strip a:hover {
  color: var(--red-700);
  background: #fee2e2;
  transform: translateY(-1px);
}

.page-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 44px 22px;
}

.page-shell.narrow {
  max-width: 900px;
}

.content-section {
  margin-bottom: 54px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--slate-600);
  line-height: 1.7;
}

.section-more {
  flex: 0 0 auto;
  color: var(--red-700);
  font-weight: 800;
}

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

.movie-card {
  min-width: 0;
}

.poster-link {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.poster-link:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgba(239, 68, 68, 0.38), transparent 34%), linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

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

.poster-link:hover .poster-wrap img {
  transform: scale(1.08);
}

.poster-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent);
}

.poster-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(220, 38, 38, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.movie-info {
  display: grid;
  gap: 5px;
  padding: 13px;
}

.movie-info strong {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  color: var(--slate-900);
  font-size: 15px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-info span,
.movie-info em {
  overflow: hidden;
  color: var(--slate-500);
  font-style: normal;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-info em {
  color: var(--red-700);
  font-weight: 700;
}

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

.rank-row {
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.rank-link {
  display: grid;
  grid-template-columns: 64px 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-600), var(--orange-500));
  font-weight: 900;
}

.rank-cover {
  width: 64px;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

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

.rank-content {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.rank-content strong {
  font-size: 18px;
  color: var(--slate-900);
}

.rank-content span {
  overflow: hidden;
  color: var(--slate-600);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-content em {
  color: var(--slate-500);
  font-style: normal;
  font-size: 13px;
}

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

.small-rank .rank-link {
  grid-template-columns: 54px minmax(0, 1fr) auto;
}

.small-rank .rank-cover {
  display: none;
}

.page-hero {
  color: var(--white);
  padding: 58px 0;
}

.red-hero {
  background: radial-gradient(circle at 80% 0%, rgba(251, 146, 60, 0.32), transparent 30%), linear-gradient(90deg, var(--red-800), var(--red-600));
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.04em;
}

.page-hero p {
  margin: 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.detail-main .breadcrumb {
  color: var(--slate-500);
}

.breadcrumb a:hover {
  color: var(--white);
}

.detail-main .breadcrumb a:hover {
  color: var(--red-700);
}

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

.category-card-large {
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.category-main-link {
  display: grid;
  gap: 10px;
  padding: 24px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-700), var(--red-900));
}

.category-main-link span {
  font-size: 24px;
  font-weight: 900;
}

.category-main-link strong {
  color: rgba(255, 255, 255, 0.84);
  font-size: 15px;
  line-height: 1.7;
}

.category-mini-links {
  padding: 18px 24px 24px;
  display: grid;
  gap: 10px;
}

.category-mini-links a {
  color: var(--slate-700);
  font-weight: 700;
}

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

.filter-bar {
  position: sticky;
  top: 78px;
  z-index: 20;
  margin-bottom: 28px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 190px;
  gap: 12px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
}

.library-filter {
  grid-template-columns: minmax(220px, 1fr) 160px 150px 190px;
}

.filter-bar input,
.filter-bar select {
  min-height: 44px;
  padding: 0 14px;
  color: var(--slate-700);
  background: var(--slate-100);
}

.empty-state {
  padding: 44px;
  text-align: center;
  color: var(--slate-500);
  border-radius: var(--radius-lg);
  background: var(--white);
}

.player-section {
  background: #000000;
}

.player-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 22px;
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000000;
}

.player-frame video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, rgba(220, 38, 38, 0.32), transparent 32%), #000000;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.play-circle {
  position: relative;
  z-index: 2;
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-600), var(--red-800));
  box-shadow: 0 20px 50px rgba(220, 38, 38, 0.38);
  font-size: 34px;
  padding-left: 5px;
}

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

.detail-main h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.detail-meta span,
.detail-meta a {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--slate-700);
  background: var(--white);
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.06);
  font-size: 14px;
  font-weight: 750;
}

.detail-meta a {
  color: var(--red-700);
  background: #fee2e2;
}

.detail-card,
.side-card {
  margin-bottom: 20px;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.intro-card {
  background: linear-gradient(135deg, #fff1f2, #ffedd5);
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.detail-card p {
  margin: 0;
  color: var(--slate-700);
  line-height: 1.9;
  font-size: 16px;
}

.intro-card p {
  font-size: 19px;
  font-weight: 650;
  color: var(--slate-800);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-cloud a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--slate-700);
  background: var(--slate-100);
  font-size: 14px;
  font-weight: 700;
}

.tag-cloud a:hover {
  color: var(--red-700);
  background: #fee2e2;
}

.detail-side {
  position: sticky;
  top: 88px;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

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

.compact-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.compact-poster {
  width: 72px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

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

.compact-card strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--slate-900);
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.compact-card em {
  display: block;
  margin-top: 7px;
  color: var(--slate-500);
  font-style: normal;
  font-size: 13px;
}

.site-footer {
  color: rgba(255, 255, 255, 0.86);
  background: linear-gradient(135deg, var(--slate-950), var(--slate-900));
}

.footer-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 34px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
}

.footer-brand {
  margin-bottom: 10px;
  font-size: 20px;
}

.footer-shell p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.8;
}

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

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

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

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

  .detail-side {
    position: static;
  }
}

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

  .mobile-toggle {
    display: inline-flex;
  }

  .hero-slider {
    min-height: 620px;
  }

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

  .hero-arrow {
    display: none;
  }

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

  .filter-bar,
  .library-filter {
    position: static;
    grid-template-columns: 1fr 1fr;
  }

  .category-grid-large {
    grid-template-columns: 1fr;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .nav-shell {
    padding: 0 16px;
  }

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

  .hero-content {
    padding: 76px 18px 180px;
  }

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

  .hero-search {
    grid-template-columns: 1fr;
    bottom: 78px;
  }

  .hero-search input,
  .hero-search button {
    min-height: 44px;
  }

  .hero-dots {
    bottom: 32px;
  }

  .page-shell {
    padding: 32px 16px;
  }

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

  .section-head {
    display: grid;
    align-items: start;
  }

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

  .rank-score {
    display: none;
  }

  .rank-content span {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .filter-bar,
  .library-filter {
    grid-template-columns: 1fr;
  }

  .player-shell {
    padding: 0;
  }

  .play-circle {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }

  .detail-card,
  .side-card {
    padding: 20px;
  }
}
