* {
  box-sizing: border-box;
}

:root {
  --primary: #0891b2;
  --primary-dark: #0e7490;
  --accent: #2563eb;
  --cyan-soft: #ecfeff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --panel: #ffffff;
  --dark: #0f172a;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 32%, #f9fafb 100%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(12px);
}

.nav-shell {
  max-width: 1240px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 30px rgba(8, 145, 178, 0.28);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  padding: 9px 12px;
  border-radius: 999px;
  color: #374151;
  font-size: 14px;
  font-weight: 650;
  transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--primary-dark);
  background: var(--cyan-soft);
  transform: translateY(-1px);
}

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

.nav-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select,
.quick-search input {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  outline: none;
  color: var(--text);
  transition: border 0.22s ease, box-shadow 0.22s ease;
}

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

.nav-search button,
.mobile-search button,
.quick-search button,
.filter-bar button {
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(8, 145, 178, 0.22);
}

.nav-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.quick-search input:focus {
  border-color: rgba(8, 145, 178, 0.6);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #111827;
}

.mobile-panel {
  display: none;
  padding: 16px 24px 24px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.mobile-panel.is-open {
  display: grid;
  gap: 10px;
}

.mobile-logo {
  color: var(--primary-dark);
  font-size: 20px;
  font-weight: 800;
}

.mobile-panel a {
  padding: 11px 12px;
  border-radius: 14px;
  background: #f9fafb;
  color: #374151;
  font-weight: 650;
}

.hero {
  position: relative;
  height: 72vh;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 900ms ease;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 76% 20%, rgba(34, 211, 238, 0.3), transparent 30%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.86) 0%, rgba(2, 6, 23, 0.54) 45%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.08) 58%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1240px) / 2 + 24px));
  right: 24px;
  bottom: 92px;
  max-width: 760px;
  color: #ffffff;
}

.hero-kicker,
.page-hero span,
.section-heading span,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(8, 145, 178, 0.92);
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.hero-content h1,
.hero-content h2 {
  margin: 16px 0 14px;
  max-width: 900px;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-shadow: 0 16px 32px rgba(0, 0, 0, 0.36);
}

.hero-content h2 + h2 {
  margin-top: -2px;
  font-size: clamp(24px, 3.4vw, 42px);
  color: #cffafe;
}

.hero-content p {
  max-width: 680px;
  color: #e5e7eb;
  font-size: 18px;
}

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

.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.22s ease, background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}

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

.btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 16px 34px rgba(8, 145, 178, 0.32);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
}

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

.hero-arrow.prev {
  left: 26px;
}

.hero-arrow.next {
  right: 26px;
}

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

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

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

.quick-search {
  max-width: 1180px;
  margin: -56px auto 0;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 28px;
  align-items: center;
  padding: 28px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.quick-search span {
  color: var(--primary);
  font-weight: 850;
}

.quick-search h2 {
  margin: 6px 0 0;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.18;
}

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

.quick-search input {
  width: 100%;
  padding: 15px 18px;
}

.section-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 24px 0;
}

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

.section-heading div {
  display: grid;
  gap: 8px;
}

.section-heading span {
  color: var(--primary-dark);
  background: #cffafe;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.1;
}

.section-heading a,
.text-link {
  color: var(--primary-dark);
  font-weight: 800;
}

.section-heading.light h2,
.section-heading.light a {
  color: #ffffff;
}

.section-heading.light span {
  color: #ffffff;
  background: rgba(8, 145, 178, 0.8);
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(8, 145, 178, 0.32);
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.15);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #155e75);
}

.movie-card:not(.compact) .poster-link {
  aspect-ratio: 3 / 4;
}

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

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

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.22);
}

.card-body {
  padding: 18px;
}

.card-category {
  display: inline-flex;
  margin-bottom: 11px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: #ecfeff;
  font-size: 12px;
  font-weight: 850;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.28;
}

.movie-card.compact .card-body h3 {
  font-size: 16px;
}

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

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

.card-meta span,
.tag-row span,
.detail-meta span,
.detail-tags span {
  border-radius: 999px;
  padding: 5px 9px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
}

.tag-row {
  margin-top: 10px;
}

.tint-panel,
.dark-panel {
  max-width: 1200px;
  margin-top: 76px;
  padding: 44px 34px;
  border-radius: 34px;
}

.tint-panel {
  background: linear-gradient(135deg, #ecfeff, #eff6ff);
}

.dark-panel {
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.2), transparent 30%),
    #0f172a;
}

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

.category-tile,
.overview-card {
  overflow: hidden;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

.overview-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  color: var(--text);
  background: #ffffff;
  border-color: rgba(229, 231, 235, 0.95);
}

.category-covers,
.overview-posters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 160px;
  overflow: hidden;
}

.overview-posters {
  grid-template-columns: repeat(2, 1fr);
  height: 100%;
}

.category-covers img,
.overview-posters img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-copy,
.overview-card > div:last-child {
  padding: 22px;
}

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

.category-copy p,
.overview-card p {
  margin: 0 0 16px;
  color: #cbd5e1;
}

.overview-card p {
  color: var(--muted);
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 10%, rgba(34, 211, 238, 0.28), transparent 32%),
    linear-gradient(135deg, #0f172a, #155e75 58%, #2563eb);
}

.page-hero > div {
  max-width: 1240px;
  margin: 0 auto;
  padding: 86px 24px;
}

.page-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.05;
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
}

.filter-shell {
  padding-top: 42px;
}

.filter-bar {
  position: sticky;
  top: 86px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

.filter-bar input {
  min-width: min(100%, 360px);
  flex: 1;
  padding: 13px 15px;
}

.filter-bar select {
  padding: 13px 15px;
  min-width: 160px;
}

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

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.08);
  transform: scale(1.08);
  opacity: 0.42;
}

.detail-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 18%, rgba(34, 211, 238, 0.24), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.62));
}

.detail-panel {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 92px 24px 74px;
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 44px;
  align-items: end;
  color: #ffffff;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a {
  color: #a5f3fc;
}

.detail-info h1 {
  margin: 16px 0 18px;
  max-width: 820px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.08;
}

.detail-info p {
  max-width: 850px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 18px;
}

.detail-meta span,
.detail-tags span {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.14);
}

.detail-tags {
  margin: 14px 0 28px;
}

.player-section {
  padding-top: 56px;
}

.player-card {
  border-radius: 30px;
  overflow: hidden;
  background: #020617;
  box-shadow: 0 28px 76px rgba(15, 23, 42, 0.28);
}

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

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 0;
  padding: 0;
  color: #ffffff;
  background: #020617;
  cursor: pointer;
  z-index: 3;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(8, 145, 178, 0.16), rgba(2, 6, 23, 0.72));
}

.play-icon {
  position: relative;
  z-index: 2;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-size: 34px;
  box-shadow: 0 24px 54px rgba(8, 145, 178, 0.38);
}

.player-cover strong {
  position: relative;
  z-index: 2;
  margin-top: 128px;
  font-size: clamp(22px, 3vw, 40px);
  text-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
}

.content-card {
  padding: 34px;
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.content-card p {
  margin: 0 0 24px;
  color: #374151;
  font-size: 17px;
}

.content-card p:last-child {
  margin-bottom: 0;
}

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

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 54px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
}

.footer-logo {
  color: #ffffff;
}

.footer-brand p {
  max-width: 540px;
  margin: 18px 0 0;
}

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

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.site-footer a:hover {
  color: #67e8f9;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 24px;
  text-align: center;
  color: #94a3b8;
}

.is-filtered-out {
  display: none !important;
}

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

  .mobile-toggle {
    display: block;
  }

  .nav-shell {
    gap: 14px;
  }

  .nav-search input {
    width: 180px;
  }

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

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

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

  .hero {
    min-height: 620px;
    height: 78vh;
  }

  .hero-content {
    left: 24px;
    bottom: 92px;
  }

  .hero-arrow {
    top: auto;
    bottom: 28px;
    transform: none;
  }

  .hero-dots {
    bottom: 52px;
  }

  .quick-search {
    grid-template-columns: 1fr;
    margin: -38px 18px 0;
  }

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

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

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

  .overview-card {
    grid-template-columns: 1fr;
  }

  .overview-posters {
    height: 190px;
  }

  .detail-panel {
    grid-template-columns: 1fr;
    padding-top: 54px;
  }

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

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

@media (max-width: 560px) {
  .nav-shell {
    height: 64px;
    padding: 0 16px;
  }

  .site-logo {
    font-size: 18px;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 34px;
  }

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

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .section-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .movie-grid,
  .movie-grid.three,
  .movie-grid.four,
  .category-grid,
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    position: relative;
    top: auto;
  }

  .filter-bar input,
  .filter-bar select {
    width: 100%;
  }

  .content-card {
    padding: 24px;
  }

  .player-cover strong {
    margin-top: 108px;
  }
}
