:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --cyan: #0891b2;
  --cyan-dark: #0e7490;
  --blue: #2563eb;
  --gold: #f59e0b;
  --shadow: 0 18px 45px rgba(15, 23, 42, .12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.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, .96), rgba(37, 99, 235, .96));
  box-shadow: 0 10px 30px rgba(15, 23, 42, .18);
}

.nav-wrap {
  min-height: 70px;
  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: 800;
  letter-spacing: .02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #0e7490;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-weight: 700;
}

.main-nav a {
  opacity: .92;
  transition: opacity .2s ease, transform .2s ease;
}

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

.nav-toggle {
  display: none;
  color: #ffffff;
  border: 0;
  background: rgba(255, 255, 255, .16);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 22px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-size: cover;
  background-position: center;
  transition: opacity .75s ease;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-content {
  height: 64vh;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(660px, 100%);
  padding: 36px 0;
}

.hero-badges,
.detail-tags,
.tag-row,
.pill-links,
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-badges span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
}

.hero-badges span {
  color: #ffffff;
  background: rgba(8, 145, 178, .9);
  backdrop-filter: blur(10px);
}

.hero h1 {
  margin: 18px 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: .98;
  letter-spacing: -.05em;
}

.hero p {
  max-width: 620px;
  margin: 0 0 28px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

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

.primary-btn,
.ghost-btn,
.ghost-light-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.primary-btn {
  color: #ffffff;
  background: var(--cyan);
  box-shadow: 0 12px 24px rgba(8, 145, 178, .28);
}

.primary-btn:hover {
  background: var(--cyan-dark);
  transform: translateY(-2px);
}

.ghost-btn,
.ghost-light-btn {
  color: #ffffff;
  background: rgba(15, 23, 42, .48);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
  backdrop-filter: blur(10px);
}

.ghost-light-btn {
  color: var(--ink);
  background: #ffffff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(2, 6, 23, .55);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

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

.quick-search-panel {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  margin-top: -34px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-box,
.search-toolbar {
  display: flex;
  gap: 12px;
}

.search-box input,
.search-toolbar input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 16px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

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

.search-box button,
.search-toolbar button {
  border: 0;
  border-radius: 14px;
  padding: 0 22px;
  color: #ffffff;
  background: var(--cyan);
  font-weight: 800;
  cursor: pointer;
}

.quick-links a,
.pill-links a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border-radius: 999px;
  padding: 0 14px;
  color: var(--cyan-dark);
  background: #ecfeff;
  font-weight: 700;
}

.page-section {
  padding: 54px 0 0;
}

.flat-section {
  padding-top: 34px;
}

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

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.section-head h2,
.page-title-card h1,
.detail-copy h1 {
  margin: 0;
  color: var(--ink);
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
}

.section-head span,
.page-title-card p {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.75;
}

.section-more {
  flex: 0 0 auto;
  color: var(--cyan-dark);
  font-weight: 800;
}

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

.category-chip {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border-radius: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, #0891b2, #2563eb);
  box-shadow: 0 16px 34px rgba(37, 99, 235, .18);
  transition: transform .2s ease, box-shadow .2s ease;
}

.category-chip:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 45px rgba(37, 99, 235, .28);
}

.category-chip strong {
  font-size: 20px;
}

.category-chip span {
  color: #dbeafe;
  font-size: 13px;
  line-height: 1.6;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
  transition: transform .25s ease, box-shadow .25s ease;
}

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

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

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, .72), transparent 58%);
  transition: opacity .3s ease;
}

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

.poster-type,
.poster-year {
  position: absolute;
  z-index: 2;
  top: 10px;
  border-radius: 8px;
  padding: 5px 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.poster-type {
  left: 10px;
  background: rgba(2, 6, 23, .72);
  backdrop-filter: blur(10px);
}

.poster-year {
  right: 10px;
  background: var(--cyan);
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--cyan);
  transform: translate(-50%, -50%) scale(.45);
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
}

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

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

.movie-card-body h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.3;
}

.movie-card-body h3 a:hover {
  color: var(--cyan-dark);
}

.movie-card-body p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.card-meta strong,
.rank-score {
  color: var(--gold);
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  color: var(--cyan-dark);
  background: #ecfeff;
  padding: 5px 9px;
  font-size: 12px;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  align-items: start;
}

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

.rank-item a {
  display: grid;
  grid-template-columns: 42px 92px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .08);
}

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

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

.rank-info strong,
.rank-info em,
.rank-info small {
  display: block;
}

.rank-info strong {
  font-size: 17px;
}

.rank-info em {
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  line-height: 1.55;
}

.rank-info small {
  margin-top: 4px;
  color: #94a3b8;
}

.rank-score {
  font-size: 20px;
  font-weight: 900;
}

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

.page-main {
  padding: 38px 0 58px;
}

.page-title-card,
.category-hero-card {
  overflow: hidden;
  padding: clamp(26px, 4vw, 42px);
  border-radius: 28px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow);
}

.page-title-card h1 {
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.05;
}

.category-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 28px;
}

.category-overview-card a {
  display: block;
  overflow: hidden;
  padding: 18px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .1);
}

.cat-preview-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.cat-preview-row img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 16px;
}

.category-overview-card h2 {
  margin: 0 0 8px;
}

.category-overview-card p {
  color: var(--muted);
  line-height: 1.7;
}

.category-overview-card span {
  color: var(--cyan-dark);
  font-weight: 900;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--cyan-dark);
  font-weight: 700;
}

.detail-main {
  padding: 28px 0 58px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 30px;
  align-items: center;
  padding: 28px;
  border-radius: 30px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #164e63 54%, #1d4ed8);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(2, 6, 23, .32);
}

.detail-copy h1 {
  color: #ffffff;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.05;
}

.detail-one-line {
  max-width: 760px;
  color: #dbeafe;
  font-size: 19px;
  line-height: 1.8;
}

.detail-tags span {
  color: #cffafe;
  background: rgba(8, 145, 178, .38);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}

.player-shell {
  position: relative;
  overflow: hidden;
  margin-top: 28px;
  border-radius: 26px;
  background: #020617;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, .7), rgba(2, 6, 23, .2));
  cursor: pointer;
}

.player-overlay span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 16px 35px rgba(8, 145, 178, .35);
  font-size: 30px;
}

.player-overlay strong {
  font-size: 20px;
}

.player-shell.playing .player-overlay {
  display: none;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  margin-top: 28px;
}

.detail-content,
.detail-side {
  padding: 26px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .08);
}

.detail-content h2,
.detail-side h2 {
  margin: 0 0 15px;
  font-size: 26px;
}

.detail-content p {
  margin: 0 0 24px;
  color: #334155;
  line-height: 1.9;
  font-size: 17px;
}

.detail-side dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

.detail-side dt {
  color: #94a3b8;
  font-weight: 800;
}

.detail-side dd {
  margin: -8px 0 0;
  color: #334155;
  line-height: 1.65;
}

.search-toolbar {
  margin: 26px 0 10px;
}

.filter-line {
  min-height: 28px;
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 700;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 28px;
  padding: 42px 0;
}

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

.site-footer p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.75;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: #67e8f9;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

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

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

  .split-section,
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(8, 145, 178, .98), rgba(37, 99, 235, .98));
    box-shadow: var(--shadow);
  }

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

  .main-nav a {
    padding: 13px 12px;
  }

  .hero,
  .hero-content {
    min-height: 72vh;
    height: 72vh;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search-panel {
    grid-template-columns: 1fr;
    margin-top: -24px;
  }

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

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

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .brand {
    font-size: 18px;
  }

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

  .search-box,
  .search-toolbar,
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

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

  .rank-item a {
    grid-template-columns: 36px 76px 1fr;
  }

  .rank-score {
    grid-column: 3;
    justify-self: start;
  }

  .rank-info em {
    display: none;
  }
}
