:root {
  --page-bg: #f8fafc;
  --card-bg: #ffffff;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --orange-500: #f97316;
  --rose-500: #f43f5e;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.10);
  --shadow-xl: 0 25px 60px rgba(15, 23, 42, 0.20);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98));
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.24);
  backdrop-filter: blur(10px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald-500), var(--teal-600));
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.24);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 24px;
  letter-spacing: -0.04em;
}

.brand-text small {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: #cbd5e1;
  font-weight: 600;
  transition: color 0.2s ease;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

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

.mobile-nav-link {
  padding: 10px 0;
  color: #cbd5e1;
  font-weight: 600;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #ffffff;
  background: var(--slate-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-slide img,
.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #0d9488);
}

.hero-shade,
.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.18)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.05) 45%);
}

.hero-content {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(720px, 100%);
  padding-top: 36px;
}

.hero-copy h1,
.detail-info h1,
.listing-hero h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 680px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: 18px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(16, 185, 129, 0.92);
  font-size: 12px;
  font-weight: 700;
}

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

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

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald-500), var(--teal-600));
  box-shadow: 0 16px 34px rgba(16, 185, 129, 0.28);
}

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

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}

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

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

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

.content-section {
  margin-top: 72px;
}

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

.section-title > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title span {
  font-size: 28px;
}

.section-title h2 {
  margin: 0;
  color: var(--gray-800);
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.04em;
}

.section-more {
  color: var(--emerald-600);
  font-weight: 800;
}

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

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

.movie-card,
.compact-card,
.rank-row,
.detail-article,
.side-panel {
  background: var(--card-bg);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.poster-wrap img,
.compact-poster img,
.rank-poster img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.play-mark {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
}

.card-body {
  padding: 18px;
}

.card-body h2,
.compact-title,
.rank-row h2,
.detail-article h2,
.side-panel h2 {
  margin: 0;
  color: var(--gray-800);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.35;
}

.card-body h2 a:hover,
.compact-title:hover,
.rank-row h2 a:hover,
.side-panel a:hover {
  color: var(--emerald-600);
}

.card-desc,
.compact-card p,
.rank-row p,
.detail-article p,
.side-panel a,
.site-footer p {
  color: var(--slate-600);
}

.card-desc {
  display: -webkit-box;
  margin: 10px 0 0;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.featured-card .poster-wrap {
  aspect-ratio: 16 / 9;
}

.compact-card {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 16px;
  padding: 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.compact-poster {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a, #0d9488);
}

.compact-meta {
  margin: 5px 0 8px;
  color: var(--slate-500);
  font-size: 13px;
}

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

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

.year-card {
  display: grid;
  gap: 6px;
  padding: 22px 16px;
  border-radius: 16px;
  text-align: center;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.year-card strong {
  color: var(--emerald-600);
  font-size: 28px;
  line-height: 1;
}

.year-card span {
  color: var(--slate-500);
  font-size: 13px;
}

.listing-hero {
  color: #ffffff;
  padding: 80px 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(20, 184, 166, 0.45), transparent 28%),
    linear-gradient(135deg, var(--slate-900), var(--slate-800));
}

.accent-hero {
  background:
    radial-gradient(circle at 85% 18%, rgba(52, 211, 153, 0.45), transparent 30%),
    linear-gradient(135deg, var(--emerald-700), var(--teal-600));
}

.ranking-hero {
  background:
    radial-gradient(circle at 70% 30%, rgba(249, 115, 22, 0.48), transparent 32%),
    linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--emerald-400);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.listing-hero p {
  max-width: 680px;
  margin: 16px 0 0;
  color: #dbeafe;
  font-size: 18px;
}

.search-panel {
  width: min(560px, 100%);
  margin-top: 28px;
}

.page-search {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 16px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  backdrop-filter: blur(8px);
}

.page-search::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}

.pagination a,
.pagination strong,
.pagination span {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  font-weight: 800;
}

.pagination strong {
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald-500), var(--teal-600));
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 120px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: var(--slate-700);
  background: var(--gray-100);
  font-size: 20px;
  font-weight: 900;
}

.top-rank .rank-number {
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange-500), var(--rose-500));
}

.rank-poster {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a, #0d9488);
}

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  color: #ffffff;
  background: var(--slate-950);
}

.detail-bg {
  position: absolute;
  inset: 0;
  filter: blur(1px);
  transform: scale(1.03);
}

.detail-hero-inner {
  position: relative;
  min-height: 560px;
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 44px;
  align-items: center;
  padding: 56px 0;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.52);
  background: linear-gradient(135deg, #0f172a, #0d9488);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.detail-one-line {
  max-width: 820px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: 18px;
}

.player-section {
  margin-top: -70px;
  position: relative;
  z-index: 5;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow-xl);
  aspect-ratio: 16 / 9;
}

.main-video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 24px;
  border: 0;
  color: #ffffff;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.75), rgba(2, 6, 23, 0.32)),
    transparent;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.big-play {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald-500), var(--teal-600));
  box-shadow: 0 18px 45px rgba(16, 185, 129, 0.32);
  font-size: 32px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  margin-top: 44px;
}

.detail-article,
.side-panel {
  padding: 28px;
}

.detail-article h2,
.side-panel h2 {
  margin-top: 28px;
}

.detail-article h2:first-child,
.side-panel h2:first-child {
  margin-top: 0;
}

.detail-article p {
  margin: 12px 0 0;
  font-size: 16px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.tag-cloud span {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--emerald-700);
  background: #d1fae5;
  font-size: 13px;
  font-weight: 700;
}

.side-panel {
  align-self: start;
  display: grid;
  gap: 12px;
}

.side-panel a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-200);
  font-weight: 700;
}

.site-footer {
  margin-top: 86px;
  padding: 54px 0 24px;
  color: #cbd5e1;
  background: linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr;
  gap: 28px;
}

.footer-grid h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 16px;
}

.footer-grid a {
  display: block;
  margin-top: 8px;
  color: #cbd5e1;
}

.footer-grid a:hover {
  color: var(--emerald-400);
}

.footer-brand {
  color: #ffffff;
  font-size: 26px;
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.search-hidden {
  display: none !important;
}

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

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

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

  .detail-poster {
    width: min(320px, 100%);
  }
}

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .brand-text strong {
    font-size: 20px;
  }

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

  .movie-grid,
  .featured-grid,
  .recent-list {
    grid-template-columns: 1fr;
  }

  .compact-card,
  .rank-row {
    grid-template-columns: 96px 1fr;
  }

  .rank-number {
    grid-column: 1 / -1;
  }

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

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

  .detail-hero-inner {
    gap: 28px;
  }

  .listing-hero {
    padding: 60px 0;
  }
}

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

  .hero-copy h1,
  .detail-info h1,
  .listing-hero h1 {
    font-size: 36px;
  }

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

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .compact-card,
  .rank-row {
    grid-template-columns: 1fr;
  }
}
