:root {
  --blue: #2563eb;
  --cyan: #06b6d4;
  --deep: #0f172a;
  --slate: #475569;
  --muted: #64748b;
  --soft: #eff6ff;
  --line: #dbeafe;
  --card: #ffffff;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
  --shadow-soft: 0 14px 40px rgba(37, 99, 235, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(219, 234, 254, 0.86);
}

.header-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 16px clamp(18px, 4vw, 48px);
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.34);
}

.brand:hover .brand-mark {
  transform: rotate(4deg) scale(1.04);
}

.brand-mark,
.movie-card,
.poster-link img,
.hero-dot,
.play-button {
  transition: 0.3s ease;
}

.brand-text strong,
.footer-brand {
  display: block;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.1;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link,
.filter-btn,
.hero-action,
.header-search button,
.mobile-panel button,
.filter-search button,
.pager a,
.pager span {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.24s ease;
}

.nav-link {
  padding: 12px 18px;
  color: #334155;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: var(--shadow-soft);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 6px;
  min-width: 290px;
}

.header-search input,
.mobile-panel input,
.filter-search input {
  border: 0;
  outline: none;
  background: transparent;
  width: 100%;
  color: var(--deep);
}

.header-search input {
  padding: 8px 10px 8px 14px;
}

.header-search button,
.mobile-panel button,
.filter-search button {
  padding: 10px 16px;
  color: #fff;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: #eff6ff;
  border-radius: 12px;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: var(--blue);
}

.mobile-panel {
  display: none;
  padding: 14px 20px 22px;
  border-top: 1px solid #dbeafe;
  background: rgba(255, 255, 255, 0.98);
}

.mobile-panel a {
  display: block;
  padding: 14px 12px;
  border-radius: 14px;
  font-weight: 800;
  color: #334155;
}

.mobile-panel a:hover {
  background: #eff6ff;
  color: var(--blue);
}

.mobile-panel form {
  display: flex;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 8px;
  margin-top: 12px;
}

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

.hero-slide {
  display: none;
  min-height: 85vh;
  background-size: cover;
  background-position: center;
}

.hero-slide.is-active {
  display: block;
}

.hero-content {
  max-width: 1600px;
  min-height: 85vh;
  margin: 0 auto;
  padding: 120px clamp(20px, 5vw, 64px) 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.56fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  color: #fff;
}

.hero-kicker,
.section-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.hero-kicker {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  color: #fde68a;
}

.hero h1 {
  max-width: 880px;
  margin: 22px 0 18px;
  font-size: clamp(42px, 8vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 780px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.hero-meta,
.card-meta,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span,
.card-meta span,
.detail-meta span,
.rank-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.hero-meta span {
  padding: 7px 12px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.14);
}

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

.hero-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 22px;
}

.hero-action.primary {
  color: var(--blue);
  background: #fff;
}

.hero-action.secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(14px);
}

.hero-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.28);
}

.hero-panel {
  border-radius: 32px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(22px);
  box-shadow: 0 30px 100px rgba(15, 23, 42, 0.35);
}

.hero-panel img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 24px;
}

.hero-panel h2 {
  margin: 18px 4px 8px;
  font-size: 28px;
}

.hero-panel p {
  margin: 0 4px 10px;
  font-size: 15px;
  color: #dbeafe;
}

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

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

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

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 86px clamp(20px, 4vw, 56px) 54px;
  color: #fff;
  background: radial-gradient(circle at 18% 20%, rgba(6, 182, 212, 0.45), transparent 32%), linear-gradient(135deg, #0f172a, #1d4ed8 58%, #06b6d4);
}

.page-hero > *,
.detail-hero > * {
  position: relative;
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
}

.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.page-hero p,
.detail-copy > p {
  max-width: 920px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.section {
  max-width: 1600px;
  margin: 0 auto;
  padding: 64px clamp(20px, 4vw, 56px);
}

.section.alt {
  max-width: none;
  background: rgba(241, 245, 249, 0.72);
}

.section.alt > .section-inner {
  max-width: 1600px;
  margin: 0 auto;
}

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

.section-title h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: -0.04em;
}

.section-title p {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 680px;
  line-height: 1.7;
}

.section-title a {
  color: var(--blue);
  font-weight: 900;
}

.section-kicker,
.detail-kicker {
  color: var(--blue);
  background: #dbeafe;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 26px;
}

.movie-grid.compact {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.1);
}

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

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

.poster-link img {
  height: 100%;
  object-fit: cover;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.82), transparent 55%);
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  color: #fff;
  font-weight: 900;
}

.play-chip {
  left: 16px;
  bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.rank-badge {
  top: 14px;
  left: 14px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.28);
}

.card-body {
  padding: 18px;
}

.card-meta {
  margin-bottom: 10px;
}

.card-meta span {
  padding: 5px 9px;
  color: #2563eb;
  background: #eff6ff;
  font-size: 12px;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.25;
}

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

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: #0369a1;
  background: #ecfeff;
  font-size: 12px;
  font-weight: 800;
}

.scroller {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 8px 4px 22px;
  scroll-snap-type: x mandatory;
}

.scroller .movie-card {
  min-width: 300px;
  scroll-snap-align: start;
}

.rank-layout,
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 34px;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.mini-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-soft);
}

.mini-card img {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  object-fit: cover;
}

.mini-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 17px;
}

.mini-card small {
  color: var(--muted);
  line-height: 1.5;
}

.mini-card > span {
  min-width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 900;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
}

.category-card {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  border-radius: 28px;
  color: #fff;
  background: radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.32), transparent 30%), linear-gradient(135deg, #1d4ed8, #06b6d4);
  box-shadow: var(--shadow-soft);
}

.category-card:nth-child(2n) {
  background: radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.28), transparent 30%), linear-gradient(135deg, #7c3aed, #ec4899);
}

.category-card:nth-child(3n) {
  background: radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.28), transparent 30%), linear-gradient(135deg, #0f766e, #22c55e);
}

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

.category-card p {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.7;
}

.category-card span {
  font-weight: 900;
}

.filter-panel {
  max-width: 1600px;
  margin: -28px auto 0;
  position: relative;
  z-index: 3;
  padding: 0 clamp(20px, 4vw, 56px) 32px;
}

.filter-search,
.filter-group {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #dbeafe;
  box-shadow: var(--shadow-soft);
}

.filter-search {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 24px;
  margin-bottom: 14px;
}

.filter-search input {
  padding: 14px 16px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
  border-radius: 24px;
}

.filter-btn {
  padding: 10px 15px;
  color: #334155;
  background: #f8fafc;
}

.filter-btn:hover,
.filter-btn.is-active {
  color: #fff;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.filter-empty {
  display: none;
  padding: 30px;
  margin: 20px 0 0;
  border-radius: 24px;
  color: var(--muted);
  background: #fff;
  text-align: center;
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: #bfdbfe;
  font-weight: 800;
}

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

.detail-hero {
  padding-bottom: 80px;
}

.detail-top {
  display: grid;
  grid-template-columns: minmax(230px, 360px) minmax(0, 1fr);
  gap: clamp(26px, 5vw, 58px);
  align-items: center;
}

.detail-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 30px;
  box-shadow: 0 32px 100px rgba(15, 23, 42, 0.45);
}

.detail-copy h1 {
  margin-bottom: 18px;
}

.detail-meta span {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.16);
  color: #e0f2fe;
}

.watch-box {
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.watch-player video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.1));
}

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

.play-button {
  width: 90px;
  height: 90px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--blue);
  background: #fff;
  font-size: 34px;
  box-shadow: 0 26px 68px rgba(15, 23, 42, 0.32);
}

.player-overlay:hover .play-button {
  transform: scale(1.08);
}

.player-message {
  display: none;
  padding: 14px 18px;
  color: #fff;
  background: rgba(239, 68, 68, 0.86);
  text-align: center;
  font-weight: 800;
}

.content-card,
.side-card {
  padding: 28px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 10px 36px rgba(15, 23, 42, 0.08);
}

.content-card h2,
.side-card h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

.content-card p {
  color: #334155;
  line-height: 1.9;
  font-size: 17px;
}

.content-card + .content-card {
  margin-top: 24px;
}

.side-card {
  position: sticky;
  top: 102px;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}

.pager a,
.pager span {
  padding: 10px 14px;
  color: #334155;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.pager a:hover,
.pager span {
  color: #fff;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.site-footer {
  margin-top: 44px;
  padding: 56px clamp(20px, 4vw, 56px) 24px;
  color: #dbeafe;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

.footer-grid {
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 1fr;
  gap: 32px;
}

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

.site-footer p {
  max-width: 520px;
  line-height: 1.8;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: #bfdbfe;
}

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

.footer-cats {
  columns: 2;
}

.footer-bottom {
  max-width: 1600px;
  margin: 28px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(191, 219, 254, 0.2);
  color: #bfdbfe;
}

@media (max-width: 1180px) {
  .main-nav,
  .header-search {
    display: none;
  }

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

  body.menu-open .mobile-panel {
    display: block;
  }

  .hero-content,
  .rank-layout,
  .detail-layout,
  .detail-top,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    max-width: 440px;
  }

  .side-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-inner {
    padding: 12px 16px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand-text strong {
    font-size: 20px;
  }

  .hero,
  .hero-slide,
  .hero-content {
    min-height: 760px;
  }

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

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

  .section,
  .page-hero,
  .detail-hero {
    padding-left: 18px;
    padding-right: 18px;
  }

  .section-title {
    display: block;
  }

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

  .card-body {
    padding: 14px;
  }

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

  .card-body p,
  .tag-row {
    display: none;
  }

  .mini-card {
    grid-template-columns: 88px 1fr;
  }

  .mini-card > span {
    display: none;
  }

  .content-card,
  .side-card {
    padding: 20px;
  }

  .filter-search {
    display: grid;
  }
}
