:root {
  --red-950: #450a0a;
  --red-900: #7f1d1d;
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --red-500: #ef4444;
  --orange-500: #f97316;
  --amber-300: #fcd34d;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #fee2e2;
  --surface: #ffffff;
  --soft: #fff7ed;
  --shadow: 0 24px 60px rgba(127, 29, 29, 0.16);
  --radius: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #fff7f7 0%, #ffffff 34%, #fff7ed 100%);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

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

img {
  display: block;
  width: 100%;
  height: auto;
}

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  max-width: 1220px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  color: var(--red-700);
  letter-spacing: -0.02em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red-600), var(--orange-500));
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.32);
  font-size: 16px;
}

.desktop-nav,
.mobile-nav,
.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #4b5563;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active,
.footer-links a:hover {
  color: var(--red-700);
  background: #fee2e2;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  border: 0;
  color: var(--red-700);
  background: #fee2e2;
  border-radius: 14px;
  padding: 10px 13px;
}

.mobile-nav {
  display: none;
  padding: 0 18px 18px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  background: radial-gradient(circle at 12% 8%, rgba(252, 211, 77, 0.42), transparent 27%), linear-gradient(135deg, var(--red-950), var(--red-700) 54%, var(--orange-500));
  color: #ffffff;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 0.65s ease;
  pointer-events: none;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.06);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 72% 42%, rgba(255, 255, 255, 0.14), transparent 30%), linear-gradient(180deg, transparent 62%, rgba(69, 10, 10, 0.74));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1220px;
  margin: 0 auto;
  min-height: 640px;
  padding: 112px 22px 118px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.55fr);
  align-items: center;
  gap: 56px;
}

.hero-text {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  margin-bottom: 18px;
  backdrop-filter: blur(12px);
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  font-weight: 950;
}

.hero p {
  margin: 22px 0 0;
  max-width: 720px;
  color: #fee2e2;
  font-size: 20px;
  line-height: 1.8;
}

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

.primary-button,
.secondary-button,
.ghost-button,
.hero-search button,
.filter-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.hero-search button {
  color: var(--red-700);
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.secondary-button {
  color: #ffffff;
  background: rgba(127, 29, 29, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.ghost-button {
  color: var(--red-700);
  background: #fee2e2;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.hero-search button:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-poster {
  position: relative;
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.36);
  transform: rotate(2deg);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

.hero-controls button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
}

.hero-controls button.active {
  width: 34px;
  background: #ffffff;
}

.hero-search-panel {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 22px;
  width: min(1120px, calc(100% - 36px));
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 28px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) 1.1fr;
  gap: 14px;
  align-items: center;
}

.hero-search {
  display: flex;
  gap: 10px;
  background: #ffffff;
  border-radius: 999px;
  padding: 8px;
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 18px;
  color: var(--ink);
  background: transparent;
}

.hero-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-cats a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.section,
.page-section {
  max-width: 1220px;
  margin: 0 auto;
  padding: 68px 22px;
}

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

.section-heading h2,
.page-hero h1,
.detail-section h2 {
  margin: 0;
  color: #111827;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-heading h2,
.detail-section h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.section-heading p,
.page-hero p,
.detail-section p,
.movie-card p,
.category-card p,
.rank-row p,
.site-footer p {
  color: var(--muted);
  line-height: 1.72;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(127, 29, 29, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: #fecaca;
  box-shadow: var(--shadow);
}

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

.poster-link img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.year-badge,
.rank-badge,
.type-pill {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 7px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(127, 29, 29, 0.88);
  backdrop-filter: blur(10px);
}

.year-badge {
  left: 12px;
}

.rank-badge {
  right: 12px;
  background: linear-gradient(135deg, var(--orange-500), var(--red-600));
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--red-600);
  font-size: 13px;
  font-weight: 800;
}

.movie-card h3,
.rank-row h3,
.category-card h3 {
  margin: 9px 0 8px;
  font-size: 20px;
  line-height: 1.28;
  font-weight: 900;
  color: #111827;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--red-700);
  background: #fee2e2;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

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

.category-card {
  min-height: 190px;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #ffffff, #fff1f2 56%, #ffedd5);
  box-shadow: 0 18px 48px rgba(127, 29, 29, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red-600), var(--orange-500));
  font-weight: 900;
  margin-bottom: 16px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 62px 98px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px 18px 12px 12px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red-600), var(--orange-500));
  font-size: 18px;
  font-weight: 950;
}

.rank-thumb {
  border-radius: 18px;
  overflow: hidden;
}

.rank-thumb img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 14px;
  margin: 0 0 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 42px rgba(127, 29, 29, 0.08);
}

.filter-bar label {
  display: grid;
  gap: 7px;
  color: var(--red-700);
  font-size: 13px;
  font-weight: 900;
}

.filter-bar input,
.filter-bar select {
  min-height: 46px;
  border: 1px solid #fecaca;
  border-radius: 16px;
  padding: 0 14px;
  color: #111827;
  background: #ffffff;
  outline: 0;
}

.page-hero {
  align-items: flex-start;
  padding: 58px 22px 16px;
}

.page-hero-text {
  max-width: 780px;
}

.page-hero p {
  margin: 16px 0 0;
  font-size: 18px;
}

.detail-hero {
  position: relative;
  color: #ffffff;
  background: radial-gradient(circle at 82% 20%, rgba(249, 115, 22, 0.32), transparent 28%), linear-gradient(135deg, var(--red-950), var(--red-700));
  overflow: hidden;
}

.detail-wrap {
  max-width: 1220px;
  margin: 0 auto;
  padding: 76px 22px 58px;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.detail-poster {
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35);
}

.detail-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

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

.detail-title p {
  margin: 18px 0 0;
  color: #fee2e2;
  font-size: 18px;
  line-height: 1.75;
}

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #111827;
  box-shadow: 0 28px 70px rgba(17, 24, 39, 0.24);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.1), rgba(17, 24, 39, 0.52));
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red-600), var(--orange-500));
  box-shadow: 0 18px 52px rgba(220, 38, 38, 0.36);
  font-size: 30px;
  padding-left: 5px;
}

.play-overlay.is-hidden {
  display: none;
}

.detail-section {
  max-width: 1220px;
  margin: 0 auto;
  padding: 54px 22px 0;
}

.detail-section article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 28px;
  box-shadow: 0 16px 42px rgba(127, 29, 29, 0.08);
}

.detail-section p {
  font-size: 17px;
}

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

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

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

.movie-card.compact p {
  display: none;
}

.site-footer {
  margin-top: 70px;
  background: #fff1f2;
  border-top: 1px solid #fecaca;
}

.footer-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 34px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-bottom {
  padding: 18px 22px 28px;
  text-align: center;
  color: var(--muted);
}

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

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

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

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

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

  .menu-toggle {
    display: inline-flex;
  }

  .mobile-nav.open {
    display: flex;
  }

  .hero,
  .hero-slider,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 82px 18px 210px;
  }

  .hero-poster {
    max-width: 280px;
    margin: 0 auto;
    transform: rotate(0);
  }

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

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

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

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

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 620px) {
  .grid-cards,
  .category-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .section,
  .page-section {
    padding: 48px 16px;
  }

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

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

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

  .rank-number {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 15px;
  }

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

  .hero p,
  .detail-title p {
    font-size: 16px;
  }

  .hero-search {
    border-radius: 20px;
    flex-direction: column;
  }

  .hero-search input {
    min-height: 44px;
  }
}

.sample-links {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.sample-links a {
  color: var(--red-700);
  font-weight: 800;
}

.sample-links a:hover {
  text-decoration: underline;
}
