:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-850: #162033;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --cyan-600: #0891b2;
  --cyan-500: #06b6d4;
  --cyan-400: #22d3ee;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --shadow-strong: 0 30px 80px rgba(2, 6, 23, 0.32);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.96);
  color: var(--white);
  box-shadow: 0 10px 35px rgba(2, 6, 23, 0.28);
  backdrop-filter: blur(14px);
}

.site-header-inner {
  width: min(1280px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.site-logo {
  font-size: 21px;
  background: linear-gradient(90deg, var(--cyan-400), var(--blue-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-500), var(--blue-600));
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.32);
  font-size: 13px;
  font-weight: 900;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  font-size: 15px;
  color: #cbd5e1;
}

.site-nav a,
.mobile-nav a {
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover,
.mobile-nav a:hover {
  color: var(--cyan-400);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 290px;
  padding: 5px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.86);
}

.header-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--white);
  background: transparent;
  padding: 8px 12px;
}

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

.header-search button,
.wide-search button,
.button-primary {
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-500), var(--blue-600));
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 35px rgba(6, 182, 212, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.wide-search button:hover,
.button-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 46px rgba(37, 99, 235, 0.36);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  color: var(--white);
  background: rgba(30, 41, 59, 0.86);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 14px;
  gap: 8px;
  flex-wrap: wrap;
}

.mobile-nav a {
  display: inline-flex;
  padding: 9px 12px;
  border-radius: 12px;
  color: #dbeafe;
  background: rgba(30, 41, 59, 0.8);
}

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: var(--slate-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
}

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 22%, rgba(6, 182, 212, 0.25), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.62) 48%, rgba(2, 6, 23, 0.12));
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: var(--white);
  max-width: 1280px;
}

.hero-tags,
.movie-card-meta,
.detail-meta,
.detail-tags,
.movie-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.hero-tags a {
  display: inline-flex;
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.hero-tags span:first-child {
  background: var(--cyan-500);
  font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
  width: min(720px, 100%);
  margin: 20px 0 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 900;
  text-shadow: 0 20px 70px rgba(0, 0, 0, 0.45);
}

.hero-content h1 + h2 {
  margin-top: 12px;
  font-size: clamp(28px, 4vw, 46px);
  color: var(--cyan-400);
}

.hero-content p {
  width: min(680px, 100%);
  margin: 22px 0 0;
  color: #e2e8f0;
  font-size: clamp(17px, 2.1vw, 22px);
}

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

.button-glass {
  display: inline-flex;
  border-radius: 999px;
  padding: 10px 18px;
  color: var(--white);
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: var(--white);
  background: rgba(15, 23, 42, 0.45);
  transform: translateY(-50%);
  font-size: 32px;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.home-search-panel,
.content-section,
.detail-layout {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.home-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 28px;
  align-items: center;
  margin-top: -52px;
  position: relative;
  z-index: 6;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(18px);
}

.home-search-panel span,
.section-heading span,
.page-hero span {
  color: var(--cyan-600);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-search-panel h2,
.section-heading h2,
.page-hero h1 {
  margin: 6px 0 0;
  color: var(--slate-900);
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.18;
}

.home-search-panel p,
.page-hero p,
.category-overview-card p {
  margin: 10px 0 0;
  color: var(--muted);
}

.wide-search,
.filter-panel {
  display: flex;
  gap: 10px;
  align-items: center;
}

.wide-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  outline: 0;
  padding: 14px 16px;
  color: var(--slate-900);
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

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

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

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

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

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

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

.movie-card.is-hidden {
  display: none;
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--slate-800);
}

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

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

.movie-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.72));
  opacity: 0.85;
}

.poster-play {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--white);
  background: rgba(6, 182, 212, 0.95);
  font-size: 13px;
  font-weight: 900;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.35);
}

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

.movie-card-meta {
  justify-content: space-between;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 13px;
}

.movie-card-meta a {
  color: var(--cyan-600);
  font-weight: 800;
}

.movie-card h3 {
  margin: 0;
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.35;
}

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

.movie-tags {
  margin-top: 14px;
}

.movie-tags span,
.detail-tags a,
.detail-meta span {
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--slate-700);
  background: var(--slate-100);
  font-size: 12px;
  font-weight: 700;
}

.white-panel {
  margin-top: 72px;
  padding: 34px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow);
}

.gradient-panel {
  margin-top: 72px;
  padding: 34px;
  border-radius: var(--radius-lg);
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-500), var(--blue-600));
  box-shadow: var(--shadow-strong);
}

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

.gradient-panel .movie-card {
  background: rgba(255, 255, 255, 0.96);
}

.section-divider {
  height: 1px;
  margin: 42px 0;
  background: var(--border);
}

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

.category-tile,
.category-overview-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius-md);
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.2), transparent 38%),
    var(--slate-900);
  color: var(--white);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
}

.category-tile span,
.category-overview-title {
  color: var(--cyan-400);
  font-size: 21px;
  font-weight: 900;
}

.category-tile strong {
  margin-top: 12px;
  font-size: 15px;
  color: #e2e8f0;
}

.category-tile em {
  margin-top: 22px;
  color: #94a3b8;
  font-size: 13px;
  font-style: normal;
}

.category-overview-card {
  background: var(--white);
  color: var(--text);
}

.category-overview-title {
  color: var(--cyan-600);
}

.category-overview-links {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.category-overview-links a {
  color: var(--slate-700);
  font-size: 14px;
}

.page-hero {
  padding: 88px 0;
  color: var(--white);
  background:
    radial-gradient(circle at 72% 20%, rgba(6, 182, 212, 0.35), transparent 30%),
    linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.page-hero > div {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.page-hero h1 {
  color: var(--white);
}

.page-hero p {
  max-width: 760px;
  color: #dbeafe;
  font-size: 18px;
}

.compact-hero {
  padding: 70px 0;
}

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

.filter-panel input {
  flex: 1.4;
}

.filter-panel select {
  flex: 0.45;
}

.player-section {
  background: var(--slate-950);
}

.player-shell {
  position: relative;
  width: min(1280px, 100%);
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.video-stage {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.76));
  cursor: pointer;
}

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

.player-play-icon {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-500), var(--blue-600));
  font-size: 28px;
  box-shadow: 0 20px 50px rgba(6, 182, 212, 0.42);
}

.player-overlay strong {
  max-width: 90%;
  font-size: clamp(20px, 4vw, 36px);
  text-align: center;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  padding-top: 44px;
}

.detail-main,
.detail-side {
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow);
}

.detail-main {
  padding: 32px;
}

.detail-side {
  align-self: start;
  overflow: hidden;
}

.detail-side img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--slate-800);
}

.detail-side div {
  padding: 22px;
}

.detail-side h2,
.detail-text-block h2 {
  margin: 0 0 10px;
  color: var(--slate-900);
  font-size: 22px;
}

.detail-side p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

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

.detail-title-row h1 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.2;
}

.detail-one-line {
  margin: 14px 0 0;
  color: var(--slate-700);
  font-size: 18px;
}

.detail-meta {
  margin-top: 22px;
}

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

.detail-tags a {
  color: var(--cyan-700);
  background: rgba(6, 182, 212, 0.12);
}

.detail-text-block {
  margin-top: 30px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.detail-text-block p {
  margin: 0;
  color: var(--slate-700);
  font-size: 17px;
}

.related-section {
  padding-bottom: 72px;
}

.site-footer {
  margin-top: 80px;
  padding: 48px 0 24px;
  color: #cbd5e1;
  background: var(--slate-900);
}

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 42px;
}

.footer-logo {
  color: var(--white);
  font-size: 18px;
}

.site-footer p {
  max-width: 460px;
  margin: 14px 0 0;
  color: #94a3b8;
}

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

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

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

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  font-size: 14px;
  text-align: center;
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

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

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

@media (max-width: 820px) {
  .site-header-inner {
    min-height: 62px;
  }

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

  .header-search {
    display: none;
  }

  .hero-carousel {
    height: 560px;
  }

  .hero-content {
    padding: 0 16px;
  }

  .hero-arrow {
    display: none;
  }

  .home-search-panel,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .home-search-panel {
    margin-top: 0;
    width: 100%;
    border-radius: 0;
  }

  .wide-search,
  .filter-panel {
    flex-direction: column;
  }

  .filter-panel select,
  .filter-panel input {
    flex: 1;
  }

  .movie-grid,
  .movie-grid-small,
  .ranking-grid,
  .category-tile-grid,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .white-panel,
  .gradient-panel,
  .detail-main {
    padding: 22px;
  }

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

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

@media (max-width: 540px) {
  .site-header-inner,
  .mobile-nav,
  .content-section,
  .detail-layout,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1280px);
  }

  .hero-carousel {
    height: 520px;
  }

  .hero-content h1,
  .hero-content h2 {
    letter-spacing: -0.02em;
  }

  .hero-tags span,
  .hero-tags a {
    padding: 6px 10px;
    font-size: 13px;
  }

  .movie-grid,
  .movie-grid-small,
  .ranking-grid,
  .category-tile-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .movie-card p {
    min-height: auto;
  }

  .player-play-icon {
    width: 64px;
    height: 64px;
  }
}
