:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --cyan: #06b6d4;
  --cyan-dark: #0891b2;
  --blue: #2563eb;
  --orange: #f97316;
  --red: #ef4444;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.25);
}

.navbar {
  width: min(1280px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #22d3ee, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #22d3ee, #2563eb);
  box-shadow: 0 0 24px rgba(6, 182, 212, 0.45);
  transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.08) rotate(6deg);
}

.nav-panel,
.nav-links,
.nav-categories {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-panel {
  gap: 24px;
}

.nav-link,
.nav-categories a {
  color: #cbd5e1;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 650;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-categories a:hover {
  color: #fff;
  background: rgba(51, 65, 85, 0.85);
}

.nav-link.is-active {
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--red));
}

.nav-categories {
  border-left: 1px solid #475569;
  padding-left: 24px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  padding: 56px 16px 64px;
  color: #fff;
  background: radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.24), transparent 36%), linear-gradient(135deg, #020617, #0f172a 48%, #172554);
}

.hero-glow {
  position: absolute;
  inset: auto -15% -45% auto;
  width: 540px;
  height: 540px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.3);
  filter: blur(80px);
}

.hero-slider {
  position: relative;
  width: min(1280px, 100%);
  margin: 0 auto;
  min-height: 520px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 480px);
  align-items: center;
  gap: 56px;
  min-height: 520px;
  animation: fadeUp 0.55s ease both;
}

.hero-slide.is-active {
  display: grid;
}

.hero-image {
  order: 2;
  position: relative;
  border-radius: 34px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  box-shadow: 0 35px 80px rgba(2, 6, 23, 0.55);
}

.hero-image::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.35));
}

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

.hero-copy {
  order: 1;
  position: relative;
  z-index: 3;
  max-width: 680px;
}

.hero-label,
.section-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #cffafe;
  background: rgba(8, 145, 178, 0.25);
  border: 1px solid rgba(103, 232, 249, 0.28);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-main h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-main p {
  margin: 0;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

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

.hero-tags {
  margin: 24px 0 0;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  color: #0891b2;
  background: #ecfeff;
  font-size: 12px;
  font-weight: 750;
}

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

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

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  box-shadow: 0 12px 28px rgba(6, 182, 212, 0.34);
}

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

.hero-controls {
  position: absolute;
  right: 18px;
  bottom: 24px;
  z-index: 6;
  display: flex;
  gap: 10px;
}

.hero-controls button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: rgba(15, 23, 42, 0.7);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.hero-dots {
  position: absolute;
  left: 0;
  bottom: 36px;
  z-index: 6;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 28px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: #22d3ee;
}

.hero-search {
  position: relative;
  z-index: 4;
  display: flex;
  width: min(880px, calc(100% - 32px));
  margin: 30px auto 0;
  padding: 10px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.hero-search input,
.search-panel input,
.search-panel select,
.filter-bar input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: #fff;
  padding: 0 16px;
  outline: none;
}

.hero-search input {
  border: 0;
}

.hero-search button,
.search-panel button {
  min-width: 120px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--red));
  font-weight: 850;
  cursor: pointer;
}

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

.section-alt {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100% - 1280px) / 2));
  padding-right: max(16px, calc((100% - 1280px) / 2));
  background: linear-gradient(135deg, #f8fafc, #eff6ff);
}

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

.section-head h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: -0.04em;
}

.section-head p {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  flex: none;
  color: var(--cyan-dark);
  font-weight: 850;
}

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

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

.category-card,
.feature-panels a,
.content-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.category-card {
  min-height: 150px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.movie-card:hover,
.feature-panels a:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-card span {
  color: var(--cyan-dark);
  font-size: 20px;
  font-weight: 900;
}

.category-card strong,
.feature-panels span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  font-weight: 500;
}

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

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

.movie-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  display: block;
  aspect-ratio: 3 / 4;
  background: #0f172a;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.8));
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.poster-play,
.rank-badge {
  position: absolute;
  z-index: 3;
  color: #fff;
  font-weight: 850;
}

.poster-play {
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  opacity: 0;
  padding: 9px 14px;
  border-radius: 12px;
  background: rgba(6, 182, 212, 0.92);
  transition: opacity 0.25s ease;
}

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

.rank-badge {
  top: 12px;
  left: 12px;
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--orange), var(--red));
}

.movie-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.movie-info strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
}

.movie-info em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.movie-desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #475569;
  font-size: 14px;
  line-height: 1.7;
}

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

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

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at 18% 10%, rgba(34, 211, 238, 0.22), transparent 38%), linear-gradient(135deg, #020617, #0f172a 55%, #172554);
}

.page-hero {
  padding: 84px 16px 76px;
  text-align: center;
}

.page-hero p {
  max-width: 760px;
  margin: 0 auto;
}

.filter-bar,
.search-panel {
  margin-bottom: 28px;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 160px 130px;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

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

.feature-panels a {
  min-height: 160px;
  padding: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-panels strong,
.feature-panels span {
  display: block;
}

.feature-panels strong {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 24px;
}

.detail-hero {
  padding: 56px 16px 72px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  filter: blur(12px);
  transform: scale(1.08);
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #020617;
  opacity: 0.7;
}

.detail-wrap {
  position: relative;
  z-index: 2;
  width: min(1280px, 100%);
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #67e8f9;
}

.detail-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.55);
}

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

.detail-main p {
  max-width: 840px;
}

.player-section {
  padding-bottom: 34px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.24);
}

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

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #fff;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.play-layer.is-hidden {
  display: none;
}

.play-layer span {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 0 32px rgba(6, 182, 212, 0.45);
  font-size: 28px;
}

.play-layer strong {
  font-size: 24px;
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding-top: 34px;
}

.content-card {
  padding: 26px;
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.content-card p {
  margin: 0;
  color: #475569;
  line-height: 1.9;
}

.meta-card {
  grid-column: 1 / -1;
}

.meta-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
}

.meta-card div {
  padding: 16px;
  border-radius: 16px;
  background: #f8fafc;
}

.meta-card dt {
  color: var(--muted);
  font-size: 13px;
}

.meta-card dd {
  margin: 6px 0 0;
  color: var(--ink);
  font-weight: 750;
}

.meta-card a {
  color: var(--cyan-dark);
}

.site-footer {
  color: #cbd5e1;
  background: #020617;
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0 34px;
  display: grid;
  grid-template-columns: minmax(260px, 430px) 1fr;
  gap: 42px;
}

.footer-inner p {
  max-width: 520px;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: start;
  gap: 14px 24px;
}

.footer-links a:hover {
  color: #67e8f9;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding: 18px 16px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

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

.empty-state {
  grid-column: 1 / -1;
  min-height: 220px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #fff;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .category-grid,
  .movie-grid.dense,
  .ranking-list.full {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .hero-image {
    order: 1;
  }

  .hero-copy {
    order: 2;
  }
}

@media (max-width: 860px) {
  .menu-toggle {
    display: block;
  }

  .nav-panel {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px 18px;
    background: #0f172a;
    border-top: 1px solid #334155;
  }

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

  .nav-links,
  .nav-categories {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-categories {
    border-left: 0;
    border-top: 1px solid #334155;
    padding-left: 0;
    padding-top: 14px;
  }

  .hero {
    min-height: auto;
    padding-top: 34px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-main h1 {
    font-size: 40px;
  }

  .hero-search,
  .search-panel {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .hero-search {
    display: grid;
  }

  .hero-search button,
  .search-panel button {
    min-height: 48px;
  }

  .section-head,
  .footer-inner,
  .detail-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: grid;
  }

  .category-grid,
  .category-grid.large,
  .movie-grid,
  .movie-grid.dense,
  .ranking-list,
  .ranking-list.full,
  .feature-panels,
  .meta-card dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .navbar,
  .section,
  .footer-inner {
    width: min(100% - 24px, 1280px);
  }

  .brand {
    font-size: 18px;
  }

  .brand-icon {
    width: 38px;
    height: 38px;
  }

  .hero-slide {
    min-height: auto;
  }

  .hero-controls,
  .hero-dots {
    display: none;
  }

  .category-grid,
  .category-grid.large,
  .movie-grid,
  .movie-grid.dense,
  .ranking-list,
  .ranking-list.full,
  .feature-panels,
  .meta-card dl,
  .nav-links,
  .nav-categories {
    grid-template-columns: 1fr;
  }

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

  .play-layer span {
    width: 58px;
    height: 58px;
  }
}
