:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --teal: #0d9488;
  --dark: #020617;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.nav-wrap {
  width: min(1240px, calc(100% - 28px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: #0f172a;
  white-space: nowrap;
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan), var(--teal));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
}

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

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

.main-nav a {
  padding: 10px 12px;
  border-radius: 999px;
  color: #475569;
  font-size: 14px;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--blue);
  background: #eff6ff;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  color: #0f172a;
  border-radius: 12px;
  background: #f1f5f9;
}

.hero-slider {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: white;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.02);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-image {
  width: 100%;
  height: 100%;
  min-height: 620px;
  object-fit: cover;
  opacity: 0.76;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 35%, rgba(6, 182, 212, 0.35), transparent 32%), linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.25));
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  bottom: 150px;
  width: min(680px, calc(100% - 64px));
}

.hero-kicker,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #67e8f9;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: 18px;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  color: #1e3a8a;
  background: #dbeafe;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: white;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary-btn,
.ghost-btn,
.section-link,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  min-height: 46px;
  padding: 0 22px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.28);
}

.ghost-btn {
  min-height: 46px;
  padding: 0 22px;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.wide {
  width: 100%;
}

.hero-dots {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  bottom: 90px;
  display: flex;
  gap: 10px;
  z-index: 5;
}

.hero-dots button {
  width: 34px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.hero-dots button.active {
  background: white;
}

.hero-search {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 84px;
  width: min(420px, calc(100% - 48px));
  padding: 10px;
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  backdrop-filter: blur(18px);
  z-index: 5;
}

.hero-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: white;
  background: transparent;
  padding: 0 8px;
}

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

.hero-search button {
  border: 0;
  color: white;
  padding: 10px 18px;
  border-radius: 14px;
  background: var(--blue);
  font-weight: 800;
}

.page-section {
  padding: 72px 0;
}

.soft-bg {
  background: linear-gradient(180deg, #eef6ff, #f8fafc);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 680px;
}

.section-link,
.text-link {
  color: var(--blue);
  white-space: nowrap;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.category-chip {
  padding: 14px 18px;
  color: #0f172a;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.movie-card {
  min-width: 0;
  background: white;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.poster img,
.ranking-poster img,
.detail-poster img,
.rank-cover img,
.category-cover-stack img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster img {
  transition: transform 0.35s ease;
}

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

.poster-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 55%;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.82));
}

.play-pill {
  position: absolute;
  right: 12px;
  bottom: 12px;
  color: white;
  background: rgba(37, 99, 235, 0.92);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 900;
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  border-radius: 12px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.35);
}

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

.card-meta {
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.movie-card h2,
.ranking-body h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.movie-card p,
.ranking-body p {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 360px;
  gap: 28px;
  align-items: start;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 46px 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-no {
  color: var(--blue);
  font-size: 22px;
  font-weight: 950;
}

.rank-cover {
  height: 58px;
  border-radius: 14px;
  overflow: hidden;
  background: #0f172a;
}

.rank-text {
  min-width: 0;
}

.rank-text strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-text small {
  display: block;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-panel,
.content-card,
.side-card {
  padding: 28px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--soft-shadow);
}

.rank-panel {
  position: sticky;
  top: 96px;
}

.rank-panel h2,
.content-card h2,
.side-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.rank-panel p,
.content-card p {
  color: var(--muted);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 22px 0;
}

.metric-row span {
  padding: 14px 10px;
  color: var(--blue);
  background: #eff6ff;
  border-radius: 16px;
  text-align: center;
  font-weight: 900;
}

.sub-hero {
  padding: 86px 0;
  color: white;
  background: radial-gradient(circle at 80% 20%, rgba(103, 232, 249, 0.25), transparent 30%), linear-gradient(135deg, #2563eb, #0891b2, #0f766e);
}

.sub-hero h1 {
  max-width: 780px;
  margin: 0 0 14px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.sub-hero p {
  max-width: 720px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
}

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

.category-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--soft-shadow);
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.category-cover-stack img {
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  background: #0f172a;
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.category-card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-weight: 900;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 15px;
  outline: 0;
  padding: 0 14px;
  color: var(--text);
  background: #f8fafc;
}

.ranking-grid {
  display: grid;
  gap: 16px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
  gap: 20px;
  padding: 14px;
}

.ranking-poster {
  position: relative;
  display: block;
  height: 118px;
  overflow: hidden;
  border-radius: 18px;
  background: #0f172a;
}

.large {
  width: 42px;
  height: 42px;
  font-size: 16px;
}

.ranking-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: white;
  background: #020617;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.42;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px) saturate(1.1);
  transform: scale(1.04);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.76)), radial-gradient(circle at 75% 30%, rgba(6, 182, 212, 0.28), transparent 30%);
}

.detail-head-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  min-height: 520px;
  padding: 72px 0;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
  background: #0f172a;
}

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

.detail-intro h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-intro p {
  max-width: 820px;
  margin: 0 0 18px;
  color: #e0f2fe;
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-meta span {
  padding: 7px 12px;
  color: white;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.detail-tags span {
  color: white;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.detail-main {
  display: grid;
  gap: 24px;
}

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

.player-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.34), rgba(2, 6, 23, 0.58));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-title {
  padding: 0 24px;
  text-align: center;
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 950;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.player-play-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 50%;
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.36);
  font-size: 28px;
}

.detail-side {
  display: grid;
  gap: 20px;
  position: sticky;
  top: 96px;
}

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

.side-card dl div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
  font-weight: 800;
}

.side-card .rank-item {
  grid-template-columns: 34px 78px minmax(0, 1fr);
  padding: 8px;
  box-shadow: none;
}

.side-card .rank-cover {
  height: 50px;
}

.site-footer {
  color: #cbd5e1;
  background: #020617;
}

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

.footer-logo {
  color: white;
  font-size: 22px;
}

.footer-grid p {
  max-width: 420px;
  margin: 14px 0 0;
  color: #94a3b8;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: white;
  font-size: 17px;
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
  list-style: none;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  color: #64748b;
  font-size: 14px;
}

.is-filter-hidden {
  display: none !important;
}

@media (max-width: 1024px) {
  .movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .rank-panel,
  .detail-side {
    position: static;
  }

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

@media (max-width: 760px) {
  .nav-wrap {
    height: auto;
    min-height: 66px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

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

  .main-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 10px 0;
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    border-radius: 14px;
  }

  .hero-slider,
  .hero-image {
    min-height: 720px;
  }

  .hero-content {
    left: 20px;
    bottom: 210px;
    width: calc(100% - 40px);
  }

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

  .hero-dots {
    left: 20px;
    bottom: 154px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .ranking-card,
  .category-card,
  .detail-head-grid {
    grid-template-columns: 1fr;
  }

  .ranking-poster {
    height: 160px;
  }

  .detail-head-grid {
    min-height: auto;
  }

  .detail-poster {
    width: min(260px, 75vw);
  }
}

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

  .page-section {
    padding: 50px 0;
  }

  .hero-content h1,
  .detail-intro h1,
  .sub-hero h1 {
    letter-spacing: -0.03em;
  }

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

  .rank-item {
    grid-template-columns: 40px 82px minmax(0, 1fr);
  }

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

  .footer-grid {
    gap: 28px;
  }
}
