:root {
  --blue: #2563eb;
  --cyan: #06b6d4;
  --orange: #f97316;
  --red: #ef4444;
  --yellow: #eab308;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --page: #f8fafc;
  --card: #ffffff;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: white;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.2);
}

.header-inner {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: var(--cyan);
  background: white;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.brand-name {
  font-size: 22px;
  white-space: nowrap;
}

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

.nav-link,
.dropdown-button {
  border: 0;
  color: white;
  cursor: pointer;
  background: transparent;
  font-weight: 650;
  opacity: 0.9;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.dropdown-button:hover {
  color: #cffafe;
  opacity: 1;
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: 42px;
  left: 0;
  width: 176px;
  padding: 8px;
  color: var(--ink);
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink);
}

.dropdown-panel a:hover {
  color: var(--blue);
  background: #eff6ff;
}

.header-search {
  display: flex;
  align-items: center;
  width: min(320px, 28vw);
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.header-search input,
.mobile-search input,
.search-panel input,
.inline-search input {
  min-width: 0;
  border: 0;
  outline: none;
}

.header-search input {
  flex: 1;
  color: white;
  padding: 10px 12px;
  background: transparent;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.header-search button,
.mobile-search button,
.search-panel button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 9px 16px;
  color: var(--blue);
  background: white;
  font-weight: 750;
}

.mobile-menu-button {
  display: none;
  border: 0;
  color: white;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.mobile-panel {
  display: none;
  padding: 14px 20px 20px;
  background: #1d4ed8;
}

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

.mobile-search {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.mobile-search input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.16);
}

.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

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

.mobile-nav-link {
  padding: 10px 4px;
  font-weight: 700;
}

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

.hero {
  position: relative;
  height: 72vh;
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.08));
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  top: 50%;
  width: min(680px, calc(100% - 48px));
  color: white;
  transform: translateY(-50%);
}

.hero-kicker {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 9px 16px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(90deg, var(--orange), var(--red));
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(249, 115, 22, 0.28);
}

.hero h1,
.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

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

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta {
  margin-bottom: 30px;
}

.hero-meta span,
.detail-meta span,
.detail-meta a {
  padding: 8px 12px;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-weight: 700;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 30px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 34px rgba(6, 182, 212, 0.25);
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.3);
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 34px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

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

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

.content-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px;
}

.tinted-blue,
.tinted-gold {
  max-width: none;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.tinted-blue > *,
.tinted-gold > * {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.tinted-gold {
  background: linear-gradient(135deg, #fff7ed, #fefce8);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.section-heading h2 {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.text-link {
  color: var(--cyan);
  font-weight: 800;
}

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

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

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

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #2563eb);
}

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

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

.play-hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  background: rgba(0, 0, 0, 0.36);
  font-size: 42px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.74);
  font-size: 12px;
  font-weight: 850;
}

.year-badge {
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
}

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

.movie-info {
  padding: 17px;
}

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

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

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

.movie-meta span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--blue);
  background: #eff6ff;
  font-size: 12px;
  font-weight: 750;
}

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.movie-tags span,
.chip-list span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
}

.movie-card-large .movie-poster {
  aspect-ratio: 16 / 9;
}

.movie-card-large .movie-title {
  font-size: 20px;
}

.showcase-stack {
  display: grid;
  gap: 42px;
}

.category-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.category-title-row h3 {
  margin: 0;
  font-size: 25px;
}

.category-title-row a {
  color: var(--cyan);
  font-weight: 800;
}

.page-main,
.detail-main {
  min-height: 60vh;
}

.page-hero {
  color: white;
  background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.36), transparent 36%), linear-gradient(135deg, #1d4ed8, #0891b2 60%, #0f172a);
}

.compact-hero {
  max-width: 1280px;
  margin: 30px auto 0;
  padding: 58px 24px;
  border-radius: 28px;
  overflow: hidden;
}

.compact-hero > div {
  max-width: 760px;
}

.ranking-hero {
  background: radial-gradient(circle at top left, rgba(249, 115, 22, 0.42), transparent 35%), linear-gradient(135deg, #7c2d12, #ea580c 55%, #0f172a);
}

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

.category-box {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 24px;
  color: white;
  background: #0f172a;
  box-shadow: var(--soft-shadow);
}

.category-box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-box:hover img {
  opacity: 0.72;
  transform: scale(1.06);
}

.category-box span {
  position: absolute;
  inset: auto 22px 22px;
  z-index: 2;
}

.category-box strong,
.category-box em {
  display: block;
}

.category-box strong {
  margin-bottom: 8px;
  font-size: 25px;
}

.category-box em {
  color: rgba(255, 255, 255, 0.82);
  font-style: normal;
  line-height: 1.55;
}

.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
  box-shadow: var(--soft-shadow);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-button {
  border: 0;
  cursor: pointer;
  padding: 10px 16px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-weight: 800;
}

.filter-button.active,
.filter-button:hover {
  color: white;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.inline-search {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
}

.inline-search input {
  width: min(320px, 70vw);
  padding: 12px 16px;
  border-radius: 999px;
  color: var(--ink);
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px var(--line);
}

.empty-result {
  display: none;
  margin: 28px 0 0;
  padding: 28px;
  border-radius: 20px;
  color: var(--muted);
  background: white;
  text-align: center;
  box-shadow: var(--soft-shadow);
}

.empty-result.show {
  display: block;
}

.search-panel {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 24px;
  background: white;
  box-shadow: var(--soft-shadow);
}

.search-panel input {
  flex: 1;
  padding: 14px 18px;
  border-radius: 999px;
  color: var(--ink);
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px var(--line);
}

.search-panel button {
  color: white;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.detail-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 56px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.85fr);
  gap: 30px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  cursor: pointer;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.72));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-size: 38px;
  box-shadow: 0 16px 34px rgba(6, 182, 212, 0.28);
}

.player-overlay strong {
  font-size: 22px;
}

.player-loading {
  position: absolute;
  top: 18px;
  right: 18px;
  display: none;
  padding: 8px 12px;
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.55);
  font-size: 13px;
  font-weight: 800;
}

.player-loading.show {
  display: block;
}

.player-controls {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.player-card:hover .player-controls,
.player-card:focus-within .player-controls {
  opacity: 1;
}

.player-controls button {
  border: 0;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-weight: 800;
}

.detail-card,
.side-sticky {
  margin-top: 22px;
  padding: 26px;
  border-radius: 24px;
  background: white;
  box-shadow: var(--soft-shadow);
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.16;
}

.detail-card .detail-meta {
  margin-bottom: 20px;
}

.detail-card .detail-meta span,
.detail-card .detail-meta a {
  color: var(--blue);
  background: #eff6ff;
}

.one-line {
  margin: 0 0 20px;
  color: #475569;
  font-size: 18px;
  line-height: 1.7;
}

.detail-card section {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

.detail-card h2,
.detail-side h2 {
  margin: 0 0 14px;
  font-size: 23px;
}

.detail-card p {
  margin: 0;
  color: #334155;
  line-height: 1.85;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-side {
  min-width: 0;
}

.side-sticky {
  position: sticky;
  top: 92px;
  margin-top: 0;
}

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

.side-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 14px;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.side-card:hover {
  background: #eff6ff;
  transform: translateX(3px);
}

.side-card img {
  width: 118px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
}

.side-card strong {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.side-card em {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 28px;
}

.footer-logo .brand-mark {
  color: #0891b2;
}

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

.footer-links {
  display: grid;
  align-content: start;
  gap: 12px;
}

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

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

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

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

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

  .side-sticky {
    position: static;
  }
}

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

  .mobile-menu-button {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

  .header-inner {
    height: 64px;
  }

  .hero {
    height: 76vh;
    min-height: 560px;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.86));
  }

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

  .hero-dots {
    left: 20px;
    right: auto;
  }

  .movie-grid,
  .category-grid,
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .section-heading,
  .filter-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .compact-hero {
    margin: 18px 14px 0;
  }
}

@media (max-width: 560px) {
  .brand-name {
    font-size: 18px;
  }

  .content-section {
    padding: 38px 16px;
  }

  .movie-grid,
  .category-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .search-panel {
    flex-direction: column;
  }

  .detail-layout {
    padding: 20px 14px 40px;
  }

  .detail-card,
  .side-sticky {
    padding: 20px;
  }

  .side-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .side-card img {
    width: 96px;
    height: 66px;
  }
}
