:root {
  --cyan: #0891b2;
  --cyan-light: #22d3ee;
  --blue: #2563eb;
  --teal: #0d9488;
  --slate: #0f172a;
  --muted: #64748b;
  --light: #f8fafc;
  --card: #ffffff;
  --ring: rgba(34, 211, 238, 0.36);
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #1f2937;
  background: linear-gradient(180deg, #f8fafc 0%, #eef7fb 46%, #f8fafc 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

img {
  display: block;
  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: linear-gradient(90deg, var(--cyan), var(--blue), var(--teal));
  box-shadow: 0 10px 35px rgba(14, 116, 144, 0.25);
}

.nav-wrap {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: white;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  transition: transform 0.3s ease;
}

.brand:hover .brand-mark {
  transform: rotate(12deg) scale(1.04);
}

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

.site-nav a {
  color: white;
  font-weight: 700;
  padding: 10px 6px;
  opacity: 0.9;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  opacity: 1;
  transform: translateY(-1px);
}

.top-search {
  position: relative;
  min-width: 220px;
}

.top-search input,
.filter-shell input,
.filter-shell select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  outline: none;
  border-radius: 999px;
  padding: 11px 16px;
  color: white;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  transition: box-shadow 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.top-search input::placeholder {
  color: rgba(255, 255, 255, 0.8);
}

.top-search input:focus,
.filter-shell input:focus,
.filter-shell select:focus {
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.65);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  padding: 8px 12px;
  color: white;
  background: rgba(255, 255, 255, 0.18);
}

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

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 42%, rgba(8, 145, 178, 0.42), transparent 30%), linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.25) 54%, rgba(2, 6, 23, 0.62));
}

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

.hero-text {
  width: min(660px, 92%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #e0f2fe;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-text h1,
.hero-text h2 {
  margin: 0;
  font-size: clamp(36px, 7vw, 72px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
}

.hero-text h2 {
  margin-top: 12px;
  font-size: clamp(30px, 5vw, 58px);
}

.hero-text p {
  max-width: 680px;
  margin: 20px 0 0;
  color: #e2e8f0;
  font-size: clamp(17px, 2.4vw, 22px);
  line-height: 1.75;
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
}

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

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

.btn {
  color: white;
  background: linear-gradient(90deg, var(--cyan-light), var(--blue));
  box-shadow: 0 16px 28px rgba(14, 165, 233, 0.28);
}

.btn-soft {
  color: white;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.btn:hover,
.btn-soft:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: white;
  font-size: 28px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
  z-index: 4;
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: white;
}

.section {
  padding: 56px 0;
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-head p,
.page-title p,
.detail-title p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-link {
  color: var(--cyan);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-link:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #164e63, #1d4ed8);
}

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

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

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

.rank-badge {
  left: 12px;
  right: auto;
  background: linear-gradient(90deg, #f97316, #ef4444);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  min-height: 48px;
  margin: 0 0 8px;
  color: #172033;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-info p {
  min-height: 45px;
  margin: 0 0 12px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

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

.tag-row span {
  color: var(--cyan);
  background: #ecfeff;
  padding: 5px 9px;
  font-size: 12px;
}

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

.category-card {
  display: block;
  padding: 26px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(236, 254, 255, 0.72));
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 24px;
  font-weight: 900;
}

.category-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.75;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-samples span {
  border-radius: 999px;
  background: white;
  color: var(--cyan);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: white;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.07);
}

.rank-num {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 900;
}

.rank-item h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 900;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.page-title {
  padding: 54px 0 30px;
  background: linear-gradient(180deg, #ecfeff, rgba(236, 254, 255, 0));
}

.filter-bar {
  padding: 12px 0 26px;
}

.filter-shell {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 38px rgba(8, 145, 178, 0.18);
}

.filter-shell select {
  color: white;
}

.filter-shell option {
  color: #111827;
}

.empty-state {
  display: none;
  padding: 28px;
  border-radius: 20px;
  text-align: center;
  color: var(--muted);
  background: white;
}

body.has-empty-result .empty-state {
  display: block;
}

.breadcrumb {
  padding: 22px 0;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--cyan);
  font-weight: 800;
}

.player-section {
  padding: 24px 0 42px;
  background: radial-gradient(circle at 70% 0%, rgba(34, 211, 238, 0.2), transparent 35%), linear-gradient(180deg, #020617, #0f172a);
}

.player-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.7fr);
  gap: 30px;
  align-items: center;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: black;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
  aspect-ratio: 16 / 9;
}

.player-card video,
.video-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-card video {
  object-fit: contain;
  background: black;
  z-index: 1;
}

.video-poster {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: black;
  cursor: pointer;
  z-index: 2;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.video-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.play-circle {
  position: absolute;
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  font-size: 36px;
  background: linear-gradient(135deg, var(--cyan-light), var(--blue));
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.4);
}

.player-card.is-playing .video-poster {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-title {
  color: white;
}

.detail-title h1 {
  color: white;
}

.detail-title p {
  color: #cbd5e1;
}

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

.detail-body {
  padding: 48px 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
}

.content-card {
  padding: 28px;
  border-radius: 26px;
  background: white;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.content-card + .content-card {
  margin-top: 22px;
}

.content-card h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 26px;
  font-weight: 900;
}

.content-card p {
  margin: 0;
  color: #334155;
  line-height: 1.9;
  font-size: 16px;
}

.side-card {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 22px;
  border-radius: 24px;
  background: white;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.side-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 900;
}

.side-link {
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #eef2f7;
}

.side-link:first-of-type {
  border-top: 0;
}

.side-link img {
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
  background: #e2e8f0;
}

.side-link strong {
  display: block;
  color: #0f172a;
  line-height: 1.35;
  font-size: 14px;
}

.side-link span {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
}

.detail-nav {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
}

.detail-nav a {
  flex: 1;
  padding: 14px 18px;
  border-radius: 18px;
  color: var(--cyan);
  background: #ecfeff;
  font-weight: 900;
}

.site-footer {
  margin-top: 42px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #1e293b, #0f172a);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  padding: 46px 0;
}

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

.footer-grid h2 {
  margin: 0 0 14px;
  color: white;
  font-size: 18px;
  font-weight: 900;
}

.footer-grid a {
  display: block;
  margin: 9px 0;
  color: #cbd5e1;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 18px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

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

  .category-panel,
  .footer-grid,
  .player-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .side-card {
    position: static;
  }
}

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

  .nav-wrap {
    flex-wrap: wrap;
    min-height: auto;
    padding: 12px 0;
  }

  .brand {
    font-size: 20px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav,
  .top-search {
    display: none;
    width: 100%;
  }

  .site-nav.is-open,
  .top-search.is-open {
    display: flex;
  }

  .site-nav.is-open {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding-top: 10px;
  }

  .top-search.is-open {
    margin-top: 8px;
  }

  .hero-carousel {
    min-height: 76vh;
  }

  .hero-arrow {
    display: none;
  }

  .hero-text h1,
  .hero-text h2 {
    letter-spacing: -0.03em;
  }

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

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

  .movie-info {
    padding: 12px;
  }

  .movie-info h3 {
    font-size: 16px;
  }

  .rank-list {
    grid-template-columns: 1fr;
  }

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

  .detail-nav {
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: block;
  }

  .rank-item {
    grid-template-columns: 46px 1fr;
  }

  .rank-item .btn {
    grid-column: 1 / -1;
  }
}
