:root {
  --red: #dc2626;
  --red-dark: #b91c1c;
  --red-soft: #fee2e2;
  --bg: #f9fafb;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --panel: #ffffff;
  --dark: #111827;
  --radius: 14px;
  --shadow: 0 14px 36px rgba(15, 23, 42, 0.10);
}

* {
  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(--text);
  background: var(--bg);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: var(--red);
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.28);
}

.brand-text strong,
.footer-brand {
  display: block;
  color: var(--text);
  font-size: 20px;
  line-height: 1.1;
  font-weight: 800;
}

.brand-text em {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.desktop-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.desktop-nav > a,
.nav-dropdown > button {
  color: #374151;
  font-weight: 650;
  background: transparent;
  border: 0;
  padding: 8px 0;
  cursor: pointer;
}

.desktop-nav > a:hover,
.desktop-nav > a.active,
.nav-dropdown > button:hover {
  color: var(--red);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  width: 330px;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  transform: translateX(-50%) translateY(8px);
  opacity: 0;
  pointer-events: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-link {
  padding: 9px 10px;
  border-radius: 10px;
  color: #374151;
  font-size: 14px;
}

.nav-dropdown-link:hover {
  color: var(--red);
  background: #fef2f2;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 260px;
}

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

.header-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.header-search button {
  height: 42px;
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  color: #fff;
  background: var(--red);
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: #fff;
}

.mobile-panel.open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 16px 16px;
}

.mobile-panel a {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f9fafb;
  color: #374151;
  font-weight: 650;
}

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #111827;
}

.hero-track,
.hero-slide,
.hero-bg,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

.hero-shade {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.48) 42%, rgba(0, 0, 0, 0.10) 100%), linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 78px;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.92);
  font-size: 14px;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 20px 0 16px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.03;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy p {
  margin: 0 0 18px;
  color: #e5e7eb;
  font-size: clamp(18px, 2.4vw, 23px);
  max-width: 680px;
}

.hero-tags,
.detail-tags,
.side-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.detail-tags span,
.side-links a {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 13px;
  font-weight: 650;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background: var(--red);
  box-shadow: 0 12px 26px rgba(220, 38, 38, 0.26);
}

.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

.btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(12px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}

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

.hero-dot {
  width: 34px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.hero-dot.active {
  background: #fff;
}

.quick-section,
.content-section {
  padding: 46px 0 0;
}

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

.section-head h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  font-weight: 900;
}

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

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

.category-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.category-chip {
  flex: 0 0 auto;
  padding: 11px 18px;
  border-radius: 999px;
  color: #374151;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  font-weight: 750;
}

.category-chip:hover {
  color: #fff;
  border-color: var(--red);
  background: var(--red);
}

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

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

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

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

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

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fee2e2, #f3f4f6);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.10);
}

.wide-card .poster-wrap {
  aspect-ratio: 16 / 9;
}

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

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

.poster-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  color: #fff;
  opacity: 0;
  transition: 0.25s ease;
}

.poster-mask span {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.movie-card:hover .poster-mask {
  opacity: 1;
  background: rgba(0, 0, 0, 0.34);
}

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.68);
  font-size: 12px;
  font-weight: 800;
}

.movie-card-body {
  padding-top: 12px;
}

.movie-card h2 {
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 850;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.movie-meta,
.movie-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  -webkit-line-clamp: 1;
}

.movie-desc {
  margin-top: 5px;
  -webkit-line-clamp: 2;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 36px;
  align-items: start;
}

.ranking-panel,
.info-box,
.detail-card,
.filter-panel,
.category-card a,
.ranking-table,
.top-rank-card a {
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.ranking-panel {
  position: sticky;
  top: 94px;
  padding: 24px;
}

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

.rank-item a {
  display: grid;
  grid-template-columns: 34px 50px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 12px;
}

.rank-item a:hover {
  background: #f9fafb;
}

.rank-number,
.row-number,
.top-rank-number {
  color: var(--red);
  font-size: 18px;
  font-weight: 900;
}

.rank-item img {
  width: 50px;
  height: 66px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-info {
  min-width: 0;
}

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

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

.page-hero {
  padding: 70px 0;
  color: #fff;
}

.red-hero {
  background: linear-gradient(135deg, #dc2626, #991b1b);
}

.dark-hero,
.player-hero {
  background: radial-gradient(circle at top left, #374151, #030712 65%);
}

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

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

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

.category-card a {
  position: relative;
  display: block;
  min-height: 180px;
  overflow: hidden;
  padding: 24px;
  color: #fff;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.58);
  transition: transform 0.3s ease;
}

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

.category-card span,
.category-card em {
  position: relative;
  z-index: 2;
  display: block;
}

.category-card span {
  margin-bottom: 10px;
  font-size: 26px;
  font-weight: 900;
}

.category-card em {
  max-width: 92%;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  font-style: normal;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 42px 0 0;
}

.pagination a,
.pagination span {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: #374151;
  font-weight: 750;
}

.pagination .current {
  color: #fff;
  border-color: var(--red);
  background: var(--red);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px 160px auto;
  gap: 12px;
  padding: 18px;
  margin-bottom: 28px;
}

.search-empty {
  margin: 34px 0;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border-radius: 16px;
}

.top-rank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

.top-rank-card a {
  position: relative;
  display: grid;
  min-height: 360px;
  overflow: hidden;
  padding: 24px;
  align-content: end;
  color: #fff;
}

.top-rank-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.58);
  transition: transform 0.3s ease;
}

.top-rank-card a:hover img {
  transform: scale(1.06);
}

.top-rank-card strong,
.top-rank-card em,
.top-rank-number {
  position: relative;
  z-index: 2;
}

.top-rank-card strong {
  display: block;
  font-size: 26px;
  font-weight: 900;
}

.top-rank-card em {
  color: rgba(255, 255, 255, 0.88);
  font-style: normal;
}

.ranking-table {
  overflow: hidden;
}

.ranking-row a {
  display: grid;
  grid-template-columns: 64px 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.ranking-row:last-child a {
  border-bottom: 0;
}

.ranking-row a:hover {
  background: #f9fafb;
}

.ranking-row img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
}

.row-main {
  min-width: 0;
}

.row-main strong,
.row-main em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-main em,
.row-meta {
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
}

.player-hero {
  padding: 26px 0 42px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
}

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

.site-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover span {
  width: 88px;
  height: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  font-size: 38px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.35);
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 32px;
  padding-top: 34px;
}

.detail-card {
  padding: clamp(22px, 4vw, 36px);
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  font-weight: 900;
}

.detail-card h2,
.info-box h2,
.simple-page h2 {
  margin: 28px 0 12px;
  font-size: 22px;
  font-weight: 900;
}

.detail-card p {
  margin: 0 0 14px;
  color: #4b5563;
  font-size: 16px;
}

.detail-lead {
  color: #111827 !important;
  font-size: 19px !important;
  font-weight: 700;
}

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

.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--red-dark);
  background: #fef2f2;
  font-size: 13px;
  font-weight: 800;
}

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

.detail-tags span {
  color: #374151;
  background: #f3f4f6;
}

.prev-next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.prev-next a {
  padding: 13px 14px;
  border-radius: 12px;
  background: #f9fafb;
  color: #374151;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prev-next a:hover {
  color: var(--red);
}

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

.info-box {
  padding: 24px;
}

.info-box h2 {
  margin-top: 0;
}

.info-box dl {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px 8px;
  margin: 0;
}

.info-box dt {
  color: var(--muted);
}

.info-box dd {
  margin: 0;
  font-weight: 800;
}

.side-links a {
  color: #374151;
  background: #f3f4f6;
}

.side-links a:hover {
  color: #fff;
  background: var(--red);
}

.simple-page {
  max-width: 900px;
}

.site-footer {
  margin-top: 70px;
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  padding: 46px 0;
}

.footer-brand {
  color: #fff;
  margin-bottom: 12px;
}

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

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

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

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 16px;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

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

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

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

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

  .ranking-panel {
    position: static;
  }

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

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

  .header-inner {
    height: 62px;
  }

  .brand-icon {
    width: 38px;
    height: 38px;
  }

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

  .hero-carousel {
    height: 560px;
  }

  .hero-content {
    padding-bottom: 82px;
  }

  .hero-copy p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hero-actions .btn {
    width: 100%;
  }

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

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

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

  .top-rank-grid,
  .footer-grid,
  .category-grid,
  .prev-next {
    grid-template-columns: 1fr;
  }

  .ranking-row a {
    grid-template-columns: 40px 62px minmax(0, 1fr);
  }

  .row-meta {
    display: none;
  }

  .player-cover span {
    width: 70px;
    height: 70px;
    font-size: 30px;
  }
}
