:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #eff6ff;
  --text: #111827;
  --muted: #667085;
  --line: #e5e7eb;
  --blue: #2563eb;
  --blue-dark: #1e3a8a;
  --cyan: #06b6d4;
  --teal: #14b8a6;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.navbar {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

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

.brand-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links > a,
.nav-dropdown > a {
  padding: 10px 14px;
  border-radius: 12px;
  color: #374151;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-links > a:hover,
.nav-dropdown > a:hover {
  color: var(--blue);
  background: #eff6ff;
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 180px;
  padding: 10px;
  display: none;
  grid-template-columns: 1fr;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.dropdown-panel a {
  padding: 9px 12px;
  border-radius: 10px;
  color: #475467;
}

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

.nav-dropdown:hover .dropdown-panel {
  display: grid;
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #111827;
  border-radius: 999px;
}

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(30, 58, 138, 0.92), rgba(14, 116, 144, 0.72), rgba(15, 23, 42, 0.2));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  max-width: 760px;
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 800;
}

.hero-content h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 6vw, 66px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.hero-content h2 {
  margin: 0 0 18px;
  font-size: clamp(26px, 4vw, 44px);
  color: #a5f3fc;
}

.hero-content p {
  margin: 0 0 30px;
  max-width: 650px;
  color: #eff6ff;
  font-size: clamp(17px, 2vw, 21px);
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 14px;
  font-weight: 900;
  transition: 0.2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.35);
}

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

.ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(12px);
}

.ghost-button.dark {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.82);
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: #fff;
}

.stats-section {
  padding: 34px 0;
  background: #fff;
}

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

.stat-card {
  padding: 28px 18px;
  border-radius: 22px;
  text-align: center;
  background: linear-gradient(135deg, #f8fafc, #ffffff);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: 0.2s ease;
}

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

.stat-card strong {
  display: block;
  font-size: 34px;
  color: var(--blue);
}

.stat-card span {
  color: var(--muted);
  font-weight: 800;
}

.content-section {
  padding: 72px 0;
}

.soft-blue {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.soft-gray {
  background: #f8fafc;
}

.white-section {
  background: #fff;
}

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

.section-heading h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.2;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.section-more {
  color: var(--blue);
  font-weight: 900;
}

.section-more span {
  display: inline-block;
  transition: transform 0.2s ease;
}

.section-more:hover span {
  transform: translateX(4px);
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #1d4ed8, #06b6d4);
}

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

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

.image-missing {
  opacity: 0;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.72), transparent 60%);
}

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

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

.year-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 9px;
  color: #fff;
  background: rgba(37, 99, 235, 0.88);
  font-size: 12px;
  font-weight: 900;
}

.movie-info {
  padding: 18px;
}

.movie-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.movie-meta-row span,
.movie-meta-row strong {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

.movie-meta-row strong {
  color: #b45309;
  background: #fef3c7;
}

.movie-info h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

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

.movie-info p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-list span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 12px;
  font-weight: 800;
}

.large-tags span {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.two-column-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
  align-items: start;
}

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

.category-tile,
.category-overview-card {
  display: block;
  padding: 24px;
  min-height: 170px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.18);
  transition: 0.2s ease;
}

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

.category-tile span,
.category-overview-card h2 {
  display: block;
  font-size: 24px;
  font-weight: 950;
}

.category-tile strong,
.category-count {
  display: inline-flex;
  margin: 12px 0;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.category-tile p,
.category-overview-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.from-indigo {
  background: linear-gradient(135deg, #4f46e5, #2563eb);
}

.from-purple {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
}

.from-amber {
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

.from-cyan {
  background: linear-gradient(135deg, #06b6d4, #14b8a6);
}

.from-rose {
  background: linear-gradient(135deg, #f43f5e, #ec4899);
}

.from-green {
  background: linear-gradient(135deg, #10b981, #059669);
}

.from-slate {
  background: linear-gradient(135deg, #475569, #111827);
}

.ranking-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
  border-radius: 24px;
  background: #0f172a;
  color: #fff;
  box-shadow: var(--shadow);
}

.ranking-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.ranking-head h2 {
  margin: 0;
}

.ranking-head a {
  color: #67e8f9;
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 1fr 48px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.rank-item:hover {
  background: rgba(255, 255, 255, 0.12);
}

.rank-num {
  color: #67e8f9;
  font-weight: 950;
}

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

.rank-score {
  color: #fde68a;
  font-weight: 950;
  text-align: right;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.35), transparent 32%), linear-gradient(135deg, #1e3a8a, #0f172a);
}

.compact-hero {
  padding: 86px 0;
}

.category-hero {
  padding: 74px 0;
}

.page-hero h1,
.detail-intro h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.page-hero p,
.detail-intro p {
  max-width: 780px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  color: #bae6fd;
  font-size: 14px;
  font-weight: 800;
}

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

.filter-bar,
.search-console {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.filter-bar input,
.search-console input {
  min-width: min(420px, 100%);
  flex: 1;
}

.filter-bar input,
.filter-bar select,
.search-console input,
.search-console select {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: #f8fafc;
}

.filter-bar input:focus,
.filter-bar select:focus,
.search-console input:focus,
.search-console select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.filter-count,
.search-tip {
  color: var(--muted);
  font-weight: 800;
}

.category-overview-card {
  color: #fff;
}

.category-overview-link {
  display: block;
}

.category-overview-card ul {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.category-overview-card li a {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.category-overview-card li a:hover {
  background: rgba(255, 255, 255, 0.2);
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 96px 62px 1fr 70px;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.ranking-cover {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.ranking-number {
  color: var(--blue);
  font-size: 26px;
  font-weight: 950;
}

.ranking-info h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.ranking-info p {
  margin: 0 0 8px;
  color: var(--muted);
}

.ranking-score {
  color: #b45309;
  font-size: 22px;
}

.detail-hero {
  min-height: 560px;
  padding: 74px 0;
  background-image: var(--poster);
  background-size: cover;
  background-position: center;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 58, 138, 0.78), rgba(15, 23, 42, 0.45));
  backdrop-filter: blur(8px);
}

.detail-hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 8px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: var(--shadow);
}

.detail-intro p {
  margin-bottom: 20px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  align-items: start;
}

.player-card,
.detail-meta-card,
.prose-card {
  padding: 24px;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: #020617;
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.big-play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78px;
  height: 78px;
  border: 0;
  border-radius: 999px;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.94);
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.25);
  font-size: 26px;
  transition: 0.2s ease;
}

.big-play-button:hover {
  transform: translate(-50%, -50%) scale(1.08);
}

.player-status {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 14px;
}

.player-box.is-playing .big-play-button,
.player-box.is-playing .player-status {
  opacity: 0;
  pointer-events: none;
}

.player-card h2,
.detail-meta-card h2,
.prose-card h2 {
  margin: 22px 0 12px;
}

.detail-meta-card h2:first-child,
.prose-card h2:first-child {
  margin-top: 0;
}

.detail-meta-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.detail-meta-card li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.detail-meta-card span {
  color: var(--muted);
}

.detail-meta-card strong {
  text-align: right;
}

.detail-text-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.prose-card p {
  margin: 0;
  color: #334155;
  font-size: 16px;
}

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

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0 34px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  margin-bottom: 12px;
  color: #fff;
  font-size: 20px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 17px;
}

.site-footer p {
  margin: 0;
  color: #94a3b8;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 14px;
}

.hidden-by-filter {
  display: none !important;
}

@media (max-width: 980px) {
  .mobile-menu-button {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .dropdown-panel {
    position: static;
    display: grid;
    margin-top: 8px;
    box-shadow: none;
  }

  .hero-carousel {
    height: 560px;
  }

  .stats-grid,
  .movie-grid,
  .featured-grid,
  .catalog-grid,
  .footer-grid,
  .category-grid,
  .category-overview-grid,
  .two-column-layout,
  .detail-layout,
  .detail-text-grid,
  .detail-hero-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ranking-panel {
    position: static;
  }

  .detail-hero-grid {
    align-items: start;
  }

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

@media (max-width: 640px) {
  .navbar {
    height: 66px;
  }

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

  .brand-icon {
    width: 36px;
    height: 36px;
  }

  .nav-links {
    top: 66px;
  }

  .hero-carousel {
    height: 600px;
  }

  .hero-content {
    padding-top: 42px;
  }

  .hero-actions,
  .section-heading,
  .filter-bar,
  .search-console {
    align-items: stretch;
    flex-direction: column;
  }

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

  .stats-grid,
  .movie-grid,
  .featured-grid,
  .catalog-grid,
  .footer-grid,
  .category-grid,
  .category-overview-grid,
  .two-column-layout,
  .detail-layout,
  .detail-text-grid,
  .detail-hero-grid {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    grid-template-columns: 82px 1fr;
  }

  .ranking-number,
  .ranking-score {
    grid-column: auto;
  }

  .content-section {
    padding: 50px 0;
  }

  .compact-hero,
  .category-hero,
  .detail-hero {
    padding: 56px 0;
  }
}
