* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: #f8fafc;
  color: #111827;
  line-height: 1.65;
}

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

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

.page {
  min-height: 100vh;
  background: #f8fafc;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
  color: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.24);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #dc2626;
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.35);
}

.logo-text {
  font-size: 20px;
  background: linear-gradient(90deg, #f87171, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: #cbd5e1;
  font-weight: 600;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: #dc2626;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

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

.mobile-menu .nav-link {
  display: block;
}

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

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 18% 18%, rgba(220, 38, 38, 0.48), transparent 32%),
              radial-gradient(circle at 82% 18%, rgba(249, 115, 22, 0.26), transparent 35%),
              linear-gradient(135deg, #0f172a, #7f1d1d 58%, #0f172a);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
}

.hero-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 82px 0 88px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1fr);
  gap: 42px;
  align-items: center;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fecaca;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 700;
}

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero h1 span {
  color: #f87171;
}

.hero-lead {
  max-width: 680px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 21px);
}

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

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

.btn-primary {
  color: #ffffff;
  background: #dc2626;
  box-shadow: 0 18px 36px rgba(220, 38, 38, 0.34);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.01);
  background: #b91c1c;
}

.btn-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

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

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 560px;
  margin-top: 26px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
}

.search-bar input,
.filter-input {
  width: 100%;
  height: 46px;
  border: 0;
  outline: 0;
  border-radius: 14px;
  padding: 0 16px;
  color: #111827;
  background: #ffffff;
  font-size: 15px;
}

.search-bar button {
  white-space: nowrap;
  border: 0;
}

.hero-panel {
  position: relative;
}

.hero-glow {
  position: absolute;
  inset: 24px;
  background: rgba(220, 38, 38, 0.3);
  filter: blur(46px);
  border-radius: 36px;
}

.hero-carousel {
  position: relative;
  min-height: 460px;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  opacity: 0;
  transform: translateX(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.hero-poster {
  position: relative;
  min-height: 285px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.45), rgba(15, 23, 42, 0.72));
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 285px;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.6));
}

.hero-copy {
  padding: 24px;
}

.hero-copy h2 {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.22;
}

.hero-copy p {
  margin: 0 0 16px;
  color: #e5e7eb;
}

.meta-line,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.meta-pill,
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
}

.hero-copy .meta-pill,
.hero-copy .tag {
  color: #fee2e2;
  background: rgba(255, 255, 255, 0.14);
}

.hero-dots {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: flex;
  gap: 8px;
  z-index: 3;
}

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

.hero-dot.active {
  width: 26px;
  background: #ffffff;
}

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

.stat-card {
  padding: 18px;
  border-radius: 18px;
  text-align: center;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  transition: all 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  background: #fff1f2;
}

.stat-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #dc2626;
  background: #fee2e2;
  font-size: 22px;
}

.stat-title {
  margin: 0;
  color: #111827;
  font-weight: 800;
}

.stat-desc {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 14px;
}

.section {
  padding: 64px 0;
}

.section-white {
  background: #ffffff;
}

.section-soft {
  background: #f1f5f9;
}

.section-hot {
  color: #ffffff;
  background: linear-gradient(135deg, #dc2626, #f97316);
}

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

.section-head h2,
.page-title h1 {
  margin: 0 0 8px;
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
}

.section-hot .section-head h2,
.section-hot .section-head p {
  color: #ffffff;
}

.section-head p,
.page-title p {
  margin: 0;
  color: #64748b;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

.section-hot .movie-card {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.cover-media {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #991b1b);
}

.cover-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.28s ease;
}

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

.cover-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.42);
  transition: opacity 0.2s ease;
}

.cover-shade::before {
  content: "▶";
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(220, 38, 38, 0.92);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

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

.card-badge,
.card-rating,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
}

.card-badge {
  top: 10px;
  left: 10px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.76);
}

.card-rating {
  right: 10px;
  bottom: 10px;
  color: #ffffff;
  background: #dc2626;
}

.rank-badge {
  top: 10px;
  right: 10px;
  color: #ffffff;
  background: linear-gradient(135deg, #dc2626, #fb923c);
}

.movie-card-body {
  padding: 14px;
}

.movie-card h3 {
  margin: 0 0 7px;
  font-size: 16px;
  line-height: 1.35;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.section-hot .movie-card h3,
.section-hot .movie-card .movie-one-line,
.section-hot .movie-card .movie-meta {
  color: #ffffff;
}

.movie-one-line {
  margin: 0 0 10px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  color: #94a3b8;
  font-size: 12px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 22px;
  border-radius: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #991b1b);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

.category-card::after {
  content: "";
  position: absolute;
  inset: auto -30px -42px auto;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.category-card h2,
.category-card h3 {
  position: relative;
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  position: relative;
  margin: 0 0 20px;
  color: #e5e7eb;
}

.category-card .btn {
  position: relative;
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(120deg, #0f172a, #7f1d1d);
  padding: 64px 0;
}

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

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: #d1d5db;
  font-size: 18px;
}

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

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

.toolbar {
  margin-bottom: 26px;
  padding: 18px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.filter-input {
  border: 1px solid #e2e8f0;
  box-shadow: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 360px;
  gap: 28px;
  align-items: start;
}

.player-card,
.detail-card,
.side-card {
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.1);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(220, 38, 38, 0.2), rgba(2, 6, 23, 0.78));
  transition: opacity 0.2s ease;
}

.play-layer.hidden {
  opacity: 0;
  pointer-events: none;
}

.play-button {
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: #dc2626;
  cursor: pointer;
  font-size: 32px;
  box-shadow: 0 18px 44px rgba(220, 38, 38, 0.4);
  transition: transform 0.2s ease, background 0.2s ease;
}

.play-button:hover {
  transform: scale(1.06);
  background: #b91c1c;
}

.detail-card {
  padding: 28px;
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 14px;
  color: #111827;
}

.detail-card p {
  color: #334155;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 24px;
}

.side-card {
  padding: 18px;
}

.poster-large {
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, #1e293b, #991b1b);
  aspect-ratio: 2 / 3;
  margin-bottom: 18px;
}

.poster-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.related-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: #f8fafc;
  transition: background 0.2s ease;
}

.related-item:hover {
  background: #fee2e2;
}

.related-thumb {
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #991b1b);
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.related-title {
  margin: 0 0 4px;
  color: #111827;
  font-weight: 800;
  line-height: 1.3;
}

.related-meta {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 56px 78px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.rank-number {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, #dc2626, #fb923c);
}

.rank-cover {
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #991b1b);
}

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

.rank-info h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rank-info p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.rank-score {
  color: #dc2626;
  font-size: 22px;
  font-weight: 900;
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
  padding: 44px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 12px;
  color: #ffffff;
}

.site-footer p {
  margin: 0;
  color: #94a3b8;
}

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

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

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

.copyright {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 14px;
}

.hidden-card {
  display: none !important;
}

.empty-state {
  display: none;
  padding: 44px;
  border-radius: 22px;
  text-align: center;
  color: #64748b;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

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

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

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

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

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 58px 0 62px;
  }

  .hero-carousel {
    min-height: 430px;
  }

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

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

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

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

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

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

  .rank-score {
    grid-column: 3;
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .container,
  .hero-inner,
  .mobile-menu {
    width: min(100% - 24px, 1180px);
  }

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

  .hero-actions,
  .search-bar {
    align-items: stretch;
    flex-direction: column;
  }

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

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

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

  .movie-card h3 {
    font-size: 15px;
  }

  .section {
    padding: 44px 0;
  }

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

  .detail-card {
    padding: 20px;
  }

  .rank-row {
    grid-template-columns: 40px 54px minmax(0, 1fr);
    gap: 10px;
  }
}
