* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #111827;
  background: #f8fafc;
  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: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #2563eb, #1d4ed8, #0891b2);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 66px;
}

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

.brand {
  font-size: 22px;
}

.brand-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 650;
}

.desktop-nav a,
.category-menu-button {
  color: rgba(255, 255, 255, 0.94);
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.category-menu-button:hover {
  color: #dbeafe;
  transform: translateY(-1px);
}

.category-menu {
  position: relative;
}

.category-menu-button {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.category-menu-panel {
  position: absolute;
  top: calc(100% + 16px);
  left: 0;
  display: none;
  width: 190px;
  padding: 8px;
  color: #1f2937;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.22);
}

.category-menu:hover .category-menu-panel {
  display: grid;
}

.category-menu-panel a {
  padding: 10px 12px;
  border-radius: 10px;
  color: #1f2937;
}

.category-menu-panel a:hover {
  color: #2563eb;
  background: #eff6ff;
}

.header-search {
  position: relative;
  flex: 1;
  max-width: 430px;
  margin-left: auto;
}

.header-search input,
.mobile-search input,
.large-search input {
  width: 100%;
  border: 0;
  outline: 0;
}

.header-search input {
  height: 40px;
  padding: 0 44px 0 18px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: #dbeafe;
}

.header-search button {
  position: absolute;
  top: 50%;
  right: 12px;
  border: 0;
  color: #ffffff;
  background: transparent;
  transform: translateY(-50%);
  cursor: pointer;
}

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

.mobile-panel {
  display: none;
  padding: 0 16px 16px;
}

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

.mobile-search {
  display: flex;
  gap: 8px;
  margin: 0 auto 12px;
  max-width: 680px;
}

.mobile-search input {
  padding: 11px 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 12px;
}

.mobile-search button {
  border: 0;
  padding: 0 16px;
  color: #2563eb;
  background: #ffffff;
  border-radius: 12px;
  font-weight: 700;
}

.mobile-panel nav {
  display: grid;
  gap: 4px;
  max-width: 680px;
  margin: 0 auto;
}

.mobile-panel nav a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-slide img.is-missing,
.card-cover img.is-missing,
.movie-list-cover img.is-missing,
.poster-card img.is-missing {
  display: none;
}

.hero-slide::before,
.card-cover::before,
.movie-list-cover::before,
.poster-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1d4ed8, #111827 60%, #0891b2);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.34) 48%, rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  min-height: 100%;
  padding-bottom: 76px;
}

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

.hero-kicker {
  display: inline-flex;
  padding: 8px 14px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.82);
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.hero-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
}

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

.primary-btn,
.ghost-btn,
.primary-link,
.section-more {
  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,
.primary-link {
  padding: 12px 22px;
  color: #ffffff;
  background: #2563eb;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.32);
}

.primary-btn:hover,
.primary-link:hover {
  transform: translateY(-2px);
  background: #1d4ed8;
}

.ghost-btn {
  padding: 12px 22px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(8px);
}

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

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

.hero-dot {
  width: 36px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

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

.quick-panel {
  margin-top: -34px;
  position: relative;
  z-index: 5;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.quick-grid a {
  padding: 22px;
  color: #0f172a;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-grid a:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.18);
}

.quick-grid strong,
.quick-grid span {
  display: block;
}

.quick-grid strong {
  font-size: 20px;
  margin-bottom: 5px;
}

.quick-grid span {
  color: #64748b;
  font-size: 14px;
}

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

.soft-bg {
  background: #eef6ff;
}

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

.section-heading.compact {
  margin-bottom: 18px;
}

.section-heading h2,
.ranking-columns h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.2;
}

.section-heading p {
  margin: 8px 0 0;
  color: #64748b;
}

.section-more {
  flex-shrink: 0;
  padding: 10px 18px;
  color: #2563eb;
  background: #dbeafe;
}

.section-more:hover {
  transform: translateY(-2px);
  background: #bfdbfe;
}

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

.movie-card,
.movie-list-card,
.category-tile,
.category-overview-card,
.detail-card,
.aside-card {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.16);
}

.card-cover,
.movie-list-cover,
.poster-card {
  position: relative;
  display: block;
  overflow: hidden;
  background: #1e293b;
}

.card-cover {
  aspect-ratio: 16 / 10;
}

.card-cover img,
.movie-list-cover img,
.poster-card img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.card-badge {
  position: absolute;
  z-index: 2;
  right: 12px;
  top: 12px;
  padding: 4px 10px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.9);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.chip-line,
.tag-cloud,
.tag-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 10px;
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.chip-blue {
  color: #2563eb;
  background: #eff6ff;
}

.movie-card h3,
.movie-list-card h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.movie-list-card h3 a:hover,
.category-mini-links a:hover,
.ranking-list a:hover .rank-title {
  color: #2563eb;
}

.movie-card p,
.movie-list-card p,
.category-tile p,
.category-overview-card p {
  margin: 0;
  color: #64748b;
}

.tag-line {
  margin-top: 12px;
}

.tag-line span {
  color: #64748b;
  font-size: 12px;
}

.split-layout {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 32px;
  align-items: start;
}

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

.ranking-list a {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.rank-num {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #0891b2);
  border-radius: 12px;
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.rank-meta {
  color: #64748b;
  font-size: 13px;
}

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

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

.category-tile,
.category-overview-card {
  padding: 22px;
}

.category-tile h3,
.category-overview-card h2 {
  margin: 0 0 10px;
}

.category-count {
  display: inline-flex;
  margin: 16px 0;
  padding: 7px 12px;
  color: #2563eb;
  background: #eff6ff;
  border-radius: 999px;
  font-weight: 800;
}

.category-mini-links {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.category-mini-links a {
  overflow: hidden;
  color: #334155;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.primary-link {
  margin-top: 18px;
}

.page-hero {
  padding: 54px 0;
  color: #ffffff;
}

.blue-hero {
  background: linear-gradient(135deg, #2563eb, #0891b2);
}

.green-hero {
  background: linear-gradient(135deg, #10b981, #0f766e);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.hero-stat {
  display: inline-flex;
  margin-top: 18px;
  padding: 8px 14px;
  color: #1e3a8a;
  background: #ffffff;
  border-radius: 999px;
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

.detail-card .breadcrumb {
  color: #64748b;
}

.filter-bar-wrap {
  padding: 22px 0;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 14px;
}

.filter-bar label {
  font-weight: 800;
}

.filter-bar input,
.filter-bar select {
  height: 42px;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  outline: 0;
}

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

.movie-list-card {
  display: grid;
  grid-template-columns: 250px 1fr;
  overflow: hidden;
}

.movie-list-cover {
  min-height: 170px;
}

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

.movie-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  color: #64748b;
  font-size: 14px;
}

.ranking-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.ranking-columns h2 {
  margin-bottom: 16px;
}

.large-search {
  display: flex;
  gap: 12px;
  max-width: 680px;
  margin-top: 24px;
}

.large-search input {
  height: 52px;
  padding: 0 18px;
  border-radius: 999px;
}

.large-search button {
  border: 0;
  padding: 0 24px;
  color: #0f766e;
  background: #ffffff;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
}

.detail-wrap {
  padding: 34px 0 0;
}

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

.detail-main > .breadcrumb {
  color: #64748b;
}

.detail-main > .breadcrumb a:hover {
  color: #2563eb;
}

.player-panel {
  position: relative;
  overflow: hidden;
  background: #000000;
  border-radius: 20px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.16), rgba(0, 0, 0, 0.62));
  cursor: pointer;
}

.player-overlay.is-hidden {
  display: none;
}

.play-circle {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border-radius: 999px;
  background: #2563eb;
  box-shadow: 0 18px 50px rgba(37, 99, 235, 0.46);
  font-size: 38px;
}

.player-overlay strong {
  font-size: 20px;
}

.detail-card,
.aside-card {
  padding: 24px;
  margin-top: 22px;
}

.detail-card h1 {
  margin: 16px 0 10px;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.12;
}

.detail-card .lead {
  margin: 0 0 18px;
  color: #475569;
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 0;
  margin-bottom: 16px;
  color: #475569;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.tag-cloud {
  margin-bottom: 22px;
}

.detail-card h2,
.aside-card h2 {
  margin: 22px 0 10px;
  font-size: 22px;
}

.detail-card p {
  color: #334155;
}

.detail-aside {
  position: sticky;
  top: 88px;
}

.poster-card {
  overflow: hidden;
  padding: 0;
}

.poster-card img {
  aspect-ratio: 16 / 11;
}

.poster-card h2,
.poster-card p {
  padding: 0 20px;
}

.poster-card h2 {
  margin: 18px 0 4px;
}

.poster-card p {
  margin: 0 0 20px;
  color: #64748b;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 34px;
  padding: 48px 0;
}

.footer-brand {
  color: #ffffff;
  font-size: 22px;
}

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

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

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

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

.footer-bottom {
  padding: 18px;
  color: #64748b;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

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

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

  .quick-grid,
  .ranking-columns,
  .detail-grid,
  .split-layout {
    grid-template-columns: 1fr 1fr;
  }

  .detail-aside {
    position: static;
  }
}

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

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

  .hero-carousel {
    height: 520px;
  }

  .quick-grid,
  .movie-grid,
  .category-grid,
  .category-grid.small,
  .ranking-columns,
  .detail-grid,
  .split-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar,
  .large-search {
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .rank-meta {
    display: none;
  }

  .ranking-list a {
    grid-template-columns: 48px minmax(0, 1fr);
  }
}

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

  .brand {
    font-size: 18px;
  }

  .hero-carousel {
    height: 500px;
  }

  .hero-content {
    align-items: center;
    padding-bottom: 36px;
  }

  .hero-copy p {
    font-size: 16px;
  }

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

  .quick-panel {
    margin-top: 18px;
  }

  .page-hero {
    padding: 42px 0;
  }

  .detail-card,
  .aside-card {
    padding: 18px;
  }
}
