:root {
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;
  --violet-600: #7c3aed;
  --rose-500: #f43f5e;
  --amber-400: #fbbf24;
  --slate-950: #020617;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --white: #ffffff;
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.14);
  --shadow-xl: 0 22px 50px rgba(15, 23, 42, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--sky-500), var(--blue-500), var(--cyan-500));
  box-shadow: 0 8px 28px rgba(2, 132, 199, 0.24);
}

.nav-wrap {
  max-width: 1200px;
  height: 68px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 800;
  letter-spacing: 0.01em;
  flex: 0 0 auto;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 22px rgba(2, 132, 199, 0.28);
  font-size: 22px;
  transition: transform 0.22s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-4deg);
}

.brand-text {
  font-size: 20px;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.94);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff7bc;
}

.nav-drop {
  position: relative;
}

.drop-panel {
  position: absolute;
  top: 44px;
  left: 0;
  width: 190px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.18s ease;
}

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

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

.drop-panel a:hover {
  background: var(--sky-100);
  color: var(--sky-600);
}

.nav-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  width: min(360px, 32vw);
  position: relative;
}

.nav-search input,
.mobile-search input,
.search-box input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(14, 165, 233, 0.28);
  outline: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--gray-800);
  padding: 11px 90px 11px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.nav-search input:focus,
.mobile-search input:focus,
.search-box input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--amber-400);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.25);
}

.nav-search button,
.mobile-search button,
.search-box button {
  position: absolute;
  right: 4px;
  top: 4px;
  bottom: 4px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  color: var(--white);
  background: linear-gradient(90deg, var(--sky-500), var(--blue-600));
  cursor: pointer;
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 22px;
}

.mobile-panel {
  display: none;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

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

.mobile-search {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 18px 6px;
  position: relative;
}

.mobile-links {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6px 18px 18px;
  display: grid;
  gap: 8px;
}

.mobile-links a {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--gray-700);
  background: var(--gray-50);
}

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

.main-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 34px 18px 60px;
}

.hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: linear-gradient(120deg, #0891b2, #2563eb 52%, #06b6d4);
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90px;
  background: linear-gradient(0deg, var(--sky-50), rgba(240, 249, 255, 0));
  pointer-events: none;
}

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

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.24;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05) blur(1px);
  transform: scale(1.04);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 255, 255, 0.24), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.72), rgba(14, 165, 233, 0.26), rgba(37, 99, 235, 0.18));
}

.hero-inner {
  position: relative;
  max-width: 1200px;
  min-height: 560px;
  margin: 0 auto;
  padding: 72px 18px 98px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.82fr);
  gap: 42px;
  align-items: center;
  color: var(--white);
  z-index: 2;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: #fff7bc;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.hero h2 {
  margin: 0 0 16px;
  font-size: clamp(24px, 3.6vw, 40px);
  line-height: 1.15;
}

.hero p {
  max-width: 720px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: var(--blue-600);
  background: var(--white);
  box-shadow: 0 16px 35px rgba(255, 255, 255, 0.18);
}

.btn-ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags a,
.hero-tags span {
  padding: 7px 11px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.15);
}

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  transform: rotate(1.5deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.hero-slide.is-active .hero-poster img {
  transform: scale(1.04);
}

.hero-poster-info {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  border-radius: 20px;
  padding: 16px;
  color: var(--white);
  background: rgba(2, 6, 23, 0.46);
  backdrop-filter: blur(10px);
}

.hero-poster-info strong {
  display: block;
  font-size: 18px;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 4;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-dot,
.hero-arrow {
  border: 0;
  cursor: pointer;
  color: var(--white);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  padding: 0;
}

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

.hero-arrow {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  font-size: 22px;
}

.section {
  margin: 0 0 56px;
}

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

.section-title {
  margin: 0;
  color: var(--gray-800);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--gray-500);
}

.more-link {
  color: var(--sky-600);
  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;
  overflow: hidden;
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--gray-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.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.64), rgba(2, 6, 23, 0.02) 62%);
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.9);
  color: var(--blue-600);
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transition: all 0.22s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.heat-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(2, 6, 23, 0.58);
  backdrop-filter: blur(6px);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 48px;
  overflow: hidden;
  color: var(--gray-800);
  font-weight: 800;
  line-height: 1.45;
}

.movie-title:hover {
  color: var(--blue-600);
}

.movie-card-body p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
  margin: 8px 0 12px;
  color: var(--gray-500);
  font-size: 14px;
}

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--gray-500);
  font-size: 13px;
}

.movie-meta span,
.detail-meta span {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--gray-100);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span,
.tag-row a {
  padding: 5px 8px;
  border-radius: 10px;
  color: var(--sky-600);
  background: var(--sky-50);
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  position: relative;
  min-height: 176px;
  overflow: hidden;
  border-radius: 24px;
  padding: 22px;
  color: var(--white);
  background: linear-gradient(135deg, var(--sky-500), var(--blue-600));
  box-shadow: var(--shadow-lg);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -36px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.category-card h3 {
  position: relative;
  margin: 0 0 10px;
  font-size: 24px;
  z-index: 1;
}

.category-card p {
  position: relative;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  z-index: 1;
}

.tone-rose { background: linear-gradient(135deg, #fb7185, #e11d48); }
.tone-violet { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.tone-pink { background: linear-gradient(135deg, #f472b6, #db2777); }
.tone-cyan { background: linear-gradient(135deg, #22d3ee, #0284c7); }
.tone-green { background: linear-gradient(135deg, #34d399, #059669); }
.tone-amber { background: linear-gradient(135deg, #fbbf24, #f97316); }
.tone-sky { background: linear-gradient(135deg, #38bdf8, #2563eb); }
.tone-red { background: linear-gradient(135deg, #f87171, #dc2626); }
.tone-indigo { background: linear-gradient(135deg, #818cf8, #4f46e5); }
.tone-orange { background: linear-gradient(135deg, #fb923c, #c2410c); }
.tone-slate { background: linear-gradient(135deg, #64748b, #0f172a); }

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 160px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.rank-num {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-400), #f97316);
  font-weight: 900;
  font-size: 20px;
}

.rank-cover {
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 16 / 9;
  background: var(--gray-100);
}

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

.rank-copy h3 {
  margin: 0 0 6px;
}

.rank-copy p {
  margin: 0;
  color: var(--gray-500);
}

.rank-heat {
  color: var(--sky-600);
  font-weight: 900;
  white-space: nowrap;
}

.page-hero {
  padding: 62px 0;
  color: var(--white);
  background:
    radial-gradient(circle at 80% 18%, rgba(255, 255, 255, 0.26), transparent 26%),
    linear-gradient(120deg, var(--sky-500), var(--blue-600), var(--cyan-500));
}

.page-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 18px;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.12;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.breadcrumb {
  margin-bottom: 18px;
  color: var(--gray-500);
  font-size: 14px;
}

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

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.filter-bar input,
.filter-bar select {
  padding-right: 16px;
}

.search-box {
  position: relative;
  max-width: 720px;
  margin: 24px 0 0;
}

.search-results-title {
  margin: 0 0 18px;
  color: var(--gray-700);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.detail-main,
.detail-side,
.player-panel {
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.player-panel {
  overflow: hidden;
  margin-bottom: 22px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000;
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--white);
  border: 0;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.2));
}

.player-shell.is-playing .play-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-cover-icon {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--blue-600);
  background: rgba(255, 255, 255, 0.92);
  font-size: 34px;
  box-shadow: var(--shadow-lg);
}

.play-cover strong {
  font-size: 22px;
}

.detail-main {
  padding: 24px;
}

.detail-main h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
}

.detail-section {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--gray-200);
}

.detail-section h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-section p {
  margin: 0;
  color: var(--gray-700);
  white-space: pre-line;
}

.detail-side {
  position: sticky;
  top: 92px;
  padding: 18px;
}

.detail-side h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.side-grid .movie-card {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  border-radius: 18px;
}

.side-grid .poster-link {
  height: 100%;
  aspect-ratio: auto;
}

.side-grid .movie-card-body {
  padding: 12px;
}

.side-grid .movie-title {
  min-height: auto;
  font-size: 14px;
}

.side-grid .movie-card-body p,
.side-grid .tag-row {
  display: none;
}

.site-footer {
  margin-top: 48px;
  color: rgba(255, 255, 255, 0.88);
  background: linear-gradient(135deg, #0f172a, #075985 70%, #0891b2);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
  gap: 28px;
}

.footer-inner strong {
  color: var(--white);
  font-size: 20px;
}

.footer-inner p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.7);
}

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.hidden {
  display: none !important;
}

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

  .hero-inner {
    grid-template-columns: 1fr;
    padding-top: 48px;
  }

  .hero-poster {
    max-width: 620px;
    transform: none;
  }

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

  .detail-side {
    position: static;
  }
}

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

  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-wrap {
    height: 64px;
  }

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

  .rank-item {
    grid-template-columns: 42px 112px minmax(0, 1fr);
  }

  .rank-heat {
    grid-column: 3;
  }

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

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

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

  .hero,
  .hero-inner {
    min-height: 690px;
  }

  .hero h1 {
    font-size: 40px;
  }

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

  .hero-controls {
    bottom: 18px;
  }

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

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

  .rank-item {
    grid-template-columns: 40px 96px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .rank-copy p {
    display: none;
  }

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