:root {
  color-scheme: light;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --teal-500: #14b8a6;
  --teal-400: #2dd4bf;
  --amber-400: #fbbf24;
  --rose-500: #f43f5e;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body.no-scroll {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 16px 35px rgba(2, 6, 23, 0.22);
  backdrop-filter: blur(14px);
}

.nav-container {
  width: min(100% - 32px, var(--container));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--teal-400), #a7f3d0);
  box-shadow: 0 0 0 5px rgba(45, 212, 191, 0.12);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

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

.brand-text em {
  margin-top: 3px;
  font-size: 12px;
  font-style: normal;
  color: #cbd5e1;
}

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

.site-nav a {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  transition: color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
  color: var(--teal-400);
  transform: translateY(-1px);
}

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

.hero-carousel {
  position: relative;
  min-height: min(720px, 72vh);
  overflow: hidden;
  color: var(--white);
  background: var(--slate-900);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 26%, rgba(20, 184, 166, 0.24), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.76) 46%, rgba(15, 23, 42, 0.18));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100% - 32px, var(--container));
  min-height: min(720px, 72vh);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: var(--container);
}

.hero-content h1,
.hero-content h2 {
  max-width: 760px;
  margin: 18px 0 16px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 680px;
  margin: 0;
  color: #e2e8f0;
  font-size: clamp(17px, 2.1vw, 22px);
  line-height: 1.75;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #99f6e4;
  background: rgba(20, 184, 166, 0.18);
  border: 1px solid rgba(45, 212, 191, 0.24);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.eyebrow.dark {
  color: #0f766e;
  background: rgba(20, 184, 166, 0.12);
  border-color: rgba(20, 184, 166, 0.18);
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.meta-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #ecfeff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.tag-row span {
  color: #0f766e;
  background: rgba(20, 184, 166, 0.10);
  border-color: rgba(20, 184, 166, 0.14);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--teal-400), #a7f3d0);
  box-shadow: 0 18px 34px rgba(20, 184, 166, 0.28);
}

.btn.ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(10px);
}

.btn.dark {
  color: var(--white);
  background: var(--slate-900);
}

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

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

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

.section {
  width: min(100% - 32px, var(--container));
  margin: 58px auto;
}

.section-head {
  margin-bottom: 24px;
}

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

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

.section-head p,
.page-title p {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--slate-600);
  line-height: 1.8;
}

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

.search-panel {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 22px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.78);
  backdrop-filter: blur(16px);
}

.search-panel form,
.filter-bar {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, minmax(140px, 0.55fr));
  gap: 14px;
}

.search-panel label,
.filter-bar label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--slate-600);
  font-size: 12px;
  font-weight: 800;
}

.search-panel input,
.search-panel select,
.filter-bar input,
.filter-bar select {
  min-height: 46px;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--slate-200);
  outline: none;
  padding: 0 14px;
  color: var(--slate-900);
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-panel input:focus,
.search-panel select:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--teal-400);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.14);
}

.clear-filter {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--slate-900);
  cursor: pointer;
}

.filter-empty {
  margin: 24px 0 0;
  padding: 18px;
  border-radius: var(--radius-md);
  color: var(--slate-600);
  background: var(--slate-100);
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--soft-shadow);
  border: 1px solid rgba(226, 232, 240, 0.78);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(20, 184, 166, 0.26);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
}

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

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

.card-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--slate-950);
  background: rgba(153, 246, 228, 0.92);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

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

.card-body h3 a:hover,
.rank-info h3 a:hover {
  color: #0f766e;
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--slate-500);
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  position: relative;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 20px;
  color: var(--white);
  background: var(--slate-900);
  box-shadow: var(--soft-shadow);
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.10), rgba(2, 6, 23, 0.88));
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
  transition: transform 0.35s ease;
}

.category-card:hover img {
  transform: scale(1.07);
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 2;
}

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

.category-card p {
  margin: 8px 0 0;
  color: #e2e8f0;
  line-height: 1.65;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 84px 56px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--soft-shadow);
  border: 1px solid rgba(226, 232, 240, 0.78);
}

.rank-cover {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: var(--slate-900);
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-number {
  color: #0f766e;
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -0.08em;
}

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--slate-600);
  line-height: 1.65;
}

.page-title {
  width: min(100% - 32px, var(--container));
  margin: 46px auto 26px;
  padding: 38px;
  border-radius: var(--radius-xl);
  color: var(--white);
  background:
    radial-gradient(circle at 82% 18%, rgba(45, 212, 191, 0.28), transparent 28%),
    linear-gradient(135deg, var(--slate-950), var(--slate-800));
  box-shadow: var(--shadow);
}

.page-title p {
  color: #cbd5e1;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 700;
}

.breadcrumb a:hover {
  color: var(--teal-400);
}

.detail-hero {
  position: relative;
  min-height: 520px;
  color: var(--white);
  overflow: hidden;
  background: var(--slate-950);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: blur(4px);
  transform: scale(1.04);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.36));
}

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(100% - 32px, var(--container));
  min-height: 520px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  align-items: center;
  gap: 34px;
  padding: 54px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
  background: var(--slate-900);
}

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

.detail-copy h1 {
  margin: 16px 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-copy p {
  max-width: 820px;
  margin: 0;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #ecfeff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 13px;
  font-weight: 800;
}

.detail-layout {
  width: min(100% - 32px, var(--container));
  margin: 50px auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.content-panel,
.side-panel {
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--soft-shadow);
  border: 1px solid rgba(226, 232, 240, 0.78);
}

.content-panel {
  padding: 24px;
}

.side-panel {
  padding: 20px;
}

.content-panel h2,
.side-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.content-panel p {
  color: var(--slate-700);
  font-size: 16px;
  line-height: 1.95;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  margin-bottom: 24px;
}

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

.player-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.08), rgba(2, 6, 23, 0.58));
  transition: opacity 0.2s ease, visibility 0.2s ease;
  cursor: pointer;
}

.player-shell.is-playing .player-layer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-start {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border: 0;
  border-radius: 999px;
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--teal-400), #a7f3d0);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 20px 45px rgba(20, 184, 166, 0.30);
}

.play-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: var(--slate-950);
}

.side-list {
  display: grid;
  gap: 12px;
}

.side-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  align-items: center;
}

.side-item img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--slate-900);
}

.side-item strong {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  line-height: 1.35;
}

.side-item span {
  color: var(--slate-500);
  font-size: 12px;
  font-weight: 700;
}

.site-footer {
  margin-top: 72px;
  padding: 38px 0;
  color: #cbd5e1;
  background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

.footer-inner {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

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

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
}

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

[hidden],
.is-hidden {
  display: none !important;
}

@media (max-width: 1024px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .search-panel form,
  .filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .side-panel {
    order: 2;
  }
}

@media (max-width: 760px) {
  .nav-container {
    height: 64px;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 13px 12px;
    border-radius: 12px;
  }

  .site-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: none;
  }

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

  .hero-shade {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.52), rgba(2, 6, 23, 0.95));
  }

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 92px;
  }

  .quick-search {
    margin-top: 24px;
  }

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

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

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

  .card-body {
    padding: 12px;
  }

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

  .rank-row {
    grid-template-columns: 68px 42px 1fr;
    gap: 12px;
  }

  .rank-info p {
    display: none;
  }

  .detail-inner {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 34px 0;
  }

  .detail-poster {
    width: 210px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .brand-text em {
    display: none;
  }

  .page-title {
    padding: 26px;
  }
}
