:root {
  color-scheme: light;
  --sky: #0ea5e9;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --deep: #0f172a;
  --muted: #64748b;
  --soft: #f0f9ff;
  --line: #dbeafe;
  --card: #ffffff;
  --shadow: 0 20px 45px rgba(37, 99, 235, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--sky), var(--blue), var(--cyan));
  box-shadow: 0 14px 35px rgba(14, 165, 233, 0.28);
}

.navbar {
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark,
.footer-logo span {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--blue);
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.24);
}

.logo-text {
  font-size: 20px;
}

.menu-button {
  display: none;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.nav-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link,
.nav-links > a {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-links > a:hover,
.nav-link.is-active {
  color: #fef08a;
  transform: translateY(-1px);
}

.nav-dropdown {
  position: relative;
}

.dropdown-button {
  border: 0;
  background: transparent;
  padding: 0;
}

.dropdown-menu {
  position: absolute;
  top: 34px;
  left: 0;
  width: 190px;
  padding: 10px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.dropdown-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #334155;
  font-weight: 650;
}

.dropdown-menu a:hover {
  background: #e0f2fe;
  color: var(--blue);
}

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

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.nav-search input {
  width: 230px;
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 10px 14px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.94);
}

.nav-search button,
.big-search button,
.search-page-form button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: #ffffff;
  font-weight: 750;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
  cursor: pointer;
}

.hero-carousel {
  position: relative;
  min-height: 590px;
  overflow: hidden;
  background: linear-gradient(135deg, #0284c7, #2563eb 55%, #06b6d4);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-bg,
.detail-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: saturate(1.18);
}

.hero-shade,
.detail-hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.9), rgba(14, 165, 233, 0.58), rgba(6, 182, 212, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  min-height: 590px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 56px;
  color: #ffffff;
}

.hero-kicker,
.detail-kicker,
.page-banner span {
  display: inline-flex;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  color: #ecfeff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(8px);
  font-weight: 750;
}

.hero-copy h1 {
  margin: 22px 0 8px;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 850;
}

.hero-copy p {
  max-width: 760px;
  margin: 0 0 22px;
  color: #e0f2fe;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.tag-row span {
  color: #0369a1;
  background: #e0f2fe;
}

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

.primary-button,
.ghost-button,
.card-action,
.rank-action,
.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-button {
  padding: 13px 24px;
  color: var(--blue);
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(255, 255, 255, 0.22);
}

.ghost-button {
  padding: 12px 20px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
}

.primary-button:hover,
.ghost-button:hover,
.card-action:hover,
.rank-action:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.38);
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 74px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  color: var(--blue);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  font-size: 28px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
}

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

.quick-search-section,
.content-section {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.quick-search-card {
  margin-top: -46px;
  position: relative;
  z-index: 6;
  padding: 30px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  border: 1px solid #e0f2fe;
}

.quick-search-card h2 {
  margin: 0 0 8px;
  color: var(--deep);
  font-size: 30px;
  font-weight: 900;
}

.quick-search-card p {
  margin: 0 0 20px;
  color: var(--muted);
}

.big-search,
.search-page-form,
.filter-panel {
  display: flex;
  gap: 12px;
}

.big-search input,
.search-page-form input,
.filter-panel input,
.filter-panel select {
  min-width: 0;
  flex: 1;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 14px 18px;
  outline: 0;
  background: #ffffff;
}

.filter-panel {
  margin: 0 0 26px;
  padding: 18px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(14, 165, 233, 0.08);
}

.content-section {
  padding: 58px 0;
}

.soft-panel {
  width: 100%;
  padding-left: max(16px, calc((100% - 1280px) / 2));
  padding-right: max(16px, calc((100% - 1280px) / 2));
  background: linear-gradient(180deg, #ecfeff, #eff6ff);
}

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

.section-heading p {
  margin: 0 0 6px;
  color: var(--cyan);
  font-weight: 850;
}

.section-heading h2 {
  margin: 0;
  color: var(--deep);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
}

.section-heading > a,
.text-link {
  color: var(--blue);
  font-weight: 850;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  overflow: hidden;
  background: #dbeafe;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.play-badge,
.year-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 850;
}

.play-badge {
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -50%);
  background: rgba(37, 99, 235, 0.82);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.24);
}

.year-badge {
  right: 12px;
  top: 12px;
  padding: 5px 10px;
  background: rgba(15, 23, 42, 0.68);
  font-size: 12px;
}

.movie-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #0ea5e9;
  font-size: 13px;
  font-weight: 800;
}

.meta-line span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #94a3b8;
}

.movie-card h3,
.rank-info h3 {
  margin: 0;
  color: var(--deep);
  font-size: 20px;
  line-height: 1.28;
  font-weight: 900;
}

.movie-card p,
.rank-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.card-action {
  margin-top: auto;
  width: fit-content;
  padding: 9px 15px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky), var(--blue));
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
  border-radius: 24px;
  padding: 22px;
  color: #ffffff;
  background: #0f172a;
  box-shadow: 0 16px 32px rgba(14, 165, 233, 0.12);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transition: transform 0.3s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.88));
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile span,
.category-tile strong {
  position: relative;
  z-index: 1;
}

.category-tile span {
  font-size: 24px;
  font-weight: 900;
}

.category-tile strong {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.6;
}

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

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

.rank-card {
  display: grid;
  grid-template-columns: 58px 82px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 22px;
}

.rank-index {
  display: flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #eab308);
  font-weight: 950;
  font-size: 18px;
}

.rank-thumb img {
  width: 82px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
}

.rank-action {
  padding: 9px 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.page-banner,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--sky), var(--blue), var(--cyan));
  color: #ffffff;
}

.page-banner {
  padding: 84px 0 72px;
}

.page-banner > div {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.page-banner h1 {
  margin: 22px 0 12px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.06;
  font-weight: 950;
}

.page-banner p {
  max-width: 760px;
  margin: 0;
  color: #e0f2fe;
  font-size: 18px;
  line-height: 1.8;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

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

.category-cover-set img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

.category-overview-card h2 {
  margin: 10px 0 10px;
  color: var(--deep);
  font-size: 27px;
  font-weight: 900;
}

.category-overview-card p {
  color: var(--muted);
  line-height: 1.8;
}

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

.detail-hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 60px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  color: #dbeafe;
  font-weight: 750;
}

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

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

.detail-poster {
  width: 260px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 24px 62px rgba(15, 23, 42, 0.38);
}

.detail-title-row h1 {
  margin: 18px 0 14px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  font-weight: 950;
}

.detail-title-row p {
  max-width: 820px;
  margin: 0 0 18px;
  color: #e0f2fe;
  font-size: 18px;
  line-height: 1.85;
}

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

.detail-main,
.detail-side {
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.detail-main {
  overflow: hidden;
}

.player-card {
  position: relative;
  overflow: hidden;
  background: #020617;
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 86px;
  height: 86px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 999px;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.28);
  font-size: 34px;
  cursor: pointer;
}

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

.detail-copy {
  padding: 28px;
}

.detail-copy h2,
.detail-side h2 {
  margin: 0 0 16px;
  color: var(--deep);
  font-size: 28px;
  font-weight: 900;
}

.detail-copy h2:not(:first-child) {
  margin-top: 30px;
}

.detail-copy p {
  margin: 0;
  color: #334155;
  line-height: 2;
  font-size: 17px;
}

.detail-side {
  padding: 24px;
  position: sticky;
  top: 96px;
}

.detail-side dl {
  margin: 0;
  display: grid;
  gap: 14px;
}

.detail-side dt {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
}

.detail-side dd {
  margin: -8px 0 0;
  color: #0f172a;
  font-weight: 800;
  line-height: 1.6;
}

.search-summary {
  margin: 18px 0 24px;
  color: var(--muted);
  font-weight: 750;
}

.site-footer {
  margin-top: 40px;
  color: #e2e8f0;
  background: linear-gradient(180deg, #1e293b, #0f172a);
}

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

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.site-footer p,
.site-footer a {
  display: block;
  margin: 0 0 9px;
  color: #cbd5e1;
  line-height: 1.8;
}

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

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

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

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

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 34px;
  }

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

  .detail-side {
    position: static;
  }
}

@media (max-width: 860px) {
  .navbar {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

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

  .nav-panel {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding-bottom: 12px;
  }

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

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .dropdown-menu {
    position: static;
    width: 100%;
    margin-top: 10px;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-search,
  .big-search,
  .search-page-form,
  .filter-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-search input {
    width: 100%;
  }

  .hero-carousel,
  .hero-content {
    min-height: 760px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 46px 0 88px;
  }

  .hero-poster {
    width: min(300px, 78vw);
    margin: 0 auto;
    transform: none;
  }

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

  .category-overview-card,
  .detail-title-row {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 560px) {
  .movie-grid,
  .dense-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: 42px 64px minmax(0, 1fr);
  }

  .rank-action {
    grid-column: 2 / 4;
    width: fit-content;
  }

  .rank-index {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .rank-thumb img {
    width: 64px;
  }

  .hero-copy p,
  .page-banner p,
  .detail-title-row p {
    font-size: 16px;
  }

  .quick-search-card,
  .detail-copy,
  .detail-side {
    padding: 20px;
  }

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