:root {
  --red: #ef4444;
  --orange: #f97316;
  --pink: #ec4899;
  --rose: #fff1f2;
  --paper: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #f1f5f9;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  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;
  color: var(--ink);
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 28%, #fff1f2 100%);
}

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

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

button,
input {
  font: inherit;
}

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

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

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--red), var(--orange), var(--pink));
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  white-space: nowrap;
}

.logo::before,
.footer-logo::before {
  content: "";
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--red), var(--orange), var(--pink));
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.28);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
}

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

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

.top-search {
  width: 310px;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 10px 28px rgba(251, 146, 60, 0.12);
}

.top-search input,
.large-search input,
.inline-filter input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  color: var(--ink);
}

.top-search input {
  padding: 8px 12px;
}

.top-search button,
.large-search button,
.inline-filter button {
  border: 0;
  cursor: pointer;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.22);
  white-space: nowrap;
}

.top-search button {
  padding: 8px 16px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #fff1f2;
  color: var(--red);
  cursor: pointer;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: linear-gradient(135deg, #f87171, #fb923c, #f472b6);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  filter: saturate(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 255, 255, 0.25), transparent 30%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.84), rgba(17, 24, 39, 0.48), rgba(239, 68, 68, 0.22)),
    linear-gradient(135deg, rgba(239, 68, 68, 0.7), rgba(249, 115, 22, 0.45), rgba(236, 72, 153, 0.6));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px;
  align-items: center;
  gap: 56px;
  color: #fff;
}

.hero-copy {
  max-width: 720px;
  animation: fadeUp 0.7s ease both;
}

.hero-kicker,
.section-heading span,
.page-hero span,
.detail-kicker,
.ranking-head span,
.category-card-wide span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-kicker {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero h1 {
  margin: 22px 0 16px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-line {
  max-width: 660px;
  margin: 0;
  font-size: 20px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.92);
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.hero-tags span,
.detail-tags span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  backdrop-filter: blur(10px);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-btn {
  border: 0;
  color: var(--red);
  background: #fff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
  cursor: pointer;
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px) scale(1.02);
}

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

.hero-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 34px 72px rgba(15, 23, 42, 0.42);
  transform: rotate(3deg);
  background: linear-gradient(135deg, #fee2e2, #ffedd5);
}

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

.hero-cover:hover img {
  transform: scale(1.06);
}

.hero-panel {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.hero-panel button {
  border: 0;
  color: #fff;
  background: transparent;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

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

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

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

.quick-search-section {
  margin-top: -42px;
  position: relative;
  z-index: 6;
}

.large-search,
.inline-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  border: 1px solid rgba(254, 215, 170, 0.85);
}

.large-search input,
.inline-filter input {
  padding: 14px 18px;
}

.large-search button,
.inline-filter button {
  padding: 14px 24px;
}

.section {
  padding: 74px 0;
}

.soft-section {
  background: linear-gradient(135deg, rgba(255, 237, 213, 0.72), rgba(255, 241, 242, 0.9));
}

.section-heading {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 42px;
}

.section-heading span,
.page-hero span,
.detail-kicker,
.category-card-wide span {
  background: linear-gradient(135deg, #fee2e2, #ffedd5);
  color: var(--red);
}

.section-heading h2,
.page-hero h1,
.detail-info h1 {
  margin: 14px 0;
  font-size: clamp(32px, 4.5vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.section-heading p,
.page-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

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

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

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

.movie-card,
.mini-card,
.category-tile,
.category-card-wide,
.rank-row {
  background: var(--paper);
  border: 1px solid rgba(248, 113, 113, 0.08);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
}

.movie-card:hover,
.mini-card:hover,
.category-tile:hover,
.category-card-wide:hover,
.rank-row:hover {
  transform: translateY(-7px);
  border-color: rgba(239, 68, 68, 0.24);
  box-shadow: var(--shadow);
}

.card-poster,
.mini-poster {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f3f4f6, #fee2e2);
}

.card-poster {
  aspect-ratio: 3 / 4;
}

.card-poster img,
.mini-poster img,
.category-tile img,
.category-card-wide img,
.rank-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .card-poster img,
.mini-card:hover .mini-poster img,
.category-tile:hover img,
.category-card-wide:hover img,
.rank-row:hover img {
  transform: scale(1.08);
}

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

.movie-card:hover .card-play {
  opacity: 1;
  background: rgba(15, 23, 42, 0.42);
}

.card-body {
  padding: 20px;
}

.card-body h3,
.mini-card strong {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
  color: #111827;
}

.card-body p {
  min-height: 52px;
  margin: 10px 0 14px;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.card-meta span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.card-meta span {
  background: #fff7ed;
  color: #c2410c;
}

.card-tags span {
  background: #fef2f2;
  color: #b91c1c;
}

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

.category-tile {
  min-height: 190px;
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 22px;
  color: #fff;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.82));
}

.category-tile img {
  position: absolute;
  inset: 0;
}

.category-tile div {
  position: relative;
  z-index: 2;
  padding: 18px;
}

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

.category-tile span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
}

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

.ranking-box {
  position: sticky;
  top: 92px;
  border-radius: var(--radius);
  padding: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.ranking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.ranking-head a {
  color: var(--red);
  font-weight: 900;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 38px 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
}

.rank-row span {
  font-weight: 950;
  color: var(--red);
  text-align: center;
}

.rank-row img {
  width: 58px;
  height: 76px;
  border-radius: 14px;
}

.rank-row strong,
.rank-row em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.mini-card {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  padding-bottom: 12px;
}

.mini-poster {
  aspect-ratio: 3 / 4;
  margin-bottom: 12px;
}

.mini-card strong,
.mini-card span {
  display: block;
  padding: 0 12px;
}

.mini-card strong {
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.page-hero {
  padding: 82px 0;
  background:
    radial-gradient(circle at 80% 10%, rgba(236, 72, 153, 0.18), transparent 32%),
    linear-gradient(135deg, #fff7ed, #fff1f2);
  text-align: center;
}

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

.category-card-wide {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  min-height: 240px;
  padding: 18px;
  border-radius: var(--radius);
}

.category-card-wide img {
  height: 204px;
  border-radius: 20px;
}

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

.category-card-wide p {
  margin: 0;
  color: var(--muted);
  line-height: 1.85;
}

.inline-filter {
  max-width: 760px;
  margin: 28px auto 0;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 14px 26px rgba(239, 68, 68, 0.28);
  font-weight: 950;
}

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

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

.detail-bg,
.detail-mask {
  position: absolute;
  inset: 0;
}

.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px) saturate(1.1);
  transform: scale(1.08);
}

.detail-mask {
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.9), rgba(17, 24, 39, 0.62)),
    linear-gradient(135deg, rgba(239, 68, 68, 0.42), rgba(236, 72, 153, 0.34));
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding-top: 74px;
  padding-bottom: 74px;
}

.breadcrumb {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 34px;
  box-shadow: 0 34px 72px rgba(0, 0, 0, 0.38);
  background: linear-gradient(135deg, #fee2e2, #ffedd5);
}

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

.detail-info h1 {
  font-size: clamp(40px, 5.6vw, 72px);
}

.detail-one-line {
  max-width: 760px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

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

.detail-tags {
  margin-bottom: 32px;
}

.player-shell {
  overflow: hidden;
  border-radius: 28px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

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

.player-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  color: #fff;
}

.small-btn {
  min-height: 40px;
  padding: 8px 18px;
}

.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 34px;
  align-items: start;
}

.detail-article,
.detail-side {
  background: #fff;
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

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

.detail-article p {
  margin: 0 0 30px;
  color: #374151;
  font-size: 17px;
  line-height: 2;
}

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

.detail-side dt {
  color: var(--muted);
  font-weight: 900;
}

.detail-side dd {
  margin: -8px 0 0;
  color: #111827;
  line-height: 1.7;
}

.site-footer {
  background: #111827;
  color: #e5e7eb;
  padding: 48px 0;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.footer-inner p {
  margin: 0;
  max-width: 780px;
  color: #9ca3af;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  color: #fca5a5;
  font-weight: 800;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .top-search {
    display: none;
  }

  .hero-content {
    grid-template-columns: 1fr 280px;
  }

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

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

  .split-layout,
  .article-grid {
    grid-template-columns: 1fr;
  }

  .ranking-box {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-wrap {
    height: 64px;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow);
  }

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

  .logo span {
    font-size: 20px;
  }

  .hero {
    height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
  }

  .hero-cover {
    width: min(240px, 76vw);
    justify-self: start;
  }

  .hero-line,
  .detail-one-line {
    font-size: 17px;
  }

  .large-search,
  .inline-filter {
    border-radius: 24px;
    flex-direction: column;
    align-items: stretch;
  }

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .category-grid,
  .category-wide-grid,
  .ranking-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

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

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

  .detail-poster {
    width: min(280px, 82vw);
  }

  .player-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .featured-grid,
  .compact-grid,
  .category-grid,
  .category-wide-grid,
  .ranking-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 38px;
  }

  .section {
    padding: 52px 0;
  }
}
