* {
  box-sizing: border-box;
}

:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #0891b2;
  --red: #ef4444;
  --yellow: #facc15;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --shadow-lg: 0 18px 38px rgba(15, 23, 42, 0.14);
  --shadow-xl: 0 26px 60px rgba(15, 23, 42, 0.24);
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--slate-50);
  color: var(--slate-800);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.container.narrow {
  width: min(980px, calc(100% - 32px));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #2563eb, #1d4ed8 48%, #0891b2);
  color: #fff;
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.28);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  gap: 24px;
}

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

.brand-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.brand strong {
  display: block;
  font-size: 24px;
  letter-spacing: 0.04em;
}

.brand small {
  display: block;
  font-size: 13px;
  color: #dbeafe;
  font-weight: 500;
}

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

.nav-link,
.mobile-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: #eff6ff;
  transition: background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 21px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: #fff;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #0f172a;
  color: #fff;
}

.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-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.26;
  filter: blur(2px) saturate(1.08);
  transform: scale(1.04);
}

.hero-slide::before,
.detail-hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 30%, rgba(59, 130, 246, 0.42), transparent 35%),
    linear-gradient(120deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.74) 55%, rgba(8, 145, 178, 0.62));
}

.hero-layout {
  position: relative;
  z-index: 1;
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 390px;
  gap: 48px;
  align-items: center;
  padding: 72px 0 96px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #dbeafe;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 22px 0 18px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-desc,
.page-hero p,
.detail-one-line {
  max-width: 700px;
  color: #dbeafe;
  font-size: 19px;
}

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

.hero-tags span,
.hero-tags strong,
.detail-meta span,
.detail-meta strong {
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 700;
}

.hero-tags strong,
.detail-meta strong {
  color: var(--yellow);
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.36);
}

.primary-button:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.46);
}

.ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 30px;
  overflow: hidden;
  min-height: 520px;
  box-shadow: var(--shadow-xl);
  transform: rotate(1.5deg);
}

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

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(15, 23, 42, 0.7));
}

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

.hero-dot {
  height: 5px;
  width: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 56px;
  background: var(--blue);
}

.search-band {
  margin-top: -42px;
  position: relative;
  z-index: 4;
}

.search-band-inner {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 24px;
  align-items: center;
  padding: 28px;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.search-band h2 {
  margin: 0 0 6px;
  font-size: 28px;
}

.search-band p {
  margin: 0;
  color: var(--slate-600);
}

.home-search {
  display: flex;
  gap: 10px;
}

.home-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  padding: 0 15px;
  background: #fff;
  color: var(--slate-800);
  outline: none;
}

.home-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.home-search button {
  min-width: 96px;
  border: 0;
  border-radius: 14px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.section {
  padding: 76px 0;
}

.section-heading {
  margin-bottom: 30px;
}

.section-heading span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  color: var(--slate-800);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
}

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

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

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

.movie-card {
  min-width: 0;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.movie-card[hidden],
.rank-card[hidden] {
  display: none !important;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.15;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #2563eb);
}

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

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

.card-badge,
.card-score {
  position: absolute;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.card-badge {
  left: 12px;
  color: #fff;
  background: rgba(37, 99, 235, 0.9);
}

.card-score {
  right: 12px;
  color: var(--yellow);
  background: rgba(15, 23, 42, 0.78);
}

.play-hover {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.88);
  color: #fff;
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-info h3 a:hover,
.rank-body h3 a:hover,
.category-samples a:hover,
.footer-links a:hover {
  color: var(--blue);
}

.movie-meta,
.movie-desc {
  margin: 0;
  color: var(--slate-500);
  font-size: 14px;
}

.movie-desc {
  margin-top: 8px;
  color: var(--slate-600);
}

.gradient-section {
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.gradient-section .movie-card {
  background: rgba(255, 255, 255, 0.96);
}

.category-section {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

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

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

.category-card {
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card > a {
  display: block;
  min-height: 190px;
  padding: 26px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.96), rgba(8, 145, 178, 0.92));
  color: #fff;
}

.category-card span {
  color: #dbeafe;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
}

.category-card h3 {
  margin: 16px 0 10px;
  font-size: 26px;
}

.category-card p {
  margin: 0;
  color: #e0f2fe;
}

.category-samples {
  display: grid;
  gap: 8px;
  padding: 18px 22px 22px;
  color: var(--slate-600);
  font-size: 14px;
}

.rank-preview-grid,
.rank-list {
  display: grid;
  gap: 16px;
}

.rank-card {
  display: grid;
  grid-template-columns: auto 92px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 9px 24px rgba(15, 23, 42, 0.07);
}

.rank-no {
  width: 38px;
  color: var(--blue);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-cover {
  display: block;
  width: 92px;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  background: var(--slate-200);
}

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

.rank-body h3 {
  margin: 0 0 6px;
  font-size: 19px;
}

.rank-body p {
  margin: 0 0 10px;
  color: var(--slate-600);
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--slate-500);
  font-size: 13px;
}

.rank-meta span,
.rank-meta strong {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--slate-100);
}

.rank-meta strong {
  color: #ca8a04;
}

.center-action {
  margin-top: 32px;
  text-align: center;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #0f172a;
}

.page-hero .container {
  position: relative;
  z-index: 1;
  padding: 88px 0;
}

.page-hero.small-hero .container {
  padding: 74px 0;
}

.category-hero .container {
  padding: 70px 0 84px;
}

.page-hero h1 {
  font-size: clamp(36px, 5vw, 60px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #bfdbfe;
  font-size: 14px;
}

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

.hero-mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-mini-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 160px 160px 190px;
  gap: 14px;
  padding: 20px;
  margin-bottom: 28px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--slate-600);
  font-size: 13px;
  font-weight: 800;
}

.detail-hero {
  min-height: 520px;
}

.detail-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 44px;
  align-items: center;
  padding: 82px 0;
}

.detail-poster {
  height: 420px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.detail-copy h1 {
  font-size: clamp(36px, 5vw, 64px);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.detail-tags a {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #e0f2fe;
}

.player-section {
  padding-top: 56px;
  padding-bottom: 34px;
  background: #0f172a;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow-xl);
}

.movie-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #020617;
  object-fit: contain;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  text-align: center;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.2), rgba(2, 6, 23, 0.75));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.big-play {
  width: 86px;
  height: 86px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.42);
  font-size: 34px;
}

.player-cover strong {
  font-size: clamp(22px, 4vw, 36px);
}

.player-cover em {
  color: #bfdbfe;
  font-style: normal;
  font-weight: 800;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}

.content-card {
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 25px;
}

.content-card p {
  margin: 0 0 24px;
  color: var(--slate-700);
  font-size: 17px;
}

.content-card p:last-child {
  margin-bottom: 0;
}

.info-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-card dt {
  color: var(--slate-500);
  font-size: 13px;
  font-weight: 800;
}

.info-card dd {
  margin: -8px 0 4px;
  color: var(--slate-800);
  font-weight: 700;
}

.site-footer {
  background: var(--slate-900);
  color: #cbd5e1;
  padding-top: 58px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr;
  gap: 36px;
}

.footer-brand {
  color: #fff;
  font-size: 24px;
}

.site-footer p {
  max-width: 520px;
  color: #94a3b8;
}

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

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

.footer-links a {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.footer-links.compact a {
  font-size: 13px;
}

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

@media (max-width: 1060px) {
  .hero-layout {
    grid-template-columns: 1fr 310px;
  }

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

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

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

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

  .filter-search {
    grid-column: 1 / -1;
  }
}

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

  .menu-button {
    display: block;
  }

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

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

  .brand strong {
    font-size: 20px;
  }

  .brand small {
    display: none;
  }

  .hero-carousel,
  .hero-layout {
    min-height: auto;
  }

  .hero-slide {
    position: relative;
    display: none;
  }

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

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 52px 0 84px;
  }

  .hero-poster {
    min-height: 420px;
    transform: none;
  }

  .search-band {
    margin-top: 0;
    padding-top: 20px;
  }

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

  .home-search {
    flex-direction: column;
  }

  .home-search button {
    min-height: 48px;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    padding: 54px 0;
  }

  .detail-poster {
    width: min(320px, 100%);
    height: auto;
    aspect-ratio: 3 / 4.15;
  }

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

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

  .section {
    padding: 52px 0;
  }

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

  .movie-info {
    padding: 13px;
  }

  .movie-info h3 {
    font-size: 16px;
  }

  .movie-desc {
    display: none;
  }

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

  .rank-card {
    grid-template-columns: 34px 76px 1fr;
    gap: 12px;
    padding: 12px;
  }

  .rank-cover {
    width: 76px;
  }

  .rank-body p {
    display: none;
  }

  .filter-panel {
    grid-template-columns: 1fr;
    padding: 15px;
  }

  .filter-search {
    grid-column: auto;
  }

  .player-shell {
    border-radius: 18px;
  }

  .content-card {
    padding: 22px;
  }
}
