:root {
  --bg: #f9fafb;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #fff7ed;
  --accent: #ef4444;
  --accent-2: #f97316;
  --accent-3: #f59e0b;
  --shadow: 0 20px 45px rgba(17, 24, 39, 0.10);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.28);
}

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

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

.nav-link {
  padding: 10px 15px;
  color: #374151;
  border-radius: 999px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--accent);
  background: #fff1f2;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: #fff1f2;
  border-radius: 13px;
  cursor: pointer;
}

.nav-toggle span {
  width: 19px;
  height: 2px;
  display: block;
  margin: 4px auto;
  background: var(--accent);
  border-radius: 999px;
}

main {
  overflow: hidden;
}

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

.hero {
  position: relative;
  isolation: isolate;
  padding: 70px 0 52px;
  background:
    radial-gradient(circle at 12% 10%, rgba(248, 113, 113, 0.26), transparent 28%),
    radial-gradient(circle at 84% 22%, rgba(251, 146, 60, 0.28), transparent 30%),
    linear-gradient(135deg, #fff1f2 0%, #fff7ed 58%, #fefce8 100%);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  filter: blur(46px);
  opacity: 0.35;
  z-index: -1;
  animation: pulseGlow 8s ease-in-out infinite;
}

.hero::before {
  left: -80px;
  top: 20px;
  background: #fca5a5;
}

.hero::after {
  right: -90px;
  bottom: 0;
  background: #fdba74;
  animation-delay: 1.8s;
}

@keyframes pulseGlow {
  0%, 100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.13);
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  align-items: center;
  gap: 36px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px 12px;
  color: #b91c1c;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(254, 202, 202, 0.9);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-title {
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero h1 span,
.page-hero h1 span {
  color: var(--accent);
}

.hero-lead {
  max-width: 650px;
  margin: 22px 0 0;
  color: #4b5563;
  font-size: 18px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 30px rgba(239, 68, 68, 0.28);
}

.btn-soft {
  color: #b91c1c;
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(254, 202, 202, 0.86);
}

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

.hero-search {
  max-width: 640px;
  margin-top: 28px;
  padding: 8px;
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(254, 202, 202, 0.8);
  border-radius: 999px;
  box-shadow: 0 16px 35px rgba(17, 24, 39, 0.08);
}

.hero-search input,
.toolbar input,
.toolbar select {
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
}

.hero-search input:focus,
.toolbar input:focus,
.toolbar select:focus {
  border-color: #fb7185;
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.14);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.quick-links a {
  padding: 8px 12px;
  color: #7f1d1d;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(254, 202, 202, 0.78);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.hero-slider {
  position: relative;
  min-height: 500px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: end;
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  pointer-events: none;
  border-radius: 30px;
  box-shadow: var(--shadow);
  transition: opacity 0.48s ease, transform 0.48s ease;
}

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 5s ease;
}

.hero-slide.is-active img {
  transform: scale(1.06);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.78));
}

.hero-slide-content {
  position: relative;
  z-index: 2;
  padding: 28px;
  color: #fff;
}

.hero-slide-content h2 {
  margin: 12px 0 10px;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.15;
}

.hero-slide-content p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.88);
}

.slide-badge {
  display: inline-flex;
  padding: 6px 10px;
  background: rgba(239, 68, 68, 0.9);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 850;
}

.slider-dots {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.slider-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  cursor: pointer;
}

.slider-dots button.is-active {
  width: 26px;
  background: #fff;
}

.section {
  padding: 62px 0;
}

.section-white {
  background: #fff;
}

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

.section-title {
  margin: 0;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-desc {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
}

.text-link {
  color: var(--accent);
  font-weight: 850;
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(252, 165, 165, 0.8);
  box-shadow: var(--shadow);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

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

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

.movie-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.56));
  transition: opacity 0.2s ease;
}

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

.poster-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 5px 10px;
  color: #fff;
  background: rgba(239, 68, 68, 0.92);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.movie-meta-row,
.rank-stats,
.detail-meta,
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

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

.movie-card h3,
.rank-card h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-card h3 a:hover {
  color: var(--accent);
}

.movie-card p,
.rank-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-row span {
  padding: 4px 8px;
  color: #b91c1c;
  background: #fff1f2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
}

.rating {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 30px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  font-weight: 900;
}

.page-hero {
  padding: 58px 0 36px;
  background: linear-gradient(135deg, #fff1f2, #fff7ed 54%, #fefce8);
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: #4b5563;
  font-size: 18px;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  margin: 28px 0;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.05);
}

.toolbar select {
  min-width: 150px;
}

.result-label {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

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

.category-card {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 18px;
  min-height: 190px;
  padding: 22px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

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

.category-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.category-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.category-stack img {
  width: 100%;
  height: 78px;
  object-fit: cover;
  border-radius: 14px;
  transition: transform 0.3s ease;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  padding: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.05);
}

.rank-poster {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 18px;
  background: #111827;
}

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

.rank-info {
  align-self: center;
  min-width: 0;
}

.rank-stats {
  margin-top: 15px;
}

.rank-stats span,
.rank-stats a {
  padding: 6px 10px;
  background: #f3f4f6;
  border-radius: 999px;
  font-weight: 800;
}

.rank-stats a {
  color: #fff;
  background: var(--accent);
}

.detail-hero {
  padding: 42px 0;
  background: linear-gradient(135deg, #111827, #7f1d1d 58%, #c2410c);
  color: #fff;
}

.detail-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.3);
}

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

.breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
}

.detail-title {
  margin-top: 18px;
}

.detail-lead {
  max-width: 760px;
  margin: 20px 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.detail-meta span {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.player-section {
  padding: 54px 0 26px;
  background: #111827;
  color: #fff;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #050816;
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

.player-wrap video,
.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-wrap video {
  object-fit: cover;
  background: #050816;
}

.player-cover {
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 0;
  color: #fff;
  background: #050816;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover:hover img {
  transform: scale(1.04);
}

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

.player-icon {
  position: absolute;
  display: inline-grid;
  place-items: center;
  width: 86px;
  height: 86px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  font-size: 34px;
  box-shadow: 0 18px 42px rgba(239, 68, 68, 0.34);
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  padding: 52px 0;
}

.article-panel,
.side-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
}

.article-panel {
  padding: 28px;
}

.article-panel h2,
.side-panel h2,
.player-section h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.article-panel p {
  margin: 0 0 18px;
  color: #374151;
}

.side-panel {
  padding: 20px;
  align-self: start;
}

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

.side-item {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-item img {
  width: 78px;
  height: 54px;
  object-fit: cover;
  border-radius: 12px;
}

.side-item strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.side-item span {
  color: var(--muted);
  font-size: 12px;
}

.site-footer {
  padding: 34px 0;
  background: #111827;
  color: #fff;
}

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

.footer-inner p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.68);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.78);
}

.empty-state {
  display: none;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.empty-state.is-visible {
  display: block;
}

@media (max-width: 980px) {
  .hero-grid,
  .detail-grid,
  .detail-content,
  .category-card {
    grid-template-columns: 1fr;
  }

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

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

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

  .rank-card {
    grid-template-columns: 180px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .hero {
    padding: 44px 0 34px;
  }

  .hero-search,
  .hero-actions,
  .section-head,
  .footer-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-search {
    border-radius: 24px;
  }

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

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

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

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

  .rank-card {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    gap: 22px;
  }

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

@media (max-width: 520px) {
  .brand-text {
    font-size: 18px;
  }

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

  .hero h1,
  .page-hero h1,
  .detail-title {
    font-size: 34px;
  }

  .hero-slide-content {
    padding: 22px;
  }

  .player-icon {
    width: 68px;
    height: 68px;
    font-size: 27px;
  }
}
