:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --card: #1e293b;
  --card-hover: #334155;
  --line: #1f2937;
  --text: #ffffff;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --blue: #3b82f6;
  --gold: #facc15;
  --danger: #ef4444;
  --shadow: 0 24px 60px rgba(8, 145, 178, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, rgba(14, 116, 144, 0.2), transparent 34rem), var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, 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;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #06121f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 26px rgba(34, 211, 238, 0.38);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 15px;
  white-space: nowrap;
}

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

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.wide-search input,
.filter-row input,
.filter-row select,
.mobile-nav input {
  border: 1px solid rgba(148, 163, 184, 0.2);
  outline: none;
  color: var(--text);
  background: rgba(30, 41, 59, 0.92);
  border-radius: 999px;
  padding: 10px 16px;
}

.header-search input {
  width: 220px;
}

.header-search input:focus,
.wide-search input:focus,
.filter-row input:focus,
.filter-row select:focus,
.mobile-nav input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
}

.header-search button,
.wide-search button,
.mobile-nav button {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  color: #06121f;
  font-weight: 700;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  cursor: pointer;
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  border: none;
  color: var(--text);
  background: transparent;
  font-size: 28px;
}

.mobile-nav {
  display: none;
  padding: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.98);
}

.mobile-nav.open {
  display: grid;
  gap: 12px;
}

.mobile-nav form {
  display: grid;
  gap: 10px;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: #000;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--bg) 2%, rgba(2, 6, 23, 0.58) 42%, rgba(0, 0, 0, 0.08)),
              linear-gradient(90deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.08));
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 82px;
}

.hero-copy {
  max-width: 720px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 14px;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 12px 0 16px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.02;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 18px;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan);
  font-size: 13px;
}

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

.primary-button,
.secondary-button,
.panel-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-height: 44px;
  padding: 12px 22px;
  font-weight: 800;
}

.primary-button {
  color: #06121f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: var(--shadow);
}

.secondary-button {
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.primary-button:hover,
.header-search button:hover,
.wide-search button:hover,
.mobile-nav button:hover {
  filter: brightness(1.08);
}

.secondary-button:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 4;
}

.hero-prev,
.hero-next,
.hero-dot {
  border: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.68);
  cursor: pointer;
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 30px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 34px;
  height: 8px;
  border-radius: 999px;
  opacity: 0.48;
}

.hero-dot.active {
  opacity: 1;
  background: var(--cyan);
}

.home-search-panel {
  margin-top: -34px;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  align-items: center;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.home-search-panel h2,
.section-head h2,
.rank-panel h2,
.content-card h2 {
  margin: 0;
}

.home-search-panel p,
.section-head p,
.page-hero p,
.site-footer p,
.card-line,
.detail-line,
.content-card p,
.search-summary {
  color: var(--muted);
}

.wide-search {
  display: flex;
  gap: 10px;
}

.wide-search input {
  width: 100%;
}

.category-strip,
.feature-layout,
.editor-picks,
.more-related,
.page-main .container {
  margin-top: 56px;
}

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

.section-head h2 {
  font-size: clamp(26px, 4vw, 36px);
}

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

.category-tile {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(59, 130, 246, 0.1)), var(--panel);
  border: 1px solid rgba(148, 163, 184, 0.15);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-overview-card:hover,
.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.85);
  box-shadow: var(--shadow);
}

.category-tile span {
  font-size: 22px;
  font-weight: 800;
}

.category-tile em {
  margin-top: 8px;
  color: var(--dim);
  font-style: normal;
  font-size: 14px;
}

.feature-layout,
.ranking-layout,
.detail-content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.movie-grid {
  display: grid;
  gap: 20px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 18px;
  background: var(--card);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

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

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

.type-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.68);
  font-size: 12px;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.poster-desc {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px;
  color: #e5e7eb;
  font-size: 13px;
  transform: translateY(100%);
  transition: transform 0.25s ease;
}

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

.movie-card:hover .poster-desc {
  transform: translateY(0);
}

.card-body {
  padding: 16px;
}

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

.card-body h2 a:hover {
  color: var(--cyan);
}

.card-meta {
  margin: 0 0 10px;
  color: var(--dim);
  font-size: 13px;
}

.card-line {
  margin: 0 0 12px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
}

.rank-panel,
.content-card,
.filter-panel,
.page-hero,
.player-box {
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.rank-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
}

.rank-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.rank-row {
  display: grid;
  grid-template-columns: auto 86px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.82);
  transition: background 0.25s ease;
}

.rank-row:hover {
  background: var(--card-hover);
}

.rank-row img {
  width: 86px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-row strong {
  display: block;
  line-height: 1.35;
}

.rank-row em {
  display: block;
  margin-top: 4px;
  color: var(--dim);
  font-style: normal;
  font-size: 12px;
}

.rank-index {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #07111d;
  background: var(--gold);
  font-weight: 900;
}

.panel-link {
  margin-top: 18px;
  width: 100%;
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.32);
}

.horizontal-cards {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 14px;
}

.page-main {
  padding-bottom: 64px;
}

.compact-hero {
  padding: 34px;
  margin-top: 38px;
}

.page-hero h1 {
  margin: 10px 0;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
}

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

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

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

.category-overview-card {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 24px;
  background: var(--panel);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-overview-card img,
.category-overview-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.category-overview-card img {
  object-fit: cover;
  transition: transform 0.45s ease;
}

.category-overview-card:hover img {
  transform: scale(1.08);
}

.category-overview-shade {
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.2));
}

.category-overview-card strong,
.category-overview-card em {
  position: relative;
}

.category-overview-card strong {
  font-size: 26px;
}

.category-overview-card em {
  color: var(--muted);
  font-style: normal;
}

.filter-panel {
  padding: 22px;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin-bottom: 22px;
}

.filter-row select {
  border-radius: 18px;
}

.detail-hero {
  margin-top: 38px;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

.detail-copy h1 {
  margin: 12px 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.04;
}

.detail-line {
  max-width: 780px;
  font-size: 18px;
}

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

.detail-meta div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.72);
}

.detail-meta dt {
  color: var(--dim);
  font-size: 12px;
}

.detail-meta dd {
  margin: 4px 0 0;
  font-weight: 700;
}

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

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: none;
  color: var(--text);
  background: radial-gradient(circle, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.78));
  cursor: pointer;
}

.play-overlay.hidden {
  display: none;
}

.play-symbol {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #06121f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-size: 40px;
  box-shadow: var(--shadow);
}

.content-card {
  padding: 28px;
}

.content-card h2 {
  margin-top: 24px;
  font-size: 26px;
}

.content-card h2:first-child {
  margin-top: 0;
}

.content-card p {
  margin: 12px 0 0;
  font-size: 17px;
}

.related-panel .rank-row {
  grid-template-columns: 86px 1fr;
}

.related-panel .rank-index {
  display: none;
}

.search-page-form {
  margin-top: 22px;
  max-width: 760px;
}

.search-summary {
  margin: 0 0 18px;
}

.site-footer {
  margin-top: 72px;
  padding: 44px 0 0;
  color: var(--dim);
  background: rgba(15, 23, 42, 0.92);
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 34px;
}

.footer-brand {
  margin-bottom: 16px;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-bottom {
  margin-top: 34px;
  padding: 18px;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--dim);
  font-size: 14px;
}

.hidden-card {
  display: none;
}

@media (max-width: 1100px) {
  .grid-6,
  .grid-5,
  .grid-4,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .feature-layout,
  .ranking-layout,
  .detail-content-layout {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

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

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

  .hero-carousel {
    height: 78vh;
    min-height: 620px;
  }

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

  .wide-search {
    flex-direction: column;
  }

  .grid-6,
  .grid-5,
  .grid-4,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 20px, 1180px);
  }

  .brand {
    font-size: 18px;
  }

  .hero-content {
    padding-bottom: 96px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .grid-6,
  .grid-5,
  .grid-4,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .compact-hero,
  .filter-panel,
  .content-card {
    padding: 20px;
  }

  .rank-row,
  .related-panel .rank-row {
    grid-template-columns: 74px 1fr;
  }

  .rank-row .rank-index {
    display: none;
  }

  .rank-row img {
    width: 74px;
    height: 52px;
  }
}
