:root {
  --bg: #100914;
  --bg-soft: #17101d;
  --bg-card: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.12);
  --text: #fff8fb;
  --muted: #d9c8d4;
  --rose: #f43f5e;
  --pink: #ec4899;
  --orange: #fb923c;
  --gold: #facc15;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(244, 63, 94, 0.28), transparent 28rem),
    radial-gradient(circle at 92% 12%, rgba(251, 146, 60, 0.24), transparent 30rem),
    linear-gradient(180deg, #160b1f 0%, #0e0812 52%, #09070d 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(244, 63, 94, 0.96), rgba(236, 72, 153, 0.96), rgba(251, 146, 60, 0.96));
  box-shadow: 0 14px 36px rgba(244, 63, 94, 0.28);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.main-nav {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.main-nav a {
  font-size: 15px;
  font-weight: 700;
  opacity: 0.94;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.header-search,
.mobile-search,
.hero-search,
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search input,
.mobile-search input,
.hero-search input,
.filter-bar input,
.filter-bar select {
  border: 1px solid rgba(255, 255, 255, 0.18);
  outline: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 11px 15px;
  min-width: 210px;
}

.header-search input::placeholder,
.mobile-search input::placeholder,
.hero-search input::placeholder,
.filter-bar input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.header-search button,
.mobile-search button,
.hero-search button,
.filter-bar button,
.btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: white;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 12px 30px rgba(244, 63, 94, 0.28);
  cursor: pointer;
  font-weight: 800;
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.menu-toggle {
  display: none;
  border: 0;
  color: white;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  font-size: 24px;
}

.mobile-panel {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  gap: 10px;
  flex-wrap: wrap;
}

.mobile-panel.is-open {
  display: flex;
}

.mobile-panel a {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 700;
}

main {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  margin: 28px 0 42px;
  border-radius: 34px;
  overflow: hidden;
  min-height: 590px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-slider {
  position: relative;
  min-height: 590px;
}

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 30%, rgba(251, 146, 60, 0.18), transparent 24rem),
    linear-gradient(90deg, rgba(11, 7, 14, 0.94) 0%, rgba(11, 7, 14, 0.72) 45%, rgba(11, 7, 14, 0.25) 100%),
    linear-gradient(0deg, rgba(10, 8, 12, 0.72), rgba(10, 8, 12, 0.08));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(670px, 100%);
  padding: 72px 54px;
  min-height: 590px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  color: #ffe4e9;
  background: rgba(244, 63, 94, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 18px 0 14px;
  font-size: clamp(36px, 7vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 950;
}

.hero p,
.page-hero p,
.detail-title p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.hero-meta,
.tag-row,
.meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-meta span,
.tag-row span,
.meta-line span {
  border-radius: 999px;
  color: #ffe8ee;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 54px;
  bottom: 40px;
  display: flex;
  gap: 10px;
}

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

.hero-dots button.is-active {
  width: 32px;
  background: white;
}

.hero-search {
  position: absolute;
  z-index: 4;
  right: 30px;
  bottom: 30px;
  width: min(440px, calc(100% - 60px));
  padding: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  background: rgba(0, 0, 0, 0.18);
}

.page-hero,
.detail-hero {
  margin: 28px 0 34px;
  padding: 38px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 90% 0%, rgba(251, 146, 60, 0.22), transparent 26rem),
    linear-gradient(135deg, rgba(244, 63, 94, 0.18), rgba(236, 72, 153, 0.09));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.section {
  margin: 42px 0;
}

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

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

.section-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-more {
  color: white;
  border-radius: 999px;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
  white-space: nowrap;
}

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

.category-tile {
  min-height: 150px;
  padding: 22px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 5%, rgba(250, 204, 21, 0.16), transparent 12rem),
    rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.2s ease, background 0.2s ease;
}

.category-tile:hover,
.movie-card:hover {
  transform: translateY(-4px);
}

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

.category-tile span {
  color: var(--muted);
  line-height: 1.7;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.movie-card {
  border-radius: 24px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.24), rgba(251, 146, 60, 0.18));
}

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

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

.poster-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--rose), var(--orange));
}

.card-body {
  padding: 14px;
}

.card-meta {
  display: flex;
  gap: 8px;
  color: #ffccd7;
  font-size: 12px;
  font-weight: 800;
}

.card-body h3 {
  margin: 9px 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

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

.rank-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.rank-list li a {
  display: grid;
  grid-template-columns: 52px 70px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.rank-no {
  color: var(--gold);
  font-size: 24px;
  font-weight: 950;
  text-align: center;
}

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

.rank-text strong,
.rank-text em {
  display: block;
}

.rank-text strong {
  font-size: 18px;
  margin-bottom: 6px;
}

.rank-text em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.6;
}

.filter-bar {
  margin: 20px 0 24px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}

.filter-bar input {
  min-width: 280px;
  flex: 1;
}

.filter-bar select {
  min-width: 150px;
}

.breadcrumb {
  margin: 24px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.breadcrumb a:hover {
  color: white;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 26px;
  align-items: start;
}

.player-wrap {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: #050509;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle at center, rgba(244, 63, 94, 0.16), rgba(0, 0, 0, 0.18));
  cursor: pointer;
  z-index: 4;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 34px;
  color: white;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 20px 50px rgba(244, 63, 94, 0.38);
  padding-left: 5px;
}

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

.detail-card {
  padding: 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.11);
}

.detail-card img {
  border-radius: 22px;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  margin-bottom: 16px;
}

.content-panel {
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 24px;
}

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.content-panel p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.95;
}

.search-empty {
  padding: 30px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

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

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

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

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .header-inner {
    justify-content: space-between;
  }

  .hero,
  .hero-slider,
  .hero-content {
    min-height: 640px;
  }

  .hero-content {
    padding: 44px 26px 120px;
  }

  .hero-search {
    left: 20px;
    right: 20px;
    bottom: 22px;
    width: auto;
  }

  .hero-dots {
    left: 28px;
    bottom: 96px;
  }

  .section-title,
  .detail-grid,
  .rank-layout {
    display: block;
  }

  .section-more {
    display: inline-block;
    margin-top: 14px;
  }

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

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-card {
    margin-top: 20px;
  }
}

@media (max-width: 540px) {
  main,
  .header-inner,
  .mobile-panel {
    width: min(100% - 22px, 1240px);
  }

  .brand {
    font-size: 18px;
  }

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

  .page-hero,
  .detail-hero,
  .content-panel {
    padding: 22px;
  }

  .rank-list li a {
    grid-template-columns: 42px 58px 1fr;
  }

  .rank-list img {
    width: 58px;
    height: 78px;
  }

  .filter-bar input,
  .filter-bar select {
    min-width: 100%;
  }
}
