:root {
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --accent: #f97316;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --card: #ffffff;
  --soft: #f8fafc;
  --dark: #020617;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--soft);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

img {
  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: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(2, 132, 199, 0.28);
}

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

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

.nav-link {
  padding: 10px 15px;
  color: #334155;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-dark);
  background: #e0f2fe;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 0;
  background: #eff6ff;
  border-radius: 14px;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--primary-dark);
  border-radius: 999px;
}

.hero {
  position: relative;
  min-height: 720px;
  color: #ffffff;
  background: var(--dark);
  overflow: hidden;
}

.hero-stage {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.52fr);
  align-items: center;
  gap: 54px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 72px;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.45;
  pointer-events: none;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.15);
  transform: scale(1.08);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at 24% 25%, rgba(14, 165, 233, 0.38), transparent 32%), linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.66) 48%, rgba(2, 6, 23, 0.32));
  pointer-events: none;
}

.hero-content,
.hero-poster,
.hero-bottom {
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  max-width: 780px;
  margin: 12px 0 18px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 700px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero .eyebrow,
.detail-hero .section-kicker {
  color: #bae6fd;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  color: #075985;
  background: #e0f2fe;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span,
.detail-hero .tag-row span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 20px;
  color: #ffffff;
  background: var(--primary);
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(2, 132, 199, 0.22);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: var(--primary-dark);
  box-shadow: 0 18px 38px rgba(2, 132, 199, 0.3);
}

.btn.ghost {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: none;
}

.btn.ghost.light {
  color: #ffffff;
}

.btn.block {
  width: 100%;
  margin-top: 22px;
}

.btn.small {
  min-height: 36px;
  padding: 8px 14px;
  font-size: 14px;
}

.hero-poster {
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  overflow: hidden;
  transform: rotate(2deg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

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

.hero-bottom {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 20px;
  align-items: center;
  margin-top: -58px;
  padding-bottom: 38px;
}

.hero-search,
.page-search {
  display: flex;
  gap: 10px;
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.hero-search input,
.page-search input {
  min-width: 0;
  flex: 1;
  padding: 0 14px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.hero-search button,
.page-search button {
  padding: 10px 18px;
  color: #ffffff;
  background: var(--primary);
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

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

.hero-thumb {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  cursor: pointer;
  text-align: left;
  backdrop-filter: blur(12px);
}

.hero-thumb.active,
.hero-thumb:hover {
  color: #ffffff;
  background: rgba(2, 132, 199, 0.75);
}

.hero-thumb img {
  width: 46px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
}

.hero-thumb span {
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.section {
  padding: 58px 0;
}

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

.section-heading h2,
.ranking-head h2,
.page-hero h1 {
  margin: 4px 0 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

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

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

.category-card {
  position: relative;
  min-height: 150px;
  padding: 16px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #ffffff;
  background: var(--dark);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
  transition: transform 0.35s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.86));
}

.category-card span {
  position: relative;
  z-index: 1;
  font-size: 18px;
  font-weight: 900;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #e0f2fe, #ffedd5);
}

.poster-img,
.poster-wrap img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 9px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

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

.movie-meta-line,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.movie-meta-line span + span::before,
.detail-meta span + span::before {
  content: "·";
  margin-right: 8px;
  color: #cbd5e1;
}

.movie-card h3 {
  margin: 8px 0 7px;
  font-size: 18px;
  line-height: 1.3;
}

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

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 24px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.rank-item:hover {
  background: #f1f5f9;
}

.rank-num {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--accent);
  border-radius: 12px;
  font-weight: 900;
}

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

.rank-meta {
  grid-column: 2;
  margin-top: -6px;
  color: var(--muted);
  font-size: 13px;
}

.page-hero {
  padding: 64px 0 28px;
}

.page-hero p {
  max-width: 780px;
  color: var(--muted);
  font-size: 18px;
}

.page-search {
  max-width: 680px;
  margin-top: 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

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

.breadcrumb.light,
.breadcrumb.light a {
  color: rgba(255, 255, 255, 0.86);
}

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

.overview-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 26px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.overview-image {
  overflow: hidden;
  border-radius: 20px;
}

.overview-image img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
}

.overview-card h2 {
  margin: 6px 0 8px;
  font-size: 24px;
}

.overview-card p {
  color: var(--muted);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.local-search {
  width: min(420px, 100%);
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  background: #ffffff;
}

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

.filter-buttons button {
  padding: 9px 14px;
  color: #334155;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.filter-buttons button.active,
.filter-buttons button:hover {
  color: #ffffff;
  background: var(--primary);
  border-color: var(--primary);
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 86px 54px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.ranking-cover {
  overflow: hidden;
  border-radius: 16px;
}

.ranking-cover img {
  width: 86px;
  height: 112px;
  object-fit: cover;
}

.ranking-number {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  border-radius: 16px;
  font-size: 20px;
  font-weight: 900;
}

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

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

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

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.42;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.1);
  transform: scale(1.08);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.68) 52%, rgba(2, 6, 23, 0.2));
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  padding: 48px 0 70px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

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

.detail-info h1 {
  margin: 12px 0 16px;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 820px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 20px;
}

.detail-meta {
  margin: 18px 0;
  color: rgba(255, 255, 255, 0.82);
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(2, 132, 199, 0.34), rgba(2, 6, 23, 0.78));
  border: 0;
  cursor: pointer;
}

.player-shell.is-playing .player-cover {
  display: none;
}

.play-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 999px;
  font-size: 30px;
  box-shadow: 0 20px 42px rgba(2, 132, 199, 0.32);
}

.player-cover strong {
  font-size: 24px;
}

.player-cover em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.82);
}

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

.content-card {
  padding: 28px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 26px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

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

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

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

.small-card h3 {
  font-size: 16px;
}

.search-results .movie-grid {
  margin-top: 20px;
}

.empty-state {
  padding: 42px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 26px;
  text-align: center;
}

.site-footer {
  margin-top: 46px;
  padding: 36px 0;
  color: #cbd5e1;
  background: #020617;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  max-width: 720px;
  margin: 8px 0 0;
  color: #94a3b8;
}

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

.footer-links a {
  color: #e0f2fe;
}

@media (max-width: 1080px) {
  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-poster {
    display: none;
  }

  .hero-bottom,
  .two-column {
    grid-template-columns: 1fr;
  }

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

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

  .ranking-panel {
    position: static;
  }
}

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

  .menu-button {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 72px;
    display: none;
    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: grid;
  }

  .nav-link {
    padding: 12px 14px;
  }

  .brand-name {
    font-size: 15px;
  }

  .hero {
    min-height: 690px;
  }

  .hero-stage {
    min-height: 560px;
  }

  .hero-slide {
    padding-top: 52px;
  }

  .hero-content h1 {
    font-size: 42px;
  }

  .hero-bottom {
    margin-top: -42px;
  }

  .hero-search,
  .page-search {
    border-radius: 24px;
  }

  .hero-search,
  .page-search,
  .toolbar,
  .section-heading,
  .footer-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-thumbs,
  .category-strip,
  .compact-grid,
  .movie-grid,
  .related-grid,
  .overview-grid,
  .detail-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-card,
  .detail-grid,
  .ranking-row {
    grid-template-columns: 1fr;
  }

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

  .ranking-cover img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
  }
}

@media (max-width: 520px) {
  .hero-thumbs,
  .category-strip,
  .compact-grid,
  .movie-grid,
  .related-grid,
  .overview-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .hero-thumb {
    grid-template-columns: 40px 1fr;
  }

  .section {
    padding: 42px 0;
  }

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