:root {
  color-scheme: light;
  --cyan-900: #164e63;
  --cyan-800: #155e75;
  --cyan-700: #0e7490;
  --cyan-600: #0891b2;
  --cyan-500: #06b6d4;
  --teal-600: #0d9488;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.18);
  --radius-lg: 18px;
  --radius-xl: 24px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--cyan-800), var(--cyan-600), var(--teal-600));
  box-shadow: 0 10px 30px rgba(8, 145, 178, 0.25);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  min-width: max-content;
}

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

.logo-text strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.logo-text small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #cffafe;
}

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

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

.nav-link:hover,
.nav-link.active {
  color: #cffafe;
  transform: translateY(-1px);
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search input {
  width: 245px;
  padding: 10px 42px 10px 16px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  outline: none;
  backdrop-filter: blur(12px);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.header-search input::placeholder {
  color: #cffafe;
}

.header-search input:focus {
  background: rgba(255, 255, 255, 0.26);
  box-shadow: 0 0 0 3px rgba(207, 250, 254, 0.25);
}

.header-search button {
  position: absolute;
  right: 6px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
}

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

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

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

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

.mobile-panel nav,
.mobile-search {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

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

.mobile-search input {
  flex: 1;
  padding: 10px 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  outline: none;
}

.mobile-search button {
  padding: 10px 16px;
  border: 0;
  border-radius: 12px;
  color: var(--cyan-900);
  background: var(--white);
  font-weight: 700;
}

.mobile-link {
  display: block;
  padding: 12px 0;
  color: var(--white);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero {
  position: relative;
  min-height: 68vh;
  overflow: hidden;
  background: var(--slate-950);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 50%, rgba(8, 145, 178, 0.3), transparent 34%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.5) 45%, rgba(2, 6, 23, 0.2));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 68vh;
  display: flex;
  align-items: flex-end;
  padding: 88px 0 76px;
}

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

.hero-copy .pill,
.page-hero .pill,
.detail-meta .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--white);
  background: var(--cyan-600);
  font-size: 14px;
  font-weight: 700;
}

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

.hero-copy p {
  max-width: 720px;
  margin: 0 0 28px;
  color: #e2e8f0;
  font-size: clamp(18px, 2vw, 22px);
}

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

.btn-primary,
.btn-secondary,
.btn-white,
.pagination a,
.pagination span,
.search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary,
.search-submit {
  color: var(--white);
  background: var(--cyan-600);
  box-shadow: 0 12px 28px rgba(8, 145, 178, 0.28);
}

.btn-primary:hover,
.search-submit:hover {
  background: var(--cyan-700);
  transform: translateY(-2px);
}

.btn-secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.26);
  transform: translateY(-2px);
}

.btn-white {
  color: var(--cyan-700);
  background: var(--white);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  right: max(24px, calc((100vw - var(--container)) / 2));
  bottom: 76px;
  display: flex;
  gap: 10px;
}

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

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

.section,
.category-overview,
.detail-layout,
.search-page {
  padding: 64px 0;
}

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

.section-gradient {
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-700), var(--teal-600));
}

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

.section-kicker {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--cyan-600);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.section-gradient .section-kicker {
  color: #cffafe;
}

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

.section-gradient .section-heading h2,
.section-gradient .section-heading p {
  color: var(--white);
}

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

.section-more {
  color: var(--cyan-600);
  font-weight: 800;
  white-space: nowrap;
}

.section-gradient .section-more {
  color: #cffafe;
}

.card-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 2px 0 18px;
  scroll-snap-type: x proximity;
}

.scroll-card {
  flex: 0 0 310px;
  scroll-snap-align: start;
}

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

.movie-card {
  overflow: hidden;
  background: var(--white);
  border-radius: var(--radius-lg);
  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-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-200), #cffafe);
}

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

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

.image-missing {
  opacity: 0.08;
}

.poster-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 38px;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.65), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.type-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 9px;
  color: var(--white);
  background: rgba(2, 6, 23, 0.72);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: 12px;
  right: auto;
  background: var(--cyan-600);
}

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

.movie-card-body h3 {
  min-height: 54px;
  margin: 0 0 8px;
  color: var(--slate-800);
  font-size: 18px;
  line-height: 1.45;
}

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

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

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

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

.tag-row span {
  padding: 4px 8px;
  color: var(--cyan-700);
  background: #ecfeff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

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

.small-media-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.small-media-card:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.small-media-card img {
  width: 118px;
  height: 74px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
}

.small-media-card strong,
.small-media-card em {
  display: block;
}

.small-media-card strong {
  margin-bottom: 5px;
}

.small-media-card em {
  color: #cffafe;
  font-style: normal;
  font-size: 13px;
}

.page-hero {
  padding: 64px 0;
  color: var(--white);
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.18), transparent 25%),
    linear-gradient(135deg, var(--cyan-800), var(--cyan-600), var(--teal-600));
}

.page-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.15;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: #cffafe;
  font-size: 18px;
}

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

.category-card {
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card h2 {
  margin: 0 0 8px;
  color: var(--slate-800);
}

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

.category-card .count {
  display: inline-flex;
  padding: 6px 12px;
  color: var(--cyan-700);
  background: #ecfeff;
  border-radius: 999px;
  font-weight: 900;
}

.category-featured {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 72px 150px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
}

.ranking-number {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-600), var(--teal-600));
  border-radius: 16px;
  font-size: 20px;
  font-weight: 900;
}

.ranking-row img {
  width: 150px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  background: var(--slate-200);
}

.ranking-row h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.ranking-row p {
  margin: 0;
  color: var(--slate-600);
}

.rating-chip {
  min-width: 82px;
  padding: 8px 12px;
  color: var(--cyan-700);
  background: #ecfeff;
  border-radius: 999px;
  text-align: center;
  font-weight: 900;
}

.breadcrumb {
  padding: 22px 0 0;
  color: var(--slate-600);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--cyan-600);
}

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

.detail-main,
.detail-side {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.detail-body {
  padding: 28px;
}

.detail-body h1 {
  margin: 14px 0;
  color: var(--slate-800);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
}

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

.detail-meta span:not(.pill) {
  padding: 6px 10px;
  color: var(--slate-600);
  background: var(--slate-100);
  border-radius: 999px;
  font-size: 14px;
}

.detail-section {
  margin-top: 28px;
}

.detail-section h2,
.detail-side h2 {
  margin: 0 0 12px;
  color: var(--slate-800);
  font-size: 22px;
}

.detail-section p {
  color: var(--slate-700);
}

.review-box {
  padding: 20px;
  background: linear-gradient(135deg, var(--slate-50), #ecfeff);
  border-radius: 16px;
}

.detail-side {
  padding: 22px;
}

.detail-side .movie-card {
  margin-bottom: 16px;
}

.detail-side .movie-card-body h3 {
  min-height: auto;
}

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

.video-player video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--white);
  background:
    radial-gradient(circle at 50% 42%, rgba(8, 145, 178, 0.45), transparent 28%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.38));
  text-align: center;
  cursor: pointer;
}

.player-overlay.is-hidden {
  display: none;
}

.player-overlay button {
  width: 82px;
  height: 82px;
  margin-bottom: 16px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--cyan-600);
  font-size: 34px;
  cursor: pointer;
  box-shadow: 0 18px 44px rgba(8, 145, 178, 0.35);
}

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

.player-overlay small {
  color: #cffafe;
}

.player-message {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: none;
  padding: 10px 12px;
  color: var(--white);
  background: rgba(2, 6, 23, 0.8);
  border-radius: 12px;
  text-align: center;
}

.player-message.is-visible {
  display: block;
}

.search-panel {
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  margin-bottom: 28px;
}

.search-form-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 14px;
}

.search-form-grid input,
.search-form-grid select {
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  outline: none;
}

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

.search-count {
  margin: 0 0 18px;
  color: var(--slate-600);
  font-weight: 700;
}

.empty-state {
  padding: 48px;
  text-align: center;
  color: var(--slate-600);
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.pagination a,
.pagination span {
  min-width: 44px;
  color: var(--slate-700);
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.pagination .current {
  color: var(--white);
  background: var(--cyan-600);
}

.site-footer {
  color: #cbd5e1;
  background: var(--slate-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
  padding: 54px 0 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--white);
}

.site-footer h2 {
  margin: 0 0 16px;
  color: var(--white);
  font-size: 18px;
}

.site-footer p {
  margin: 0 0 12px;
}

.site-footer ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-footer li {
  margin-bottom: 8px;
}

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

.footer-note {
  color: #94a3b8;
}

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

.footer-bottom p {
  margin: 0;
}

@media (max-width: 1024px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

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

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

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

  .search-submit {
    grid-column: 1 / -1;
  }
}

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

  .header-inner {
    height: 66px;
  }

  .logo-text strong {
    font-size: 18px;
  }

  .logo-text small,
  .hero-controls {
    display: none;
  }

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

  .hero-content {
    padding: 72px 0 46px;
  }

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

  .section,
  .category-overview,
  .detail-layout,
  .search-page {
    padding: 42px 0;
  }

  .section-heading {
    display: block;
  }

  .section-more {
    display: inline-flex;
    margin-top: 12px;
  }

  .movie-grid,
  .latest-grid,
  .category-grid,
  .footer-grid,
  .category-featured {
    grid-template-columns: 1fr;
  }

  .scroll-card {
    flex-basis: 280px;
  }

  .ranking-row {
    grid-template-columns: 52px 1fr;
  }

  .ranking-row img {
    display: none;
  }

  .rating-chip {
    grid-column: 2;
    width: max-content;
  }

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

  .detail-body,
  .detail-side {
    padding: 18px;
  }
}
