* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f9fafb;
  color: #111827;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.92);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #111827;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 12px 25px rgba(239, 68, 68, 0.28);
}

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

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

.nav-link,
.mobile-link {
  padding: 9px 14px;
  color: #4b5563;
  border-radius: 999px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #ef4444;
  background: #fee2e2;
}

.nav-search,
.mobile-search,
.page-search,
.search-panel {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

.nav-search input,
.mobile-search input,
.page-search input,
.search-panel input {
  width: 160px;
  border: 0;
  outline: 0;
  padding: 10px 14px;
  color: #111827;
  background: transparent;
}

.nav-search button,
.mobile-search button,
.page-search button,
.search-panel button {
  border: 0;
  padding: 10px 16px;
  color: #ffffff;
  background: #ef4444;
  cursor: pointer;
}

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

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

.mobile-panel {
  display: none;
  padding: 16px;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

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

.mobile-brand {
  margin-bottom: 12px;
  font-weight: 800;
  color: #111827;
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  background: linear-gradient(135deg, #fff7ed 0%, #fff1f2 45%, #f9fafb 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 14% 20%, rgba(239, 68, 68, 0.20), transparent 28%),
    radial-gradient(circle at 76% 18%, rgba(249, 115, 22, 0.22), transparent 26%),
    radial-gradient(circle at 64% 88%, rgba(251, 191, 36, 0.20), transparent 24%);
}

.hero-inner {
  position: relative;
  min-height: 640px;
  padding: 82px 0 54px;
}

.hero-slide {
  display: none;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 54px;
  min-height: 500px;
}

.hero-slide.active {
  display: grid;
  animation: fadeUp 0.5s ease both;
}

.hero-kicker,
.eyebrow {
  margin: 0 0 12px;
  color: #ef4444;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(38px, 7vw, 70px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-desc {
  max-width: 720px;
  margin: 24px 0;
  color: #4b5563;
  font-size: 20px;
}

.hero-tags,
.detail-meta,
.meta-row,
.tag-row,
.detail-tags,
.genre-pills,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.detail-meta span,
.genre-pills span,
.genre-pills a,
.detail-tags a,
.tag-cloud a,
.tag-row a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #ffffff;
  color: #4b5563;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.hero-tags span,
.detail-meta span {
  padding: 8px 13px;
}

.detail-tags a,
.genre-pills span,
.genre-pills a,
.tag-cloud a,
.tag-row a {
  padding: 7px 12px;
  font-size: 14px;
}

.tag-cloud a:hover,
.detail-tags a:hover,
.genre-pills a:hover,
.tag-row a:hover {
  color: #ffffff;
  background: #ef4444;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

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

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

.btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 18px 35px rgba(239, 68, 68, 0.26);
}

.btn.ghost {
  color: #374151;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.btn.text {
  color: #ef4444;
}

.hero-cover {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 16 / 11;
  box-shadow: 0 35px 80px rgba(15, 23, 42, 0.24);
}

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

.hero-cover:hover img {
  transform: scale(1.05);
}

.hero-cover-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(17, 24, 39, 0.18));
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: #fecaca;
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 30px;
  background: #ef4444;
}

.stats-section,
.section {
  padding: 70px 0;
}

.stats-section {
  background: #ffffff;
}

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

.stat-card {
  padding: 28px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.07);
}

.stat-card strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.stat-card span {
  display: block;
  margin-top: 8px;
  color: #6b7280;
  font-weight: 700;
}

.stat-card.red {
  background: linear-gradient(135deg, #fff1f2, #ffedd5);
  color: #ef4444;
}

.stat-card.orange {
  background: linear-gradient(135deg, #ffedd5, #fef3c7);
  color: #f97316;
}

.stat-card.yellow {
  background: linear-gradient(135deg, #fef3c7, #ecfccb);
  color: #ca8a04;
}

.stat-card.green {
  background: linear-gradient(135deg, #ecfccb, #ccfbf1);
  color: #16a34a;
}

.section.alt {
  background: #f3f4f6;
}

.section.warm {
  background: linear-gradient(135deg, #fff7ed, #fff1f2);
}

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

.section-heading h2,
.tags-panel h2,
.player-card h2,
.article-card h2,
.side-card h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ef4444;
  font-weight: 800;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.82);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(239, 68, 68, 0.26);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.12);
}

.poster-link,
.list-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #fee2e2, #ffedd5);
}

.poster-link {
  aspect-ratio: 16 / 10;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(17, 24, 39, 0.74));
  opacity: 0;
  transition: opacity 0.22s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.poster-category,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.poster-category {
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  background: #ef4444;
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 10px 25px rgba(239, 68, 68, 0.28);
}

.card-body,
.list-info {
  padding: 17px;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  min-height: 52px;
  color: #111827;
  font-size: 17px;
  line-height: 1.5;
  font-weight: 800;
}

.list-card .card-title {
  min-height: 0;
  -webkit-line-clamp: 1;
  font-size: 19px;
}

.card-title:hover {
  color: #ef4444;
}

.card-body p,
.list-info p,
.catalog-copy span,
.page-hero p,
.article-card p,
.side-card dd,
.site-footer p {
  color: #6b7280;
}

.card-body p,
.list-info p {
  display: -webkit-box;
  overflow: hidden;
  margin: 10px 0 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.meta-row {
  color: #6b7280;
  font-size: 13px;
}

.meta-row span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3f4f6;
}

.list-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
}

.list-poster {
  min-height: 150px;
}

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

.category-tile,
.catalog-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  min-height: 180px;
  background: #111827;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

.category-tile img,
.catalog-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-tile span,
.catalog-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.08), rgba(17, 24, 39, 0.82));
}

.category-tile strong,
.category-tile em {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 2;
}

.category-tile strong {
  bottom: 58px;
  color: #ffffff;
  font-size: 20px;
  font-style: normal;
  font-weight: 900;
}

.category-tile em {
  bottom: 20px;
  color: #e5e7eb;
  font-size: 13px;
  font-style: normal;
}

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

.catalog-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  min-height: 220px;
  background: #ffffff;
}

.catalog-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.catalog-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 247, 237, 0.92));
}

.catalog-copy p {
  margin: 0 0 8px;
  color: #ef4444;
  font-weight: 800;
}

.catalog-copy h2 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 28px;
}

.page-hero {
  padding: 74px 0;
  background:
    radial-gradient(circle at 16% 18%, rgba(239, 68, 68, 0.16), transparent 28%),
    linear-gradient(135deg, #fff7ed, #f9fafb);
}

.page-hero.compact {
  padding: 66px 0;
}

.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
}

.page-search input {
  width: 260px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-bar button {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  color: #4b5563;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  cursor: pointer;
}

.filter-bar button.active,
.filter-bar button:hover {
  color: #ffffff;
  background: #ef4444;
}

.inline-search {
  margin-bottom: 22px;
}

.inline-search input {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 14px 18px;
  background: #ffffff;
  outline: 0;
}

.sticky-filter {
  position: sticky;
  top: 86px;
  z-index: 5;
}

.empty-state {
  display: none;
  margin-top: 24px;
  padding: 34px;
  border-radius: 20px;
  color: #6b7280;
  text-align: center;
  background: #ffffff;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.06);
}

.empty-state.show {
  display: block;
}

.ranking-list {
  display: grid;
  gap: 16px;
}

.search-panel {
  max-width: 680px;
  margin-top: 26px;
}

.search-panel input {
  flex: 1;
  width: auto;
  padding: 16px 20px;
}

.search-panel button {
  padding: 16px 24px;
}

.search-note {
  margin-bottom: 20px;
  color: #6b7280;
  font-weight: 700;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #111827;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}

.detail-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 42px;
  padding: 70px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #fee2e2, #ffedd5);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.36);
}

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

.detail-copy h1 {
  color: #ffffff;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: #e5e7eb;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.detail-one-line {
  max-width: 820px;
  margin: 20px 0;
  color: #e5e7eb;
  font-size: 20px;
}

.detail-tags {
  margin: 16px 0 24px;
}

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

.main-column,
.side-column {
  display: grid;
  gap: 22px;
  align-content: start;
}

.player-card,
.article-card,
.side-card {
  border: 1px solid rgba(229, 231, 235, 0.84);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.07);
}

.player-card,
.article-card {
  padding: 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  border-radius: 20px;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.20), rgba(2, 6, 23, 0.78));
  cursor: pointer;
}

.player-shell.is-playing .play-overlay {
  display: none;
}

.play-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 20px 45px rgba(239, 68, 68, 0.35);
  font-size: 28px;
}

.article-card p {
  margin: 18px 0 0;
  font-size: 17px;
}

.side-card {
  padding: 22px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  margin: 18px 0 0;
}

.side-card dt {
  color: #111827;
  font-weight: 800;
}

.side-card dd {
  margin: 0;
}

.genre-pills {
  margin-top: 18px;
}

.tags-panel {
  text-align: center;
}

.tag-cloud {
  justify-content: center;
  margin-top: 22px;
}

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

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

.footer-brand {
  color: #ffffff;
  font-size: 22px;
}

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

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: #d1d5db;
}

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

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

.hidden-by-filter,
.hidden-by-search {
  display: none !important;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

  .hero-inner {
    min-height: auto;
    padding: 46px 0;
  }

  .hero-slide,
  .hero-slide.active,
  .page-hero-grid,
  .detail-hero-grid,
  .footer-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-slide {
    min-height: auto;
    gap: 28px;
  }

  .hero-cover {
    min-height: 260px;
  }

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

  .detail-hero-grid {
    padding: 46px 0;
  }

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

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

  .stats-grid,
  .movie-grid.four,
  .movie-grid.three,
  .category-grid,
  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .list-card,
  .catalog-card {
    grid-template-columns: 1fr;
  }

  .list-poster {
    aspect-ratio: 16 / 10;
  }

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

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

  .page-hero {
    padding: 48px 0;
  }

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 36px;
  }

  .hero-desc,
  .detail-one-line {
    font-size: 17px;
  }
}
