:root {
  --color-cyan: #06b6d4;
  --color-blue: #2563eb;
  --color-deep: #0f172a;
  --color-muted: #64748b;
  --color-soft: #f8fafc;
  --color-card: #ffffff;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f1f5f9;
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: #ffffff;
  background: linear-gradient(90deg, #06b6d4 0%, #2563eb 100%);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.25);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-icon {
  font-size: 2rem;
  transition: transform 0.25s ease;
}

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

.brand-text {
  font-size: 1.2rem;
  white-space: nowrap;
}

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

.nav-link,
.mobile-link {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #cffafe;
}

.header-search {
  position: relative;
  width: 260px;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 11px 16px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, 88vw);
  max-height: 420px;
  overflow: auto;
  padding: 10px;
  border-radius: 18px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.search-results.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.search-result-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
}

.search-result-item:hover {
  background: #ecfeff;
}

.search-result-item img {
  width: 48px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  background: linear-gradient(135deg, #e0f2fe, #dbeafe);
}

.search-result-item strong {
  display: block;
  line-height: 1.3;
}

.search-result-item span {
  display: block;
  color: var(--color-muted);
  font-size: 0.82rem;
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  border-radius: 4px;
  background: #ffffff;
}

.mobile-nav {
  display: none;
  padding: 10px 16px 18px;
  background: rgba(30, 64, 175, 0.88);
}

.mobile-nav.open {
  display: block;
}

.mobile-link {
  display: block;
  padding: 11px 4px;
}

.mobile-search {
  position: relative;
  margin-top: 8px;
}

.hero {
  position: relative;
  min-height: 630px;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 10% 20%, rgba(34, 211, 238, 0.75), transparent 25%),
              linear-gradient(135deg, #22d3ee 0%, #2563eb 46%, #1d4ed8 100%);
}

.hero-slider {
  position: relative;
  min-height: 630px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.88) 0%, rgba(29, 78, 216, 0.56) 48%, rgba(8, 145, 178, 0.22) 100%),
                    var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
}

.hero-slide::after {
  content: "🎬";
  position: absolute;
  right: 6vw;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(8rem, 20vw, 19rem);
  opacity: 0.16;
  filter: blur(0.2px);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.55fr);
  gap: 36px;
  align-items: center;
  min-height: 630px;
  padding: 70px 0 96px;
}

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

.eyebrow,
.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
}

.hero h1,
.page-hero h1,
.movie-title h1 {
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: -0.065em;
}

.hero p {
  max-width: 660px;
  margin: 0 0 18px;
  color: #e0f2fe;
  font-size: clamp(1rem, 2vw, 1.25rem);
}

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

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

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

.btn-primary {
  color: #1d4ed8;
  background: #ffffff;
  box-shadow: 0 16px 35px rgba(255, 255, 255, 0.18);
}

.btn-primary:hover {
  background: #ecfeff;
}

.btn-outline {
  color: #ffffff;
  background: transparent;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.8);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-blue {
  color: #ffffff;
  background: linear-gradient(90deg, var(--color-cyan), var(--color-blue));
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
}

.hero-panel {
  position: relative;
  z-index: 2;
  align-self: stretch;
  display: flex;
  align-items: end;
}

.hero-poster-card {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

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

.hero-poster-card div {
  padding: 18px;
}

.hero-poster-card strong {
  display: block;
  font-size: 1.1rem;
}

.hero-poster-card span {
  color: #cffafe;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  bottom: 34px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100% - 32px, var(--container));
  transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

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

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 6px;
}

.hero-dot {
  width: 36px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

.hero-dot.active {
  background: #ffffff;
}

.quick-cats {
  position: relative;
  z-index: 3;
  margin-top: -58px;
}

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

.quick-cat {
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-cat:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.quick-cat strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.quick-cat span {
  color: var(--color-muted);
  font-size: 0.92rem;
}

.section {
  padding: 72px 0;
}

.section.soft {
  background: #f8fafc;
}

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

.section-title h2,
.section-title h1 {
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-title p {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--color-muted);
}

.gradient-line {
  width: 82px;
  height: 4px;
  margin-top: 16px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--color-cyan), var(--color-blue));
}

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: var(--color-card);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-soft);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #e0f2fe, #dbeafe);
}

.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.07);
}

.play-mark {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.86);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

.movie-card-body {
  padding: 14px;
}

.movie-meta,
.rank-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--color-muted);
  font-size: 0.86rem;
}

.movie-card h2,
.rank-info h2 {
  margin: 8px 0 8px;
  font-size: 1rem;
  line-height: 1.35;
}

.movie-card h2 a:hover,
.rank-info h2 a:hover {
  color: var(--color-blue);
}

.movie-card p,
.rank-info p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--color-muted);
  font-size: 0.9rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-list span,
.detail-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 0.78rem;
  font-weight: 650;
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4 0%, #2563eb 55%, #1e40af 100%);
}

.page-hero-inner {
  padding: 74px 0;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: #e0f2fe;
  font-size: 1.1rem;
}

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

.category-card {
  min-height: 210px;
  padding: 24px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

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

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

.category-links a {
  padding: 6px 10px;
  border-radius: 999px;
  color: #075985;
  background: #ecfeff;
  font-size: 0.82rem;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.filter-panel input,
.filter-panel select {
  border: 1px solid #dbeafe;
  background: #f8fafc;
}

.rank-list {
  display: grid;
  gap: 14px;
}

.rank-row {
  display: grid;
  grid-template-columns: 56px 84px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-cyan), var(--color-blue));
  font-weight: 900;
}

.rank-cover img {
  width: 84px;
  height: 112px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-info h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.rank-play {
  padding: 10px 16px;
  border-radius: 999px;
  color: #ffffff;
  background: #2563eb;
  font-weight: 800;
}

.movie-detail {
  background: #f8fafc;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 24px 0 12px;
  color: var(--color-muted);
  font-size: 0.94rem;
}

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

.player-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

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

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

.player-poster {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-shell.is-playing .player-poster,
.player-shell.is-ready .player-poster {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.82);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.35);
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.play-button:hover {
  transform: scale(1.08);
  background: rgba(6, 182, 212, 0.88);
}

.play-button span {
  margin-left: 5px;
  font-size: 2.5rem;
  line-height: 1;
}

.detail-body {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 28px;
  padding: 28px;
}

.detail-cover img {
  width: 100%;
  border-radius: 20px;
  box-shadow: var(--shadow-card);
}

.movie-title h1 {
  color: #0f172a;
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.detail-meta {
  margin-bottom: 14px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.detail-section {
  margin-top: 22px;
}

.detail-section h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.detail-section p {
  margin: 0;
  color: #334155;
}

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

.empty-state {
  padding: 26px;
  border-radius: 20px;
  color: var(--color-muted);
  background: #ffffff;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #1f2937 0%, #0f172a 100%);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 30px;
  padding: 54px 0;
}

.footer-brand {
  color: #ffffff;
  font-size: 1.25rem;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 1rem;
}

.site-footer p {
  margin: 14px 0 0;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

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

.footer-bottom {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  font-size: 0.9rem;
}

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

  .mobile-toggle {
    display: block;
  }

  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    display: none;
  }

  .quick-cats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

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

  .hero,
  .hero-slider,
  .hero-content {
    min-height: 560px;
  }

  .hero-content {
    padding: 48px 0 92px;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 12vw, 3.8rem);
  }

  .quick-cats {
    margin-top: 0;
    padding-top: 22px;
  }

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

  .section {
    padding: 48px 0;
  }

  .section-head {
    display: block;
  }

  .section-actions {
    margin-top: 16px;
  }

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

  .rank-row {
    grid-template-columns: 42px 70px 1fr;
  }

  .rank-play {
    grid-column: 2 / 4;
    text-align: center;
  }

  .rank-cover img {
    width: 70px;
    height: 96px;
  }

  .detail-body {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .detail-cover {
    max-width: 240px;
  }

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

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
}

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

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

  .btn {
    width: 100%;
  }

  .movie-card {
    display: grid;
    grid-template-columns: 118px 1fr;
  }

  .poster-link img {
    height: 100%;
    aspect-ratio: 2 / 3;
  }

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

  .play-button {
    width: 72px;
    height: 72px;
  }
}
