:root {
  --bg: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --card: #ffffff;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --deep: #0f172a;
  --shadow: 0 18px 55px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  --radius: 24px;
}

* {
  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;
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 45%, #f1f5f9 100%);
  color: var(--text);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.narrow {
  max-width: 860px;
}

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

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--deep);
  white-space: nowrap;
}

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

.main-nav {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.nav-link {
  padding: 9px 13px;
  border-radius: 999px;
  color: #475569;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: #e0f2fe;
  color: #075985;
}

.quick-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-search input,
.search-panel input,
.filter-bar input {
  border: 1px solid var(--line);
  border-radius: 999px;
  min-width: 220px;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  outline: none;
}

.quick-search input:focus,
.search-panel input:focus,
.filter-bar input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.quick-search button,
.search-panel button,
.primary-btn,
.secondary-btn,
.section-more {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  transition: 0.2s ease;
}

.quick-search button,
.primary-btn {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.22);
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.secondary-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.section-more {
  color: var(--blue);
  background: #eff6ff;
  border-color: #bfdbfe;
  font-weight: 700;
}

.quick-search button:hover,
.primary-btn:hover,
.search-panel button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.28);
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #0f172a;
}

.hero-stage {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg::after,
.detail-backdrop::after,
.rank-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 30%, rgba(37, 99, 235, 0.42), transparent 35%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72) 48%, rgba(15, 23, 42, 0.22));
}

.hero-bg img,
.detail-backdrop img,
.rank-cover img {
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #fff;
  padding: 88px 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: #38bdf8;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1,
.rank-hero h1 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 5.4rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-desc,
.lead,
.rank-hero p,
.page-hero p {
  max-width: 700px;
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.82);
}

.hero-tags,
.detail-meta,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 26px;
}

.hero-tags span,
.detail-meta span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
}

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

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

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

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

.search-panel {
  width: min(1180px, calc(100% - 32px));
  margin: -54px auto 32px;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  align-items: center;
  padding: 28px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.search-panel h2 {
  margin: 0 0 6px;
  font-size: 1.55rem;
}

.search-panel p {
  margin: 0;
  color: var(--muted);
}

.search-panel form {
  display: flex;
  gap: 10px;
}

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

.search-panel button {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  white-space: nowrap;
}

.category-strip {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 42px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 146px;
  border-radius: 22px;
  background: #0f172a;
  box-shadow: var(--soft-shadow);
  color: #fff;
}

.category-tile img {
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  transition: 0.25s ease;
}

.category-tile span,
.category-tile small {
  position: absolute;
  left: 16px;
  z-index: 1;
}

.category-tile span {
  bottom: 38px;
  font-size: 1.1rem;
  font-weight: 800;
}

.category-tile small {
  bottom: 17px;
  color: #bfdbfe;
}

.category-tile:hover img {
  transform: scale(1.06);
  opacity: 0.72;
}

.content-section,
.category-block,
.detail-content {
  margin: 56px 0;
}

.section-heading,
.category-block-head,
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 24px;
}

.section-heading h2,
.category-block h2,
.text-panel h2 {
  margin: 0;
  font-size: 1.8rem;
  letter-spacing: -0.02em;
}

.section-heading p,
.category-block p {
  margin: 5px 0 0;
  color: var(--muted);
}

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

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

.movie-card {
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--soft-shadow);
  transition: 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

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

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

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

.poster-tag,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.75rem;
  font-weight: 800;
}

.poster-tag {
  left: 10px;
  bottom: 10px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 32px;
  text-align: center;
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #fff;
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 9px 0;
  color: var(--muted);
  font-size: 0.8rem;
}

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

.desc {
  margin: 0;
  color: #64748b;
  font-size: 0.88rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-hero,
.category-hero {
  padding: 72px 0;
  color: #fff;
  background:
    radial-gradient(circle at top left, rgba(6, 182, 212, 0.45), transparent 35%),
    linear-gradient(135deg, #1d4ed8, #0891b2);
}

.page-hero p {
  color: rgba(255, 255, 255, 0.84);
}

.category-overview {
  padding-bottom: 20px;
}

.category-block {
  padding: 26px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--soft-shadow);
}

.filter-bar {
  align-items: center;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--soft-shadow);
}

.filter-bar input {
  width: min(560px, 100%);
}

.filter-bar span {
  color: var(--muted);
  white-space: nowrap;
}

.rank-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #0f172a;
}

.rank-hero {
  min-height: 440px;
}

.rank-cover,
.detail-backdrop {
  position: absolute;
  inset: 0;
}

.rank-hero-content {
  position: relative;
  z-index: 2;
  padding: 92px 0;
}

.detail-shell {
  position: relative;
  z-index: 2;
  padding: 34px 0 64px;
}

.breadcrumb {
  display: flex;
  gap: 9px;
  align-items: center;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  margin-bottom: 24px;
}

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

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

.detail-poster {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #1e293b;
}

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

.detail-info .lead {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.12rem;
}

.detail-meta span,
.tag-list span {
  background: rgba(255, 255, 255, 0.13);
}

.player-section {
  padding: 44px 0 20px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.55));
  color: #fff;
  cursor: pointer;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-size: 2rem;
  box-shadow: 0 18px 48px rgba(37, 99, 235, 0.35);
}

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

.text-panel {
  padding: 28px;
  margin-bottom: 24px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--soft-shadow);
}

.text-panel p {
  margin: 14px 0 0;
  color: #334155;
}

.related-section {
  margin-top: 34px;
}

.site-footer {
  margin-top: 70px;
  background: #0f172a;
  color: #cbd5e1;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 24px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-logo {
  color: #fff;
  margin-bottom: 8px;
}

.footer-inner p {
  margin: 8px 0 0;
  max-width: 540px;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #64748b;
}

[hidden],
.movie-card.is-hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .header-inner {
    height: auto;
    padding: 12px 0;
    flex-wrap: wrap;
  }

  .main-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    margin-left: 0;
  }

  .quick-search {
    margin-left: auto;
  }

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

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

@media (max-width: 760px) {
  .quick-search {
    width: 100%;
  }

  .quick-search input {
    min-width: 0;
    width: 100%;
  }

  .hero,
  .hero-stage,
  .hero-content {
    min-height: 560px;
  }

  .hero-content {
    padding-top: 64px;
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1,
  .rank-hero h1 {
    font-size: clamp(2rem, 11vw, 3.2rem);
  }

  .search-panel {
    grid-template-columns: 1fr;
    margin-top: -28px;
  }

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

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

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

  .section-heading,
  .category-block-head,
  .filter-bar,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .detail-poster {
    max-width: 260px;
  }

  .text-panel {
    padding: 22px;
  }
}

@media (max-width: 430px) {
  .category-strip {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .small-grid,
  .ranking-grid {
    grid-template-columns: 1fr;
  }
}
