:root {
  --page-bg: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #0f766e;
  --brand-strong: #059669;
  --rose: #e11d48;
  --card: #ffffff;
  --dark: #020617;
  --shadow: 0 20px 55px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  color: #0f172a;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, #059669, #06b6d4 55%, #2563eb);
  box-shadow: 0 10px 24px rgba(5, 150, 105, 0.28);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #334155;
}

.main-nav a {
  padding: 9px 13px;
  border-radius: 999px;
}

.main-nav a:hover {
  color: var(--brand);
  background: #ecfeff;
}

.nav-toggle {
  display: none;
  border: 0;
  background: #0f172a;
  color: #ffffff;
  border-radius: 12px;
  padding: 9px 12px;
}

.hero-section {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: linear-gradient(120deg, #020617, #1e293b);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 900ms ease;
}

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

.hero-slide > img {
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.55), rgba(2, 6, 23, 0.2)), linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent 50%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 82px;
  width: min(1200px, calc(100% - 48px));
  transform: translateX(-50%);
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 800;
}

.hero-content h1 {
  max-width: 860px;
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.72;
}

.hero-tags,
.tag-row,
.detail-meta,
.meta-line,
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.tag-row span,
.tag-row a,
.detail-meta span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.hero-actions {
  margin-top: 28px;
}

.btn-primary,
.btn-ghost,
.quick-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  font-weight: 900;
  cursor: pointer;
}

.btn-primary,
.quick-search button {
  color: #ffffff;
  background: linear-gradient(135deg, #059669, #0ea5e9);
  box-shadow: 0 16px 30px rgba(5, 150, 105, 0.28);
}

.btn-primary:hover,
.quick-search button:hover {
  transform: translateY(-1px);
}

.btn-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(10px);
}

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

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

.hero-dots button.is-active {
  width: 34px;
  background: #ffffff;
}

.quick-search-panel {
  max-width: 1180px;
  margin: -42px auto 28px;
  position: relative;
  z-index: 5;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.quick-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.quick-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  padding: 0 14px;
  outline: none;
  background: #ffffff;
  color: #0f172a;
}

.quick-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.quick-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.quick-cats a {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
}

.quick-cats a:hover {
  background: #ccfbf1;
  color: #0f766e;
}

.section-block {
  max-width: 1280px;
  margin: 0 auto 28px;
  padding: 54px 24px;
  border-radius: 30px;
}

.section-block.white {
  background: #ffffff;
}

.section-block.soft {
  background: linear-gradient(135deg, #ecfeff, #fff7ed);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.section-title.left-only {
  justify-content: flex-start;
}

.section-title h2 {
  margin: 0;
  flex: 1;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 950;
  color: #0f172a;
}

.section-title a {
  color: #0f766e;
  font-weight: 900;
}

.title-icon {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  background: #f1f5f9;
  font-size: 22px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #0f172a, #334155);
}

.poster-link img,
.detail-poster img {
  height: 100%;
  object-fit: cover;
  transition: transform 350ms ease;
}

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

.year-badge,
.play-badge {
  position: absolute;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  font-weight: 900;
}

.year-badge {
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  font-size: 12px;
}

.play-badge {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.84);
  transition: all 240ms ease;
}

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

.card-body {
  padding: 18px;
}

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

.card-body h3 a:hover {
  color: #e11d48;
}

.card-body p {
  min-height: 48px;
  margin: 0 0 14px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
}

.meta-line {
  margin-bottom: 12px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.meta-line a {
  color: #0f766e;
}

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

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

.category-tile {
  min-height: 130px;
  padding: 22px;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.category-tile:hover {
  border-color: #5eead4;
  transform: translateY(-2px);
}

.category-tile strong {
  display: block;
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 950;
}

.category-tile span {
  color: #64748b;
  line-height: 1.65;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  gap: 28px;
}

.feature-list,
.ranking-grid {
  display: grid;
  gap: 12px;
}

.rank-panel {
  padding: 24px;
  border-radius: 26px;
  background: linear-gradient(160deg, #020617, #0f172a 55%, #134e4a);
  color: #ffffff;
}

.rank-panel h2 {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 950;
}

.rank-panel p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.72);
}

.rank-item {
  display: grid;
  grid-template-columns: auto 74px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  color: #0f172a;
}

.rank-panel .rank-item {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}

.rank-item:hover {
  background: #ecfeff;
}

.rank-panel .rank-item:hover {
  background: rgba(255, 255, 255, 0.16);
}

.rank-num {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: #0f766e;
  color: #ffffff;
  font-size: 13px;
  font-weight: 950;
}

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

.rank-item strong,
.rank-item em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-item strong {
  font-weight: 950;
}

.rank-item em {
  color: #64748b;
  font-style: normal;
  font-size: 13px;
}

.rank-panel .rank-item em {
  color: rgba(255, 255, 255, 0.68);
}

.page-main {
  max-width: 1360px;
  margin: 0 auto;
  padding: 26px 20px 48px;
}

.page-hero {
  margin-bottom: 28px;
  padding: 54px;
  border-radius: 30px;
  background: linear-gradient(135deg, #ffffff, #ecfeff);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
}

.page-hero.dark-hero {
  color: #ffffff;
  background: linear-gradient(135deg, #020617, #0f172a 60%, #0f766e);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.06;
  font-weight: 950;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #64748b;
  font-size: 18px;
  line-height: 1.75;
}

.page-hero.dark-hero p {
  color: rgba(255, 255, 255, 0.75);
}

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

.breadcrumb a {
  color: #0f766e;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(140px, 190px) minmax(150px, 210px);
  gap: 12px;
  margin-bottom: 24px;
}

.filter-bar.search-only {
  grid-template-columns: minmax(240px, 1fr) minmax(140px, 180px) minmax(150px, 180px);
}

.detail-main {
  background: #f8fafc;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  background: #020617;
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.34;
  filter: blur(5px) saturate(1.1);
  transform: scale(1.04);
}

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

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #020617, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.42)), linear-gradient(0deg, #020617, transparent 58%);
}

.detail-wrap {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 80px 24px;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  align-items: center;
  gap: 42px;
  color: #ffffff;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  background: #0f172a;
  box-shadow: 0 28px 65px rgba(0, 0, 0, 0.36);
}

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.one-line {
  max-width: 760px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 21px;
  line-height: 1.78;
}

.detail-meta {
  margin-bottom: 18px;
}

.detail-meta span,
.detail-tags a {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
}

.player-section {
  max-width: 1180px;
  margin: -88px auto 34px;
  position: relative;
  z-index: 5;
  padding: 0 20px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.24);
  border-radius: 30px;
  background: #000000;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
  aspect-ratio: 16 / 9;
}

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

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  min-width: 150px;
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #059669, #0ea5e9);
  font-size: 18px;
  font-weight: 950;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 38px rgba(5, 150, 105, 0.32);
}

.player-status {
  position: absolute;
  left: 20px;
  bottom: 18px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.68);
  font-size: 13px;
  font-weight: 800;
}

.video-shell.is-playing .player-start,
.video-shell.is-playing .player-status {
  display: none;
}

.detail-content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 34px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.story-card {
  padding: 28px;
  border: 1px solid #e2e8f0;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
}

.story-card h2 {
  margin: 0 0 16px;
  font-size: 26px;
  font-weight: 950;
}

.story-card p {
  margin: 0;
  color: #334155;
  line-height: 2;
  font-size: 16px;
}

.related-block {
  max-width: 1180px;
}

.site-footer {
  margin-top: 42px;
  background: #0f172a;
  color: rgba(255, 255, 255, 0.72);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 24px;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 30px;
}

.footer-logo {
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 950;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  justify-content: flex-end;
  gap: 10px;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.empty-result {
  grid-column: 1 / -1;
  padding: 34px;
  border-radius: 22px;
  background: #f8fafc;
  color: #64748b;
  text-align: center;
  font-weight: 800;
}

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

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

  .detail-wrap {
    grid-template-columns: 260px minmax(0, 1fr);
  }
}

@media (max-width: 780px) {
  .nav-wrap {
    min-height: 64px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    left: 14px;
    right: 14px;
    top: 70px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .hero-section {
    height: 560px;
  }

  .hero-content {
    bottom: 74px;
    width: calc(100% - 34px);
  }

  .hero-actions,
  .quick-search,
  .filter-bar,
  .filter-bar.search-only {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
  }

  .quick-search-panel {
    margin: -28px 14px 20px;
  }

  .section-block,
  .page-hero {
    padding: 32px 16px;
    border-radius: 22px;
  }

  .card-grid.four,
  .card-grid.three,
  .category-grid,
  .category-grid.large {
    grid-template-columns: 1fr;
  }

  .detail-wrap {
    grid-template-columns: 1fr;
    padding: 54px 20px 120px;
  }

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

  .player-section {
    margin-top: -98px;
  }

  .rank-item {
    grid-template-columns: auto 62px minmax(0, 1fr);
  }

  .rank-item img {
    width: 62px;
    height: 46px;
  }

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