* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #1f2937;
  background: #f9fafb;
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

.top-nav {
  background: linear-gradient(90deg, #dc2626, #b91c1c);
  box-shadow: 0 10px 24px rgba(127, 29, 29, 0.25);
}

.nav-inner {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  line-height: 1;
  font-weight: 800;
  color: #ffffff;
  transition: color 0.2s ease;
}

.brand:hover {
  color: #fde047;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #991b1b;
  background: #fde047;
  box-shadow: 0 6px 16px rgba(254, 240, 138, 0.4);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #ffffff;
  font-weight: 700;
}

.nav-links a {
  position: relative;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #fde047;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: #fde047;
  transition: width 0.2s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

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

.mobile-menu {
  display: none;
  padding: 10px 24px 18px;
  background: #b91c1c;
  border-top: 1px solid rgba(127, 29, 29, 0.4);
}

.mobile-menu a {
  display: block;
  color: #ffffff;
  padding: 12px 0;
  font-weight: 700;
}

.mobile-menu.is-open {
  display: block;
}

.hero {
  position: relative;
  height: 500px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #7f1d1d, #b91c1c 48%, #7f1d1d);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(253, 224, 71, 0.22), transparent 32%),
    radial-gradient(circle at 80% 45%, rgba(248, 113, 113, 0.22), transparent 34%),
    rgba(0, 0, 0, 0.32);
  z-index: 2;
}

.hero-slider {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  background-size: cover;
  background-position: center;
  transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.9), rgba(127, 29, 29, 0.72), rgba(127, 29, 29, 0.28));
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
}

.hero-panel {
  max-width: 760px;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  background: rgba(17, 24, 39, 0.36);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  color: #fde047;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero h1 span {
  color: #fde047;
}

.hero p {
  margin: 0 0 24px;
  max-width: 680px;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.65;
  color: #f3f4f6;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  color: #7f1d1d;
  background: #fef3c7;
  font-size: 13px;
  font-weight: 800;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

.primary-btn {
  color: #111827;
  background: #facc15;
  box-shadow: 0 14px 30px rgba(250, 204, 21, 0.32);
}

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

.secondary-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

.secondary-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.22);
}

.soft-btn {
  color: #b91c1c;
  background: #fee2e2;
}

.soft-btn:hover {
  transform: translateY(-2px);
  background: #fecaca;
}

.hero-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  max-width: 640px;
  margin-top: 22px;
}

.hero-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0 14px;
  background: #ffffff;
  color: #111827;
  outline: none;
}

.hero-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

.hero-dots button.is-active {
  width: 34px;
  background: #fde047;
}

main {
  min-height: 70vh;
}

.section {
  padding: 62px 24px;
}

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

.section-inner,
.page-inner,
.detail-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.section-heading {
  margin-bottom: 34px;
  text-align: center;
}

.section-heading h2,
.page-title h1,
.detail-title h1 {
  margin: 0 0 10px;
  color: #1f2937;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
}

.section-heading p,
.page-title p,
.detail-title p {
  margin: 0;
  color: #6b7280;
  font-size: 18px;
  line-height: 1.7;
}

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

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgba(127, 29, 29, 0.18);
}

.poster-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background-color: #e5e7eb;
  background-size: cover;
  background-position: center;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-frame {
  transform: scale(1.03);
  filter: saturate(1.08);
}

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.72));
  opacity: 0.82;
}

.play-hover {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.85);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(220, 38, 38, 0.88);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
  position: absolute;
  z-index: 3;
  left: 10px;
  top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #111827;
  background: #fde047;
  font-size: 12px;
}

.movie-info {
  display: block;
  padding: 14px;
}

.movie-info strong {
  display: block;
  overflow: hidden;
  margin-bottom: 6px;
  color: #1f2937;
  font-size: 16px;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.movie-card:hover strong {
  color: #dc2626;
}

.movie-info em {
  display: block;
  overflow: hidden;
  margin-bottom: 8px;
  color: #6b7280;
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-info small {
  display: -webkit-box;
  min-height: 38px;
  overflow: hidden;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-card {
  display: block;
  min-height: 190px;
  padding: 26px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(127, 29, 29, 0.16);
}

.category-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-bottom: 18px;
  border-radius: 18px;
  color: #dc2626;
  background: #fee2e2;
  font-size: 30px;
}

.category-card h3 {
  margin: 0 0 10px;
  color: #1f2937;
  font-size: 22px;
}

.category-card p {
  margin: 0 0 18px;
  color: #6b7280;
  line-height: 1.65;
}

.category-card span {
  color: #dc2626;
  font-weight: 800;
}

.page-hero {
  padding: 62px 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #7f1d1d, #dc2626 58%, #991b1b);
}

.page-title {
  max-width: 1280px;
  margin: 0 auto;
}

.page-title h1,
.page-title p {
  color: #ffffff;
}

.page-title p {
  max-width: 780px;
  color: #fee2e2;
}

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

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

.filter-bar {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 12px;
  margin-bottom: 26px;
  padding: 18px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.filter-bar button {
  border: 0;
}

.no-results {
  display: none;
  padding: 34px;
  text-align: center;
  border-radius: 18px;
  color: #6b7280;
  background: #ffffff;
}

.no-results.is-visible {
  display: block;
}

.detail-hero {
  padding: 42px 24px 0;
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #7f1d1d 56%, #991b1b);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
  gap: 30px;
  align-items: end;
}

.detail-title {
  padding-bottom: 34px;
}

.detail-title h1,
.detail-title p {
  color: #ffffff;
}

.detail-title p {
  color: #f3f4f6;
}

.detail-cover {
  min-height: 420px;
  border-radius: 26px 26px 0 0;
  background-color: #e5e7eb;
  background-size: cover;
  background-position: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.meta-pills span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 800;
}

.detail-section {
  padding: 36px 24px;
}

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

.content-card h2,
.content-card h3 {
  margin: 0 0 16px;
  color: #1f2937;
}

.content-card p {
  margin: 0;
  color: #374151;
  font-size: 17px;
  line-height: 1.9;
}

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: #000000;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.32);
}

.player-box video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.08), rgba(0, 0, 0, 0.64));
  cursor: pointer;
}

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

.big-play {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: #111827;
  background: #facc15;
  font-size: 38px;
  box-shadow: 0 18px 42px rgba(250, 204, 21, 0.32);
  transition: transform 0.2s ease;
}

.player-cover:hover .big-play {
  transform: scale(1.08);
}

.player-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  color: #ffffff;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.76));
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.player-box:hover .player-controls,
.player-box.is-playing .player-controls {
  opacity: 1;
  transform: translateY(0);
}

.player-controls button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
}

.player-controls button:hover {
  background: rgba(255, 255, 255, 0.28);
}

.player-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
}

.player-message {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 5;
  display: none;
  padding: 10px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(127, 29, 29, 0.92);
}

.player-message.is-visible {
  display: block;
}

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

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 28px;
}

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

.site-footer p,
.site-footer a {
  display: block;
  margin: 0 0 10px;
  color: #d1d5db;
  line-height: 1.7;
}

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

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

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

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

  .detail-cover {
    min-height: 360px;
    border-radius: 24px;
  }

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

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

  .nav-toggle {
    display: block;
  }

  .hero {
    height: auto;
    min-height: 620px;
  }

  .hero-content {
    align-items: flex-end;
    padding-top: 90px;
    padding-bottom: 70px;
  }

  .hero-panel {
    padding: 24px;
  }

  .hero-search,
  .filter-bar {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 580px) {
  .nav-inner {
    padding: 0 16px;
  }

  .brand {
    font-size: 18px;
  }

  .hero-panel {
    border-radius: 20px;
  }

  .hero-actions,
  .detail-actions {
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn,
  .soft-btn {
    width: 100%;
  }

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

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

  .content-card {
    padding: 22px;
  }

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