* {
  box-sizing: border-box;
}

:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-400: #38bdf8;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --primary-800: #075985;
  --accent-50: #ecfdf5;
  --accent-600: #059669;
  --secondary-100: #fde68a;
  --secondary-600: #b45309;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.14);
  --shadow-lg: 0 30px 80px rgba(15, 23, 42, 0.24);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(8px);
}

.nav-wrap {
  width: min(1280px, calc(100% - 32px));
  height: 66px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
  box-shadow: 0 10px 28px rgba(2, 132, 199, 0.28);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--gray-700);
  font-weight: 600;
  white-space: nowrap;
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover,
.mobile-menu a:hover,
.site-logo:hover {
  color: var(--primary-700);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--primary-50);
  cursor: pointer;
}

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

.mobile-menu {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.mobile-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--gray-700);
  font-weight: 600;
}

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

.page-main {
  padding-top: 66px;
  min-height: 72vh;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--gray-900);
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 32%, rgba(14, 165, 233, 0.24), transparent 30%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.52) 47%, rgba(0, 0, 0, 0.1) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: var(--white);
}

.hero-content h1 {
  max-width: 760px;
  margin: 12px 0 20px;
  font-size: clamp(2.5rem, 7vw, 5.6rem);
  line-height: 1.04;
  font-weight: 900;
  text-shadow: 0 20px 70px rgba(0, 0, 0, 0.55);
}

.hero-desc {
  max-width: 680px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
}

.eyebrow {
  margin: 0;
  color: var(--primary-400);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--primary-700);
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(224, 242, 254, 0.92);
  color: var(--primary-800);
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  backdrop-filter: blur(4px);
}

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

.small-actions {
  margin-top: 20px;
}

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

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

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
  box-shadow: 0 18px 36px rgba(2, 132, 199, 0.32);
}

.btn-glass {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
}

.btn-ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

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

.content-section {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 62px 0;
}

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

.section-head h2 {
  margin: 0 0 6px;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.2;
}

.section-head p {
  margin: 0;
  color: var(--gray-600);
}

.section-more,
.text-link,
.card-category {
  color: var(--primary-700);
  font-weight: 800;
}

.search-band {
  padding-top: 42px;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 24px;
  align-items: center;
  padding: 32px;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
  box-shadow: var(--shadow-sm);
}

.search-panel h2 {
  margin: 6px 0 8px;
  font-size: 2rem;
}

.search-panel p {
  margin: 0;
  color: var(--gray-600);
}

.home-search,
.filter-panel {
  display: flex;
  gap: 10px;
}

.home-search input,
.filter-panel input,
.filter-panel select {
  min-height: 48px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  background: var(--white);
  padding: 0 14px;
  outline: none;
}

.home-search input,
.filter-panel input {
  flex: 1;
  min-width: 0;
}

.home-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.home-search button {
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  color: var(--white);
  background: var(--primary-600);
  font-weight: 800;
  padding: 0 18px;
  cursor: pointer;
}

.filter-panel {
  position: sticky;
  top: 80px;
  z-index: 8;
  flex-wrap: wrap;
  padding: 14px;
  margin-bottom: 26px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-100), var(--accent-50));
}

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

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

.poster-year {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(17, 24, 39, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
  backdrop-filter: blur(4px);
}

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

.card-meta {
  margin: 0 0 6px;
  color: var(--gray-500);
  font-size: 0.82rem;
  font-weight: 700;
}

.card-title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  line-height: 1.35;
}

.card-title a:hover,
.rank-card h2 a:hover {
  color: var(--primary-700);
}

.card-desc {
  min-height: 3.2em;
  margin: 0 0 12px;
  color: var(--gray-600);
  font-size: 0.92rem;
}

.card-category {
  display: inline-flex;
  margin-top: 12px;
  font-size: 0.9rem;
}

.category-section {
  padding-top: 30px;
}

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

.category-tile {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 26px;
  color: var(--gray-900);
  background: linear-gradient(135deg, var(--white), var(--primary-50));
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-tile strong {
  font-size: 1.35rem;
}

.category-tile span {
  margin: 12px 0;
  color: var(--gray-600);
}

.category-tile em {
  color: var(--primary-700);
  font-style: normal;
  font-weight: 800;
}

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

.highlight-card {
  padding: 28px;
  border-radius: 30px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.soft-card {
  background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
}

.rank-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.rank-list a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: var(--gray-50);
}

.rank-list a:hover {
  background: var(--primary-50);
}

.rank-no {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: var(--primary-600);
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  color: var(--gray-500);
  font-size: 0.84rem;
}

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

.page-hero {
  min-height: 330px;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 85% 20%, rgba(5, 150, 105, 0.24), transparent 30%),
    linear-gradient(135deg, var(--gray-900), var(--primary-800));
  color: var(--white);
}

.page-hero > div {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.page-hero h1 {
  max-width: 820px;
  margin: 12px 0 16px;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1.08;
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
}

.compact-hero {
  min-height: 300px;
}

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

.category-card-large {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
  border-radius: 28px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.category-cover-stack {
  position: relative;
  min-height: 260px;
  background: var(--gray-900);
}

.category-cover-stack img {
  position: absolute;
  width: 46%;
  height: 58%;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.category-cover-stack img:nth-child(1) {
  left: 16px;
  top: 20px;
  z-index: 4;
}

.category-cover-stack img:nth-child(2) {
  right: 16px;
  top: 48px;
  z-index: 3;
}

.category-cover-stack img:nth-child(3) {
  left: 44px;
  bottom: 22px;
  z-index: 2;
}

.category-cover-stack img:nth-child(4) {
  right: 42px;
  bottom: 18px;
  z-index: 1;
}

.category-card-body {
  padding: 28px;
}

.category-card-body h2 {
  margin: 0 0 10px;
  font-size: 1.55rem;
}

.category-card-body p {
  margin: 0 0 14px;
  color: var(--gray-600);
}

.category-card-body span {
  display: block;
  margin-bottom: 18px;
  color: var(--gray-500);
}

.empty-state {
  padding: 30px;
  border-radius: 20px;
  background: var(--primary-50);
  color: var(--primary-800);
  font-weight: 800;
  text-align: center;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 18px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.rank-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  background: var(--gray-100);
}

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

.rank-poster span {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: rgba(2, 132, 199, 0.92);
  font-weight: 900;
}

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

.rank-card p {
  margin: 0 0 12px;
  color: var(--gray-600);
}

.inline-tags {
  gap: 6px;
}

.breadcrumb {
  width: min(1280px, calc(100% - 32px));
  margin: 26px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--gray-500);
  font-size: 0.92rem;
}

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

.detail-main {
  background:
    radial-gradient(circle at 85% 120px, rgba(14, 165, 233, 0.18), transparent 24%),
    linear-gradient(180deg, var(--gray-50), var(--white));
}

.detail-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 34px;
  border-radius: 34px;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  background: var(--gray-100);
  box-shadow: var(--shadow-md);
}

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

.detail-info h1 {
  margin: 10px 0 14px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.1;
}

.detail-one-line {
  margin: 0 0 22px;
  color: var(--gray-600);
  font-size: 1.05rem;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.detail-meta-grid span {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--gray-50);
  color: var(--gray-700);
}

.detail-meta-grid b {
  color: var(--primary-700);
}

.detail-tags {
  margin-bottom: 12px;
}

.player-section,
.detail-content,
.related-section {
  width: min(1280px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.player-section {
  padding: 44px 0 26px;
}

.player-section h2 {
  margin: 0 0 16px;
  font-size: 1.8rem;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow-lg);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.15), rgba(17, 24, 39, 0.72));
  cursor: pointer;
}

.play-overlay.is-hidden {
  display: none;
}

.play-circle {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--primary-700);
  background: var(--white);
  font-size: 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 28px 0 0;
}

.text-panel {
  padding: 28px;
  border-radius: 26px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.text-panel h2 {
  margin: 0 0 12px;
  font-size: 1.45rem;
}

.text-panel p {
  margin: 0;
  color: var(--gray-700);
}

.accent-panel {
  background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
}

.site-footer {
  margin-top: 40px;
  color: var(--gray-300);
  background: var(--gray-900);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 42px;
  padding: 48px 0;
}

.footer-logo {
  color: var(--white);
}

.footer-inner p {
  max-width: 520px;
  color: var(--gray-400);
}

.footer-inner h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 1.08rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: var(--gray-400);
}

.footer-links a:hover {
  color: var(--primary-400);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 0;
  color: var(--gray-500);
  text-align: center;
}

@media (max-width: 1180px) {
  .nav-links {
    gap: 14px;
    font-size: 0.92rem;
  }

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

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

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: 610px;
  }

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 94px;
  }

  .search-panel,
  .highlight-layout,
  .detail-hero,
  .detail-content,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    padding: 20px;
  }

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

  .category-card-large {
    grid-template-columns: 1fr;
  }

  .category-cover-stack {
    min-height: 300px;
  }
}

@media (max-width: 640px) {
  .content-section {
    padding: 42px 0;
  }

  .hero-actions,
  .home-search,
  .filter-panel {
    flex-direction: column;
  }

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

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

  .card-desc {
    min-height: auto;
  }

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

  .rank-meta {
    display: none;
  }

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

  .footer-inner {
    gap: 24px;
  }
}

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