:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --teal: #14b8a6;
  --teal-dark: #0f766e;
  --cyan: #22d3ee;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 45%, #e2e8f0 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.28);
  backdrop-filter: blur(14px);
}

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

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 8px 22px rgba(20, 184, 166, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link,
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 15px;
  border: 0;
  border-radius: 11px;
  color: #cbd5e1;
  background: transparent;
  font: inherit;
  cursor: pointer;
  transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.nav-link:hover,
.nav-button:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(20, 184, 166, 0.86);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(51, 65, 85, 0.75);
  cursor: pointer;
}

.mobile-panel,
.search-panel {
  display: none;
  padding: 14px 0 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
}

.mobile-panel.open,
.search-panel.open {
  display: block;
}

.mobile-panel .nav-link {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  margin: 4px 0;
}

.search-form,
.page-search {
  display: flex;
  gap: 10px;
}

.search-form input,
.page-search input,
.filter-select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 13px;
  padding: 12px 14px;
  color: #ffffff;
  outline: none;
  background: rgba(51, 65, 85, 0.88);
}

.search-form button,
.page-search button,
.cta,
.secondary-cta {
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(20, 184, 166, 0.28);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.search-form button:hover,
.page-search button:hover,
.cta:hover,
.secondary-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(20, 184, 166, 0.36);
}

.secondary-cta {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.hero {
  position: relative;
  height: 64vh;
  min-height: 520px;
  overflow: hidden;
  color: #ffffff;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 5s ease;
}

.hero-slide.active .hero-img {
  transform: scale(1.12);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.54) 48%, rgba(2, 6, 23, 0.35) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
}

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

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

.kicker-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 13px;
  color: #ffffff;
  background: rgba(20, 184, 166, 0.92);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(20, 184, 166, 0.26);
}

.badge-soft {
  color: #99f6e4;
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.24);
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 760px;
  margin: 0 0 26px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.72;
}

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

.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.58);
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: background 0.22s ease, transform 0.22s ease;
}

.hero-control:hover {
  background: rgba(20, 184, 166, 0.86);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

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

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

.section {
  padding: 58px 0;
}

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

.section-title {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-desc {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 21px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

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

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

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

.movie-card:hover .poster img {
  transform: scale(1.09);
  filter: brightness(0.82);
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.72));
  transition: opacity 0.28s ease;
}

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

.play-float {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(20, 184, 166, 0.92);
  transform: translate(-50%, -50%) scale(0.78);
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

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

.card-badge,
.year-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.card-badge {
  left: 12px;
  background: rgba(20, 184, 166, 0.9);
}

.year-badge {
  right: 12px;
  background: rgba(2, 6, 23, 0.72);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 52px;
  margin: 0 0 9px;
  overflow: hidden;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.45;
  font-weight: 800;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.22s ease;
}

.movie-card:hover .card-title {
  color: var(--teal-dark);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 9px;
  color: #64748b;
  font-size: 12px;
}

.card-desc {
  display: -webkit-box;
  min-height: 60px;
  margin: 0;
  overflow: hidden;
  color: #64748b;
  font-size: 14px;
  line-height: 1.52;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  border-radius: 24px;
  padding: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #164e63 62%, #0f766e);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.18);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -45px;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.16);
}

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

.category-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 900;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0 0 18px;
  color: #cbd5e1;
  line-height: 1.7;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 90px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  border-color: rgba(20, 184, 166, 0.45);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  font-weight: 900;
}

.rank-cover {
  width: 90px;
  height: 124px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 900;
}

.rank-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #0891b2);
  padding: 72px 0;
}

.page-hero.dark {
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: #ccfbf1;
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(10px);
}

.filter-bar input,
.filter-bar select {
  min-height: 48px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 0 14px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
}

.player-section {
  padding: 36px 0;
  background: linear-gradient(180deg, #020617, #111827);
}

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

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

.cover-play {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.08), rgba(2, 6, 23, 0.35));
  cursor: pointer;
}

.cover-play span {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.94);
  box-shadow: 0 18px 40px rgba(20, 184, 166, 0.34);
  clip-path: polygon(32% 22%, 32% 78%, 78% 50%);
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 28px;
  padding: 38px 0 64px;
}

.detail-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.detail-card {
  padding: 28px;
}

.detail-title {
  margin: 0 0 18px;
  font-size: clamp(32px, 5vw, 50px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.meta-pill {
  border-radius: 999px;
  padding: 7px 12px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 13px;
  font-weight: 800;
}

.detail-card h2 {
  margin: 28px 0 12px;
  font-size: 22px;
  font-weight: 900;
}

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

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

.tag-cloud span,
.tag-cloud a {
  border-radius: 999px;
  padding: 7px 11px;
  color: #475569;
  background: #f1f5f9;
  font-size: 13px;
}

.side-card {
  overflow: hidden;
  padding: 18px;
}

.side-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 900;
}

.related-list {
  display: grid;
  gap: 13px;
}

.related-item {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.related-item:hover {
  background: #f8fafc;
}

.related-item img {
  width: 76px;
  height: 104px;
  border-radius: 12px;
  object-fit: cover;
}

.related-item h3 {
  margin: 0 0 7px;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 900;
}

.related-item p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}

.breadcrumb {
  margin-bottom: 18px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: #0f766e;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 46px 0 34px;
}

.footer-title {
  margin: 0 0 12px;
  color: #ffffff;
  font-weight: 900;
}

.footer-text,
.footer-list a {
  color: #cbd5e1;
  line-height: 1.75;
}

.footer-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-list a:hover {
  color: #5eead4;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  padding: 18px 0;
  color: #94a3b8;
  text-align: center;
  font-size: 13px;
}

.empty-state {
  display: none;
  padding: 42px;
  border: 1px dashed #cbd5e1;
  border-radius: 22px;
  color: #64748b;
  background: #ffffff;
  text-align: center;
}

.movie-card.hidden,
.rank-item.hidden {
  display: none;
}

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

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

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

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

  .hero {
    height: 72vh;
    min-height: 560px;
  }

  .hero-control {
    display: none;
  }

  .hero-inner {
    padding-bottom: 70px;
  }

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

  .section {
    padding: 42px 0;
  }

  .section-head {
    display: block;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 42px 70px 1fr;
  }

  .rank-cover {
    width: 70px;
    height: 98px;
  }

  .rank-item .cta {
    grid-column: 2 / -1;
    justify-self: start;
  }

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

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

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

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

  .search-form,
  .page-search {
    flex-direction: column;
  }
}
