* {
  box-sizing: border-box;
}

:root {
  --sky: #0284c7;
  --sky-dark: #0369a1;
  --sky-soft: #e0f2fe;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --page: #f8fafc;
  --card: #ffffff;
  --footer: #111827;
  --shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 34%, #f8fafc 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  height: 68px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 10px 22px rgba(2, 132, 199, 0.28);
  font-size: 14px;
}

.brand-text {
  font-size: 21px;
  letter-spacing: -0.02em;
}

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

.nav-link {
  padding: 10px 14px;
  color: #334155;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 650;
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--sky-dark);
  background: var(--sky-soft);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  padding: 10px 12px;
  font-size: 20px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 16px;
}

.mobile-nav.open {
  display: grid;
  gap: 8px;
}

.hero {
  position: relative;
  max-width: 100%;
  overflow: hidden;
  background: #020617;
}

.hero-slider {
  position: relative;
  height: 610px;
  overflow: hidden;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 30%, rgba(14, 165, 233, 0.28), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(15, 23, 42, 0.72) 45%, rgba(15, 23, 42, 0.16) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.05));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 20px;
  padding: 8px 15px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  font-size: 14px;
  font-weight: 760;
  box-shadow: 0 12px 25px rgba(2, 132, 199, 0.28);
}

.hero h1,
.page-hero h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p {
  max-width: 680px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
  line-height: 1.72;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.hero-meta span,
.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.primary-btn,
.ghost-btn,
.quick-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 0;
  font-weight: 780;
  cursor: pointer;
  transition: 0.22s ease;
}

.primary-btn,
.quick-search button {
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 14px 28px rgba(2, 132, 199, 0.25);
}

.primary-btn:hover,
.quick-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(2, 132, 199, 0.34);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(14px);
}

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

.primary-btn.full,
.ghost-btn.full {
  width: 100%;
  margin-top: 12px;
}

.hero-control {
  position: absolute;
  z-index: 4;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  background: rgba(15, 23, 42, 0.38);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.hero-control.prev {
  left: 22px;
}

.hero-control.next {
  right: 22px;
}

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

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

.hero-dot.active {
  width: 28px;
  background: #ffffff;
}

.hero-thumbs {
  max-width: 1180px;
  margin: -72px auto 0;
  padding: 0 20px 28px;
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.hero-thumb {
  overflow: hidden;
  border-radius: 18px;
  min-height: 110px;
  position: relative;
  box-shadow: var(--shadow);
  background: #0f172a;
}

.hero-thumb img {
  width: 100%;
  height: 128px;
  object-fit: cover;
  opacity: 0.78;
  transition: 0.25s ease;
}

.hero-thumb span {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  color: #ffffff;
  font-weight: 750;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.hero-thumb:hover img {
  opacity: 1;
  transform: scale(1.06);
}

.content-section,
.page-shell,
.detail-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 20px;
}

.content-section.no-top {
  padding-top: 20px;
}

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

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-more {
  color: var(--sky-dark);
  font-weight: 760;
  white-space: nowrap;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.88);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
  transition: 0.24s ease;
}

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

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #0ea5e9);
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.42s ease;
}

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

.card-shade,
.tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.86) 100%);
  opacity: 0.74;
}

.play-bubble {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.86);
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sky-dark);
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transition: 0.25s ease;
}

.movie-card:hover .play-bubble {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.year-badge,
.rank-num {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  background: var(--sky);
  font-size: 12px;
  font-style: normal;
  font-weight: 780;
}

.rank-num {
  left: 12px;
  right: auto;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 9px;
  font-size: 17px;
  line-height: 1.42;
}

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

.card-body p {
  min-height: 47px;
  margin: 0 0 13px;
  color: #475569;
  font-size: 14px;
  line-height: 1.65;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-size: 12px;
  margin-bottom: 12px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.card-tags span {
  border-radius: 999px;
  padding: 5px 8px;
  color: #075985;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 650;
}

.search-strip {
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.search-strip h2 {
  margin: 0 0 8px;
  font-size: 30px;
}

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

.quick-search {
  min-width: min(520px, 100%);
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.quick-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 15px;
}

.quick-search input {
  padding: 0 16px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

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

.category-tile,
.top-rank {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border-radius: 24px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.category-tile img,
.top-rank img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-tile strong,
.category-tile small,
.top-rank div,
.top-rank strong {
  position: relative;
  z-index: 2;
}

.category-tile {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  color: #ffffff;
}

.category-tile strong {
  font-size: 23px;
  margin-bottom: 6px;
}

.category-tile small {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
}

.category-tile:hover img,
.top-rank:hover img {
  transform: scale(1.06);
}

.rank-panel {
  border-radius: 26px;
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  align-self: start;
}

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

.section-head.slim h2 {
  font-size: 26px;
}

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

.rank-line {
  display: grid;
  grid-template-columns: 42px 1fr;
  grid-template-areas:
    "num title"
    "num meta";
  gap: 3px 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
  transition: 0.2s ease;
}

.rank-line:hover {
  background: #e0f2fe;
}

.rank-line span {
  grid-area: num;
  color: var(--sky-dark);
  font-weight: 850;
}

.rank-line strong {
  grid-area: title;
  font-size: 15px;
}

.rank-line em {
  grid-area: meta;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  overflow: hidden;
  border-radius: 30px;
  margin-top: 28px;
  padding: 68px 40px;
  color: #ffffff;
  background:
    radial-gradient(circle at 85% 18%, rgba(125, 211, 252, 0.35), transparent 28%),
    linear-gradient(135deg, #0f172a, #075985 58%, #0284c7);
  box-shadow: var(--shadow);
}

.small-hero {
  min-height: 250px;
  display: flex;
  align-items: center;
}

.category-hero {
  min-height: 310px;
  display: flex;
  align-items: center;
}

.filter-bar {
  margin: 28px 0 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
  padding: 12px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.wide-filter {
  grid-template-columns: minmax(0, 1fr) 160px 180px;
}

.filter-bar input,
.filter-bar select {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  background: #f8fafc;
}

.category-block {
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
}

.rank-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 18px;
  margin-top: 28px;
}

.top-rank {
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  padding: 24px;
  color: #ffffff;
}

.top-rank:first-child {
  min-height: 360px;
}

.top-rank strong {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-size: 22px;
}

.top-rank h2 {
  margin: 0 0 9px;
  font-size: 27px;
}

.top-rank p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.6;
}

.detail-shell {
  padding-top: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}

.breadcrumb a:hover {
  color: var(--sky-dark);
}

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

.player-card,
.detail-side,
.detail-text {
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-start {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at 50% 50%, rgba(2, 132, 199, 0.32), rgba(2, 6, 23, 0.52));
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
}

.player-start.hidden {
  display: none;
}

.player-start span {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--sky-dark);
  font-size: 30px;
  box-shadow: var(--shadow);
}

.player-start strong {
  font-size: 18px;
}

.detail-title-block {
  padding: 26px;
}

.detail-title-block h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 46px);
  letter-spacing: -0.04em;
}

.detail-title-block p {
  margin: 0 0 20px;
  color: #475569;
  line-height: 1.8;
  font-size: 17px;
}

.detail-title-block .detail-meta span {
  color: #075985;
  background: #e0f2fe;
  border: 0;
}

.detail-side {
  padding: 18px;
  align-self: start;
}

.detail-side img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  background: linear-gradient(135deg, #0f172a, #0284c7);
}

.detail-tags {
  margin: 18px 0 8px;
}

.detail-text {
  margin-top: 36px;
  padding: 30px;
}

.detail-text p {
  color: #334155;
  line-height: 1.95;
  font-size: 17px;
}

.detail-text h2 {
  margin-top: 28px;
}

.site-footer {
  margin-top: 50px;
  color: #d1d5db;
  background: var(--footer);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 46px 20px 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 30px;
}

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

.site-footer p,
.site-footer li,
.site-footer a {
  color: #9ca3af;
  line-height: 1.8;
  font-size: 14px;
}

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

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

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  margin-top: 34px;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #6b7280;
  font-size: 14px;
}

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

  .menu-toggle {
    display: inline-flex;
  }

  .hero-slider {
    height: 560px;
  }

  .hero-thumbs,
  .split-section,
  .detail-layout,
  .rank-hero-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-thumbs {
    margin-top: 0;
  }

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

  .search-strip {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-side {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 18px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    height: 62px;
    padding: 0 14px;
  }

  .brand-text {
    font-size: 18px;
  }

  .hero-slider {
    height: 540px;
  }

  .hero-content {
    padding: 0 18px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 38px;
  }

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

  .hero-control {
    display: none;
  }

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

  .hero-thumb {
    min-height: 84px;
  }

  .hero-thumb img {
    height: 96px;
  }

  .content-section,
  .page-shell,
  .detail-shell {
    padding: 28px 14px;
  }

  .page-hero {
    border-radius: 22px;
    padding: 42px 22px;
  }

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

  .movie-grid,
  .compact-grid,
  .category-grid,
  .filter-bar,
  .wide-filter {
    grid-template-columns: 1fr;
  }

  .quick-search {
    border-radius: 22px;
    flex-direction: column;
  }

  .quick-search input {
    min-height: 44px;
  }

  .detail-side {
    display: block;
  }
}
