:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --blue-dark: #1e40af;
  --blue-soft: #dbeafe;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #1e3a8a);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.brand strong,
.footer-brand strong {
  display: block;
  font-size: 20px;
  line-height: 1.15;
}

.brand small,
.footer-brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.main-nav a,
.quick-nav a,
.mobile-nav a {
  color: #475569;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.top-search {
  width: 300px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.top-search input,
.search-band input,
.filter-panel input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.top-search button,
.search-band button {
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: var(--blue);
  border-radius: 999px;
  padding: 8px 14px;
  white-space: nowrap;
}

.quick-nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.quick-nav a,
.category-chips a {
  padding: 7px 12px;
  background: #f1f5f9;
  border-radius: 999px;
  white-space: nowrap;
}

.quick-nav a:hover,
.category-chips a:hover {
  color: var(--blue);
  background: var(--blue-soft);
}

.mobile-toggle {
  display: none;
  border: 0;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 12px;
  padding: 8px 12px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 14px;
  gap: 8px;
  flex-wrap: wrap;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 999px;
}

.hero-carousel {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.16) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.86) 0%, transparent 46%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 72px 0 170px;
}

.hero-copy {
  width: min(760px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.82);
  border: 1px solid rgba(191, 219, 254, 0.35);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

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

.hero-copy p {
  max-width: 700px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.22);
  border: 1px solid rgba(125, 211, 252, 0.32);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.3);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
}

.hero-panel {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 4;
  transform: translateX(-50%);
}

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

.compact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  padding: 10px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.compact-card img {
  width: 70px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.compact-card strong,
.compact-card em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-card em {
  color: #cbd5e1;
  font-size: 12px;
  font-style: normal;
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.hero-dots button {
  width: 30px;
  height: 5px;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.hero-dots button.active {
  background: #ffffff;
}

.search-band {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 420px);
  align-items: center;
  gap: 24px;
  margin-top: -26px;
  padding: 28px;
  position: relative;
  z-index: 7;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.search-band h2,
.section-head h2,
.page-hero h1,
.player-section h2,
.detail-body h2 {
  margin: 0;
  color: #0f172a;
  line-height: 1.2;
}

.search-band p,
.section-head p,
.page-hero p,
.detail-line,
.detail-body p {
  color: var(--muted);
}

.search-band form,
.filter-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px;
}

.page-section {
  margin-top: 58px;
}

.white-box,
.rank-home,
.filter-panel,
.detail-body article,
.player-section,
.full-rank {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.white-box,
.rank-home {
  padding: 28px;
}

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

.section-head h2 {
  font-size: clamp(26px, 3vw, 36px);
}

.section-head p {
  margin: 8px 0 0;
}

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

.poster-grid {
  display: grid;
  gap: 22px;
}

.five-cols {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14);
}

.poster-wrap {
  display: block;
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

.wide-card .poster-wrap {
  aspect-ratio: 16 / 10;
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78) 0%, transparent 50%);
}

.poster-badge,
.poster-duration {
  position: absolute;
  top: 10px;
  z-index: 2;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.poster-badge {
  left: 10px;
}

.poster-duration {
  right: 10px;
}

.card-content {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.card-content strong {
  color: #0f172a;
  font-size: 16px;
  line-height: 1.35;
}

.card-content em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: #64748b;
  font-size: 12px;
  margin-top: auto;
}

.card-tags span {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 280px);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 6px;
}

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

.category-tile,
.category-large {
  display: flex;
  min-height: 150px;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  color: #ffffff;
  overflow: hidden;
  position: relative;
  background: radial-gradient(circle at top right, rgba(96, 165, 250, 0.75), transparent 38%), linear-gradient(135deg, #1e3a8a, #0f172a);
  border-radius: 22px;
  box-shadow: 0 16px 34px rgba(30, 58, 138, 0.18);
}

.category-tile span,
.category-large span {
  font-size: 21px;
  font-weight: 900;
}

.category-tile strong,
.category-large p {
  color: #dbeafe;
  font-weight: 500;
}

.category-large em {
  color: #ffffff;
  font-style: normal;
  font-weight: 800;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 44px 76px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
}

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

.rank-row img {
  width: 76px;
  height: 56px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.rank-play {
  color: var(--blue);
  font-weight: 900;
}

.plain-page {
  padding: 34px 0 70px;
}

.page-hero {
  margin-bottom: 28px;
  padding: 36px;
  color: #ffffff;
  overflow: hidden;
  background: radial-gradient(circle at 85% 10%, rgba(125, 211, 252, 0.45), transparent 32%), linear-gradient(135deg, #1e3a8a, #0f172a);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.small-hero h1 {
  margin-top: 16px;
  color: #ffffff;
  font-size: clamp(32px, 5vw, 54px);
}

.small-hero p {
  max-width: 760px;
  color: #dbeafe;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.category-chips a {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
}

.filter-panel {
  margin-bottom: 24px;
  padding: 14px 18px;
}

.empty-state {
  display: none;
  margin: 28px 0;
  color: var(--muted);
  text-align: center;
}

.empty-state.show {
  display: block;
}

.detail-page {
  padding: 28px 0 70px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  margin-bottom: 22px;
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--blue);
  font-weight: 700;
}

.detail-hero {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  padding: 30px;
  color: #ffffff;
  overflow: hidden;
  position: relative;
  background: radial-gradient(circle at 85% 0%, rgba(59, 130, 246, 0.38), transparent 36%), linear-gradient(135deg, #0f172a, #1e3a8a);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 24px 48px rgba(2, 6, 23, 0.42);
}

.detail-info h1 {
  margin: 18px 0 12px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
}

.detail-line {
  max-width: 780px;
  color: #dbeafe;
  font-size: 18px;
}

.detail-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.detail-meta span {
  padding: 7px 11px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.detail-info .primary-btn {
  margin-top: 24px;
}

.player-section {
  margin-top: 34px;
  padding: 28px;
}

.player-shell {
  position: relative;
  margin-top: 18px;
  overflow: hidden;
  background: #020617;
  border-radius: 24px;
  box-shadow: 0 24px 54px rgba(2, 6, 23, 0.22);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.2), rgba(2, 6, 23, 0.55));
}

.play-cover span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.88);
  border-radius: 999px;
  font-size: 32px;
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.38);
}

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

.detail-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 34px;
}

.detail-body article {
  padding: 28px;
}

.detail-body p {
  color: #475569;
  font-size: 16px;
}

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

.site-footer {
  margin-top: 80px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #111827);
}

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

.footer-brand .brand-icon {
  box-shadow: none;
}

.footer-brand small,
.site-footer p,
.site-footer a {
  color: #94a3b8;
}

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

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li + li {
  margin-top: 8px;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  font-size: 14px;
}

@media (max-width: 1024px) {
  .top-search {
    display: none;
  }

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

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

  .hero-thumbs .compact-card:nth-child(n + 4) {
    display: none;
  }

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

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

  .nav-wrap {
    min-height: 64px;
  }

  .main-nav,
  .quick-nav {
    display: none;
  }

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

  .brand small {
    display: none;
  }

  .hero-carousel,
  .hero-content {
    min-height: 76vh;
  }

  .hero-content {
    padding: 64px 0 190px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .hero-panel {
    bottom: 18px;
  }

  .hero-thumbs {
    grid-template-columns: 1fr;
  }

  .hero-thumbs .compact-card:nth-child(n + 2) {
    display: none;
  }

  .search-band {
    grid-template-columns: 1fr;
    padding: 22px;
  }

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

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

  .card-content {
    min-height: 174px;
    padding: 14px;
  }

  .rank-row {
    grid-template-columns: 36px 64px 1fr;
  }

  .rank-row img {
    width: 64px;
    height: 50px;
  }

  .rank-play {
    display: none;
  }

  .page-hero {
    padding: 24px;
  }

  .detail-hero,
  .detail-body,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    width: min(260px, 100%);
  }

  .player-section,
  .detail-body article,
  .white-box,
  .rank-home {
    padding: 20px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .five-cols,
  .four-cols,
  .category-grid,
  .category-large-grid {
    grid-template-columns: 1fr;
  }

  .scroll-row {
    grid-auto-columns: minmax(240px, 86vw);
  }
}
