* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: #e5e7eb;
  background: #020617;
}

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.nav-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  white-space: nowrap;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 10px 32px rgba(245, 158, 11, 0.35);
  color: #111827;
  font-size: 13px;
}

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

.desktop-nav a,
.mobile-panel a {
  color: #cbd5e1;
  font-weight: 600;
  font-size: 14px;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
  color: #fbbf24;
}

.header-search {
  display: flex;
  align-items: center;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 4px;
  min-width: 260px;
}

.header-search input,
.local-search input,
.search-page-form input {
  border: 0;
  outline: 0;
  color: #f8fafc;
  background: transparent;
}

.header-search input {
  width: 100%;
  padding: 10px 12px;
}

.header-search button,
.search-page-form button {
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  color: #111827;
  background: #f59e0b;
  font-weight: 800;
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: #0f172a;
  color: #f8fafc;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mobile-panel.open {
  display: grid;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

.hero-slider {
  position: relative;
  min-height: 72vh;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.65fr);
  align-items: center;
  gap: 44px;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  opacity: 0;
  transform: translateX(24px);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  filter: blur(10px) brightness(0.72);
  transform: scale(1.04);
}

.hero::after,
.detail-hero::after,
.page-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 180px;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0), #020617 80%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 60px;
}

.eyebrow,
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #fbbf24;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0;
  max-width: 760px;
  color: #ffffff;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-one-line,
.detail-one-line {
  max-width: 720px;
  margin: 24px 0 0;
  color: #d1d5db;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.7;
}

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

.hero-meta span,
.detail-meta span {
  padding: 8px 12px;
  border: 1px solid rgba(251, 191, 36, 0.26);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(15, 23, 42, 0.7);
  font-size: 13px;
}

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

.hero-tags,
.detail-tags {
  margin-top: 18px;
}

.hero-tags span,
.detail-tags a,
.tag-row span {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  padding: 7px 10px;
  font-size: 12px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn.primary {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 18px 48px rgba(249, 115, 22, 0.28);
}

.btn.ghost {
  color: #f8fafc;
  border: 1px solid rgba(248, 250, 252, 0.24);
  background: rgba(15, 23, 42, 0.52);
}

.hero-poster,
.detail-poster {
  position: relative;
  z-index: 2;
  aspect-ratio: 3 / 4;
  width: min(100%, 380px);
  border-radius: 32px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  justify-self: end;
}

.hero-poster::after,
.detail-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(2, 6, 23, 0.72));
}

.hero-poster span,
.detail-poster span {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 999px;
  background: #f59e0b;
  color: #111827;
  box-shadow: 0 16px 46px rgba(245, 158, 11, 0.38);
}

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

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

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

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

.muted-section {
  width: 100%;
  padding-left: max(16px, calc((100% - 1240px) / 2));
  padding-right: max(16px, calc((100% - 1240px) / 2));
  background: rgba(15, 23, 42, 0.42);
}

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

.section-heading h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 680px;
  margin: 12px 0 0;
  color: #94a3b8;
  line-height: 1.7;
}

.section-link {
  color: #fbbf24;
  font-weight: 800;
  white-space: nowrap;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.24);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.36);
  background: rgba(30, 41, 59, 0.92);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.movie-card.compact .movie-cover {
  aspect-ratio: 16 / 10;
}

.movie-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 14px;
  border-radius: 999px;
  padding: 7px 10px;
  color: #111827;
  background: #fbbf24;
  font-size: 12px;
  font-weight: 900;
}

.rank-badge {
  left: auto;
  right: 14px;
}

.cover-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  color: #111827;
  background: rgba(251, 191, 36, 0.95);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

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

.movie-card h3 {
  margin: 0;
  min-height: 52px;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.42;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  margin: 10px 0 0;
  color: #fbbf24;
  font-size: 13px;
}

.movie-desc {
  margin: 10px 0 14px;
  color: #94a3b8;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  min-height: 28px;
}

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

.category-tile,
.category-card-large {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 26px;
  padding: 24px;
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 45%), rgba(15, 23, 42, 0.82);
  min-height: 170px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card-large {
  min-height: 260px;
}

.category-tile:hover,
.category-card-large:hover {
  transform: translateY(-5px);
  border-color: rgba(251, 191, 36, 0.34);
}

.category-tile span {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #111827;
  background: #fbbf24;
  font-weight: 900;
}

.category-tile strong,
.category-card-large h2 {
  display: block;
  margin-top: 20px;
  color: #ffffff;
  font-size: 23px;
}

.category-tile em,
.category-card-large p {
  display: block;
  margin-top: 12px;
  color: #94a3b8;
  font-style: normal;
  line-height: 1.65;
}

.category-preview {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  color: #cbd5e1;
  font-size: 13px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 96px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 26px;
  padding: 24px;
  background: rgba(15, 23, 42, 0.86);
}

.compact-heading {
  align-items: center;
  margin-bottom: 18px;
}

.compact-heading h2 {
  font-size: 26px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-radius: 18px;
  padding: 12px;
  background: rgba(30, 41, 59, 0.72);
}

.rank-row span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  color: #111827;
  background: #fbbf24;
  font-weight: 900;
}

.rank-row strong {
  display: block;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row em {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.2), transparent 42%), linear-gradient(180deg, #0f172a, #020617);
}

.page-hero > div {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0 72px;
}

.page-hero h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(38px, 6vw, 66px);
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: #cbd5e1;
  line-height: 1.75;
  font-size: 18px;
}

.local-search,
.search-page-form {
  display: flex;
  align-items: center;
  width: min(100%, 720px);
  margin-top: 28px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  padding: 6px;
}

.local-search input,
.search-page-form input {
  width: 100%;
  padding: 14px 18px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(8px) brightness(0.72);
  transform: scale(1.03);
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 84px 0 78px;
}

.detail-poster {
  width: 100%;
  justify-self: start;
}

.detail-info h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(36px, 6vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 30px;
  background: #000000;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

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

.player-play-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #111827;
  background: radial-gradient(circle at center, rgba(251, 191, 36, 0.24), rgba(2, 6, 23, 0.48));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-play-button span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: #fbbf24;
  box-shadow: 0 24px 62px rgba(251, 191, 36, 0.34);
  font-size: 28px;
}

.player-shell.is-playing .player-play-button {
  opacity: 0;
  visibility: hidden;
}

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

.text-panel {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.78);
  padding: 28px;
}

.text-panel h2 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 28px;
}

.text-panel p {
  margin: 0;
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.9;
}

.ranking-grid {
  display: grid;
  gap: 16px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 62px 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.78);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-card:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.34);
}

.ranking-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #fbbf24;
  color: #111827;
  font-weight: 900;
}

.ranking-cover {
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  background-size: cover;
  background-position: center;
}

.ranking-card h2 {
  margin: 0;
  color: #ffffff;
  font-size: 22px;
}

.ranking-card p {
  margin: 8px 0;
  color: #cbd5e1;
  line-height: 1.65;
}

.ranking-card em {
  color: #fbbf24;
  font-style: normal;
  font-size: 13px;
}

.search-summary,
.empty-state {
  margin: 0 0 24px;
  color: #94a3b8;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: #020617;
}

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

.footer-grid p {
  max-width: 430px;
  color: #94a3b8;
  line-height: 1.75;
}

.footer-grid h3 {
  margin: 0 0 16px;
  color: #ffffff;
}

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

.footer-links a {
  color: #94a3b8;
}

.footer-links a:hover {
  color: #fbbf24;
}

.copyright {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  padding: 18px 0 28px;
  color: #64748b;
  font-size: 14px;
}

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

  .mobile-toggle {
    display: inline-flex;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 82px 0 110px;
  }

  .hero-poster {
    display: none;
  }

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

  .split-section,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }

  .detail-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .nav-shell,
  .content-section,
  .footer-grid,
  .copyright,
  .detail-layout,
  .page-hero > div,
  .hero-slide {
    width: min(100% - 24px, 1240px);
  }

  .hero,
  .hero-slider {
    min-height: 84vh;
  }

  .hero-content h1,
  .detail-info h1,
  .page-hero h1 {
    letter-spacing: -0.04em;
  }

  .section-heading {
    display: block;
  }

  .section-link {
    display: inline-block;
    margin-top: 14px;
  }

  .movie-grid,
  .featured-grid,
  .small-grid,
  .catalog-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

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

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

  .ranking-card {
    grid-template-columns: 44px 92px minmax(0, 1fr);
    gap: 12px;
  }

  .ranking-card p {
    display: none;
  }

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