* {
  box-sizing: border-box;
}

:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #0891b2;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --shadow-strong: 0 24px 70px rgba(15, 23, 42, 0.20);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark,
.footer-logo span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.28);
}

.brand-name {
  font-size: 24px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.nav-link {
  color: #374151;
  font-weight: 700;
  font-size: 15px;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue);
}

.nav-category {
  color: #64748b;
  font-weight: 600;
}

.nav-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-search input,
.search-hero input {
  border: 1px solid #d1d5db;
  outline: none;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
  width: 210px;
  padding: 10px 14px;
}

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

.nav-search button,
.mobile-search button,
.search-hero button,
.primary-btn,
.secondary-btn {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button,
.mobile-search button,
.search-hero button,
.primary-btn {
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.nav-search button {
  padding: 10px 16px;
}

.nav-search button:hover,
.mobile-search button:hover,
.search-hero button:hover,
.primary-btn:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: #111827;
  font-size: 26px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-panel nav {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.mobile-link {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fafc;
  color: #374151;
  font-weight: 700;
}

.mobile-search input {
  flex: 1;
  padding: 11px 14px;
}

.mobile-search button {
  padding: 11px 16px;
}

.hero-carousel {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #1e3a8a 58%, #0e7490);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.58) 46%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-inner {
  position: absolute;
  inset: 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.hero-content {
  max-width: 680px;
  color: #ffffff;
  padding: 80px 0;
}

.eyebrow,
.movie-label,
.detail-label,
.category-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.eyebrow {
  padding: 9px 16px;
  background: var(--blue);
  color: #ffffff;
  font-size: 14px;
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.35);
}

.hero-content h1 {
  margin: 22px 0 16px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

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

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 34px;
}

.hero-meta span {
  padding: 8px 13px;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  font-weight: 700;
}

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

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.24);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.50);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.page-wrap,
.category-wrap,
.detail-wrap,
.search-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.home-main {
  padding: 54px 0 72px;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 62px;
}

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 168px;
  padding: 24px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.movie-card:hover,
.compact-card:hover,
.rank-row:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
}

.category-card::after {
  content: "";
  position: absolute;
  right: -42px;
  top: -42px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(8, 145, 178, 0.18));
}

.category-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-size: 24px;
  font-weight: 900;
}

.category-card h2,
.category-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

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

.content-section {
  margin-bottom: 68px;
}

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

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

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  color: var(--blue);
  font-weight: 800;
  white-space: nowrap;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-poster {
  position: relative;
  display: block;
  height: 245px;
  overflow: hidden;
  background: #111827;
}

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

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

.movie-label {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 11px;
  color: #ffffff;
  background: var(--blue);
  font-size: 12px;
}

.rank-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 6px 11px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.72);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.movie-body {
  padding: 18px;
}

.movie-body h3 {
  margin: 0 0 8px;
  min-height: 56px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-body h3 a {
  transition: color 0.2s ease;
}

.movie-body h3 a:hover {
  color: var(--blue);
}

.movie-body p {
  display: -webkit-box;
  min-height: 46px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.tag-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.tag-strip span,
.detail-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.feature-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 24px;
  margin-bottom: 68px;
}

.rank-panel,
.recommend-panel,
.category-hero,
.search-hero,
.detail-card,
.related-side,
.player-shell {
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.rank-panel {
  padding: 28px;
  background: linear-gradient(135deg, #1e3a8a, #0e7490);
  color: #ffffff;
}

.rank-panel h2,
.recommend-panel h2,
.detail-card h2,
.related-side h2 {
  margin: 0 0 18px;
}

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

.compact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 18px;
  background: #ffffff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-panel .compact-card {
  padding: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  backdrop-filter: blur(12px);
}

.compact-cover {
  width: 86px;
  height: 70px;
  overflow: hidden;
  flex: 0 0 auto;
  border-radius: 14px;
  background: #111827;
}

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

.compact-info {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.compact-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-info em {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-style: normal;
}

.recommend-panel {
  padding: 28px;
}

.recommend-panel .compact-card {
  padding: 10px;
  border: 1px solid #eef2f7;
}

.recommend-panel .compact-info em {
  color: #64748b;
}

.page-hero {
  padding: 64px 0;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #ffffff;
}

.category-hero,
.search-hero {
  padding: 34px;
}

.page-hero h1,
.category-hero h1,
.search-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 54px);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

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

.category-wrap,
.search-wrap {
  padding: 46px 0 76px;
}

.category-hero p,
.search-hero p {
  color: var(--muted);
}

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

.rank-page-list {
  display: grid;
  gap: 12px;
  margin-top: 34px;
}

.rank-row {
  display: grid;
  grid-template-columns: 66px 92px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.rank-cover {
  height: 74px;
  overflow: hidden;
  border-radius: 16px;
  background: #111827;
}

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

.rank-info {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.rank-info strong {
  font-size: 18px;
}

.rank-info em {
  overflow: hidden;
  color: #64748b;
  font-size: 14px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info small {
  color: #94a3b8;
  font-weight: 700;
}

.search-hero form {
  display: flex;
  gap: 12px;
  margin-top: 26px;
}

.search-hero input {
  flex: 1;
  min-height: 52px;
  padding: 0 18px;
}

.search-hero button {
  min-width: 116px;
  padding: 0 22px;
}

.search-status {
  margin: 24px 0;
  color: #64748b;
  font-weight: 700;
}

.detail-top {
  background: linear-gradient(135deg, #111827, #1f2937);
  color: #ffffff;
  padding: 26px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 700;
}

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

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

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

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

.player-shell {
  overflow: hidden;
  background: #020617;
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
  cursor: pointer;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.26), rgba(0, 0, 0, 0.52));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-start span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 20px 60px rgba(37, 99, 235, 0.46);
  font-size: 38px;
}

.detail-card {
  padding: 30px;
}

.detail-label {
  padding: 8px 14px;
  color: #ffffff;
  background: var(--blue);
  font-size: 13px;
}

.detail-card h1 {
  margin: 18px 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  color: #64748b;
  font-weight: 800;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: #f1f5f9;
}

.detail-card h2 {
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid #edf2f7;
  font-size: 24px;
}

.detail-card h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.lead-text {
  color: #1f2937;
  font-size: 18px;
  font-weight: 700;
}

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

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.related-side {
  align-self: start;
  position: sticky;
  top: 92px;
  padding: 22px;
}

.related-side .compact-card {
  padding: 10px;
  border: 1px solid #eef2f7;
}

.related-side .compact-info em {
  color: #64748b;
}

.related-bottom {
  display: none;
}

@media (max-width: 1120px) {
  .desktop-nav .nav-category {
    display: none;
  }

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

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

  .related-side {
    position: static;
  }
}

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

  .mobile-toggle {
    display: block;
    margin-left: auto;
  }

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

  .hero-arrow {
    display: none;
  }

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

  .rank-row {
    grid-template-columns: 52px 76px minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .nav-wrap {
    height: 62px;
  }

  .brand-name {
    font-size: 20px;
  }

  .hero-carousel {
    min-height: 500px;
  }

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

  .hero-meta {
    margin-bottom: 24px;
  }

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

  .movie-poster {
    height: 230px;
  }

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

  .feature-panel {
    gap: 18px;
  }

  .rank-row {
    grid-template-columns: 44px 70px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-num {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 13px;
  }

  .rank-info em {
    display: none;
  }

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

  .search-hero button {
    min-height: 50px;
  }

  .detail-card,
  .category-hero,
  .search-hero,
  .rank-panel,
  .recommend-panel {
    padding: 22px;
    border-radius: 22px;
  }

  .player-start span {
    width: 70px;
    height: 70px;
    font-size: 30px;
  }
}

.category-overview-card {
  display: grid;
  gap: 18px;
}

.category-overview-card > a {
  display: block;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
  z-index: 2;
}

.category-samples a {
  max-width: 100%;
  padding: 7px 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-pill {
  padding: 8px 14px;
  margin-bottom: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-size: 13px;
}

.category-hero h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.03em;
}
