:root {
  --bg: #f8fafc;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --card: #ffffff;
  --dark: #0f172a;
  --red: #dc2626;
  --red-dark: #b91c1c;
  --orange: #f97316;
  --amber: #f59e0b;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #fff 0%, var(--bg) 36%, #fff 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(14px);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 12px 25px rgba(220, 38, 38, 0.28);
}

.brand-name {
  font-size: 20px;
  background: linear-gradient(90deg, var(--red), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 15px;
  font-weight: 700;
  color: #374151;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--red);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: #374151;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 12px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--soft-shadow);
}

.mobile-nav.is-open {
  display: grid;
  gap: 6px;
}

.mobile-nav-link {
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
  color: #374151;
}

.mobile-nav-link:hover {
  color: var(--red);
  background: #fef2f2;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #111827;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.55fr);
  align-items: center;
  gap: 42px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.28), transparent 32%),
    radial-gradient(circle at 80% 20%, rgba(220, 38, 38, 0.32), transparent 28%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.76));
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: blur(2px) saturate(1.2);
}

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

.hero-kicker,
.section-heading p,
.detail-kicker,
.page-hero p {
  margin: 0 0 10px;
  color: #fed7aa;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-content h2 {
  margin-top: 12px;
  font-size: clamp(26px, 4vw, 44px);
  color: #fff7ed;
}

.hero-content p:not(.hero-kicker) {
  max-width: 680px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.hero-tags,
.detail-tags,
.tag-row,
.movie-meta,
.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.detail-tags span,
.tag-row span,
.detail-facts span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

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

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 16px 34px rgba(220, 38, 38, 0.32);
}

.secondary-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  z-index: 2;
  display: block;
  width: min(100%, 360px);
  justify-self: end;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

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

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 32px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: #fff;
}

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

.narrow-wrap {
  width: min(860px, calc(100% - 32px));
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading a {
  flex: 0 0 auto;
  color: var(--red);
  font-weight: 800;
}

.left-heading {
  display: block;
}

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

.category-tile {
  min-height: 150px;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff, #fff7ed);
  border: 1px solid rgba(249, 115, 22, 0.16);
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile span {
  color: var(--orange);
  font-weight: 800;
}

.category-tile strong {
  display: block;
  margin-top: 10px;
  font-size: 22px;
}

.category-tile small {
  display: block;
  margin-top: 14px;
  color: var(--muted);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 160px 160px 160px;
  gap: 12px;
  margin-bottom: 24px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.search-box span {
  color: var(--red);
  font-size: 20px;
  font-weight: 900;
}

.search-box input,
.filter-panel select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111827;
}

.filter-panel select {
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.empty-state {
  margin: 0 0 22px;
  padding: 18px;
  border-radius: 18px;
  color: #991b1b;
  background: #fef2f2;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid rgba(229, 231, 235, 0.92);
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.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.3s ease, opacity 0.3s ease;
}

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

.poster-year,
.poster-play {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
}

.poster-year {
  top: 10px;
  left: 10px;
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.poster-play {
  right: 10px;
  bottom: 10px;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

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

.movie-title {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  color: #111827;
  font-weight: 850;
  line-height: 1.25;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-line {
  display: -webkit-box;
  min-height: 42px;
  margin: 8px 0 10px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  margin-bottom: 10px;
  color: #4b5563;
  font-size: 12px;
  font-weight: 700;
}

.movie-meta span {
  padding: 2px 8px;
  border-radius: 999px;
  background: #f3f4f6;
}

.tag-row span {
  color: #991b1b;
  background: #fef2f2;
  font-size: 12px;
}

.split-section {
  display: block;
}

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

.rank-list.tall {
  grid-template-columns: 1fr;
  align-self: start;
  position: sticky;
  top: 90px;
}

.rank-item {
  display: grid;
  grid-template-columns: 42px 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.rank-num {
  color: var(--red);
  font-weight: 900;
  font-size: 18px;
}

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

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

.rank-meta {
  grid-column: 3;
  color: var(--muted);
  font-size: 12px;
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  padding: 70px 0;
  color: #fff;
  background:
    radial-gradient(circle at 22% 20%, rgba(249, 115, 22, 0.44), transparent 30%),
    radial-gradient(circle at 88% 10%, rgba(220, 38, 38, 0.36), transparent 28%),
    linear-gradient(135deg, #111827, #1f2937);
}

.small-hero > * {
  display: block;
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.page-hero h1 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.page-hero span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

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

.category-card-large {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  border-radius: 26px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card-cover {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
}

.category-card-cover img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.category-card-cover span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 4px 10px;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-weight: 800;
}

.category-card-large h2 {
  margin: 6px 0 8px;
  font-size: 26px;
}

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

.category-samples {
  display: grid;
  gap: 8px;
}

.category-samples a {
  color: #374151;
  font-weight: 700;
}

.category-samples a:hover {
  color: var(--red);
}

.split-ranking {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.detail-main {
  background: linear-gradient(180deg, #111827 0, #111827 520px, var(--bg) 521px, #fff 100%);
}

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 50px;
  color: #fff;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

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

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

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

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

.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.detail-line {
  max-width: 780px;
  margin: 20px 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
}

.detail-tags span {
  background: rgba(255, 255, 255, 0.12);
}

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

.player-section .section-heading h2,
.player-section .section-heading p {
  color: #fff;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.62));
  cursor: pointer;
}

.player-cover[hidden] {
  display: none;
}

.play-circle {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 18px 45px rgba(220, 38, 38, 0.36);
  font-size: 36px;
}

.player-cover strong {
  display: block;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.detail-copy {
  color: #1f2937;
}

.detail-copy h2 {
  margin: 0 0 12px;
  font-size: 30px;
  letter-spacing: -0.03em;
}

.detail-copy p {
  margin: 0 0 28px;
  color: #4b5563;
  font-size: 17px;
}

.detail-facts {
  margin-top: 10px;
}

.detail-facts span {
  color: #7f1d1d;
  background: #fff7ed;
}

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

.site-footer {
  margin-top: 20px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #111827, #1e293b 55%, #111827);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 30px;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
}

.footer-logo {
  margin-bottom: 12px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.footer-brand p {
  max-width: 360px;
  margin: 0;
  color: #94a3b8;
}

.footer-column {
  display: grid;
  align-content: start;
  gap: 8px;
}

.footer-column h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 16px;
}

.footer-column a {
  color: #cbd5e1;
  font-size: 14px;
}

.footer-column a:hover {
  color: #fb923c;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

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

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

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

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

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

  .hero,
  .hero-carousel {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
    padding: 42px 0 90px;
  }

  .hero-poster {
    width: min(260px, 75vw);
    justify-self: start;
  }

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

  .category-cards-large,
  .split-ranking,
  .footer-inner,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .rank-list.tall {
    position: static;
  }

  .detail-poster {
    width: min(300px, 80vw);
  }

  .player-section .section-heading h2,
  .player-section .section-heading p {
    color: var(--text);
  }
}

@media (max-width: 640px) {
  .header-inner {
    height: 62px;
  }

  .brand-name {
    font-size: 18px;
  }

  .section-wrap,
  .detail-hero,
  .player-section {
    width: min(100% - 24px, 1180px);
  }

  .section-heading {
    display: block;
  }

  .section-heading a {
    display: inline-flex;
    margin-top: 10px;
  }

  .hero-content p:not(.hero-kicker),
  .detail-line {
    font-size: 16px;
  }

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

  .category-grid-mini,
  .filter-panel,
  .rank-list {
    grid-template-columns: 1fr;
  }

  .category-card-large {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
  }

  .category-card-large h2 {
    font-size: 20px;
  }

  .movie-title {
    min-height: 40px;
    font-size: 14px;
  }

  .movie-line {
    display: none;
  }

  .tag-row {
    display: none;
  }

  .rank-item {
    grid-template-columns: 38px 48px minmax(0, 1fr);
  }

  .rank-item img {
    width: 48px;
    height: 64px;
  }

  .play-circle {
    width: 66px;
    height: 66px;
    font-size: 28px;
  }
}
