:root {
  --cyan-50: #ecfeff;
  --cyan-100: #cffafe;
  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;
  --cyan-600: #0891b2;
  --cyan-700: #0e7490;
  --cyan-800: #155e75;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --white: #ffffff;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.18);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--slate-50), var(--slate-100));
  color: var(--slate-800);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, var(--cyan-800), var(--cyan-600), #0d9488);
  color: var(--white);
  box-shadow: 0 8px 30px rgba(8, 145, 178, 0.22);
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-icon,
.footer-brand span {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.brand strong {
  display: block;
  font-size: 22px;
  line-height: 1;
}

.brand small {
  display: block;
  margin-top: 4px;
  color: var(--cyan-100);
  font-size: 12px;
}

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

.nav-link,
.mobile-nav-link {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: var(--white);
}

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

.header-search input,
.mobile-search input,
.search-panel input,
.filter-panel input {
  border: 1px solid rgba(255, 255, 255, 0.28);
  outline: none;
  border-radius: 999px;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
  min-width: 210px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

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

.header-search input:focus,
.mobile-search input:focus,
.search-panel input:focus,
.filter-panel input:focus {
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 4px rgba(207, 250, 254, 0.22);
}

.header-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  color: var(--cyan-800);
  background: var(--white);
  cursor: pointer;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: var(--white);
  background: transparent;
  font-size: 28px;
}

.mobile-panel {
  display: none;
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--cyan-800);
}

.mobile-panel.is-open {
  display: block;
}

.mobile-search {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.mobile-search input {
  min-width: 0;
  flex: 1;
}

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

.hero-carousel {
  position: relative;
  height: min(72vh, 720px);
  min-height: 520px;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.45), transparent 38%), var(--slate-900);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.35) 58%, rgba(0, 0, 0, 0.14));
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding-bottom: 86px;
  color: var(--white);
}

.hero-kicker,
.detail-badge,
.page-hero span {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--cyan-600);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1 {
  max-width: 840px;
  margin: 16px 0 14px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

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

.hero-actions,
.page-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease;
}

.primary-button {
  background: var(--cyan-600);
  color: var(--white);
  box-shadow: 0 14px 30px rgba(8, 145, 178, 0.28);
}

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

.primary-button:hover {
  background: var(--cyan-700);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
  font-size: 34px;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.carousel-control.prev {
  left: 22px;
}

.carousel-control.next {
  right: 22px;
}

.carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 32px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.carousel-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.carousel-dot.is-active {
  width: 34px;
  background: var(--white);
}

.section {
  padding: 62px 0;
}

.section-white {
  background: var(--white);
}

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

.section-heading h2 {
  margin: 0;
  color: var(--slate-800);
  font-size: clamp(26px, 4vw, 36px);
}

.section-heading a {
  color: var(--cyan-700);
  font-weight: 800;
}

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

.movie-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(270px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 18px;
}

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.42), transparent 34%), linear-gradient(135deg, var(--slate-800), var(--cyan-800));
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.62);
  font-size: 12px;
  font-weight: 700;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: var(--cyan-600);
  color: var(--white);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-card-body h3 {
  display: -webkit-box;
  min-height: 54px;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--slate-800);
  font-size: 18px;
  line-height: 1.48;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--slate-500);
  font-size: 13px;
}

.tag-row,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span,
.tag-cloud span {
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--cyan-700);
  background: var(--cyan-50);
  font-size: 12px;
  font-weight: 700;
}

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

.category-card,
.category-overview-card,
.side-card,
.player-card,
.rank-item,
.filter-panel {
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.category-card {
  padding: 24px;
  background: linear-gradient(135deg, var(--cyan-700), #0f766e);
  color: var(--white);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.category-overview-card:hover,
.rank-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.category-card span {
  display: block;
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.7;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 132px 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-600), #0d9488);
  font-size: 20px;
  font-weight: 900;
}

.rank-thumb {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--slate-700), var(--cyan-800));
}

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

.rank-item h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-item p {
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--slate-600);
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-hero {
  padding: 64px 0;
  color: var(--white);
  background: radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.22), transparent 35%), linear-gradient(90deg, var(--cyan-800), var(--cyan-600), #0d9488);
}

.page-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(36px, 6vw, 58px);
  letter-spacing: -0.03em;
}

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

.page-actions,
.search-panel {
  margin-top: 24px;
}

.search-panel input,
.filter-panel input {
  width: min(680px, 100%);
  background: rgba(255, 255, 255, 0.2);
}

.filter-panel {
  margin-bottom: 24px;
  padding: 18px;
}

.filter-panel input {
  width: 100%;
  border-color: var(--slate-200);
  color: var(--slate-800);
  background: var(--slate-50);
}

.filter-panel input::placeholder {
  color: var(--slate-500);
}

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

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

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 118px;
  background: linear-gradient(135deg, var(--slate-700), var(--cyan-800));
}

.category-thumbs img {
  width: 100%;
  height: 118px;
  object-fit: cover;
}

.category-overview-card div:last-child {
  padding: 20px;
}

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

.category-overview-card p {
  margin: 0;
  color: var(--slate-600);
  line-height: 1.7;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding: 24px 0;
  color: var(--slate-600);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(310px, 0.85fr);
  gap: 28px;
  padding-bottom: 64px;
}

.player-card {
  overflow: hidden;
}

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle at center, rgba(8, 145, 178, 0.28), rgba(0, 0, 0, 0.48));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.play-overlay span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: var(--cyan-600);
  color: var(--white);
  font-size: 34px;
  box-shadow: 0 20px 48px rgba(8, 145, 178, 0.35);
}

.player-box.is-playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.detail-body {
  padding: 28px;
}

.detail-body h1 {
  margin: 16px 0;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.18;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--slate-200);
  color: var(--slate-600);
}

.content-block {
  margin: 28px 0;
}

.content-block h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.content-block p,
.review-box p {
  margin: 0 0 14px;
  color: var(--slate-700);
  line-height: 1.9;
}

.review-box {
  border-radius: var(--radius);
  padding: 22px;
  background: linear-gradient(135deg, var(--slate-50), var(--cyan-50));
}

.detail-side {
  min-width: 0;
}

.side-card {
  position: sticky;
  top: 96px;
  padding: 20px;
}

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

.side-recommend .movie-card-body h3 {
  min-height: auto;
  font-size: 16px;
}

.side-recommend .movie-card-body p,
.side-recommend .tag-row {
  display: none;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, var(--slate-800), var(--slate-900));
}

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

.footer-brand {
  margin-bottom: 16px;
  color: var(--white);
}

.site-footer h3 {
  margin: 0 0 14px;
  color: var(--white);
}

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

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

.site-footer a:hover {
  color: var(--cyan-400);
}

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

[data-filter-item].is-hidden {
  display: none;
}

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

  .menu-toggle {
    display: block;
  }

  .header-search {
    margin-left: auto;
  }

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

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

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

  .side-card {
    position: static;
  }

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

@media (max-width: 760px) {
  .header-inner {
    height: 64px;
  }

  .brand small,
  .header-search {
    display: none;
  }

  .hero-carousel {
    min-height: 500px;
    height: 70vh;
  }

  .hero-content {
    padding-bottom: 72px;
  }

  .carousel-control {
    display: none;
  }

  .section {
    padding: 42px 0;
  }

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

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

  .rank-item {
    grid-template-columns: 44px 100px 1fr;
    gap: 12px;
  }

  .rank-item p {
    display: none;
  }

  .detail-body {
    padding: 22px;
  }
}

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

  .movie-grid {
    gap: 16px;
  }

  .rank-item {
    grid-template-columns: 44px 1fr;
  }

  .rank-thumb {
    display: none;
  }
}
