:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #eef7fb;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.08);
  --cyan: #06b6d4;
  --blue: #2563eb;
  --teal: #14b8a6;
  --yellow: #facc15;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
  --soft-shadow: 0 16px 36px rgba(37, 99, 235, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

body {
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
  max-width: 100%;
  height: auto;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.96), rgba(37, 99, 235, 0.96), rgba(20, 184, 166, 0.96));
  box-shadow: 0 14px 35px rgba(14, 116, 144, 0.24);
  backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.76);
  border-radius: 14px;
  color: #ffffff;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.18);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-text small {
  margin-top: 4px;
  font-size: 12px;
  opacity: 0.9;
}

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

.desktop-nav a,
.mobile-nav a {
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--yellow);
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.header-search input,
.mobile-nav input {
  width: 210px;
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 10px 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

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

.header-search button,
.mobile-nav button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #0f172a;
  background: #ffffff;
  font-weight: 800;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 999px;
}

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

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

.mobile-nav form {
  display: flex;
  width: 100%;
  gap: 8px;
}

.hero-carousel {
  position: relative;
  min-height: 690px;
  overflow: hidden;
  background: #0f172a;
}

.hero-track {
  position: relative;
  min-height: 690px;
}

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

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 18%, rgba(6, 182, 212, 0.6), transparent 30%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.56) 48%, rgba(15, 23, 42, 0.26)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.88), transparent 42%);
}

.hero-content {
  position: relative;
  min-height: 690px;
  display: flex;
  align-items: center;
  padding: 86px 0;
}

.hero-copy {
  width: min(720px, 100%);
  color: #ffffff;
}

.hero-eyebrow,
.hero-kicker-title {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #cffafe;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.07em;
  font-weight: 950;
}

.hero-movie-title {
  display: block;
  margin-bottom: 18px;
  color: #fef08a;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
  font-weight: 900;
}

.hero-copy p {
  max-width: 670px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.9;
}

.hero-tags,
.movie-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.movie-tags span,
.detail-tags a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.hero-tags span {
  color: #ecfeff;
  background: rgba(6, 182, 212, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-button,
.ghost-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.28);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.text-button {
  color: #fef08a;
  background: transparent;
}

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

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

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

.hero-dot.is-active {
  width: 38px;
  background: #ffffff;
}

.section {
  padding: 74px 0;
}

.section-light {
  background: var(--bg);
}

.section-white {
  background: #ffffff;
}

.section-soft {
  background: linear-gradient(180deg, #ffffff, #eef7fb);
}

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

.section-heading h2 {
  margin: 0 0 8px;
  color: #1e293b;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.section-heading p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.8;
}

.section-heading a {
  flex: none;
  color: #0891b2;
  font-weight: 900;
  text-decoration: none;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(6, 182, 212, 0.35);
  box-shadow: var(--soft-shadow);
}

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(15, 23, 42, 0.72));
}

.play-chip {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.32);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  min-width: 38px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #0f172a;
  background: #fef08a;
  font-weight: 950;
  box-shadow: 0 10px 24px rgba(250, 204, 21, 0.28);
}

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

.movie-tags span {
  color: #0e7490;
  background: #ecfeff;
}

.movie-card h3 {
  margin: 12px 0 8px;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-card h3 a {
  color: #0f172a;
  text-decoration: none;
}

.movie-card h3 a:hover {
  color: #0891b2;
}

.movie-card p {
  min-height: 54px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.movie-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

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

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

.category-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 24px;
  border-radius: var(--radius-lg);
  color: #ffffff;
  text-decoration: none;
  background: #0f172a;
  box-shadow: var(--soft-shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow);
}

.category-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.96;
}

.from-cyan-500.to-blue-600 { background: linear-gradient(135deg, #06b6d4, #2563eb); }
.from-blue-500.to-indigo-600 { background: linear-gradient(135deg, #3b82f6, #4f46e5); }
.from-teal-500.to-emerald-600 { background: linear-gradient(135deg, #14b8a6, #059669); }
.from-rose-500.to-pink-600 { background: linear-gradient(135deg, #f43f5e, #db2777); }
.from-violet-500.to-fuchsia-600 { background: linear-gradient(135deg, #8b5cf6, #c026d3); }
.from-orange-500.to-red-600 { background: linear-gradient(135deg, #f97316, #dc2626); }
.from-sky-500.to-cyan-600 { background: linear-gradient(135deg, #0ea5e9, #0891b2); }
.from-amber-500.to-orange-600 { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.from-slate-600.to-cyan-700 { background: linear-gradient(135deg, #475569, #0e7490); }
.from-indigo-500.to-slate-700 { background: linear-gradient(135deg, #6366f1, #334155); }

.category-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -45% 18%;
  height: 140px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  transform: rotate(-12deg);
}

.category-card strong {
  font-size: 24px;
  font-weight: 950;
}

.category-card em {
  min-height: 58px;
  color: rgba(255, 255, 255, 0.86);
  font-style: normal;
  line-height: 1.7;
}

.category-card small {
  opacity: 0.9;
  font-weight: 900;
}

.page-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 18% 12%, rgba(6, 182, 212, 0.5), transparent 28%),
    linear-gradient(135deg, #0f172a, #164e63 52%, #1d4ed8);
}

.compact-hero,
.category-hero {
  padding: 96px 0 86px;
}

.page-hero span {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #cffafe;
  font-weight: 900;
}

.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.06em;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 150px 170px 130px;
  gap: 12px;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(14, 116, 144, 0.16);
  border-radius: 999px;
  padding: 13px 16px;
  color: var(--text);
  background: #f8fafc;
  outline: 0;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(6, 182, 212, 0.7);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.1);
}

.detail-hero {
  padding: 54px 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 85% 14%, rgba(6, 182, 212, 0.32), transparent 30%),
    linear-gradient(135deg, #0f172a, #164e63 58%, #1d4ed8);
}

.detail-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #0f172a;
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.breadcrumbs a {
  color: #cffafe;
  text-decoration: none;
  font-weight: 800;
}

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 66px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.one-line {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.9;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 800;
}

.detail-tags {
  margin-bottom: 28px;
}

.detail-tags a {
  color: #ecfeff;
  background: rgba(6, 182, 212, 0.28);
}

.player-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #020617;
  box-shadow: var(--shadow);
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

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

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

.player-overlay[hidden] {
  display: none;
}

.player-button {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-size: 32px;
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.36);
}

.player-overlay strong {
  max-width: min(720px, 84%);
  font-size: clamp(22px, 4vw, 42px);
  line-height: 1.25;
  text-align: center;
}

.detail-text {
  display: grid;
  gap: 18px;
  max-width: 960px;
}

.detail-text h2 {
  color: #1e293b;
  font-size: 30px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.detail-text p {
  color: #334155;
  font-size: 17px;
  line-height: 2;
}

.site-footer {
  padding: 44px 0;
  color: #dbeafe;
  background: #0f172a;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
  font-weight: 950;
}

.site-footer p {
  max-width: 600px;
  margin-top: 10px;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  color: #dbeafe;
  text-decoration: none;
  font-weight: 800;
}

.is-hidden-by-filter {
  display: none;
}

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .header-search {
    display: none;
  }

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

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

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

  .brand-text strong {
    font-size: 15px;
  }

  .brand-text small {
    font-size: 11px;
  }

  .hero-carousel,
  .hero-track,
  .hero-content {
    min-height: 610px;
  }

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

  .section {
    padding: 56px 0;
  }

  .section-heading {
    display: block;
  }

  .section-heading a {
    display: inline-flex;
    margin-top: 14px;
  }

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

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

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

  .detail-poster {
    max-width: 360px;
  }

  .footer-grid {
    display: block;
  }

  .footer-links {
    margin-top: 22px;
  }
}

@media (max-width: 540px) {
  .container,
  .header-inner,
  .mobile-nav {
    width: min(100% - 22px, 1180px);
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .brand-text small {
    display: none;
  }

  .hero-copy p,
  .page-hero p,
  .one-line {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .movie-grid,
  .featured-grid,
  .ranking-grid,
  .category-grid,
  .large-category-grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: 160px;
  }

  .compact-hero,
  .category-hero {
    padding: 72px 0 64px;
  }

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