:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --cyan-500: #06b6d4;
  --cyan-400: #22d3ee;
  --blue-500: #3b82f6;
  --white: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--slate-900);
  background: linear-gradient(180deg, var(--slate-50) 0%, #ffffff 45%, var(--slate-100) 100%);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.28);
}

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

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

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-500), var(--blue-500));
  box-shadow: 0 12px 24px rgba(6, 182, 212, 0.28);
  font-size: 14px;
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(90deg, var(--cyan-400), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-nav-link {
  color: #d1d5db;
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--cyan-400);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--white);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 10px 22px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

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

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.22), transparent 32%), linear-gradient(135deg, #020617, #164e63 55%, #0f172a);
}

.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-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: saturate(1.08);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(15, 23, 42, 0.82) 42%, rgba(15, 23, 42, 0.2) 100%), linear-gradient(0deg, rgba(15, 23, 42, 0.98) 0%, transparent 48%);
}

.hero-content {
  position: relative;
  max-width: 1180px;
  min-height: 640px;
  margin: 0 auto;
  padding: 88px 22px 96px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 54px;
  align-items: center;
}

.hero-copy {
  max-width: 760px;
  color: var(--white);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan-400);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 700px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: 19px;
}

.hero-tags,
.movie-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.detail-tags span {
  padding: 7px 13px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 650;
}

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

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

.primary-button {
  color: var(--white);
  background: linear-gradient(90deg, var(--cyan-500), var(--blue-500));
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.28);
}

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

.primary-button.small,
.ghost-button.small {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 14px;
}

.ghost-button {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
}

.ghost-button.dark {
  color: var(--slate-800);
  border-color: rgba(15, 23, 42, 0.12);
  background: var(--white);
}

.hero-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.58);
  transform: rotate(2deg);
}

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

.hero-poster:hover img {
  transform: scale(1.06);
}

.hero-control {
  position: absolute;
  bottom: 34px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.hero-control.prev {
  right: 88px;
}

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

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

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

.hero-dot.active {
  width: 34px;
  background: var(--cyan-400);
}

.quick-search {
  margin-top: -42px;
  position: relative;
  z-index: 5;
}

.quick-search-inner,
.content-section,
.page-hero,
.detail-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 22px;
  padding-right: 22px;
}

.quick-search-inner {
  padding-top: 24px;
  padding-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--white);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(8, 145, 178, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.quick-search h2,
.quick-search p {
  margin: 0;
}

.quick-search p {
  color: #cbd5e1;
}

.content-section {
  padding-top: 68px;
  padding-bottom: 12px;
}

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

.section-heading h2,
.page-hero h1,
.detail-card h1,
.detail-card h2,
.side-card h2 {
  margin: 0;
  color: var(--slate-900);
  letter-spacing: -0.04em;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 40px);
}

.section-heading p,
.page-hero p {
  margin: 8px 0 0;
  color: var(--slate-600);
}

.section-link {
  min-height: 38px;
  color: #0e7490;
  background: #ecfeff;
}

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

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

.category-tile {
  position: relative;
  min-height: 180px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
  border-radius: 24px;
  color: var(--white);
  background: var(--slate-800);
  box-shadow: var(--shadow);
}

.category-tile img,
.category-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.category-tile img {
  object-fit: cover;
  opacity: 0.52;
  transition: transform 0.45s ease;
}

.category-overlay {
  background: linear-gradient(180deg, transparent 10%, rgba(2, 6, 23, 0.94) 100%);
}

.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 2;
}

.category-tile strong {
  font-size: 22px;
  font-weight: 900;
}

.category-tile em {
  margin-top: 6px;
  color: #cbd5e1;
  font-style: normal;
  font-size: 14px;
}

.category-tile:hover img {
  transform: scale(1.08);
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.09);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--slate-800);
}

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

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

.poster-year,
.rank-mark {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
}

.poster-year {
  top: 12px;
  right: 12px;
  padding: 4px 9px;
}

.rank-mark {
  left: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.movie-body {
  padding: 16px;
}

.movie-meta-line {
  display: flex;
  gap: 8px;
  color: var(--cyan-500);
  font-size: 12px;
  font-weight: 800;
}

.movie-body h3 {
  margin: 8px 0 8px;
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.28;
  font-weight: 900;
}

.movie-body h3 a:hover {
  color: #0891b2;
}

.movie-body p {
  min-height: 46px;
  margin: 0 0 12px;
  color: var(--slate-600);
  font-size: 14px;
}

.movie-tags span {
  color: var(--slate-600);
  background: var(--slate-100);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 650;
}

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

.sub-page {
  padding-bottom: 70px;
}

.page-hero {
  padding-top: 72px;
  padding-bottom: 44px;
}

.page-hero h1 {
  margin-top: 12px;
  font-size: clamp(38px, 6vw, 62px);
  font-weight: 950;
}

.category-hero {
  max-width: none;
  padding-left: max(22px, calc((100vw - 1180px) / 2 + 22px));
  padding-right: max(22px, calc((100vw - 1180px) / 2 + 22px));
  background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.2), transparent 34%), linear-gradient(135deg, var(--slate-900), #164e63);
}

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

.listing-toolbar {
  margin-bottom: 24px;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 16px;
  align-items: end;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
}

.listing-toolbar label {
  display: grid;
  gap: 7px;
  color: var(--slate-600);
  font-size: 13px;
  font-weight: 750;
}

.listing-toolbar input,
.listing-toolbar select {
  width: 100%;
  height: 44px;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  padding: 0 13px;
  color: var(--slate-900);
  background: var(--white);
  outline: none;
}

.listing-toolbar input:focus,
.listing-toolbar select:focus {
  border-color: var(--cyan-500);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.14);
}

.empty-state {
  margin: 32px 0 0;
  padding: 28px;
  text-align: center;
  color: var(--slate-500);
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.detail-page {
  background: linear-gradient(180deg, var(--slate-50), var(--white));
}

.detail-shell {
  padding-top: 34px;
  padding-bottom: 80px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: #0891b2;
  font-weight: 800;
}

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

.detail-main {
  display: grid;
  gap: 24px;
}

.player-card {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.34);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.46));
  cursor: pointer;
  z-index: 3;
}

.player-card.is-playing .play-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan-500), var(--blue-500));
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.35);
  font-size: 34px;
  text-indent: 4px;
}

.detail-card,
.side-card {
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.detail-card {
  padding: clamp(22px, 4vw, 36px);
}

.detail-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
}

.detail-card h1 {
  margin-top: 8px;
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 950;
  line-height: 1.15;
}

.lead-text {
  margin: 18px 0 18px;
  color: var(--slate-700);
  font-size: 18px;
  font-weight: 650;
}

.detail-tags {
  margin-bottom: 28px;
}

.detail-tags span {
  color: #0e7490;
  background: #ecfeff;
  border-color: #cffafe;
}

.detail-card h2,
.side-card h2 {
  margin-top: 26px;
  margin-bottom: 10px;
  font-size: 24px;
  font-weight: 900;
}

.detail-card p {
  color: var(--slate-700);
  font-size: 16px;
}

.detail-side {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 22px;
}

.side-card {
  padding: 18px;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  background: var(--slate-800);
}

.meta-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.meta-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--slate-500);
  font-size: 14px;
}

.meta-list strong {
  color: var(--slate-900);
  text-align: right;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.mini-card img {
  width: 104px;
  height: 70px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--slate-800);
}

.mini-card strong {
  display: block;
  color: var(--slate-900);
  font-size: 14px;
  line-height: 1.35;
}

.mini-card em {
  display: block;
  margin-top: 5px;
  color: var(--slate-500);
  font-style: normal;
  font-size: 12px;
}

.site-footer {
  background: var(--slate-900);
  color: #cbd5e1;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 36px;
  align-items: center;
}

.footer-brand {
  color: var(--white);
  font-size: 20px;
}

.footer-inner p {
  max-width: 620px;
  margin: 12px 0 0;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--cyan-400);
}

.footer-bottom {
  padding: 16px 22px 28px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

@media (max-width: 1120px) {
  .movie-grid,
  .ranking-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .menu-toggle {
    display: block;
  }

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

  .hero-poster {
    display: none;
  }

  .hero-control {
    bottom: 22px;
  }

  .hero-dots {
    bottom: 34px;
  }

  .quick-search-inner,
  .section-heading,
  .footer-inner,
  .detail-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .quick-search-inner,
  .section-heading,
  .detail-title-row {
    display: flex;
  }

  .listing-toolbar {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }
}

@media (max-width: 720px) {
  .header-inner {
    height: 62px;
  }

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

  .hero-carousel,
  .hero-content {
    min-height: 580px;
  }

  .hero-content {
    padding-top: 70px;
    padding-bottom: 90px;
  }

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

  .category-grid,
  .category-grid.large,
  .movie-grid,
  .compact-grid,
  .ranking-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .content-section {
    padding-top: 48px;
  }

  .movie-body {
    padding: 13px;
  }

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

  .movie-body p {
    min-height: auto;
  }
}

@media (max-width: 480px) {
  .category-grid,
  .category-grid.large,
  .movie-grid,
  .compact-grid,
  .ranking-strip {
    grid-template-columns: 1fr;
  }

  .hero-control.prev {
    right: 76px;
  }

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

  .play-icon {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }
}
