* {
  box-sizing: border-box;
}

:root {
  --teal: #0d9488;
  --cyan: #0891b2;
  --blue: #2563eb;
  --amber: #f59e0b;
  --emerald: #10b981;
  --dark: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --panel: #ffffff;
  --soft: #f8fafc;
  --shadow: 0 22px 45px rgba(15, 23, 42, 0.14);
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: #1e293b;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  line-height: 1.7;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  color: #ffffff;
  background: linear-gradient(90deg, var(--teal), var(--cyan), var(--blue));
  box-shadow: 0 12px 28px rgba(8, 145, 178, 0.22);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 15px;
  font-weight: 650;
}

.main-nav a {
  opacity: 0.92;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  opacity: 1;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 8px 11px;
  cursor: pointer;
}

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

.mobile-nav a {
  display: block;
  padding: 10px 12px;
  margin-top: 4px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.10);
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.2s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.58) 48%, rgba(0, 0, 0, 0.28) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 126px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 34px;
  align-items: end;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.04em;
  text-shadow: 0 16px 34px rgba(0, 0, 0, 0.45);
}

.hero p {
  margin: 0;
  max-width: 680px;
  color: #e5e7eb;
  font-size: 18px;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.hero-tag,
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  color: #0f766e;
  background: #ccfbf1;
}

.hero-tag {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  color: #ffffff;
  font-weight: 750;
  box-shadow: 0 14px 28px rgba(13, 148, 136, 0.24);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(13, 148, 136, 0.30);
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.btn.light {
  color: #0f766e;
  background: #ffffff;
}

.hero-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-card img {
  height: 430px;
  object-fit: cover;
}

.hero-card-info {
  position: absolute;
  inset: auto 16px 16px 16px;
  border-radius: 18px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(12px);
}

.hero-card-info strong {
  display: block;
  font-size: 19px;
  margin-bottom: 4px;
}

.hero-card-info span {
  color: #cbd5e1;
  font-size: 13px;
}

.hero-controls {
  position: absolute;
  z-index: 5;
  inset: auto 0 32px 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}

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

.hero-dot.active {
  width: 28px;
  background: #ffffff;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 6;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

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

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

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

.section {
  padding: 52px 0;
}

.section.tight {
  padding-top: 28px;
}

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

.section-kicker {
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.16;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--muted);
}

.search-panel {
  margin: -34px auto 0;
  position: relative;
  z-index: 10;
  width: min(1100px, calc(100% - 32px));
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr 170px 150px;
  gap: 12px;
}

.search-panel.flat {
  margin: 26px 0 0;
  width: 100%;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.09);
}

.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  color: #0f172a;
  background: #ffffff;
  outline: 0;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

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

.category-card {
  display: block;
  min-height: 150px;
  border-radius: 24px;
  padding: 24px;
  color: #0f172a;
  background: linear-gradient(135deg, #ffffff 0%, #ecfeff 100%);
  border: 1px solid rgba(14, 165, 233, 0.12);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card strong {
  display: block;
  font-size: 21px;
  margin-bottom: 8px;
}

.category-card span {
  color: var(--muted);
  font-size: 14px;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 15px 32px rgba(15, 23, 42, 0.10);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #0f172a;
}

.poster.tall {
  aspect-ratio: 3 / 4;
}

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

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

.poster:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.04) 54%);
  opacity: 0.84;
}

.badge {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 700;
}

.poster-title {
  position: absolute;
  z-index: 2;
  left: 14px;
  right: 14px;
  bottom: 12px;
  color: #ffffff;
  font-weight: 800;
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body {
  padding: 17px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.card-text {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}

.watch-link {
  color: var(--teal);
  font-weight: 800;
  font-size: 14px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.09);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-card .poster {
  height: 144px;
  aspect-ratio: auto;
}

.rank-body {
  padding: 16px 16px 16px 0;
}

.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 28px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--amber), #ef4444);
  font-weight: 900;
  font-size: 13px;
  margin-bottom: 8px;
}

.rank-body h3,
.detail-info h1 {
  margin: 0;
}

.rank-body h3 {
  color: #0f172a;
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-body p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-hero {
  padding: 74px 0 50px;
  color: #ffffff;
  background: radial-gradient(circle at 20% 0%, rgba(45, 212, 191, 0.55), transparent 32%), linear-gradient(120deg, #0f766e, #0891b2, #2563eb);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.12;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #e0f2fe;
  font-size: 17px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: #0f766e;
  font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.player-panel,
.detail-panel,
.side-panel {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

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

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

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

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 5px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 18px 42px rgba(8, 145, 178, 0.45);
  font-size: 34px;
}

.player-title {
  padding: 24px 28px 28px;
}

.player-title h1 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
}

.info-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #475569;
  font-size: 14px;
}

.info-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #f1f5f9;
  font-weight: 700;
}

.detail-panel {
  margin-top: 26px;
  padding: 28px;
}

.detail-panel h2,
.side-panel h2 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: 24px;
}

.detail-panel p {
  margin: 0 0 16px;
  color: #334155;
}

.side-panel {
  padding: 18px;
}

.cover-card {
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.cover-card img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

.related-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-radius: 14px;
  padding: 8px;
  background: #f8fafc;
}

.related-card .poster {
  border-radius: 12px;
  aspect-ratio: 3 / 4;
}

.related-card h3 {
  margin: 0 0 5px;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.site-footer {
  margin-top: 42px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #1e293b, #0f172a);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 28px;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr;
  gap: 28px;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 12px;
  color: #ffffff;
}

.site-footer p,
.site-footer a {
  color: #cbd5e1;
  font-size: 14px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.copyright {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 18px 0 26px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  color: #94a3b8;
  font-size: 13px;
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--teal);
  box-shadow: 0 14px 28px rgba(13, 148, 136, 0.28);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-top:hover {
  transform: translateY(-3px);
}

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

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

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

  .mobile-nav.open {
    display: block;
  }

  .hero {
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 96px;
  }

  .hero-card {
    max-width: 420px;
  }

  .search-panel {
    grid-template-columns: 1fr;
  }

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

  .rank-list,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .nav-wrap {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    font-size: 18px;
  }

  .hero {
    min-height: 690px;
  }

  .hero-content {
    width: min(100% - 24px, 1180px);
    padding-bottom: 92px;
  }

  .hero-card img {
    height: 300px;
  }

  .hero-arrow {
    display: none;
  }

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

  .category-grid,
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: 98px minmax(0, 1fr);
  }

  .rank-card .poster {
    height: 132px;
  }

  .detail-panel,
  .player-title {
    padding: 20px;
  }
}
