:root {
  --color-cyan: #0891b2;
  --color-cyan-dark: #0e7490;
  --color-blue: #2563eb;
  --color-slate-950: #020617;
  --color-slate-900: #0f172a;
  --color-slate-800: #1e293b;
  --color-slate-700: #334155;
  --color-slate-600: #475569;
  --color-slate-500: #64748b;
  --color-slate-200: #e2e8f0;
  --color-slate-100: #f1f5f9;
  --color-white: #ffffff;
  --shadow-soft: 0 20px 55px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.10);
  --radius-lg: 22px;
  --radius-md: 16px;
  --header-height: 74px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--color-slate-800);
  background: linear-gradient(135deg, #f8fafc 0%, #eef6ff 42%, #f1f5f9 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(8, 145, 178, 0.96), rgba(37, 99, 235, 0.96));
  color: var(--color-white);
  box-shadow: 0 10px 30px rgba(8, 47, 73, 0.28);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.brand-text {
  font-size: 22px;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 15px;
}

.desktop-nav a,
.mobile-nav a {
  color: rgba(255, 255, 255, 0.92);
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #cffafe;
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.16);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mobile-nav.is-open {
  display: grid;
}

main {
  min-height: 70vh;
}

.hero-carousel {
  position: relative;
  min-height: 68vh;
  overflow: hidden;
  background: var(--color-slate-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 18%, rgba(34, 211, 238, 0.26), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.64) 52%, rgba(15, 23, 42, 0.16));
}

.hero-content {
  position: relative;
  min-height: 68vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 48px;
  padding: 64px 0;
  color: var(--color-white);
}

.hero-copy {
  max-width: 720px;
}

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

.hero-badges a,
.hero-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.90);
  color: var(--color-white);
  font-size: 14px;
  font-weight: 700;
}

.hero-badges span:nth-child(3) {
  background: rgba(37, 99, 235, 0.90);
}

.hero-copy h1 {
  margin: 20px 0 16px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0;
  color: rgba(226, 232, 240, 0.94);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta {
  margin: 22px 0 30px;
  color: rgba(226, 232, 240, 0.92);
}

.hero-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.40);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

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

.primary-button,
.ghost-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  min-height: 48px;
  padding: 0 24px;
  color: var(--color-white);
  background: linear-gradient(90deg, var(--color-cyan), var(--color-blue));
  box-shadow: 0 14px 30px rgba(8, 145, 178, 0.32);
}

.ghost-button {
  min-height: 48px;
  padding: 0 24px;
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.ghost-button.light {
  color: var(--color-slate-800);
  background: var(--color-white);
}

.primary-button:hover,
.ghost-button:hover,
.text-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.hero-poster {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 35px 80px rgba(2, 6, 23, 0.55);
  transform: perspective(900px) rotateY(-7deg);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: var(--color-white);
  background: rgba(0, 0, 0, 0.42);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.68);
}

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

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

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--color-white);
}

.section {
  padding: 58px 0;
}

.split-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(241, 245, 249, 0.88));
}

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

.section-heading.compact {
  margin-bottom: 18px;
}

.section-heading p,
.page-hero p {
  margin: 0 0 4px;
  color: var(--color-cyan);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.section-heading h2,
.page-hero h1 {
  margin: 0;
  color: var(--color-slate-800);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
}

.section-heading a {
  color: var(--color-cyan-dark);
  font-weight: 800;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-white);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--color-slate-900);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(2, 6, 23, 0.76));
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--color-white);
  background: var(--color-cyan);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.72);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.poster-type,
.poster-year {
  position: absolute;
  top: 10px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 9px;
  color: var(--color-white);
  font-size: 12px;
  font-weight: 800;
}

.poster-type {
  left: 10px;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(10px);
}

.poster-year {
  right: 10px;
  background: var(--color-cyan);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: var(--color-slate-800);
  font-size: 18px;
  line-height: 1.35;
}

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

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

.card-meta span,
.detail-tags span,
.rank-meta span {
  padding: 5px 9px;
  border-radius: 9px;
  background: #ecfeff;
  color: var(--color-cyan-dark);
  font-size: 12px;
  font-weight: 800;
}

.card-meta span:nth-child(2),
.detail-tags span:nth-child(even),
.rank-meta span:nth-child(even) {
  background: #dbeafe;
  color: #1d4ed8;
}

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

.category-card {
  position: relative;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius-md);
  color: var(--color-white);
  background-image:
    linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(8, 47, 73, 0.88)),
    var(--category-image);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 42px rgba(8, 47, 73, 0.24);
}

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

.category-card strong {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 500;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: 36px;
}

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

.wide-rank-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rank-item {
  display: grid;
  grid-template-columns: 52px 94px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--color-white);
  box-shadow: var(--shadow-card);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--color-white);
  background: linear-gradient(135deg, var(--color-cyan), var(--color-blue));
  font-weight: 900;
}

.rank-poster {
  overflow: hidden;
  border-radius: 14px;
}

.rank-poster img {
  width: 94px;
  height: 66px;
  object-fit: cover;
}

.rank-copy h3 {
  margin: 0 0 5px;
  font-size: 17px;
}

.rank-copy h3 a:hover {
  color: var(--color-cyan-dark);
}

.rank-copy p {
  display: -webkit-box;
  margin: 0 0 9px;
  overflow: hidden;
  color: var(--color-slate-600);
  font-size: 13px;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 82px 0;
  color: var(--color-white);
  background:
    radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.28), transparent 32%),
    linear-gradient(135deg, #0f172a, #0e7490 55%, #2563eb);
}

.page-hero h1,
.page-hero p {
  color: var(--color-white);
}

.page-hero span {
  display: block;
  max-width: 760px;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.slim-hero {
  padding: 74px 0;
}

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

.overview-card {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
  gap: 26px;
  align-items: center;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--color-white);
  box-shadow: var(--shadow-card);
}

.overview-copy h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.overview-copy p {
  margin: 0 0 18px;
  color: var(--color-slate-600);
}

.text-button {
  color: var(--color-cyan-dark);
  font-weight: 900;
}

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

.overview-posters a {
  overflow: hidden;
  border-radius: 12px;
}

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

.filter-panel,
.global-search-panel {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr 0.7fr;
  gap: 16px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-card);
}

.filter-panel label,
.global-search-panel label {
  display: grid;
  gap: 8px;
  color: var(--color-slate-700);
  font-weight: 800;
}

.filter-panel input,
.filter-panel select,
.global-search-panel input,
.global-search-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--color-slate-200);
  border-radius: 14px;
  outline: none;
  background: var(--color-white);
  color: var(--color-slate-800);
}

.filter-panel input:focus,
.filter-panel select:focus,
.global-search-panel input:focus,
.global-search-panel select:focus {
  border-color: var(--color-cyan);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

.empty-state,
.search-summary {
  margin: 22px 0;
  padding: 18px;
  border-radius: 16px;
  color: var(--color-slate-600);
  background: var(--color-white);
  box-shadow: var(--shadow-card);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 24px;
  color: var(--color-slate-600);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--color-cyan-dark);
  font-weight: 800;
}

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

.player-card,
.detail-card,
.info-card,
.side-poster {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-white);
  box-shadow: var(--shadow-card);
}

.player-frame {
  position: relative;
  overflow: hidden;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: var(--color-white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.20), rgba(2, 6, 23, 0.72));
  text-align: center;
  font-size: clamp(18px, 3vw, 28px);
  font-weight: 900;
}

.player-overlay[hidden] {
  display: none;
}

.play-ring {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-cyan), var(--color-blue));
  box-shadow: 0 20px 42px rgba(8, 145, 178, 0.36);
}

.detail-card {
  margin-top: 22px;
  padding: 26px;
}

.detail-card h1 {
  margin: 0 0 16px;
  color: var(--color-slate-800);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.18;
}

.detail-card section {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--color-slate-200);
}

.detail-card h2,
.info-card h2 {
  margin: 0 0 12px;
  color: var(--color-slate-800);
  font-size: 22px;
}

.detail-card p {
  margin: 0;
  color: var(--color-slate-600);
  font-size: 16px;
  line-height: 1.9;
}

.lead-text {
  color: var(--color-slate-700) !important;
  font-weight: 700;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.tag-cloud a {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--color-cyan-dark);
  background: #ecfeff;
  font-size: 13px;
  font-weight: 800;
}

.detail-side {
  position: sticky;
  top: calc(var(--header-height) + 22px);
  display: grid;
  gap: 18px;
}

.info-card {
  padding: 22px;
}

.info-card dl {
  margin: 0;
}

.info-card div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-slate-200);
}

.info-card div:last-child {
  border-bottom: 0;
}

.info-card dt {
  color: var(--color-slate-500);
}

.info-card dd {
  margin: 0;
  color: var(--color-slate-800);
  font-weight: 800;
  text-align: right;
}

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

.site-footer {
  margin-top: 40px;
  color: rgba(255, 255, 255, 0.82);
  background: linear-gradient(180deg, var(--color-slate-800), var(--color-slate-950));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 34px;
  padding: 44px 0;
}

.footer-brand {
  margin-bottom: 12px;
  color: var(--color-white);
  font-size: 24px;
  font-weight: 900;
}

.site-footer p {
  margin: 0;
  max-width: 520px;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #67e8f9;
  font-size: 18px;
}

.site-footer a {
  display: block;
  margin: 7px 0;
}

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

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  text-align: center;
  color: rgba(255, 255, 255, 0.64);
}

[hidden] {
  display: none !important;
}

@media (max-width: 1120px) {
  .desktop-nav {
    gap: 14px;
    font-size: 14px;
  }

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

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

  .wide-rank-list {
    grid-template-columns: 1fr;
  }
}

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

  .menu-button {
    display: block;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-poster {
    display: none;
  }

  .two-column-section,
  .watch-layout,
  .footer-grid,
  .overview-card {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }

  .filter-panel,
  .global-search-panel {
    grid-template-columns: 1fr;
  }
}

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

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

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

  .hero-content {
    padding: 58px 0 74px;
  }

  .hero-control {
    display: none;
  }

  .section {
    padding: 42px 0;
  }

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

  .movie-grid,
  .side-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

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

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

  .rank-item {
    grid-template-columns: 42px 78px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-poster img {
    width: 78px;
    height: 58px;
  }

  .detail-card,
  .info-card {
    padding: 20px;
  }
}
