:root {
  --brand-red: #ef4444;
  --brand-orange: #f97316;
  --brand-pink: #ec4899;
  --text: #1f2937;
  --muted: #6b7280;
  --soft: #fff7ed;
  --line: rgba(17, 24, 39, 0.08);
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
  --radius: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, #fff7ed 0%, #fdf2f8 38%, #fff 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.02em;
}

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

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

.site-nav a {
  padding: 10px 14px;
  color: #4b5563;
  border-radius: 999px;
  font-weight: 700;
  transition: all 0.25s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--brand-red);
  background: #fee2e2;
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(280px, 26vw);
  padding: 8px 10px 8px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.06);
}

.top-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
}

.top-search button,
.nav-toggle {
  border: 0;
  cursor: pointer;
}

.top-search button {
  padding: 8px 12px;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-orange));
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border-radius: 14px;
  background: #fff1f2;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ef4444;
  border-radius: 999px;
}

.hero {
  position: relative;
  height: 640px;
  overflow: hidden;
  background: #111827;
}

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

.hero-slide {
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.9s ease;
}

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

.hero-content {
  width: min(760px, calc(100% - 32px));
  margin-left: max(16px, calc((100vw - 1180px) / 2));
  color: #fff;
  padding: 40px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin: 0 0 18px;
  color: #fee2e2;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  font-weight: 800;
}

.hero h1,
.hero h2 {
  margin: 0;
  font-size: clamp(44px, 7vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  text-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
}

.hero h2 {
  font-size: clamp(40px, 6vw, 70px);
}

.hero-lead {
  max-width: 660px;
  margin: 24px 0 0;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.9);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-tags span,
.tag-row span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-orange));
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.28);
}

.btn-light {
  color: var(--brand-red);
  background: #fff;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.18);
}

.btn-soft {
  color: #9f1239;
  background: #ffe4e6;
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.hero-prev {
  left: max(16px, calc((100vw - 1240px) / 2));
}

.hero-next {
  right: max(16px, calc((100vw - 1240px) / 2));
}

.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 34px;
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.hero-dot {
  width: 28px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
  transition: all 0.25s ease;
}

.hero-dot.is-active {
  width: 54px;
  background: #fff;
}

.page-hero {
  padding: 76px 0 58px;
  color: #fff;
  background: radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.28), transparent 26%), linear-gradient(135deg, #ef4444, #f97316 55%, #ec4899);
  overflow: hidden;
}

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

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

.section {
  padding: 70px 0;
}

.section-soft {
  background: linear-gradient(135deg, rgba(255, 237, 213, 0.78), rgba(252, 231, 243, 0.72));
}

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

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin: 0 0 10px;
  color: #b91c1c;
  background: linear-gradient(135deg, #fee2e2, #ffedd5);
  border-radius: 999px;
  font-weight: 900;
}

.section-title {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.04em;
}

.section-desc {
  max-width: 680px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #f3f4f6, #fee2e2);
}

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

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

.score-badge,
.rank-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 6px 10px;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-orange));
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.28);
}

.play-hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  transition: all 0.25s ease;
}

.play-hover span {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
  font-size: 26px;
}

.movie-card:hover .play-hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.38);
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.card-title {
  margin: 10px 0 8px;
  font-size: 20px;
  line-height: 1.3;
}

.card-title a:hover {
  color: var(--brand-red);
}

.card-text {
  display: -webkit-box;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row span {
  color: #b91c1c;
  background: #fee2e2;
}

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

.category-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #111827;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transition: transform 0.55s ease;
}

.category-card-content {
  position: relative;
  z-index: 2;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
}

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

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.7;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px 180px;
  gap: 14px;
  padding: 18px;
  margin: -34px auto 42px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  outline: 0;
}

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

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

.ranking-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 82px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.07);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #fff;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-orange));
  font-weight: 1000;
}

.rank-cover {
  width: 82px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
  background: #f3f4f6;
}

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

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-info p {
  display: -webkit-box;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-score {
  color: var(--brand-red);
  font-size: 22px;
  font-weight: 1000;
}

.detail-shell {
  padding: 42px 0 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--muted);
  font-weight: 700;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 34px;
  align-items: start;
}

.player-card,
.detail-card {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.video-player {
  position: relative;
  overflow: hidden;
  background: #020617;
  border-radius: 28px 28px 0 0;
}

.video-player video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.52));
  transition: opacity 0.25s ease;
}

.video-player.is-playing .player-overlay {
  opacity: 0;
}

.play-button {
  pointer-events: auto;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-orange));
  box-shadow: 0 20px 48px rgba(239, 68, 68, 0.38);
  font-size: 30px;
  cursor: pointer;
  transition: transform 0.25s ease;
}

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

.player-caption {
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.player-caption strong {
  font-size: 18px;
}

.player-status {
  color: var(--muted);
  font-weight: 700;
}

.detail-card {
  padding: 28px;
}

.detail-title {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

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

.meta-pill {
  color: #9f1239;
  background: #ffe4e6;
}

.detail-section {
  margin-top: 24px;
}

.detail-section h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.detail-section p {
  margin: 0;
  color: #4b5563;
  line-height: 1.9;
}

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

.related-card {
  overflow: hidden;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
}

.related-card .related-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f3f4f6;
}

.related-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.related-card h3 {
  margin: 0;
  padding: 12px;
  font-size: 16px;
  line-height: 1.35;
}

.site-footer {
  padding: 36px 0;
  color: #6b7280;
  background: #111827;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-inner strong {
  color: #fff;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

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

.movie-card,
.category-card,
.rank-item,
.detail-card,
.player-card {
  animation: fadeIn 0.5s ease both;
}

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

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

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

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav,
  .top-search {
    display: none;
    width: 100%;
  }

  .site-header.is-open .site-nav,
  .site-header.is-open .top-search {
    display: flex;
  }

  .site-nav {
    flex-direction: column;
    align-items: stretch;
    order: 3;
  }

  .top-search {
    order: 4;
  }

  .hero {
    height: 600px;
  }

  .hero-content {
    margin-left: 16px;
    margin-right: 16px;
  }

  .hero-control {
    display: none;
  }

  .section-head {
    display: block;
  }

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

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

  .rank-item {
    grid-template-columns: 46px 70px 1fr;
  }

  .rank-score {
    grid-column: 3;
    justify-self: start;
    font-size: 18px;
  }
}

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

  .logo {
    font-size: 18px;
  }

  .hero {
    height: 560px;
  }

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

  .btn {
    width: 100%;
  }

  .section {
    padding: 52px 0;
  }

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

  .card-title {
    font-size: 18px;
  }

  .player-caption {
    display: block;
  }
}
