:root {
  --bg-start: #fff7ed;
  --bg-mid: #fff1f2;
  --bg-end: #ffe4e6;
  --rose: #f43f5e;
  --rose-dark: #e11d48;
  --orange: #fb923c;
  --ink: #111827;
  --muted: #6b7280;
  --line: rgba(17, 24, 39, 0.10);
  --card: rgba(255, 255, 255, 0.86);
  --shadow: 0 18px 45px rgba(225, 29, 72, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(135deg, var(--bg-start), var(--bg-mid) 48%, var(--bg-end));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

main {
  min-height: 72vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 12px 28px rgba(244, 63, 94, 0.25);
  transition: transform 0.28s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.08) rotate(-3deg);
}

.brand-text strong {
  display: block;
  font-size: 20px;
  line-height: 1;
  background: linear-gradient(90deg, var(--rose), var(--orange));
  -webkit-background-clip: text;
  color: transparent;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
}

.nav-link,
.mobile-link {
  border-radius: 12px;
  color: #374151;
  font-weight: 700;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.nav-link {
  padding: 10px 14px;
  white-space: nowrap;
  font-size: 14px;
}

.nav-link:hover,
.mobile-link:hover {
  color: var(--rose-dark);
  background: rgba(244, 63, 94, 0.08);
}

.nav-link.active,
.mobile-link.active {
  color: #ffffff;
  background: linear-gradient(90deg, var(--rose), var(--orange));
  box-shadow: 0 10px 24px rgba(244, 63, 94, 0.2);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(244, 63, 94, 0.08);
  color: var(--rose-dark);
  font-size: 22px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 8px 20px 16px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}

.mobile-link {
  display: block;
  padding: 12px 14px;
  margin: 4px 0;
}

.hero-section {
  position: relative;
  max-width: 1220px;
  height: min(72vh, 680px);
  min-height: 520px;
  margin: 28px auto 0;
  overflow: hidden;
  border-radius: 34px;
  background: radial-gradient(circle at 20% 20%, rgba(251, 146, 60, 0.45), transparent 30%), radial-gradient(circle at 80% 40%, rgba(244, 63, 94, 0.42), transparent 34%), #111827;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.64) 42%, rgba(244, 63, 94, 0.18));
}

.hero-content {
  position: absolute;
  left: clamp(28px, 7vw, 88px);
  bottom: clamp(48px, 10vw, 110px);
  width: min(680px, calc(100% - 56px));
  color: #ffffff;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

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

.section-kicker {
  color: var(--rose-dark);
  background: rgba(244, 63, 94, 0.09);
}

.hero-content h1 {
  margin: 18px 0 16px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

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

.primary-button,
.secondary-button,
.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(90deg, var(--rose), var(--orange));
  box-shadow: 0 18px 32px rgba(244, 63, 94, 0.28);
}

.secondary-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.outline-button {
  color: var(--rose-dark);
  background: #ffffff;
  border: 1px solid rgba(244, 63, 94, 0.18);
}

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

.hero-controls {
  position: absolute;
  left: clamp(28px, 7vw, 88px);
  bottom: 28px;
  display: flex;
  gap: 9px;
}

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

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

.home-intro,
.page-hero,
.section-block,
.filter-panel,
.detail-hero,
.player-section,
.detail-content {
  max-width: 1220px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.home-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-top: 54px;
}

.home-intro h1,
.page-hero h1,
.detail-info h1 {
  margin: 14px 0 10px;
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.home-intro p,
.page-hero p,
.detail-info p {
  max-width: 820px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 17px;
}

.small-hero {
  padding-top: 56px;
  padding-bottom: 16px;
}

.filter-panel {
  margin-top: 24px;
}

.filter-panel label {
  display: block;
  margin-bottom: 10px;
  color: #374151;
  font-weight: 900;
}

.filter-row {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.filter-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  border-radius: 16px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-size: 16px;
}

.filter-row button {
  border: 0;
  border-radius: 16px;
  padding: 12px 18px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--rose), var(--orange));
  font-weight: 900;
  cursor: pointer;
}

.section-block {
  padding-top: 48px;
}

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

.section-heading h2 {
  margin: 10px 0 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.section-heading a {
  color: var(--rose-dark);
  font-weight: 900;
}

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

.category-tile {
  min-height: 132px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.7);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-tile span {
  display: block;
  color: var(--rose-dark);
  font-size: 20px;
  font-weight: 950;
  margin-bottom: 10px;
}

.category-tile small {
  color: var(--muted);
  line-height: 1.65;
}

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

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

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

.movie-card {
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.7);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 42px rgba(225, 29, 72, 0.14);
}

.card-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.22), rgba(251, 146, 60, 0.2));
}

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

.movie-card:hover .poster-wrap img {
  transform: scale(1.08);
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17, 24, 39, 0.72), transparent 58%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.movie-card:hover .poster-wrap::after {
  opacity: 1;
}

.poster-wrap figcaption {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

.type-badge,
.rank-badge,
.category-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.type-badge,
.rank-badge {
  padding: 6px 10px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(12px);
}

.rank-badge {
  background: linear-gradient(90deg, var(--rose), var(--orange));
}

.card-body {
  padding: 16px;
}

.category-pill {
  padding: 5px 9px;
  color: var(--rose-dark);
  background: rgba(244, 63, 94, 0.1);
}

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

.compact-grid .card-body h2 {
  min-height: 44px;
  font-size: 16px;
}

.card-body p {
  margin: 0 0 12px;
  min-height: 48px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 13px;
}

.meta-row span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.05);
}

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

.ranking-item a {
  display: grid;
  grid-template-columns: 54px 160px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.ranking-num {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  font-weight: 950;
}

.ranking-item img {
  width: 160px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.22), rgba(251, 146, 60, 0.2));
}

.ranking-item h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.ranking-item p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.7;
}

.detail-hero {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 36px;
  align-items: center;
  padding-top: 54px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 32px;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.24), rgba(251, 146, 60, 0.22));
  box-shadow: var(--shadow);
}

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

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 26px;
}

.detail-tags span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #374151;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
  font-weight: 800;
}

.player-section {
  padding-top: 44px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  aspect-ratio: 16 / 9;
  background: #0f172a;
  box-shadow: 0 28px 58px rgba(15, 23, 42, 0.28);
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000000;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.16), rgba(15, 23, 42, 0.74));
  cursor: pointer;
}

.play-layer span {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 34px;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 18px 40px rgba(244, 63, 94, 0.34);
}

.player-box.playing .play-layer {
  opacity: 0;
  pointer-events: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding-top: 32px;
}

.detail-content article {
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.detail-content h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-content p {
  margin: 0;
  color: #374151;
  line-height: 1.9;
}

.site-footer {
  margin-top: 72px;
  color: #ffffff;
  background: linear-gradient(90deg, #111827, #1f2937);
}

.footer-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 42px 20px 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 28px;
}

.footer-brand {
  color: #fb7185;
  font-size: 22px;
  font-weight: 950;
  margin-bottom: 12px;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #fb7185;
  font-size: 18px;
}

.site-footer p,
.site-footer a {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.8;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li + li {
  margin-top: 8px;
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.56);
  text-align: center;
  font-size: 14px;
}

[data-card].is-hidden {
  display: none;
}

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

  .menu-button {
    display: grid;
    place-items: center;
  }

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

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

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

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

@media (max-width: 820px) {
  .hero-section {
    min-height: 520px;
    margin-left: 14px;
    margin-right: 14px;
    border-radius: 28px;
  }

  .home-intro,
  .section-heading,
  .filter-row {
    align-items: stretch;
    flex-direction: column;
  }

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

  .ranking-item a {
    grid-template-columns: 44px 96px 1fr;
    gap: 12px;
  }

  .ranking-item img {
    width: 96px;
  }

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

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .header-inner {
    height: 62px;
    padding: 0 14px;
  }

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

  .hero-section {
    min-height: 500px;
  }

  .hero-content {
    left: 22px;
    bottom: 58px;
    width: calc(100% - 44px);
  }

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

  .hero-controls {
    left: 22px;
  }

  .category-grid,
  .movie-grid,
  .featured-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .ranking-item a {
    grid-template-columns: 1fr;
  }

  .ranking-num {
    width: 38px;
    height: 38px;
  }

  .ranking-item img {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
