:root {
  color-scheme: light;
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-500: #64748b;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --white: #ffffff;
  --shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 18px 40px rgba(15, 23, 42, 0.14);
  --radius-lg: 22px;
  --radius-md: 16px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--slate-50), #ffffff 42%, var(--sky-50));
  color: var(--slate-900);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.nav-shell {
  width: min(var(--container), calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand,
.mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.02em;
}

.brand-mark {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--sky-500), var(--sky-600));
  color: var(--white);
  font-size: 14px;
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.35);
}

.brand-name {
  font-size: 21px;
}

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

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--slate-500);
  font-size: 15px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--sky-600);
  background: var(--sky-50);
}

.nav-search,
.mobile-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 288px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  background: var(--white);
  overflow: visible;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.nav-search input,
.mobile-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 11px 14px 11px 18px;
  background: transparent;
  color: var(--slate-700);
}

.nav-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 9px 15px;
  margin-right: 3px;
  color: var(--white);
  background: var(--sky-500);
  cursor: pointer;
}

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, 88vw);
  max-height: 420px;
  overflow: auto;
  display: none;
  padding: 10px;
  border: 1px solid var(--slate-200);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-md);
}

.search-panel.is-open {
  display: block;
}

.search-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  padding: 9px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.search-item:hover {
  background: var(--sky-50);
}

.search-item img {
  width: 52px;
  height: 70px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--slate-200);
}

.search-item strong {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
}

.search-item span {
  display: block;
  color: var(--slate-500);
  font-size: 12px;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--slate-200);
  border-radius: 13px;
  background: var(--white);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--slate-700);
}

.mobile-panel {
  display: none;
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--slate-200);
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.mobile-panel.is-open {
  display: block;
}

.mobile-search {
  width: 100%;
  margin: 14px 0;
}

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

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
}

.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-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.58) 42%, rgba(2, 6, 23, 0.12)), linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.04) 62%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - var(--container)) / 2));
  bottom: 12%;
  width: min(660px, calc(100% - 48px));
  color: var(--white);
}

.hero-label,
.detail-label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.92);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.hero h2 {
  margin: 0 0 16px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.38);
}

.hero p {
  max-width: 620px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.hero-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  backdrop-filter: blur(8px);
}

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

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

.primary-btn {
  background: var(--sky-500);
  color: var(--white);
  box-shadow: 0 16px 28px rgba(14, 165, 233, 0.35);
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  backdrop-filter: blur(10px);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.34);
  color: var(--white);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

.hero-dot {
  width: 28px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--sky-500);
}

.quick-panel,
.section-shell,
.breadcrumb,
.detail-hero,
.watch-section {
  width: min(var(--container), calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.quick-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: -52px;
  position: relative;
  z-index: 5;
}

.quick-card {
  padding: 24px;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
}

.quick-card span,
.section-title p,
.page-hero p {
  display: block;
  margin: 0 0 7px;
  color: var(--sky-600);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quick-card strong {
  display: block;
  margin-bottom: 12px;
  color: var(--slate-900);
  font-size: 22px;
}

.quick-card a,
.section-title a {
  color: var(--sky-600);
  font-weight: 800;
}

.section-shell {
  margin-top: 70px;
}

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

.section-title h2,
.page-hero h1,
.detail-intro h1,
.story-card h2 {
  margin: 0;
  color: var(--slate-900);
  line-height: 1.16;
}

.section-title h2 {
  font-size: clamp(28px, 4vw, 42px);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(14, 165, 233, 0.32);
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-200), var(--sky-100));
}

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

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

.score-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  display: inline-flex;
  min-width: 42px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
}

.score-badge {
  right: 12px;
  background: rgba(14, 165, 233, 0.94);
}

.rank-badge {
  left: 12px;
  background: rgba(15, 23, 42, 0.76);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.3;
}

.movie-info h3 a:hover {
  color: var(--sky-600);
}

.movie-meta,
.movie-desc {
  margin: 0;
  color: var(--slate-500);
  font-size: 13px;
}

.movie-desc {
  margin-top: 10px;
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.soft-section {
  padding: 40px;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(240, 249, 255, 0.88), rgba(255, 255, 255, 0.94));
  border: 1px solid rgba(226, 232, 240, 0.8);
}

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

.category-card,
.category-overview-card {
  display: block;
  padding: 22px;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.category-card span,
.category-heading span {
  display: block;
  margin-bottom: 8px;
  color: var(--slate-900);
  font-size: 20px;
  font-weight: 800;
}

.category-card p,
.category-overview-card p {
  margin: 0;
  color: var(--slate-500);
  font-size: 14px;
}

.category-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-heading strong {
  color: var(--sky-600);
  white-space: nowrap;
}

.category-preview-links {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.category-preview-links a {
  color: var(--slate-600);
  font-size: 14px;
}

.category-preview-links a:hover {
  color: var(--sky-600);
}

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

.ranking-list .movie-card.compact {
  display: grid;
  grid-template-columns: 112px 1fr;
  min-height: 168px;
}

.movie-card.compact .poster-link {
  height: 100%;
  aspect-ratio: auto;
}

.movie-card.compact .movie-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

.page-hero {
  width: min(var(--container), calc(100% - 32px));
  margin: 36px auto 0;
  padding: 48px;
  border-radius: 30px;
  background: radial-gradient(circle at 80% 20%, rgba(14, 165, 233, 0.26), transparent 32%), linear-gradient(135deg, #ffffff, var(--sky-50));
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow-sm);
}

.page-hero h1 {
  max-width: 760px;
  font-size: clamp(34px, 5vw, 56px);
}

.page-hero span {
  display: block;
  max-width: 780px;
  margin-top: 14px;
  color: var(--slate-500);
  font-size: 17px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-btn {
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--white);
  color: var(--slate-600);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-btn:hover,
.filter-btn.is-active {
  border-color: rgba(14, 165, 233, 0.38);
  background: var(--sky-50);
  color: var(--sky-600);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 30px;
  color: var(--slate-500);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 34px;
  align-items: center;
  margin-top: 26px;
  padding: 34px;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 30px;
  background: linear-gradient(135deg, #ffffff, var(--sky-50));
  box-shadow: var(--shadow-sm);
}

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

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--slate-200);
}

.detail-intro h1 {
  font-size: clamp(36px, 5vw, 60px);
}

.detail-intro p {
  max-width: 760px;
  color: var(--slate-600);
  font-size: 17px;
}

.detail-intro .detail-meta span {
  background: rgba(14, 165, 233, 0.11);
  color: var(--sky-600);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tag-list span {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--white);
  color: var(--slate-600);
  font-size: 14px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.watch-section {
  margin-top: 46px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.32);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.24), rgba(2, 6, 23, 0.68));
  color: var(--white);
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.play-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  display: inline-flex;
  width: 76px;
  height: 76px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--sky-500);
  color: var(--white);
  font-size: 30px;
  box-shadow: 0 18px 42px rgba(14, 165, 233, 0.42);
}

.play-overlay strong {
  font-size: 20px;
}

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

.story-card {
  padding: 28px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.story-card h2 {
  margin-bottom: 14px;
  font-size: 26px;
}

.story-card p {
  margin: 0;
  color: var(--slate-600);
  font-size: 16px;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--slate-200);
  background: linear-gradient(180deg, var(--slate-50), var(--slate-100));
}

.footer-shell {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}

.footer-main p {
  max-width: 560px;
  margin: 14px 0 0;
  color: var(--slate-500);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  color: var(--slate-600);
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--sky-600);
}

.footer-bottom {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid var(--slate-200);
  color: var(--slate-500);
  font-size: 14px;
}

@media (max-width: 1100px) {
  .nav-search {
    width: 230px;
  }

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

  .ranking-list,
  .wide-list {
    grid-template-columns: 1fr;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: 640px;
  }

  .hero-content {
    bottom: 90px;
  }

  .hero-control {
    display: none;
  }

  .quick-panel,
  .detail-content,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .quick-panel {
    margin-top: 18px;
  }

  .detail-hero {
    padding: 22px;
  }

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

  .footer-shell {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .nav-shell {
    min-height: 64px;
  }

  .brand-name {
    font-size: 18px;
  }

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

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

  .hero-content {
    left: 18px;
    width: calc(100% - 36px);
  }

  .quick-card,
  .page-hero,
  .soft-section,
  .story-card {
    padding: 22px;
  }

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

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

  .movie-info {
    padding: 12px;
  }

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

  .movie-desc {
    display: none;
  }

  .ranking-list .movie-card.compact {
    grid-template-columns: 92px 1fr;
    min-height: 138px;
  }

  .player-shell {
    border-radius: 18px;
  }

  .play-circle {
    width: 62px;
    height: 62px;
  }
}

@media (max-width: 420px) {
  .movie-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }
}
