:root {
  --blue: #2563eb;
  --purple: #7c3aed;
  --pink: #db2777;
  --orange: #f97316;
  --red: #ef4444;
  --cyan: #06b6d4;
  --dark: #0f172a;
  --gray: #475569;
  --light: #f8fafc;
  --card: #ffffff;
  --ring: rgba(37, 99, 235, 0.22);
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 46%, #ffffff 100%);
  color: #1f2937;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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: linear-gradient(90deg, var(--blue), var(--purple), var(--pink));
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.24);
}

.header-inner {
  display: flex;
  align-items: center;
  min-height: 72px;
  gap: 26px;
}

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

.brand {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.nav-link,
.nav-drop > button {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 650;
  cursor: pointer;
  padding: 8px 0;
}

.nav-link:hover,
.nav-link.active,
.nav-drop:hover > button {
  color: #cffafe;
}

.nav-drop {
  position: relative;
}

.nav-drop-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: -18px;
  display: grid;
  width: 188px;
  padding: 10px;
  border-radius: 16px;
  background: #ffffff;
  color: #1f2937;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-drop:hover .nav-drop-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-drop-panel a {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.95rem;
}

.nav-drop-panel a:hover {
  background: #eff6ff;
  color: var(--blue);
}

.top-search {
  position: relative;
  width: min(260px, 24vw);
}

.top-search input,
.mobile-search input {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  padding: 11px 46px 11px 17px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.top-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.74);
}

.top-search button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  font-size: 1.1rem;
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 0 20px 20px;
}

.mobile-panel.open {
  display: grid;
  gap: 12px;
}

.mobile-panel .nav-link {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: var(--blue);
  background: #ffffff;
  font-weight: 700;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 12% 10%, rgba(6, 182, 212, 0.52), transparent 32%), linear-gradient(135deg, #0f172a 0%, #1e1b4b 48%, #831843 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -34% -10%;
  height: 240px;
  background: #f8fbff;
  transform: rotate(-3deg);
  transform-origin: center;
}

.hero-slider {
  position: relative;
  z-index: 1;
  min-height: 630px;
  padding: 74px 0 98px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.06fr) minmax(320px, 0.76fr);
  align-items: center;
  gap: clamp(28px, 5vw, 62px);
}

.hero-slide.active {
  display: grid;
}

.hero-badge,
.section-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: linear-gradient(90deg, var(--orange), var(--red));
  box-shadow: 0 14px 30px rgba(239, 68, 68, 0.28);
}

.hero-badge {
  padding: 9px 16px;
  margin-bottom: 20px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-meta span,
.detail-meta span,
.card-meta-line span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(14px);
  color: rgba(255, 255, 255, 0.88);
  font-weight: 650;
  font-size: 0.92rem;
}

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

.btn-primary,
.btn-secondary,
.btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.22s ease;
}

.btn-primary {
  padding: 14px 24px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--orange), var(--red));
  box-shadow: 0 16px 32px rgba(239, 68, 68, 0.3);
}

.btn-secondary {
  padding: 14px 24px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.btn-soft {
  padding: 11px 18px;
  color: var(--blue);
  background: #eff6ff;
}

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

.hero-poster {
  position: relative;
  min-height: 420px;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.34);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(15, 23, 42, 0.78) 100%);
}

.poster-caption {
  position: absolute;
  z-index: 1;
  left: 24px;
  right: 24px;
  bottom: 22px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.poster-caption strong {
  display: block;
  font-size: 1.25rem;
}

.poster-caption span {
  color: rgba(255, 255, 255, 0.76);
}

.hero-dots {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: -48px;
  padding-bottom: 54px;
}

.hero-dot {
  width: 36px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

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

main {
  position: relative;
  z-index: 2;
}

.section {
  padding: 54px 0;
}

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

.section-kicker,
.detail-kicker {
  padding: 7px 12px;
  font-size: 0.78rem;
}

.section h2,
.page-title,
.detail-title {
  margin: 10px 0 0;
  color: var(--dark);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-lead,
.page-lead {
  max-width: 760px;
  color: var(--gray);
  line-height: 1.8;
}

.category-strip,
.category-grid {
  display: grid;
  gap: 16px;
}

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

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 138px;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #eff6ff);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  transition: 0.22s ease;
}

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

.category-card strong {
  display: block;
  color: var(--dark);
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.category-card p {
  margin: 0;
  color: var(--gray);
  line-height: 1.65;
}

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

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

.space-gap {
  height: 18px;
}

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
  transition: 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #fce7f3);
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.35s ease;
}

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

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(15, 23, 42, 0.64));
  opacity: 0.75;
}

.movie-play {
  position: absolute;
  z-index: 1;
  right: 14px;
  bottom: 14px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(249, 115, 22, 0.92);
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.32);
}

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

.movie-title {
  display: block;
  color: var(--dark);
  font-size: 1.05rem;
  font-weight: 850;
  line-height: 1.4;
}

.movie-title:hover {
  color: var(--blue);
}

.movie-meta,
.movie-line {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.6;
}

.movie-line {
  min-height: 46px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  border-radius: 999px;
  padding: 5px 9px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 700;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 24px;
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 15px;
  border-radius: 18px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
}

.rank-item:hover {
  transform: translateX(4px);
}

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

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

.rank-info strong {
  color: var(--dark);
}

.rank-info em {
  color: #64748b;
  font-style: normal;
  font-size: 0.88rem;
}

.page-hero,
.detail-hero {
  padding: 52px 0;
  color: #ffffff;
  background: radial-gradient(circle at 18% 20%, rgba(14, 165, 233, 0.42), transparent 28%), linear-gradient(135deg, #111827, #312e81 52%, #9f1239);
}

.page-hero .page-title,
.page-hero .page-lead,
.detail-hero .detail-title {
  color: #ffffff;
}

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

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #dbeafe, #fce7f3);
}

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

.detail-info {
  display: grid;
  gap: 18px;
}

.detail-title {
  margin-top: 12px;
  font-size: clamp(2.1rem, 5vw, 4.2rem);
}

.detail-summary {
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.06rem;
  line-height: 1.9;
}

.player-section {
  padding: 48px 0 24px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

.video-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  outline: 0;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.52));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-cover.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  display: grid;
  width: clamp(72px, 10vw, 108px);
  height: clamp(72px, 10vw, 108px);
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 22px 48px rgba(239, 68, 68, 0.4);
}

.play-icon::before {
  content: "";
  margin-left: 7px;
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  border-left: 28px solid #ffffff;
}

.content-card {
  padding: 28px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
  margin: 0 0 12px;
  color: var(--dark);
}

.content-card p {
  margin: 0;
  color: var(--gray);
  line-height: 1.9;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

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

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.search-panel input {
  min-width: 0;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  background: #f1f5f9;
  outline: 0;
}

.search-panel button {
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--blue), var(--purple));
  font-weight: 800;
  cursor: pointer;
}

.search-note {
  color: #64748b;
  line-height: 1.8;
}

.site-footer {
  margin-top: 64px;
  color: #cbd5e1;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr 1fr;
  gap: 34px;
  padding: 48px 0;
}

.footer-brand {
  color: #ffffff;
  font-size: 1.35rem;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 1rem;
}

.site-footer p {
  max-width: 460px;
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer a {
  display: block;
  margin-bottom: 10px;
  color: #cbd5e1;
}

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

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}

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

@media (max-width: 980px) {
  .desktop-nav,
  .top-search {
    display: none;
  }

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

  .hero-slide,
  .detail-grid,
  .rank-layout,
  .two-column,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-slider {
    min-height: auto;
    padding: 48px 0 82px;
  }

  .hero-poster,
  .hero-poster img {
    min-height: 360px;
  }

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

@media (max-width: 620px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

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

  .hero h1,
  .detail-title {
    letter-spacing: -0.03em;
  }

  .hero-actions,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .category-strip,
  .category-grid,
  .category-overview,
  .movie-grid,
  .ranking-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .hero-poster img {
    min-height: 300px;
  }

  .poster-caption {
    align-items: start;
    flex-direction: column;
  }

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

  .search-panel button {
    padding: 13px 18px;
  }
}
