:root {
  --bg: #f3f4f6;
  --paper: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --muted-dark: #374151;
  --line: #e5e7eb;
  --cyan: #0891b2;
  --cyan-light: #06b6d4;
  --blue: #2563eb;
  --shadow: 0 14px 35px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f9fafb 0%, #eef2f7 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

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(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan-light), var(--blue));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted-dark);
  font-weight: 650;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.1);
}

.top-search {
  width: min(310px, 34vw);
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 999px;
  overflow: hidden;
}

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

.top-search button {
  border: 0;
  padding: 10px 15px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan-light), var(--blue));
}

.menu-toggle {
  display: none;
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #eef2f7;
  color: #0f172a;
  font-size: 20px;
}

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.54) 46%, rgba(0, 0, 0, 0.15) 100%);
}

.hero-content-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-content {
  max-width: 680px;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  color: #e0f2fe;
  font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.hero-content p {
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.7;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 28px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 700;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn-primary,
.btn-secondary,
.btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

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

.btn-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.btn-soft {
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.1);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-soft:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  font-size: 28px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.42);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 9px;
}

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

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

.main-area {
  padding: 56px 0 70px;
}

.section {
  margin-bottom: 66px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #111827;
}

.section-desc {
  margin-top: 8px;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.75;
}

.grid {
  display: grid;
  gap: 24px;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card > a,
.ranking-card,
.category-card {
  display: block;
  height: 100%;
  overflow: hidden;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  overflow: hidden;
  background: #111827;
  aspect-ratio: 16 / 10;
}

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

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

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

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

.type-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: 12px;
  right: auto;
  background: linear-gradient(135deg, var(--cyan-light), var(--blue));
}

.card-body {
  padding: 18px;
}

.card-title {
  margin: 0 0 9px;
  color: #111827;
  font-size: 19px;
  font-weight: 850;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card > a:hover .card-title {
  color: var(--cyan);
}

.card-desc {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.meta-chip {
  padding: 5px 9px;
  border-radius: 999px;
  color: #0e7490;
  background: #cffafe;
  font-weight: 750;
}

.category-card {
  padding: 24px;
  min-height: 220px;
  position: relative;
  overflow: hidden;
}

.category-card::after {
  content: "";
  position: absolute;
  right: -45px;
  top: -45px;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(37, 99, 235, 0.16));
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  position: relative;
  z-index: 1;
  font-size: 24px;
  font-weight: 900;
}

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

.category-card .mini-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted-dark);
  font-weight: 650;
}

.filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
  margin: 24px 0;
  padding: 16px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.filters input,
.filters select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 14px;
  outline: 0;
  color: var(--text);
  background: #ffffff;
}

.filters input:focus,
.filters select:focus {
  border-color: var(--cyan-light);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.12);
}

.no-result {
  padding: 34px;
  border-radius: var(--radius);
  text-align: center;
  background: #ffffff;
  color: var(--muted);
}

.is-hidden {
  display: none !important;
}

.breadcrumbs {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--cyan);
  font-weight: 700;
}

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

.detail-main,
.detail-side,
.content-panel {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

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

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

.play-layer {
  position: absolute;
  inset: 0;
  border: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.16), rgba(2, 6, 23, 0.68));
  color: #ffffff;
}

.play-layer span {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  font-size: 38px;
  background: linear-gradient(135deg, var(--cyan-light), var(--blue));
  box-shadow: 0 24px 55px rgba(6, 182, 212, 0.36);
}

.play-layer.is-hidden {
  pointer-events: none;
}

.detail-copy {
  padding: 26px;
}

.detail-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.detail-copy p {
  color: var(--muted-dark);
  line-height: 1.8;
}

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

.detail-tags span {
  padding: 7px 11px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 13px;
  font-weight: 800;
}

.detail-side {
  padding: 20px;
}

.detail-poster {
  border-radius: 18px;
  overflow: hidden;
  background: #111827;
  aspect-ratio: 3 / 4;
  margin-bottom: 18px;
}

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

.side-meta {
  display: grid;
  gap: 10px;
}

.side-meta div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.side-meta span:first-child {
  color: var(--muted);
}

.side-meta span:last-child {
  color: #111827;
  font-weight: 800;
  text-align: right;
}

.content-panel {
  padding: 28px;
  margin-top: 30px;
}

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
  font-weight: 900;
}

.content-panel p {
  margin: 0 0 18px;
  color: var(--muted-dark);
  line-height: 1.9;
}

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

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

.ranking-card {
  display: grid;
  grid-template-columns: 180px 1fr;
}

.ranking-card .poster-wrap {
  aspect-ratio: 4 / 3;
  height: 100%;
}

.site-footer {
  color: #cbd5e1;
  background: #111827;
  padding: 46px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
}

.footer-title {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

.footer-text,
.footer-links a {
  color: #94a3b8;
  line-height: 1.8;
}

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

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

.copyright {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  color: #94a3b8;
}

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

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

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

  .detail-side {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
  }

  .detail-poster {
    margin-bottom: 0;
  }
}

@media (max-width: 840px) {
  .header-inner {
    min-height: 64px;
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .nav {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 14px;
  }

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

  .top-search {
    order: 3;
    width: 100%;
    margin-bottom: 12px;
  }

  .hero-slider {
    height: 74vh;
    min-height: 520px;
  }

  .hero-arrow {
    display: none;
  }

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

  .ranking-card {
    grid-template-columns: 1fr;
  }

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

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

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

  .logo {
    font-size: 20px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 42px;
  }

  .movie-grid,
  .category-grid,
  .related-grid,
  .ranking-list {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-copy,
  .content-panel {
    padding: 20px;
  }

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