:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --accent: #38bdf8;
  --danger: #f43f5e;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.2), transparent 34rem),
    radial-gradient(circle at 80% 12%, rgba(37, 99, 235, 0.2), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 28px rgba(34, 211, 238, 0.24);
}

.brand-text,
.footer-brand {
  font-size: 20px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #67e8f9, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  color: var(--muted);
  font-size: 15px;
}

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

.main-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
  color: var(--cyan);
}

.nav-categories {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.header-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 280px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
}

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

.header-search button,
.search-page-form button {
  padding: 10px 16px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--text);
}

.mobile-panel {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.95);
}

.mobile-panel a {
  display: block;
  padding: 12px 8px;
  color: var(--muted);
}

.hero-carousel {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
}

.hero-title-block {
  position: absolute;
  top: 112px;
  left: 50%;
  z-index: 6;
  width: min(1120px, calc(100% - 32px));
  transform: translateX(-50%);
  pointer-events: none;
}

.hero-title-block h1 {
  max-width: 760px;
  margin: 8px 0 12px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.06em;
  background: linear-gradient(90deg, #f8fafc, #67e8f9, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-title-block p {
  max-width: 620px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 22px);
}

.hero-stage {
  position: relative;
  min-height: 78vh;
}

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

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

.hero-bg,
.detail-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.62) 44%, rgba(2, 6, 23, 0.7) 100%),
    linear-gradient(0deg, #020617 0%, transparent 42%, rgba(2, 6, 23, 0.38) 100%);
}

.hero-content {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: end;
  width: min(1120px, calc(100% - 32px));
  min-height: 78vh;
  margin: 0 auto;
  padding: 310px 0 86px;
}

.hero-copy h2 {
  max-width: 720px;
  margin: 14px 0;
  font-size: clamp(34px, 6vw, 74px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 680px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  color: #67e8f9;
  background: rgba(8, 145, 178, 0.12);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.hero-tags,
.detail-tags,
.tag-row,
.card-meta,
.detail-meta,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-tags,
.detail-tags {
  margin-top: 18px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.68);
  font-size: 13px;
}

.hero-actions {
  margin-top: 26px;
}

.btn-primary,
.btn-ghost,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

.btn-ghost,
.section-link {
  border: 1px solid var(--line);
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.68);
}

.btn-primary:hover,
.btn-ghost:hover,
.section-link:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.48);
}

.hero-poster {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1120px) / 2));
  bottom: 28px;
  z-index: 9;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 38px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.28);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.content-section {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 78px 0;
}

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

.section-head h2 {
  margin: 12px 0 8px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section-head p,
.page-hero p,
.category-overview-head p,
.site-footer p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.8;
}

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

.category-tile,
.category-overview-card,
.movie-card,
.detail-side-card,
.detail-article,
.player-shell,
.ranking-feature,
.ranking-side,
.search-page-form {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.76), rgba(15, 23, 42, 0.82));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.category-tile {
  display: grid;
  min-height: 220px;
  padding: 18px;
  border-radius: 24px;
  overflow: hidden;
}

.category-tile span {
  color: #67e8f9;
  font-weight: 800;
}

.category-tile strong {
  color: #dbeafe;
  line-height: 1.7;
  font-size: 14px;
}

.tile-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  align-self: end;
}

.tile-thumbs img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  object-fit: cover;
}

.highlight-panel {
  width: min(1280px, calc(100% - 32px));
  padding: 42px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 34px;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 26rem),
    rgba(15, 23, 42, 0.52);
}

.ranking-strip,
.mini-card-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.45);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.6);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.card-year,
.card-type,
.rank-badge,
.heat-score {
  position: absolute;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(12px);
  font-size: 12px;
  font-weight: 700;
}

.card-year {
  left: 10px;
  top: 10px;
}

.card-type {
  right: 10px;
  top: 10px;
}

.rank-badge {
  left: 10px;
  bottom: 10px;
  background: linear-gradient(135deg, #f97316, #e11d48);
}

.heat-score {
  right: 10px;
  bottom: 10px;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  gap: 8px;
  margin-bottom: 12px;
  color: #93c5fd;
  font-size: 13px;
}

.tag-row {
  gap: 6px;
}

.tag-row span {
  padding: 4px 8px;
  font-size: 12px;
}

.movie-card-compact {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
}

.movie-card-compact .poster-link img {
  height: 100%;
  min-height: 156px;
}

.movie-card-compact .card-body h3 {
  font-size: 16px;
}

.filter-bar {
  margin: -8px 0 26px;
}

.filter-bar input,
.search-page-form input {
  width: min(520px, 100%);
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  outline: 0;
  background: rgba(15, 23, 42, 0.72);
}

.page-hero,
.ranking-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 42px auto 0;
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 82% 20%, rgba(34, 211, 238, 0.18), transparent 24rem),
    linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.78));
  box-shadow: var(--shadow);
}

.slim-hero h1,
.category-hero h1,
.ranking-feature h1,
.detail-info h1 {
  margin: 14px 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.category-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 32px;
  align-items: center;
}

.page-hero-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.page-hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.category-overview-list {
  display: grid;
  gap: 28px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
  border-radius: 30px;
}

.category-overview-head h2 {
  margin: 12px 0;
  font-size: 32px;
}

.ranking-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
}

.ranking-feature {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  padding: 24px;
  border-radius: 30px;
}

.ranking-feature img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 22px;
  object-fit: cover;
}

.ranking-side {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border-radius: 30px;
}

.ranking-side a {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.5);
}

.ranking-side span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.18);
  color: #67e8f9;
  font-weight: 800;
}

.ranking-side strong,
.ranking-side em {
  display: block;
  font-style: normal;
}

.ranking-side em {
  color: var(--muted);
  font-size: 13px;
}

.search-section {
  min-height: 54vh;
}

.search-page-form {
  display: flex;
  width: min(760px, 100%);
  padding: 10px;
  border-radius: 999px;
}

.search-page-form input {
  flex: 1;
  border: 0;
  background: transparent;
}

.search-page-form button {
  border-radius: 999px;
}

.search-summary {
  margin: 22px 0;
  color: var(--muted);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  filter: blur(6px);
  transform: scale(1.03);
}

.detail-layer {
  position: relative;
  z-index: 2;
  min-height: 680px;
  padding: 36px 0 72px;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.72)),
    linear-gradient(0deg, #020617, transparent 54%);
}

.breadcrumb,
.detail-layout {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

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

.detail-one-line {
  max-width: 860px;
  color: #cbd5e1;
  font-size: 20px;
  line-height: 1.8;
}

.detail-meta {
  margin-top: 18px;
  color: #bfdbfe;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.66);
}

.player-section {
  padding-top: 36px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  background: #000000;
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle, rgba(34, 211, 238, 0.18), transparent 20rem),
    rgba(2, 6, 23, 0.48);
  cursor: pointer;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.player-overlay:hover {
  transform: scale(1.01);
}

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

.play-icon {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 20px 52px rgba(37, 99, 235, 0.46);
}

.play-icon::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid #ffffff;
}

.player-overlay strong {
  font-size: 28px;
}

.player-overlay em {
  color: #cbd5e1;
  font-style: normal;
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 5;
  color: #cbd5e1;
  font-size: 14px;
}

.detail-text-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

.detail-article,
.detail-side-card {
  padding: 28px;
  border-radius: 30px;
}

.detail-article h2,
.detail-side-card h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.detail-article p {
  margin: 0 0 26px;
  color: #cbd5e1;
  line-height: 2;
}

.detail-side-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-side-card dt {
  color: #67e8f9;
  font-weight: 800;
}

.detail-side-card dd {
  margin: -8px 0 4px;
  color: #cbd5e1;
}

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

.prev-next-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
}

.prev-next-row a {
  flex: 1;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.68);
}

.site-footer {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.72);
}

.footer-inner {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 48px;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  color: var(--muted);
}

.footer-copy {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: #64748b;
  font-size: 14px;
}

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

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

  .ranking-strip,
  .mini-card-row,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

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

  .hero-title-block {
    top: 94px;
  }

  .hero-content,
  .detail-layout,
  .detail-text-section,
  .ranking-hero,
  .ranking-feature,
  .category-overview-card,
  .category-hero,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding-top: 300px;
  }

  .hero-poster,
  .page-hero-poster {
    display: none;
  }

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

  .page-hero,
  .ranking-hero,
  .highlight-panel {
    padding: 28px;
  }
}

@media (max-width: 620px) {
  .hero-carousel,
  .hero-stage,
  .hero-content {
    min-height: 86vh;
  }

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

  .hero-copy h2 {
    font-size: 36px;
  }

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

  .movie-grid,
  .category-grid,
  .ranking-strip,
  .mini-card-row,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-compact {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .section-head,
  .prev-next-row {
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .search-page-form {
    border-radius: 24px;
    flex-direction: column;
  }

  .search-page-form button {
    margin-top: 8px;
  }
}
