:root {
  --bg: #f8fafc;
  --paper: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --cyan: #06b6d4;
  --cyan-dark: #0891b2;
  --slate: #0f172a;
  --slate-soft: #1e293b;
  --blue: #2563eb;
  --rose: #f43f5e;
  --amber: #f59e0b;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
  box-shadow: 0 16px 35px rgba(2, 6, 23, 0.18);
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ecfeff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 28px rgba(6, 182, 212, 0.35);
}

.brand-text {
  font-size: 21px;
  background: linear-gradient(90deg, #67e8f9, #60a5fa);
  -webkit-background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-nav-link {
  color: #cbd5e1;
  border-radius: 12px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 12px;
  font-size: 15px;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover {
  color: #ffffff;
  background: rgba(51, 65, 85, 0.65);
}

.menu-toggle {
  display: none;
  color: #ffffff;
  background: transparent;
  border: 0;
  font-size: 28px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 8px 16px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  background: #1e293b;
}

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.mobile-nav-link {
  padding: 12px 14px;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 540px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg,
.hero-bg img,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-bg img {
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08);
}

.hero-overlay {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(15, 23, 42, 0.7) 46%, rgba(15, 23, 42, 0.14) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(650px, 100%);
  color: #ffffff;
}

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

.hero-kicker span {
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.92);
  font-size: 14px;
  box-shadow: 0 10px 22px rgba(8, 145, 178, 0.28);
}

.hero-kicker span + span {
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
}

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

.hero-copy p {
  max-width: 620px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  line-height: 1.75;
}

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

.primary-btn,
.ghost-btn,
.small-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
  box-shadow: 0 14px 30px rgba(8, 145, 178, 0.32);
}

.primary-btn:hover,
.ghost-btn:hover,
.small-link:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.42);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(2, 6, 23, 0.68);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

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

.content-section {
  padding: 58px 0 0;
}

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

.section-heading > div {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
}

.section-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.16);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
}

.section-heading p {
  grid-column: 2;
  margin: -6px 0 0;
  color: var(--muted);
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0) 35%, rgba(2, 6, 23, 0.72) 100%);
}

.poster-badge,
.rank-number {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
}

.poster-badge {
  top: 12px;
  left: 12px;
  padding: 5px 11px;
  background: rgba(6, 182, 212, 0.95);
  font-size: 13px;
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.rank-number {
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--rose), var(--amber));
  box-shadow: 0 12px 24px rgba(244, 63, 94, 0.3);
}

.movie-body {
  padding: 16px;
}

.movie-meta,
.mini-meta,
.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.movie-meta span,
.mini-meta span,
.detail-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

.movie-body h3 {
  margin: 11px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-body h3 a:hover,
.row-body h3 a:hover,
.category-box h3 a:hover {
  color: var(--cyan-dark);
}

.movie-body p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

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

.tag-row span,
.detail-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #0e7490;
  background: #ecfeff;
  font-size: 12px;
  font-weight: 700;
}

.highlight-section {
  margin-top: 58px;
  padding: 36px;
  border-radius: 32px;
  background: linear-gradient(135deg, #ecfeff 0%, #eff6ff 100%);
}

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

.category-box,
.year-panel,
.category-card-large {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.category-box,
.year-panel {
  padding: 22px;
}

.category-box h3,
.year-panel h3 {
  margin: 0 0 18px;
  padding-left: 12px;
  border-left: 4px solid var(--cyan);
  font-size: 22px;
}

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

.movie-row {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  padding: 10px;
  border-radius: 18px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.row-poster {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 10;
  background: #0f172a;
}

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

.row-body h3 {
  margin: 4px 0 6px;
  font-size: 16px;
}

.row-body p {
  margin: 0 0 9px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.page-hero {
  padding: 72px 0;
  color: #ffffff;
  background: radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.36), transparent 36%), linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #164e63 100%);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

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

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

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

.category-card-large a {
  display: block;
  min-height: 230px;
  padding: 28px;
  background: linear-gradient(135deg, rgba(236, 254, 255, 0.9), rgba(255, 255, 255, 0.92));
}

.category-count {
  display: inline-flex;
  margin-bottom: 20px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 800;
}

.category-card-large h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

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

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-samples a {
  min-height: 0;
  padding: 7px 10px;
  border-radius: 999px;
  background: #ffffff;
  color: #0e7490;
  font-size: 13px;
  box-shadow: none;
}

.filter-panel {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  min-width: 220px;
  flex: 1;
}

.filter-panel span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0 14px;
  outline: none;
  background: #f8fafc;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.small-link {
  color: #ffffff;
  background: var(--slate-soft);
}

.empty-state {
  padding: 38px;
  text-align: center;
  border-radius: 22px;
  color: var(--muted);
  background: #ffffff;
}

.detail-hero {
  padding: 34px 0;
  background: linear-gradient(135deg, #020617 0%, #0f172a 55%, #164e63 100%);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
  gap: 30px;
  align-items: center;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  aspect-ratio: 16 / 9;
  box-shadow: 0 28px 62px rgba(0, 0, 0, 0.42);
}

.video-shell video,
.player-cover,
.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-shell video {
  background: #000000;
}

.player-cover {
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000000;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  object-fit: cover;
  opacity: 0.72;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.55));
}

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

.big-play {
  position: relative;
  z-index: 4;
  width: 86px;
  height: 86px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 36px rgba(6, 182, 212, 0.32);
  font-size: 36px;
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 5;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
}

.detail-info {
  color: #ffffff;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
}

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

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.12;
}

.detail-one-line {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.8;
  font-size: 18px;
}

.detail-info .detail-meta span {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.12);
}

.detail-tags {
  margin-top: 18px;
}

.detail-tags span {
  color: #ecfeff;
  background: rgba(6, 182, 212, 0.26);
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
  padding-top: 42px;
}

.detail-block,
.related-side {
  padding: 26px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.detail-block + .detail-block {
  margin-top: 22px;
}

.detail-block h2,
.related-side h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

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

.related-grid {
  grid-template-columns: 1fr;
  gap: 16px;
}

.related-side .poster-wrap {
  aspect-ratio: 16 / 9;
}

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

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

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 20px;
}

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

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

.footer-links a:hover {
  color: #67e8f9;
}

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

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

  .menu-toggle {
    display: block;
  }

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

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

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

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

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

  .hero-copy p {
    font-size: 17px;
  }

  .hero-arrow {
    display: none;
  }

  .content-section {
    padding-top: 38px;
  }

  .highlight-section {
    padding: 22px;
    border-radius: 24px;
  }

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .list-grid,
  .ranking-grid,
  .category-grid,
  .year-grid,
  .category-overview-grid,
  .footer-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .movie-row {
    grid-template-columns: 96px 1fr;
  }

  .filter-panel label {
    min-width: 100%;
  }

  .detail-hero {
    padding-top: 18px;
  }

  .detail-content {
    padding-top: 24px;
  }
}

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

  .hero-kicker span {
    font-size: 12px;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .page-hero {
    padding: 48px 0;
  }

  .movie-body p {
    min-height: 0;
  }
}
