:root {
  color-scheme: light;
  --bg: #f7fbfc;
  --surface: #ffffff;
  --surface-soft: #ecfeff;
  --text: #172033;
  --muted: #64748b;
  --line: #dbeafe;
  --teal: #0f766e;
  --cyan: #0891b2;
  --blue: #2563eb;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 30px rgba(14, 116, 144, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(45, 212, 191, 0.18), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(37, 99, 235, 0.10), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.nav-shell {
  width: min(1200px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

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

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

.brand:hover .brand-icon {
  transform: scale(1.08) rotate(-3deg);
}

.brand-text {
  font-size: 1.2rem;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 8px 12px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.92rem;
  font-weight: 700;
  transition: background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.nav-link-soft {
  color: rgba(255, 255, 255, 0.78);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

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

.page-main {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 64px;
}

.hero-slider {
  position: relative;
  min-height: 560px;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.75fr);
  align-items: center;
  gap: 44px;
  padding: 58px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.72) 44%, rgba(15, 23, 42, 0.30)),
    radial-gradient(circle at 20% 20%, rgba(45, 212, 191, 0.28), transparent 28rem);
  z-index: 1;
}

.hero-slide > * {
  position: relative;
  z-index: 2;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  filter: saturate(1.08) contrast(1.08);
}

.hero-copy {
  color: #ffffff;
  max-width: 710px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.20);
  color: #99f6e4;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(153, 246, 228, 0.25);
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 640px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
}

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

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button {
  padding: 12px 20px;
  background: linear-gradient(135deg, #14b8a6, #06b6d4, #2563eb);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(8, 145, 178, 0.34);
}

.secondary-button {
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.ghost-button {
  padding: 10px 16px;
  background: #ffffff;
  color: var(--teal);
  box-shadow: inset 0 0 0 1px rgba(14, 116, 144, 0.18);
}

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

.hero-poster {
  justify-self: end;
  width: min(330px, 100%);
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

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

.hero-dots {
  position: absolute;
  left: 58px;
  bottom: 34px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

.hero-dot.active {
  background: #2dd4bf;
}

.quick-cats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0 34px;
}

.quick-cat {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(14, 116, 144, 0.10);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.quick-cat strong {
  display: block;
  color: var(--teal);
  font-size: 1.02rem;
}

.quick-cat span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

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

.section-heading p {
  margin: 0 0 4px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  color: #172033;
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  letter-spacing: -0.04em;
}

.section-more {
  display: inline-flex;
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--teal);
  background: #ffffff;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(14, 116, 144, 0.18);
}

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.90);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(14, 116, 144, 0.10);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card.is-hidden {
  display: none;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f766e, #2563eb);
}

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 52%;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.72));
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  background: linear-gradient(135deg, #f59e0b, #f43f5e);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(244, 63, 94, 0.28);
}

.movie-card-body {
  padding: 16px;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.movie-card h3 {
  margin: 10px 0 8px;
  color: #0f172a;
  font-size: 1.06rem;
  line-height: 1.32;
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #ecfeff;
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 800;
}

.feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.rank-panel,
.category-card,
.info-panel,
.filter-panel,
.detail-card {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(14, 116, 144, 0.10);
}

.rank-panel {
  padding: 18px;
  position: sticky;
  top: 92px;
}

.rank-panel h2 {
  margin: 0 0 14px;
  font-size: 1.35rem;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 36px 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background 0.25s ease, transform 0.25s ease;
}

.rank-row:hover {
  background: #ecfeff;
  transform: translateX(2px);
}

.rank-row img {
  width: 54px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-index strong {
  color: var(--rose);
  font-size: 1.05rem;
}

.rank-title,
.rank-desc {
  display: block;
}

.rank-title {
  color: #0f172a;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-desc {
  color: var(--muted);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-year {
  color: var(--cyan);
  font-weight: 900;
  font-size: 0.86rem;
}

.filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  margin: 24px 0;
}

.search-box {
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #dbeafe;
}

.search-box span {
  color: var(--teal);
  font-weight: 900;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-actions select {
  min-height: 42px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  padding: 0 14px;
  outline: 0;
}

.page-hero {
  padding: 42px;
  border-radius: 28px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.94), rgba(8, 145, 178, 0.90), rgba(37, 99, 235, 0.92)),
    radial-gradient(circle at 70% 15%, rgba(255, 255, 255, 0.2), transparent 28rem);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.05rem;
}

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

.category-card {
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card-inner {
  padding: 22px;
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 1.45rem;
  color: #0f172a;
}

.category-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  padding: 12px;
  background: #f8fafc;
}

.category-strip img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--teal);
}

.watch-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at center, rgba(20, 184, 166, 0.28), transparent 18rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.28), rgba(15, 23, 42, 0.72));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #14b8a6, #06b6d4, #2563eb);
  box-shadow: 0 18px 38px rgba(8, 145, 178, 0.34);
  font-size: 2rem;
}

.player-cover span:last-child {
  font-weight: 900;
  letter-spacing: 0.06em;
}

.detail-side {
  display: grid;
  gap: 16px;
}

.detail-side img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.detail-title-panel {
  padding: 22px;
}

.detail-title-panel h1 {
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-title-panel p {
  margin: 0;
  color: var(--muted);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.detail-meta span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #0f766e;
  background: #ecfeff;
  font-size: 0.86rem;
  font-weight: 900;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
  margin-top: 24px;
}

.detail-card {
  padding: 26px;
}

.detail-card h2 {
  margin: 0 0 12px;
  font-size: 1.55rem;
  color: #0f172a;
}

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

.info-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.info-list dt {
  color: var(--muted);
  font-weight: 800;
}

.info-list dd {
  margin: 0;
  color: #0f172a;
  text-align: right;
  font-weight: 900;
}

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

.related-grid .movie-card-body {
  padding: 12px;
}

.related-grid .movie-card p,
.related-grid .tag-row,
.related-grid .movie-meta-line {
  display: none;
}

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

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

.site-footer h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 1.1rem;
}

.site-footer p {
  margin: 0;
  color: #94a3b8;
}

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

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

.footer-bottom {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  font-size: 0.9rem;
}

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

  .feature-layout,
  .watch-hero,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }

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

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

@media (max-width: 780px) {
  .nav-shell {
    width: min(100% - 24px, 1200px);
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 76px;
    display: none;
    padding: 12px;
    border-radius: 20px;
    background: rgba(15, 118, 110, 0.98);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .nav-link {
    display: block;
    text-align: center;
  }

  .page-main {
    width: min(100% - 24px, 1200px);
    padding-top: 22px;
  }

  .hero-slider {
    min-height: 640px;
    border-radius: 24px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    padding: 32px 24px 74px;
    gap: 24px;
  }

  .hero-poster {
    justify-self: start;
    width: 170px;
    border-radius: 20px;
  }

  .hero-dots {
    left: 24px;
    bottom: 26px;
  }

  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-actions {
    width: 100%;
  }

  .filter-actions select,
  .filter-actions button {
    flex: 1;
  }

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

  .page-hero {
    padding: 28px;
  }

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

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .brand-text {
    font-size: 1rem;
  }

  .main-nav.is-open {
    grid-template-columns: 1fr;
  }

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

  .quick-cats {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 28px 48px minmax(0, 1fr);
  }

  .rank-year {
    display: none;
  }

  .watch-hero {
    gap: 16px;
  }

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