:root {
  color-scheme: light;
  --emerald: #059669;
  --teal: #0d9488;
  --cyan: #0891b2;
  --rose: #f43f5e;
  --amber: #f59e0b;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-100: #f1f5f9;
  --white: #ffffff;
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.14);
  --soft-shadow: 0 12px 35px rgba(15, 23, 42, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  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, #ecfeff 0%, #f8fafc 18%, #ffffff 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--emerald), var(--teal), var(--cyan));
  box-shadow: 0 18px 40px rgba(8, 145, 178, 0.25);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

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

.main-nav a {
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
  color: #fde68a;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.header-search {
  position: relative;
  width: 260px;
}

.header-search input,
.filter-panel input {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  outline: none;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(380px, 92vw);
  max-height: 420px;
  overflow: auto;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
  display: none;
}

.search-panel.is-open {
  display: block;
}

.search-panel a {
  display: block;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.search-panel strong {
  display: block;
  color: var(--slate-900);
}

.search-panel span {
  display: block;
  margin-top: 4px;
  color: var(--slate-500);
  font-size: 13px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  align-items: center;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
  padding: 84px 0 96px;
}

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

.hero-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.34;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(16px) saturate(1.3);
  transform: scale(1.08);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(16, 185, 129, 0.42), transparent 30%),
    radial-gradient(circle at 82% 28%, rgba(34, 211, 238, 0.34), transparent 30%),
    linear-gradient(135deg, rgba(2, 6, 23, 0.9), rgba(15, 118, 110, 0.72));
}

.hero-content,
.hero-poster,
.hero-dots {
  position: relative;
  z-index: 1;
}

.hero-kicker,
.page-hero span,
.section-title span {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 8px 14px;
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 22px 0 18px;
  color: #fff;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
  line-height: 1.8;
}

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

.hero-tags {
  margin: 24px 0 32px;
}

.hero-tags span,
.detail-tags span,
.tag-row span,
.detail-meta span,
.meta-row span {
  border-radius: 999px;
  padding: 7px 11px;
  color: #065f46;
  background: #d1fae5;
  font-size: 12px;
  font-weight: 700;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  color: #064e3b;
  background: linear-gradient(90deg, #fde68a, #fef3c7);
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.28);
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

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

.hero-poster {
  display: block;
  overflow: hidden;
  border-radius: 34px;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.48);
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--emerald);
  background: rgba(255, 255, 255, 0.9);
  font-size: 26px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dot.is-active {
  width: 36px;
  background: #fde68a;
}

.section-wrap,
.filter-panel {
  width: min(1240px, calc(100% - 32px));
  margin: 54px auto;
}

.section-overlap {
  margin-top: -56px;
  position: relative;
  z-index: 5;
}

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

.section-title h2,
.filter-panel h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: -0.04em;
}

.section-title a {
  color: var(--teal);
  font-weight: 800;
}

.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-card {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius-lg);
  padding: 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--emerald), var(--teal) 50%, var(--cyan));
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-name {
  font-size: 24px;
  font-weight: 850;
}

.category-desc {
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.7;
}

.category-card strong {
  width: fit-content;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.18);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--slate-900);
}

.poster img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card-compact .poster img {
  aspect-ratio: 3 / 4;
}

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

.play-badge {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--emerald);
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.year-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 9px;
  padding: 6px 9px;
  color: #fff;
  background: rgba(0, 0, 0, 0.66);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 18px;
}

.card-title {
  display: block;
  color: var(--slate-900);
  font-size: 19px;
  font-weight: 850;
  line-height: 1.35;
}

.card-title:hover {
  color: var(--emerald);
}

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

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

.tag-row span {
  color: var(--slate-700);
  background: var(--slate-100);
}

.rank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 82px 1fr;
  gap: 14px;
  align-items: center;
  border-radius: var(--radius-lg);
  padding: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--soft-shadow);
}

.rank-number {
  color: var(--rose);
  font-size: 24px;
  font-weight: 900;
}

.rank-item img {
  width: 82px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  margin-bottom: 5px;
  font-size: 17px;
}

.rank-info em {
  color: var(--slate-500);
  font-style: normal;
  font-size: 13px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: center;
  border-radius: var(--radius-xl);
  padding: 28px;
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.1), rgba(8, 145, 178, 0.12));
}

.filter-panel p {
  margin: 10px 0 0;
  color: var(--slate-500);
  line-height: 1.7;
}

.page-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 34px auto 0;
  border-radius: var(--radius-xl);
  padding: 64px;
  color: #fff;
  background:
    radial-gradient(circle at 20% 20%, rgba(253, 230, 138, 0.22), transparent 34%),
    linear-gradient(135deg, var(--slate-900), var(--teal));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin-top: 16px;
  color: #fff;
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--slate-950);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.34;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(16px) saturate(1.22);
  transform: scale(1.06);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.92), rgba(15, 118, 110, 0.64));
}

.detail-layout {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 44px;
  align-items: center;
  padding: 74px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.44);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

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

.detail-info h1 {
  margin: 18px 0;
  color: #fff;
  font-size: clamp(38px, 6vw, 72px);
}

.detail-one-line {
  max-width: 820px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
  line-height: 1.8;
}

.detail-meta {
  margin: 24px 0 16px;
}

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

.player-section {
  width: min(1120px, calc(100% - 32px));
  margin: 56px auto 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #000;
  box-shadow: var(--shadow);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.68));
  cursor: pointer;
}

.play-overlay span {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--emerald);
  background: rgba(255, 255, 255, 0.92);
  font-size: 30px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

.play-overlay strong {
  font-size: 22px;
}

.play-overlay.is-hidden {
  display: none;
}

.detail-content {
  margin-top: 40px;
}

.content-card {
  border-radius: var(--radius-xl);
  padding: 34px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

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

.content-card p {
  margin: 0 0 24px;
  color: var(--slate-700);
  line-height: 2;
  font-size: 17px;
}

.site-footer {
  margin-top: 70px;
  color: #cbd5e1;
  background: linear-gradient(180deg, var(--slate-800), var(--slate-950));
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 42px 0;
}

.footer-inner h2 {
  margin: 0 0 10px;
  color: #fff;
}

.footer-inner p {
  margin: 0;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

.is-filter-hidden {
  display: none !important;
}

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

  .main-nav.is-open {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: grid;
    gap: 8px;
    border-radius: 18px;
    padding: 18px;
    background: linear-gradient(180deg, var(--teal), var(--cyan));
    box-shadow: var(--shadow);
  }

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

  .header-search {
    width: min(360px, 42vw);
  }

  .hero-slide {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

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

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

@media (max-width: 720px) {
  .header-inner {
    min-height: auto;
    padding: 12px 0;
    flex-wrap: wrap;
  }

  .brand {
    font-size: 20px;
  }

  .header-search {
    order: 3;
    width: 100%;
  }

  .hero {
    min-height: 620px;
  }

  .hero-slide {
    padding: 54px 0 92px;
  }

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

  .hero p {
    font-size: 17px;
  }

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

  .filter-panel {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .category-grid,
  .category-grid.large,
  .movie-grid,
  .wide-grid,
  .rank-grid,
  .rank-list {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 38px 24px;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    padding: 46px 0;
  }

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

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