*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #0891b2;
  --teal: #0d9488;
  --sky-soft: #eff6ff;
  --cyan-soft: #ecfeff;
  --teal-soft: #f0fdfa;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --panel: #ffffff;
  --dark: #111827;
  --radius: 22px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(239, 246, 255, 0.96), rgba(236, 254, 255, 0.96), rgba(240, 253, 250, 0.96));
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
  backdrop-filter: blur(16px);
}

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

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.25);
  transition: transform 0.25s ease;
}

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

.brand-text {
  display: grid;
  gap: 1px;
}

.brand-text strong {
  font-size: 24px;
  line-height: 1.1;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #334155;
  font-weight: 700;
}

.desktop-nav a,
.nav-dropdown > button {
  position: relative;
  border: 0;
  color: #334155;
  background: transparent;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.nav-dropdown > button:hover {
  color: var(--blue);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: -18px;
  display: grid;
  min-width: 180px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-panel a {
  padding: 10px 12px;
  border-radius: 10px;
}

.dropdown-panel a:hover {
  background: var(--sky-soft);
}

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

.header-search input,
.mobile-search input,
.hero-search input,
.search-panel input,
.search-panel select {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 999px;
  padding: 12px 16px;
  outline: none;
  color: var(--ink);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 220px;
}

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

.header-search button,
.mobile-search button,
.hero-search button,
.search-panel button,
.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 0;
  min-height: 44px;
  padding: 0 20px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.hero-search button,
.search-panel button,
.primary-button {
  color: #ffffff;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

.ghost-button {
  color: var(--blue);
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.12);
}

.ghost-button.small {
  min-height: 38px;
  padding: 0 16px;
}

.header-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.search-panel button:hover,
.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.25);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: var(--blue);
  background: rgba(37, 99, 235, 0.09);
  font-size: 24px;
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
}

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

.mobile-panel a {
  padding: 10px 6px;
  color: #334155;
  font-weight: 700;
}

.hero,
.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--sky-soft), var(--cyan-soft), var(--teal-soft));
}

.hero {
  padding: 78px 0 88px;
}

.compact-hero {
  padding: 64px 0 58px;
}

.hero-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(48px);
  opacity: 0.32;
  pointer-events: none;
}

.hero-orb-a {
  top: 30px;
  left: 6%;
  width: 280px;
  height: 280px;
  background: #60a5fa;
}

.hero-orb-b {
  right: 4%;
  bottom: 22px;
  width: 320px;
  height: 320px;
  background: #2dd4bf;
}

.hero-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 46px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  width: max-content;
  margin-bottom: 16px;
  padding: 7px 13px;
  color: var(--blue);
  background: rgba(37, 99, 235, 0.1);
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.page-hero h1,
.detail-copy h1 {
  font-size: clamp(34px, 4vw, 52px);
}

.hero-copy > p,
.page-hero p,
.detail-lead {
  margin: 18px 0 0;
  color: #475569;
  font-size: 18px;
}

.hero-search {
  width: min(100%, 560px);
  margin-top: 28px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.hero-search input {
  flex: 1;
  border: 0;
  box-shadow: none;
}

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

.center-actions {
  justify-content: center;
}

.hero-tags,
.tag-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags a,
.tag-list a {
  display: inline-flex;
  padding: 7px 12px;
  color: var(--blue-dark);
  background: #dbeafe;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.hero-visual {
  min-width: 0;
}

.hero-stage {
  position: relative;
  min-height: 560px;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.25);
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: end;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.65s ease, transform 0.65s ease;
  pointer-events: none;
}

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.78));
}

.hero-slide-copy {
  position: relative;
  z-index: 2;
  padding: 34px;
  color: #ffffff;
}

.hero-slide-copy span {
  display: inline-flex;
  margin-bottom: 10px;
  color: #bfdbfe;
  font-weight: 800;
}

.hero-slide-copy h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.12;
}

.hero-slide-copy p {
  max-width: 640px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
}

.text-link {
  display: inline-flex;
  margin-top: 16px;
  color: #ffffff;
  font-weight: 900;
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 18px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #bae6fd;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.section-block {
  padding: 76px 0;
}

.soft-bg {
  background: linear-gradient(135deg, #ffffff, #eff6ff);
}

.section-heading {
  margin-bottom: 34px;
  text-align: center;
}

.section-heading.align-left {
  text-align: left;
}

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

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

.section-heading p {
  max-width: 720px;
  margin: 12px auto 0;
  color: var(--muted);
}

.align-left p {
  margin-left: 0;
}

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

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(37, 99, 235, 0.16);
}

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

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

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

.poster-badge,
.poster-score {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 5px 9px;
  color: #ffffff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.poster-badge {
  left: 12px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.poster-score {
  right: 12px;
  background: rgba(15, 23, 42, 0.78);
}

.card-content {
  padding: 18px;
}

.card-content h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.32;
}

.card-content h3 a:hover,
.ranking-info h3 a:hover,
.detail-side-card a:hover {
  color: var(--blue);
}

.card-meta {
  margin: 8px 0 0;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
}

.card-desc {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 10px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

.category-card a {
  display: block;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 24px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card a:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 45px rgba(37, 99, 235, 0.15);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  height: 148px;
  padding: 3px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
}

.category-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.category-copy {
  padding: 20px;
}

.category-copy span {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
}

.category-copy h2 {
  margin: 5px 0 8px;
  font-size: 24px;
}

.category-copy p {
  margin: 0;
  color: var(--muted);
}

.ranking-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 46px;
  align-items: start;
}

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

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

.ranking-item {
  display: grid;
  grid-template-columns: 54px 82px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

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

.ranking-poster {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 3 / 4;
}

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

.ranking-info h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.ranking-info p,
.ranking-info span {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.ranking-info span {
  margin-top: 4px;
  color: var(--blue);
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: #475569;
  font-weight: 700;
}

.breadcrumb a:hover {
  color: var(--blue);
}

.detail-hero {
  padding: 48px 0 64px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 38px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

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

.detail-lead {
  max-width: 820px;
  font-size: 20px;
}

.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-meta span {
  padding: 8px 13px;
  color: var(--blue-dark);
  background: #dbeafe;
  border-radius: 999px;
  font-weight: 900;
}

.detail-tags {
  margin-top: 16px;
}

.player-section {
  padding: 64px 0;
  background: #020617;
}

.player-section .section-heading h2,
.player-section .section-heading p {
  color: #ffffff;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.38), rgba(2, 6, 23, 0.76));
  border: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  padding-left: 5px;
  color: var(--blue);
  background: #ffffff;
  border-radius: 999px;
  font-size: 34px;
  box-shadow: 0 18px 42px rgba(255, 255, 255, 0.24);
}

.detail-body-section {
  background: #ffffff;
}

.detail-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 34px;
  align-items: start;
}

.detail-body article,
.detail-side-card {
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
}

.detail-body h2,
.detail-side-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-body p,
.detail-side-card p {
  margin: 0 0 16px;
  color: #475569;
}

.search-panel {
  align-items: stretch;
  margin-top: 28px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.search-panel input {
  flex: 1 1 260px;
}

.search-panel select {
  min-width: 140px;
}

.search-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.search-toolbar h2 {
  margin: 0;
  font-size: 30px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 34px;
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--muted);
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #111827, #1f2937, #111827);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 34px;
  padding: 56px 0 38px;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer p {
  margin: 12px 0 0;
  color: #94a3b8;
}

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

.site-footer a:hover {
  color: #60a5fa;
}

.footer-brand {
  color: #ffffff;
}

.back-top {
  margin-top: 18px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  padding: 10px 16px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

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

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

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

  .hero-shell,
  .ranking-layout,
  .detail-layout,
  .detail-body {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(320px, 100%);
  }

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

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

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

  .hero,
  .compact-hero,
  .detail-hero,
  .section-block,
  .player-section {
    padding: 44px 0;
  }

  .hero-stage {
    min-height: 430px;
    border-radius: 24px;
  }

  .hero-search,
  .search-panel,
  .hero-actions,
  .mobile-search {
    flex-direction: column;
    align-items: stretch;
    border-radius: 24px;
  }

  .hero-search input,
  .hero-search button,
  .search-panel input,
  .search-panel select,
  .search-panel button,
  .mobile-search input,
  .mobile-search button {
    width: 100%;
  }

  .movie-grid,
  .category-grid,
  .category-grid.large,
  .ranking-page-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .ranking-item {
    grid-template-columns: 44px 74px 1fr;
  }

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

  .play-circle {
    width: 68px;
    height: 68px;
    font-size: 27px;
  }
}
