:root {
  --cyan-50: #ecfeff;
  --cyan-100: #cffafe;
  --cyan-500: #06b6d4;
  --cyan-600: #0891b2;
  --cyan-700: #0e7490;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --white: #ffffff;
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.16);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--slate-800);
  background: var(--slate-50);
  line-height: 1.6;
}

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, var(--cyan-600), var(--blue-700));
  box-shadow: 0 10px 30px rgba(14, 116, 144, 0.25);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 23px;
  font-weight: 800;
  white-space: nowrap;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 650;
  font-size: 15px;
}

.nav-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 21px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
  border-radius: 999px;
}

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 540px;
  overflow: hidden;
  background: var(--slate-900);
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.08));
}

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

.hero-copy {
  width: min(680px, 100%);
  color: var(--white);
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(90deg, var(--cyan-600), var(--blue-600));
  font-size: 13px;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(40px, 7vw, 74px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 620px;
  margin: 0 0 20px;
  color: rgba(248, 250, 252, 0.9);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0 0 28px;
  color: var(--cyan-100);
  font-weight: 700;
}

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

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

.primary-button {
  color: var(--white);
  background: linear-gradient(90deg, var(--cyan-600), var(--blue-600));
  box-shadow: 0 12px 26px rgba(8, 145, 178, 0.35);
}

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

.ghost-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.45);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

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

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

.page-hero,
.detail-hero {
  padding: 58px 0;
  color: var(--white);
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.35), transparent 32%), linear-gradient(135deg, var(--slate-900), var(--cyan-700), var(--blue-700));
}

.page-hero p {
  max-width: 760px;
  margin: 0;
}

.page-hero > .container > p:first-child {
  margin-bottom: 10px;
  color: var(--cyan-100);
  font-weight: 800;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.1;
}

.page-lead {
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.title-line {
  width: 88px;
  height: 5px;
  margin: 18px 0;
  border-radius: 999px;
  background: var(--cyan-100);
}

.search-panel {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(260px, 1.2fr);
  gap: 24px;
  align-items: center;
  margin-top: -32px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.search-panel h2 {
  margin: 0 0 4px;
  font-size: 24px;
}

.search-panel p {
  margin: 0;
  color: var(--slate-500);
}

.search-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 140px 140px auto;
  gap: 12px;
}

.search-form input,
.search-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  color: var(--slate-800);
  background: var(--white);
  outline: none;
}

.search-form input:focus,
.search-form select:focus {
  border-color: var(--cyan-500);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.16);
}

.search-form button {
  min-height: 44px;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--white);
  background: var(--slate-800);
  padding: 0 18px;
  cursor: pointer;
}

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

.soft-section {
  background: linear-gradient(180deg, var(--white), var(--slate-100));
}

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

.section-heading h2 {
  display: inline;
  margin: 0;
  color: var(--slate-800);
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.15;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--slate-500);
}

.section-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-right: 10px;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-600), var(--blue-600));
}

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

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

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

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

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

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--slate-200);
}

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

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

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 60%);
  transition: opacity 0.25s ease;
}

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

.movie-type,
.movie-year {
  position: absolute;
  top: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 7px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}

.movie-type {
  left: 10px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

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

.movie-play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  color: var(--white);
  background: var(--cyan-600);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.65);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-body {
  padding: 18px;
}

.movie-body h3 {
  margin: 0 0 10px;
  color: var(--slate-800);
  font-size: 18px;
  line-height: 1.25;
}

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

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--slate-600);
  font-size: 12px;
  font-weight: 700;
}

.movie-meta span {
  padding: 4px 8px;
  border-radius: 7px;
  background: var(--cyan-50);
  color: var(--cyan-700);
}

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

.category-tile {
  display: flex;
  min-height: 142px;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
  border-radius: var(--radius-md);
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-500), var(--blue-600));
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile em {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-style: normal;
}

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

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

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 82px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.rank-num {
  color: var(--cyan-700);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  width: 82px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
}

.rank-title {
  overflow: hidden;
  color: var(--slate-800);
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-info {
  color: var(--slate-500);
  font-size: 13px;
  white-space: nowrap;
}

.latest-box {
  border-radius: var(--radius-lg);
  padding: 24px;
  background: linear-gradient(180deg, var(--slate-800), var(--slate-900));
  color: var(--white);
  box-shadow: var(--shadow-lg);
}

.latest-box h2 {
  margin: 0 0 18px;
}

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

.latest-list a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.latest-list span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 750;
}

.latest-list em {
  flex: 0 0 auto;
  color: var(--cyan-100);
  font-size: 13px;
  font-style: normal;
}

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

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

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

.overview-images {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  background: var(--slate-200);
}

.overview-images img {
  width: 100%;
  height: 130px;
  object-fit: cover;
}

.overview-body {
  padding: 22px;
}

.overview-body h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.overview-body p {
  margin: 0 0 14px;
  color: var(--slate-600);
}

.overview-body span {
  color: var(--cyan-700);
  font-weight: 800;
}

.detail-hero {
  padding: 24px 0;
}

.detail-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 650;
}

.detail-breadcrumb a:hover {
  color: var(--white);
}

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

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--slate-900);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: var(--slate-900);
  object-fit: contain;
}

.player-mask {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 8px;
  border: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.18));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.big-play {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan-600), var(--blue-600));
  box-shadow: 0 20px 45px rgba(8, 145, 178, 0.35);
  font-size: 34px;
}

.player-mask strong {
  font-size: 26px;
}

.player-mask em {
  font-style: normal;
  color: var(--cyan-100);
  font-weight: 800;
}

.detail-article {
  margin-top: 24px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.detail-title-row h1 {
  margin: 0 0 10px;
  color: var(--slate-900);
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.1;
}

.detail-title-row p {
  margin: 0 0 20px;
  color: var(--slate-600);
  font-size: 18px;
}

.inline-play {
  flex: 0 0 auto;
}

.detail-tags span {
  color: var(--cyan-700);
  background: var(--cyan-50);
}

.detail-article h2 {
  margin: 24px 0 10px;
  color: var(--slate-800);
  font-size: 24px;
}

.detail-article p {
  margin: 0;
  color: var(--slate-700);
  font-size: 17px;
  line-height: 1.9;
}

.prev-next {
  display: grid;
  gap: 10px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--slate-200);
}

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

.detail-side {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
}

.side-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.poster-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.side-card h2 {
  margin: 0;
  padding: 20px 20px 0;
  font-size: 22px;
}

.side-card dl {
  margin: 0;
  padding: 14px 20px 20px;
}

.side-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--slate-100);
}

.side-card dt {
  color: var(--slate-500);
}

.side-card dd {
  margin: 0;
  color: var(--slate-800);
  font-weight: 800;
  text-align: right;
}

.side-card dd a {
  color: var(--cyan-700);
}

.related-section {
  padding-top: 32px;
}

.empty-state {
  display: none;
  margin: 32px 0 0;
  padding: 36px;
  border-radius: var(--radius-md);
  color: var(--slate-500);
  background: var(--white);
  text-align: center;
  box-shadow: var(--shadow-md);
}

.empty-state.is-visible {
  display: block;
}

.site-footer {
  margin-top: 30px;
  color: var(--white);
  background: linear-gradient(180deg, var(--slate-800), var(--slate-900));
}

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

.footer-logo {
  margin-bottom: 10px;
  font-size: 22px;
  font-weight: 900;
}

.site-footer p {
  max-width: 560px;
  margin: 0;
  color: var(--slate-200);
}

.site-footer h2 {
  margin: 0 0 12px;
  color: var(--cyan-100);
  font-size: 18px;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: var(--slate-200);
}

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

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--slate-300);
  text-align: center;
  font-size: 14px;
}

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

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

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

  .detail-side {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .site-nav {
    min-height: 64px;
  }

  .menu-button {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 12px 24px 20px;
    background: linear-gradient(90deg, var(--cyan-600), var(--blue-700));
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 11px 0;
  }

  .hero-slider {
    min-height: 520px;
    height: 64vh;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .movie-grid,
  .small-grid,
  .category-grid,
  .overview-grid,
  .wide-rank-list,
  .footer-grid,
  .detail-side {
    grid-template-columns: 1fr 1fr;
  }

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

  .rank-info {
    display: none;
  }

  .detail-title-row {
    flex-direction: column;
  }
}

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

  .site-logo {
    font-size: 18px;
  }

  .hero-slider {
    min-height: 560px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

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

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

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

  .overview-images img {
    height: 90px;
  }

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

  .big-play {
    width: 68px;
    height: 68px;
  }
}
