:root {
  --cyan: #06b6d4;
  --cyan-dark: #0891b2;
  --blue: #2563eb;
  --ink: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --card: #ffffff;
  --soft: #f8fafc;
  --shadow: 0 18px 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(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f8fafc 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, rgba(8, 145, 178, 0.96), rgba(37, 99, 235, 0.96));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: var(--cyan);
  background: #ffffff;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.16);
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  transition: background 0.25s ease, color 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-control input,
.filter-control select {
  border: 1px solid rgba(255, 255, 255, 0.22);
  outline: none;
}

.header-search input,
.mobile-search input {
  width: 220px;
  padding: 10px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.76);
}

.header-search button,
.mobile-search button,
.btn-primary,
.btn-soft {
  border: 0;
  cursor: pointer;
  font-weight: 700;
  border-radius: 999px;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.header-search button,
.mobile-search button,
.btn-primary {
  padding: 10px 18px;
  color: #ffffff;
  background: var(--cyan);
  box-shadow: 0 12px 22px rgba(6, 182, 212, 0.28);
}

.btn-soft {
  padding: 10px 18px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
}

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

.menu-toggle {
  display: none;
  margin-left: auto;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px 0;
  border-radius: 2px;
  background: #ffffff;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.hero {
  position: relative;
  height: clamp(520px, 78vh, 720px);
  overflow: hidden;
  color: #ffffff;
  background: #020617;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-slide.active img {
  animation: heroZoom 8s ease forwards;
}

@keyframes heroZoom {
  from {
    transform: scale(1.04);
  }
  to {
    transform: scale(1.1);
  }
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.58) 44%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-content {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 0 0 clamp(52px, 10vw, 108px);
}

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

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.hero-meta span,
.tag-row span,
.detail-tags span,
.small-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-meta span,
.small-badge {
  padding: 7px 12px;
  color: #ffffff;
  background: rgba(6, 182, 212, 0.92);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 740px;
  margin: 0 0 28px;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.36);
  cursor: pointer;
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.56);
}

.hero-arrow.prev {
  left: 22px;
}

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

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

.hero-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.main-space {
  padding: 58px 0;
}

.stack {
  display: grid;
  gap: 66px;
}

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

.section-heading h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: #1f2937;
  letter-spacing: -0.025em;
}

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

.section-heading p,
.page-title p,
.detail-title p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-more {
  color: var(--cyan-dark);
  font-weight: 800;
  white-space: nowrap;
}

.grid {
  display: grid;
  gap: 24px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.74);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.poster-wrap img,
.list-cover img,
.feature-card img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .poster-wrap img,
.movie-card:hover .list-cover img,
.feature-card:hover img {
  transform: scale(1.08);
}

.duration-badge,
.list-cover span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 8px;
  color: #ffffff;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.7);
}

.play-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--cyan-dark);
  font-size: 34px;
  opacity: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.54), rgba(2, 6, 23, 0.1));
  transition: opacity 0.25s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
}

.card-body {
  padding: 18px;
}

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 9px;
  color: #1f2937;
  font-weight: 800;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.card-body p,
.list-content p,
.feature-card p,
.detail-copy p {
  color: var(--muted);
  line-height: 1.7;
}

.card-body p,
.list-content p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 12px;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span,
.detail-tags span {
  padding: 5px 9px;
  color: #0e7490;
  background: #ecfeff;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  color: #64748b;
  font-size: 13px;
}

.soft-section {
  margin-right: calc((100vw - min(1180px, calc(100vw - 32px))) / -2);
  margin-left: calc((100vw - min(1180px, calc(100vw - 32px))) / -2);
  padding: 48px max(16px, calc((100vw - 1180px) / 2));
  border-radius: 34px;
  background: linear-gradient(90deg, #f0fdfa, #ecfeff);
}

.feature-card {
  position: relative;
  overflow: hidden;
  height: 430px;
  border-radius: 24px;
  box-shadow: var(--shadow);
  background: #020617;
}

.feature-card a,
.feature-card img {
  display: block;
  width: 100%;
  height: 100%;
}

.feature-card a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.34), rgba(2, 6, 23, 0.08));
}

.feature-card div {
  position: absolute;
  right: 28px;
  bottom: 28px;
  left: 28px;
  z-index: 2;
  color: #ffffff;
}

.feature-card span {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--cyan);
  font-weight: 800;
}

.feature-card h3 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 36px);
}

.feature-card p {
  color: rgba(255, 255, 255, 0.88);
}

.category-card {
  display: block;
  min-height: 154px;
  padding: 26px;
  border: 1px solid #cffafe;
  border-radius: 24px;
  background: linear-gradient(135deg, #ecfeff, #eff6ff);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--cyan-dark);
  font-size: 26px;
}

.category-card span {
  color: var(--muted);
  line-height: 1.65;
}

.page-hero {
  padding: 56px 0;
  color: #ffffff;
  background: linear-gradient(90deg, #0891b2, #2563eb 70%, #1d4ed8);
}

.page-title h1 {
  color: #ffffff;
  font-size: clamp(32px, 5vw, 48px);
}

.page-title p {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.88);
}

.filter-panel {
  margin-bottom: 28px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.filter-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 16px;
}

.filter-control label {
  display: block;
  margin-bottom: 8px;
  color: #334155;
  font-size: 14px;
  font-weight: 800;
}

.filter-control input,
.filter-control select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  color: #0f172a;
  background: #ffffff;
}

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

.movie-card-list {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
}

.list-cover {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 138px;
  border-radius: 14px;
  background: #0f172a;
}

.list-content {
  min-width: 0;
  padding: 4px 6px 4px 0;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 72px 180px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.rank-number {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.rank-poster {
  position: relative;
  overflow: hidden;
  height: 108px;
  border-radius: 14px;
  background: #0f172a;
}

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

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

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

.detail-hero {
  padding: 32px 0 54px;
  color: #ffffff;
  background: radial-gradient(circle at 20% 0%, rgba(6, 182, 212, 0.34), transparent 34%), linear-gradient(135deg, #020617, #164e63 58%, #1d4ed8);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: #ffffff;
}

.detail-head-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 26px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.detail-title h1 {
  color: #ffffff;
  font-size: clamp(32px, 5vw, 56px);
}

.detail-title p {
  color: rgba(255, 255, 255, 0.86);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
}

.detail-main {
  padding: 46px 0 64px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
}

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

.player-card {
  overflow: hidden;
  margin-bottom: 28px;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.video-shell video {
  width: 100%;
  height: 100%;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.52), rgba(2, 6, 23, 0.12));
  cursor: pointer;
}

.play-overlay span {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 999px;
  color: var(--cyan-dark);
  font-size: 34px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

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

.player-caption {
  padding: 18px 22px;
}

.player-caption h2,
.detail-panel h2,
.side-panel h2 {
  margin: 0 0 12px;
  color: #1f2937;
}

.detail-panel {
  padding: 28px;
}

.detail-copy {
  display: grid;
  gap: 22px;
}

.detail-copy p {
  margin: 0;
}

.side-panel {
  position: sticky;
  top: 92px;
  padding: 20px;
}

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

.side-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  transition: background 0.25s ease;
}

.side-item:hover {
  background: #f1f5f9;
}

.side-item img {
  width: 92px;
  height: 58px;
  border-radius: 10px;
  object-fit: cover;
}

.side-item strong {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 4px;
  color: #1f2937;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.side-item span {
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  display: none;
  padding: 54px 18px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed #cbd5e1;
  border-radius: 24px;
  background: #ffffff;
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr;
  gap: 38px;
  padding: 46px 0;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #67e8f9;
  font-size: 18px;
}

.footer-grid p {
  max-width: 460px;
  color: #94a3b8;
  line-height: 1.7;
}

.footer-grid a:not(.footer-brand) {
  display: block;
  margin: 9px 0;
  color: #94a3b8;
}

.footer-grid a:hover {
  color: #ffffff;
}

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

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

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

  .side-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  body.menu-open .mobile-panel {
    display: block;
  }

  .mobile-search input {
    width: 100%;
  }

  .mobile-search {
    align-items: stretch;
  }

  .grid-4,
  .grid-3,
  .movie-list-grid,
  .grid-2,
  .filter-grid,
  .detail-head-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-list,
  .rank-item {
    grid-template-columns: 1fr;
  }

  .rank-poster {
    height: 180px;
  }

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

  .hero-arrow {
    display: none;
  }

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

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

  .brand {
    font-size: 18px;
  }

  .hero {
    height: 560px;
  }

  .main-space {
    padding: 42px 0;
  }

  .stack {
    gap: 46px;
  }

  .soft-section {
    border-radius: 0;
  }

  .feature-card {
    height: 360px;
  }

  .detail-panel {
    padding: 22px;
  }

  .play-overlay span {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
