:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --blue-900: #1e3a8a;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --cyan-400: #22d3ee;
  --emerald-500: #10b981;
  --amber-400: #f59e0b;
  --rose-500: #f43f5e;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-500: #64748b;
  --gray-700: #334155;
  --gray-900: #0f172a;
  --white: #ffffff;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.10);
  --radius-xl: 1.25rem;
  --radius-2xl: 1.75rem;
}

* {
  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(--gray-900);
  background: linear-gradient(180deg, #f8fafc 0%, #eef6ff 100%);
  min-height: 100vh;
}

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: 100;
  background: linear-gradient(90deg, var(--slate-900), var(--blue-900), var(--slate-900));
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.25);
}

.header-inner {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.logo-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-500), var(--cyan-400));
  box-shadow: 0 8px 20px rgba(34, 211, 238, 0.28);
  font-size: 14px;
}

.logo-text {
  font-size: 21px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  flex: 1;
}

.main-nav a,
.main-nav button {
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav button:hover {
  color: var(--white);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: 34px;
  left: 0;
  width: 190px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--gray-700);
}

.dropdown-panel a:hover {
  color: var(--blue-600);
  background: var(--gray-100);
}

.header-search {
  display: flex;
  align-items: center;
  width: min(360px, 28vw);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
}

.header-search input {
  width: 100%;
  min-width: 0;
  padding: 10px 14px;
  border: 0;
  color: var(--white);
  outline: none;
  background: transparent;
}

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

.header-search button {
  border: 0;
  color: var(--white);
  padding: 10px 15px;
  cursor: pointer;
  background: rgba(59, 130, 246, 0.72);
}

.mobile-menu-button {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-menu-button span {
  width: 20px;
  height: 2px;
  background: var(--white);
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
}

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

.mobile-panel a,
.mobile-cats a {
  color: rgba(255, 255, 255, 0.88);
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.32);
}

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

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-900), var(--blue-900), #164e63);
}

.hero-backgrounds,
.hero-bg,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-bg {
  opacity: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  transition: opacity 0.7s ease, transform 4s ease;
}

.hero-bg.is-active {
  opacity: 0.25;
  transform: scale(1);
}

.hero-shade {
  background:
    radial-gradient(circle at 72% 24%, rgba(34, 211, 238, 0.24), transparent 30%),
    radial-gradient(circle at 28% 66%, rgba(59, 130, 246, 0.28), transparent 34%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(248, 250, 252, 0.96) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 620px;
  margin: 0 auto;
  padding: 82px 24px 74px;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.05em;
  font-weight: 900;
}

.gradient-text {
  display: block;
  color: transparent;
  background: linear-gradient(90deg, #60a5fa, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-lead {
  max-width: 700px;
  margin: 24px 0 28px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 20px;
  line-height: 1.8;
}

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

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

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-500), var(--cyan-400));
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.32);
}

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

.btn-light {
  color: var(--blue-600);
  background: var(--white);
}

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

.hero-search {
  display: flex;
  max-width: 620px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.20);
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.22);
  backdrop-filter: blur(18px);
}

.hero-search input {
  flex: 1;
  border: 0;
  outline: none;
  padding: 16px 20px;
  color: var(--white);
  background: transparent;
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

.hero-search button {
  border: 0;
  padding: 0 24px;
  color: var(--white);
  font-weight: 800;
  background: var(--blue-500);
}

.hero-panel {
  position: relative;
  padding: 18px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.28);
  backdrop-filter: blur(22px);
}

.hero-slide-card {
  display: none;
}

.hero-slide-card.is-active {
  display: block;
}

.hero-poster {
  position: relative;
  height: 460px;
  border-radius: 26px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.44);
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 34%, rgba(2, 6, 23, 0.88));
}

.hero-card-copy {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 26px;
  z-index: 2;
}

.hero-card-copy h2 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.2;
}

.hero-card-copy p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.hero-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.hero-meta span,
.tag-row span,
.detail-tags span,
.footer-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-meta span {
  color: #cffafe;
  background: rgba(34, 211, 238, 0.18);
}

.hero-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

.hero-dot.is-active {
  width: 28px;
  background: var(--cyan-400);
}

.section,
.page-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px;
}

.section-header,
.page-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.section-title,
.page-title-row h1,
.category-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 900;
  color: var(--gray-900);
}

.section-header p,
.page-title-row p,
.category-hero p {
  margin: 10px 0 0;
  color: var(--gray-500);
  line-height: 1.8;
}

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

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

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
}

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

.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-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.02), rgba(2, 6, 23, 0.52));
}

.year-badge,
.rank-badge,
.type-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}

.year-badge {
  right: 12px;
  bottom: 12px;
  background: rgba(2, 6, 23, 0.72);
}

.rank-badge {
  left: 12px;
  top: 12px;
  background: linear-gradient(135deg, var(--rose-500), var(--amber-400));
}

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

.card-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--blue-600);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 10px;
}

.movie-card h2 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.35;
}

.movie-card h2 a:hover {
  color: var(--blue-600);
}

.movie-card p {
  margin: 0;
  color: var(--gray-500);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span {
  color: #047857;
  background: #d1fae5;
}

.horizontal-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 320px);
  gap: 22px;
  overflow-x: auto;
  padding: 2px 4px 18px;
  scrollbar-width: thin;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  padding: 24px;
  border-radius: var(--radius-xl);
  color: var(--white);
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-900), var(--blue-900));
  box-shadow: var(--shadow-card);
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #083344, #1d4ed8);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #312e81, #0f766e);
}

.category-card::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -45px;
  bottom: -45px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.category-card h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: 23px;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
}

.category-card span {
  position: relative;
  z-index: 1;
  font-weight: 800;
  color: #bfdbfe;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 0.7fr);
  gap: 12px;
  padding: 16px;
  margin-bottom: 28px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.filter-bar input,
.filter-bar select {
  min-height: 46px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  outline: none;
  padding: 0 16px;
  background: var(--gray-50);
}

.category-hero,
.ranking-hero,
.search-hero {
  padding: 52px 0 34px;
}

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

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

.detail-hero {
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-950), var(--blue-900), #164e63);
}

.detail-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 24px 58px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 34px;
  align-items: center;
}

.detail-hero .breadcrumb {
  grid-column: 1 / -1;
  color: rgba(255, 255, 255, 0.68);
  margin: 0;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.5);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  cursor: pointer;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.68));
}

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

.player-play {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 32px;
  background: linear-gradient(135deg, var(--blue-500), var(--cyan-400));
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.36);
}

.detail-title h1 {
  color: var(--white);
  font-size: clamp(34px, 5vw, 54px);
  margin-bottom: 18px;
}

.detail-title p {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 18px;
  line-height: 1.8;
}

.detail-info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.detail-info-row span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
}

.detail-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
}

.detail-article,
.related-panel,
.text-panel {
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.detail-article {
  padding: 32px;
}

.detail-article h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-article p {
  margin: 0 0 26px;
  color: var(--gray-700);
  line-height: 1.95;
  font-size: 16px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 8px;
}

.detail-tags span {
  color: #075985;
  background: #e0f2fe;
}

.related-panel {
  padding: 22px;
  align-self: start;
  position: sticky;
  top: 92px;
}

.related-panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.mini-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.mini-card:hover {
  background: var(--gray-100);
}

.mini-card img {
  width: 112px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--slate-900);
}

.mini-card strong {
  display: block;
  color: var(--gray-900);
  line-height: 1.35;
  margin-bottom: 5px;
}

.mini-card em {
  display: block;
  color: var(--gray-500);
  font-style: normal;
  font-size: 13px;
  line-height: 1.4;
}

.search-results-empty {
  display: none;
  padding: 34px;
  border-radius: var(--radius-xl);
  text-align: center;
  color: var(--gray-500);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.search-results-empty.is-visible {
  display: block;
}

.site-footer {
  color: rgba(255, 255, 255, 0.72);
  background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 52px 24px;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 34px;
}

.footer-logo {
  color: var(--white);
  font-size: 22px;
  margin-bottom: 14px;
}

.site-footer p {
  line-height: 1.8;
  margin: 0;
}

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

.site-footer a {
  display: block;
  margin-bottom: 10px;
}

.site-footer a:hover {
  color: #60a5fa;
}

.footer-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.footer-tags span {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.18);
}

.footer-bottom {
  text-align: center;
  padding: 18px 24px;
  color: rgba(255, 255, 255, 0.48);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

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

  .header-inner {
    justify-content: space-between;
  }

  .mobile-menu-button {
    display: flex;
  }

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

  .hero-panel {
    max-width: 620px;
  }

  .related-panel {
    position: static;
  }

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

@media (max-width: 720px) {
  .header-inner {
    height: 62px;
    padding: 0 16px;
  }

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

  .hero {
    min-height: auto;
  }

  .hero-inner {
    min-height: auto;
    padding: 54px 16px 44px;
    gap: 28px;
  }

  .hero-lead {
    font-size: 17px;
  }

  .hero-search {
    border-radius: 22px;
    flex-direction: column;
  }

  .hero-search button {
    min-height: 46px;
  }

  .hero-poster {
    height: 360px;
  }

  .section,
  .page-main {
    padding: 42px 16px;
  }

  .section-header,
  .page-title-row {
    display: block;
  }

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

  .category-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .detail-hero-inner,
  .detail-layout {
    padding-left: 16px;
    padding-right: 16px;
  }

  .detail-article {
    padding: 22px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    padding: 38px 16px;
  }
}

@media (max-width: 480px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .mobile-cats {
    grid-template-columns: 1fr;
  }

  .mini-card {
    grid-template-columns: 92px 1fr;
  }

  .mini-card img {
    width: 92px;
    height: 62px;
  }
}
