* {
  box-sizing: border-box;
}

:root {
  --rose: #f43f5e;
  --rose-dark: #be123c;
  --orange: #fb923c;
  --amber: #f59e0b;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #fff7ed;
  --line: rgba(17, 24, 39, 0.08);
  --shadow: 0 20px 50px rgba(244, 63, 94, 0.16);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #fff7ed 0%, #fff1f2 48%, #fff7ed 100%);
  min-height: 100vh;
}

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

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

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.84);
  border-bottom: 1px solid rgba(244, 63, 94, 0.10);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
}

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

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 10px 24px rgba(244, 63, 94, 0.26);
}

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

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

.nav-link,
.mobile-link {
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  color: #374151;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.active,
.mobile-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #fff1f2;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--rose-dark);
  border-radius: 4px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 32px rgba(17, 24, 39, 0.08);
}

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

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

.hero-track,
.hero-slide {
  min-height: 560px;
}

.hero-slide {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 54px;
  padding: 72px max(32px, calc((100vw - 1180px) / 2)) 80px;
  color: #fff;
  background-size: cover;
  background-position: center;
}

.hero-slide.active {
  display: flex;
  animation: heroFade 0.48s ease both;
}

@keyframes heroFade {
  from {
    opacity: 0.3;
    transform: scale(1.02);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-copy {
  width: min(620px, 100%);
}

.hero-kicker,
.page-hero span,
.section-heading span,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff7ed;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 14px 0 0;
  line-height: 1.08;
}

.hero-copy h1 {
  font-size: clamp(38px, 6vw, 70px);
}

.hero-copy h2 {
  font-size: clamp(30px, 5vw, 56px);
}

.hero-copy p {
  margin: 20px 0 0;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.78;
}

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

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

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

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

.primary-button,
.site-search button {
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 16px 34px rgba(244, 63, 94, 0.28);
}

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

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

.hero-poster {
  width: min(330px, 34vw);
  aspect-ratio: 2 / 3;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(10px);
  font-size: 38px;
  line-height: 48px;
  cursor: pointer;
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

.hero-dot {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.hero-dot.active {
  background: #fff;
}

.search-band {
  padding: 28px 0 8px;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 24px;
  align-items: center;
  padding: 26px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-panel h2,
.search-panel p {
  margin: 0;
}

.search-panel h2 {
  font-size: 28px;
}

.search-panel p {
  margin-top: 8px;
  color: var(--muted);
}

.site-search {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(244, 63, 94, 0.10);
}

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

.section-block {
  padding: 58px 0;
}

.compact-section {
  padding: 42px 0;
}

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

.section-heading span {
  color: var(--rose);
}

.section-heading h2 {
  margin: 4px 0 0;
  font-size: clamp(26px, 4vw, 38px);
}

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

.light-heading span,
.light-heading h2,
.light-heading a {
  color: #fff;
}

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

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  padding: 22px;
  border-radius: 26px;
  color: #fff;
  background: #111827;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.category-card img,
.category-card::before {
  position: absolute;
  inset: 0;
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  z-index: -2;
  transition: transform 0.36s ease;
}

.category-card::before {
  content: "";
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.10), rgba(17, 24, 39, 0.84));
  z-index: -1;
}

.category-card:hover img {
  transform: scale(1.08);
}

.category-card strong,
.category-card small,
.category-card em {
  display: block;
  position: relative;
  z-index: 2;
}

.category-card strong {
  margin-top: 82px;
  font-size: 24px;
}

.category-card small {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
}

.category-card em {
  margin-top: 14px;
  font-style: normal;
  font-weight: 800;
  color: #fed7aa;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 58px rgba(244, 63, 94, 0.18);
}

.card-media {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #fff1f2, #ffedd5);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease;
}

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

.type-badge,
.year-badge,
.rank-mark {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(10px);
}

.type-badge {
  left: 12px;
  top: 12px;
}

.year-badge {
  right: 12px;
  top: 12px;
}

.rank-mark {
  left: 12px;
  bottom: 12px;
  min-width: 40px;
  background: linear-gradient(135deg, var(--rose), var(--orange));
}

.card-body {
  padding: 16px;
}

.meta-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
}

.meta-line span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-body h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.32;
}

.card-body h3 a:hover {
  color: var(--rose-dark);
}

.card-body p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row span,
.detail-tags span {
  color: var(--rose-dark);
  background: #ffe4e6;
}

.compact-card {
  display: grid;
  grid-template-columns: 100px 1fr;
}

.compact-card .card-media {
  aspect-ratio: 2 / 3;
  min-height: 150px;
}

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

.ranking-band {
  background: linear-gradient(135deg, #f43f5e, #fb923c);
}

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

.page-hero {
  padding: 92px 0 76px;
  color: #fff;
  background: linear-gradient(135deg, #f43f5e, #fb923c 55%, #f59e0b);
}

.catalog-hero {
  background: linear-gradient(135deg, #be123c, #f97316 58%, #f59e0b);
}

.ranking-hero {
  background: linear-gradient(135deg, #111827, #be123c 54%, #fb923c);
}

.category-hero {
  background: linear-gradient(135deg, #f43f5e, #fb923c);
}

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

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

.inner-search {
  max-width: 620px;
  margin-top: 28px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-chip {
  border: 0;
  padding: 10px 16px;
  border-radius: 999px;
  color: #374151;
  background: #fff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
  cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
}

.empty-state {
  display: none;
  padding: 48px 0;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.empty-state.show {
  display: block;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--rose-dark);
}

.detail-hero {
  padding: 64px 0;
  background: radial-gradient(circle at top left, #ffe4e6, transparent 36%), linear-gradient(135deg, #fff7ed, #fff1f2);
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

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

.detail-kicker {
  color: var(--rose-dark);
}

.detail-info h1 {
  margin: 14px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.detail-one-line {
  max-width: 760px;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.8;
}

.detail-tags {
  margin: 22px 0 28px;
}

.player-section h2 {
  margin: 0 0 18px;
  font-size: 30px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.18), rgba(0, 0, 0, 0.58));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 20px 40px rgba(244, 63, 94, 0.34);
  font-weight: 900;
  cursor: pointer;
}

.play-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(240px, 320px);
  gap: 22px;
  padding: 0 0 42px;
}

.story-card,
.info-card {
  padding: 26px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.08);
}

.story-card h2,
.info-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.story-card p {
  margin: 0;
  color: #4b5563;
  line-height: 1.92;
}

.info-card dl,
.info-card dd {
  margin: 0;
}

.info-card div {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.info-card div:last-child {
  border-bottom: 0;
}

.info-card dt {
  color: var(--muted);
  font-weight: 800;
}

.info-card dd {
  color: #111827;
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937);
  margin-top: 30px;
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 34px;
  padding: 46px 0;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #fff;
}

.footer-grid p {
  max-width: 460px;
  color: #9ca3af;
  line-height: 1.8;
}

.footer-grid a {
  display: block;
  margin: 8px 0;
  color: #d1d5db;
}

.footer-grid a:hover {
  color: #fff;
}

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
  text-align: center;
}

.movie-card.hidden-card {
  display: none;
}

@media (max-width: 1120px) {
  .category-grid,
  .large-category-grid,
  .all-movie-grid,
  .ranking-page-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .info-card {
    grid-column: 1 / -1;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero-slide {
    flex-direction: column;
    align-items: flex-start;
    min-height: 680px;
    padding: 58px 24px 86px;
  }

  .hero-poster {
    width: min(240px, 70vw);
  }

  .hero-arrow {
    display: none;
  }

  .search-panel,
  .detail-grid,
  .footer-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .category-grid,
  .large-category-grid,
  .movie-grid,
  .all-movie-grid,
  .ranking-page-grid,
  .related-grid,
  .rank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading {
    display: block;
  }

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

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

  .brand-text {
    font-size: 17px;
  }

  .hero-copy h1 {
    font-size: 36px;
  }

  .hero-copy h2 {
    font-size: 30px;
  }

  .hero-copy p,
  .page-hero p,
  .detail-one-line {
    font-size: 16px;
  }

  .site-search {
    border-radius: 22px;
    flex-direction: column;
  }

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

  .category-grid,
  .large-category-grid,
  .movie-grid,
  .all-movie-grid,
  .ranking-page-grid,
  .related-grid,
  .rank-grid {
    grid-template-columns: 1fr;
  }

  .compact-card {
    grid-template-columns: 96px 1fr;
  }

  .page-hero {
    padding: 64px 0 54px;
  }

  .section-block {
    padding: 38px 0;
  }
}
