* {
  box-sizing: border-box;
}

:root {
  --bg: #f8fafc;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --red: #dc2626;
  --orange: #f97316;
  --yellow: #facc15;
  --blue: #2563eb;
  --dark: #111827;
  --card: #ffffff;
  --radius: 22px;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}

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

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, #1f2937, #dc2626, #f97316);
}

button,
input {
  font: inherit;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  color: #fff;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--yellow));
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--red);
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.brand-copy {
  display: grid;
  line-height: 1.2;
}

.brand-name {
  font-size: 26px;
  letter-spacing: 0.04em;
}

.brand-subtitle {
  font-size: 12px;
  opacity: 0.92;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 700;
}

.site-nav a {
  padding: 9px 12px;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.nav-cats {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 14px;
}

.nav-toggle {
  display: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
}

.hero-carousel {
  position: relative;
  height: clamp(520px, 68vw, 660px);
  overflow: hidden;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

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

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

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

.hero-kicker,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-kicker span,
.detail-meta span,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.95), rgba(249, 115, 22, 0.95));
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-content h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 740px;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2vw, 22px);
}

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

.btn-primary,
.btn-ghost,
.section-more,
.search-panel button,
.hero-search button,
.inline-filter button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary,
.search-panel button,
.hero-search button,
.inline-filter button {
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--red));
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.32);
}

.btn-primary:hover,
.search-panel button:hover,
.hero-search button:hover,
.inline-filter button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(220, 38, 38, 0.38);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(10px);
}

.hero-search,
.search-panel,
.inline-filter,
.category-search {
  display: flex;
  gap: 10px;
}

.hero-search {
  max-width: 570px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.hero-search input,
.search-panel input,
.inline-filter input,
.category-search input {
  width: 100%;
  min-height: 46px;
  color: var(--text);
  background: #fff;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 18px;
  outline: none;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.32);
  border: 0;
  border-radius: 50%;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

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

.section {
  padding: 76px 0;
}

.white-section {
  background: #fff;
}

.warm-section {
  background: linear-gradient(135deg, #fff7ed, #fef2f2);
}

.dark-section {
  color: #fff;
  background: radial-gradient(circle at top left, rgba(249, 115, 22, 0.28), transparent 34%), linear-gradient(135deg, #111827, #020617);
}

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

.section-head.centered {
  justify-content: center;
  text-align: center;
}

.section-head h2 {
  margin: 10px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
}

.section-head p {
  margin: 12px auto 0;
  max-width: 720px;
  color: var(--muted);
}

.section-kicker {
  color: #fff;
}

.section-more {
  color: var(--red);
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.section-more.light {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

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

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

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

.movie-card {
  display: grid;
  overflow: hidden;
  color: var(--text);
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 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: rgba(249, 115, 22, 0.42);
  box-shadow: var(--shadow);
}

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

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

.movie-card:hover img {
  transform: scale(1.07);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.68));
}

.card-type {
  position: absolute;
  top: 12px;
  left: 12px;
  color: #fff;
  background: linear-gradient(90deg, var(--red), var(--orange));
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.play-mark {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--red);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 50%;
  transform: scale(0.94);
  transition: transform 0.2s ease;
}

.movie-card:hover .play-mark {
  transform: scale(1.08);
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.card-body strong {
  font-size: 17px;
  line-height: 1.35;
}

.card-body small,
.card-body em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.card-body em {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row,
.tag-block div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span,
.tag-block span {
  color: #b91c1c;
  background: #fee2e2;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-style: normal;
}

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

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

.category-tile {
  position: relative;
  display: grid;
  min-height: 182px;
  overflow: hidden;
  padding: 24px;
  color: var(--text);
  background: linear-gradient(135deg, #fff, #fff7ed);
  border: 1px solid #fed7aa;
  border-radius: 24px;
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.1);
}

.category-glow {
  position: absolute;
  right: -36px;
  top: -36px;
  width: 110px;
  height: 110px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  border-radius: 50%;
  opacity: 0.14;
}

.category-tile strong {
  position: relative;
  font-size: 22px;
}

.category-tile small {
  position: relative;
  color: var(--muted);
  font-size: 14px;
}

.category-tile > span:last-child {
  position: relative;
  align-self: end;
  color: var(--red);
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 70px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  backdrop-filter: blur(12px);
}

.rank-item span:first-child {
  color: #fdba74;
  font-size: 22px;
  font-weight: 900;
}

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

.rank-item strong,
.rank-item small {
  grid-column: 3;
}

.rank-item small {
  color: rgba(255, 255, 255, 0.68);
}

.service-band {
  color: #fff;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--yellow));
  padding: 34px 0;
}

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

.service-grid div {
  display: grid;
  gap: 4px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 18px;
}

.service-grid strong {
  font-size: 20px;
}

.page-hero {
  color: #fff;
  background: radial-gradient(circle at 20% 15%, rgba(250, 204, 21, 0.32), transparent 26%), linear-gradient(135deg, #991b1b, #ea580c 45%, #111827);
}

.compact-hero {
  padding: 72px 0 62px;
}

.page-hero h1 {
  margin: 14px 0 12px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
}

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

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.category-search {
  max-width: 560px;
  margin-top: 26px;
}

.category-search input {
  border-color: rgba(255, 255, 255, 0.24);
}

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

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

.rank-number {
  color: var(--orange);
  font-size: 28px;
  font-weight: 900;
}

.rank-row img {
  width: 112px;
  height: 70px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-copy {
  display: grid;
  gap: 4px;
}

.rank-copy small,
.rank-copy em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.rank-watch {
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--red));
  border-radius: 999px;
  padding: 8px 15px;
  font-weight: 800;
}

.search-panel {
  max-width: 720px;
  margin-top: 28px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.search-status {
  margin-bottom: 24px;
  color: var(--muted);
  font-weight: 800;
}

.detail-hero {
  color: #fff;
  background-position: center;
  background-size: cover;
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 38px;
  align-items: center;
  min-height: 560px;
  padding: 58px 0;
}

.detail-copy h1 {
  margin: 16px 0;
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1.04;
}

.detail-copy p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
}

.detail-poster {
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

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

.watch-section {
  padding: 42px 0;
  background: #030712;
}

.player-frame {
  position: relative;
  overflow: hidden;
  background: #000;
  border-radius: 26px;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.35);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-start span {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  color: var(--red);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  font-size: 30px;
}

.player-start strong {
  font-size: 22px;
}

.player-frame.is-playing .player-start {
  display: none;
}

.player-message {
  position: absolute;
  left: 18px;
  bottom: 18px;
  color: #fff;
  background: rgba(0, 0, 0, 0.56);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
}

.player-message:empty {
  display: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 32px;
}

.detail-article,
.detail-side {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.detail-article {
  padding: 32px;
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-article p {
  margin: 0 0 28px;
  color: #334155;
  font-size: 17px;
}

.tag-block {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.detail-side {
  align-self: start;
  padding: 24px;
}

.detail-side dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-side dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.detail-side dd {
  margin: -8px 0 6px;
  font-weight: 700;
}

.detail-side a {
  color: var(--red);
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #111827, #030712);
  padding-top: 54px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}

.footer-brand {
  display: inline-block;
  margin-bottom: 12px;
  color: #fff;
  font-size: 26px;
  font-weight: 900;
}

.site-footer p {
  margin: 0;
  color: #94a3b8;
}

.site-footer strong {
  display: block;
  margin-bottom: 12px;
  color: #fff;
}

.site-footer nav {
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  margin-top: 38px;
  padding: 20px;
  color: #94a3b8;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

[hidden] {
  display: none !important;
}

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

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

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

  .nav-cats {
    display: none;
  }
}

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

  .header-inner {
    min-height: 66px;
  }

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

  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 14px;
    color: #fff;
    background: rgba(17, 24, 39, 0.96);
    border-radius: 18px;
  }

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

  .hero-carousel {
    height: 620px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-search,
  .search-panel,
  .inline-filter {
    flex-direction: column;
    border-radius: 22px;
  }

  .section {
    padding: 52px 0;
  }

  .section-head {
    display: grid;
  }

  .movie-grid,
  .featured-grid,
  .category-grid,
  .category-grid.large,
  .rank-grid,
  .related-grid,
  .service-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 48px 90px 1fr;
  }

  .rank-row img {
    width: 90px;
    height: 62px;
  }

  .rank-watch {
    grid-column: 3;
    justify-self: start;
  }

  .detail-hero-inner {
    min-height: auto;
    padding: 42px 0;
  }

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

  .detail-article,
  .detail-side {
    padding: 22px;
  }
}
