* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fafaf9;
  color: #292524;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 12px;
  border: 0;
  padding: 0 22px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.24);
}

.btn-primary:hover {
  background: #0369a1;
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.92);
  color: #0c4a6e;
}

.btn-secondary:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(2, 132, 199, 0.08);
  color: #0369a1;
}

.btn-ghost:hover {
  background: rgba(2, 132, 199, 0.14);
}

.card {
  overflow: hidden;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.input-field,
.filter-select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d6d3d1;
  border-radius: 12px;
  background: #ffffff;
  color: #292524;
  padding: 0 14px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.input-field:focus,
.filter-select:focus {
  border-color: #0ea5e9;
  outline: none;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(231, 229, 228, 0.9);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-mark,
.footer-brand span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #ffffff;
  font-size: 15px;
  box-shadow: 0 10px 22px rgba(14, 165, 233, 0.22);
}

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

.nav-links a {
  border-radius: 999px;
  color: #57534e;
  font-size: 15px;
  font-weight: 700;
  padding: 9px 15px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  background: rgba(2, 132, 199, 0.1);
  color: #0284c7;
}

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

.nav-search-toggle,
.nav-menu-toggle {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: #f5f5f4;
  color: #44403c;
  padding: 0 14px;
  font-weight: 800;
  cursor: pointer;
}

.nav-menu-toggle {
  display: none;
}

.search-panel,
.mobile-panel {
  display: none;
  border-top: 1px solid #e7e5e4;
}

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

.search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 16px 0;
}

.mobile-links {
  display: grid;
  gap: 6px;
  padding: 14px 0;
}

.mobile-links a {
  border-radius: 12px;
  padding: 11px 12px;
  color: #57534e;
  font-weight: 700;
}

.mobile-links a:hover {
  background: #f5f5f4;
  color: #0284c7;
}

.hero-carousel {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  background: #082f49;
  color: #ffffff;
}

.hero-slide {
  display: none;
  min-height: 660px;
  background-position: center;
  background-size: cover;
}

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

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
  gap: 44px;
  align-items: center;
  min-height: 660px;
  padding: 64px 0;
}

.hero-kicker {
  display: inline-flex;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.hero-copy h1 {
  margin: 18px 0 16px;
  max-width: 850px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 760px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 2vw, 20px);
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
}

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

.hero-poster-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

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

.hero-poster-caption {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  border-radius: 18px;
  background: rgba(8, 47, 73, 0.78);
  padding: 16px;
  backdrop-filter: blur(14px);
}

.hero-poster-caption strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}

.hero-poster-caption span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.hero-controls {
  position: absolute;
  right: max(18px, calc((100% - 1280px) / 2));
  bottom: 26px;
  display: flex;
  gap: 10px;
}

.hero-controls button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 26px;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

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

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

.section-title {
  margin: 0;
  color: #1c1917;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-desc {
  margin: 8px 0 0;
  color: #78716c;
  max-width: 760px;
}

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

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.movie-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e7e5e4;
}

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

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

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.92);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(2, 132, 199, 0.26);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #f97316;
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
}

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

.movie-meta {
  color: #0284c7;
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 8px 0 8px;
  color: #1c1917;
  font-size: 19px;
  line-height: 1.3;
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 14px;
  overflow: hidden;
  color: #78716c;
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.compact-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
}

.compact-card .movie-poster img {
  height: 100%;
  min-height: 172px;
}

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

.category-card {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #e7e5e4;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, #f0f9ff);
  padding: 22px;
}

.category-card h3 {
  margin: 0 0 10px;
  color: #0c4a6e;
  font-size: 24px;
}

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

.page-hero {
  background: linear-gradient(135deg, #0284c7, #075985);
  color: #ffffff;
}

.page-hero-inner {
  padding: 60px 0;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

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

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
  margin: 0 0 24px;
}

.no-results {
  display: none;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  background: #ffffff;
  color: #78716c;
  padding: 32px;
  text-align: center;
}

.no-results.is-visible {
  display: block;
}

.detail-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 34px;
  padding-top: 38px;
}

.breadcrumb {
  margin: 0 0 18px;
  color: #78716c;
  font-size: 14px;
}

.breadcrumb a {
  color: #0284c7;
  font-weight: 800;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 22px 64px rgba(2, 6, 23, 0.24);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.56));
  color: #ffffff;
  cursor: pointer;
}

.play-overlay span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.92);
  font-size: 32px;
  box-shadow: 0 18px 38px rgba(2, 132, 199, 0.34);
}

.player-shell.is-playing .play-overlay {
  display: none;
}

.detail-card {
  margin-top: 24px;
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 12px;
  color: #1c1917;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.05em;
}

.detail-card h2,
.aside-card h2 {
  margin: 26px 0 10px;
  color: #1c1917;
  font-size: 24px;
}

.detail-card p {
  margin: 0 0 14px;
  color: #57534e;
  font-size: 16px;
}

.detail-cover {
  width: 100%;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

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

.aside-card {
  margin-top: 20px;
  padding: 22px;
}

.aside-list {
  display: grid;
  gap: 12px;
}

.aside-list a {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-radius: 14px;
  padding: 8px;
  transition: background 0.2s ease;
}

.aside-list a:hover {
  background: #f0f9ff;
}

.aside-list img {
  width: 68px;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  object-fit: cover;
}

.aside-list strong {
  display: block;
  overflow: hidden;
  color: #1c1917;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aside-list span {
  color: #78716c;
  font-size: 13px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 60px 120px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border-radius: 18px;
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.rank-number {
  color: #0284c7;
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 120px;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  object-fit: cover;
}

.rank-item h2 {
  margin: 0 0 8px;
  color: #1c1917;
  font-size: 24px;
}

.rank-item p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #78716c;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.site-footer {
  margin-top: 72px;
  background: #1c1917;
  color: #d6d3d1;
}

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

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

.site-footer p {
  max-width: 480px;
  color: #a8a29e;
}

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

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: #a8a29e;
}

.footer-links a:hover {
  color: #38bdf8;
}

.footer-bottom {
  border-top: 1px solid #44403c;
  color: #a8a29e;
  padding: 18px;
  text-align: center;
}

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

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

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

  .detail-sidebar {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 22px;
  }
}

@media (max-width: 760px) {
  .container-custom {
    width: min(100% - 24px, 1280px);
  }

  .nav-links,
  .nav-search-toggle {
    display: none;
  }

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

  .brand {
    font-size: 18px;
  }

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

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

  .hero-poster-card {
    max-width: 320px;
  }

  .hero-controls {
    right: 16px;
    bottom: 18px;
  }

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

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

  .filter-bar,
  .search-form {
    grid-template-columns: 1fr;
  }

  .compact-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .compact-card .movie-poster img {
    min-height: 145px;
  }

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

  .rank-item .btn-ghost {
    grid-column: 2 / -1;
  }

  .rank-item img {
    width: 86px;
  }

  .detail-sidebar {
    display: block;
  }

  .detail-cover {
    max-width: 280px;
  }

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

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