:root {
  color-scheme: light;
  --bg: #f7f7f8;
  --surface: #ffffff;
  --ink: #1f2937;
  --muted: #64748b;
  --line: #e5e7eb;
  --amber: #d97706;
  --amber-dark: #b45309;
  --black: #070707;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  z-index: 60;
  top: 0;
  left: 0;
  right: 0;
  color: #ffffff;
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
}

.inner-page .site-header,
.site-header.is-scrolled,
.mobile-open .site-header {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

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

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #ffffff;
  background: var(--amber);
  box-shadow: 0 12px 25px rgba(217, 119, 6, 0.35);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.desktop-nav a,
.mobile-panel a {
  font-weight: 700;
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
  color: var(--amber);
  opacity: 1;
}

.top-search,
.mobile-search,
.hero-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.hero-search input,
.card-filter-input,
.card-filter-select {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  padding: 10px 16px;
  min-width: 210px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  outline: none;
}

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

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: inherit;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.inner-page .menu-toggle,
.site-header.is-scrolled .menu-toggle,
.mobile-open .menu-toggle {
  background: #f1f5f9;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.mobile-panel nav {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

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

.home-hero {
  position: relative;
  height: 700px;
  overflow: hidden;
  background: #000000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #000000 0%, rgba(0, 0, 0, 0.72) 28%, rgba(0, 0, 0, 0.16) 100%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  right: 32px;
  bottom: 92px;
  max-width: 780px;
  color: #ffffff;
}

.hero-pills,
.plain-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-pills span,
.plain-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 6px 13px;
  color: #ffffff;
  background: rgba(217, 119, 6, 0.92);
  font-size: 13px;
  font-weight: 800;
}

.hero-pills span:nth-child(2n) {
  background: rgba(37, 99, 235, 0.9);
}

.hero-pills span:nth-child(3n) {
  background: rgba(22, 163, 74, 0.9);
}

.hero-pills span:nth-child(4n) {
  background: rgba(147, 51, 234, 0.9);
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.lead-line {
  margin: 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-actions,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

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

.primary-btn {
  color: #ffffff;
  background: var(--amber);
  box-shadow: 0 16px 32px rgba(217, 119, 6, 0.32);
}

.primary-btn:hover,
.top-search button:hover,
.mobile-search button:hover,
.hero-search button:hover {
  background: var(--amber-dark);
  transform: translateY(-1px);
}

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

.ghost-btn.dark {
  color: var(--ink);
  border-color: var(--line);
  background: #ffffff;
}

.hero-nav {
  position: absolute;
  top: 50%;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-nav.prev {
  left: 32px;
}

.hero-nav.next {
  right: 32px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

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

.surface-section {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100vw - 1180px) / 2));
  padding-right: max(16px, calc((100vw - 1180px) / 2));
  background: #ffffff;
}

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

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

.section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-head a {
  flex-shrink: 0;
  color: var(--amber);
  font-weight: 900;
}

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

.category-tile,
.category-card {
  display: grid;
  min-height: 154px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  padding: 22px;
  background: linear-gradient(145deg, #ffffff, #fff7ed);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.12);
}

.category-tile span,
.category-card strong {
  font-size: 20px;
  font-weight: 900;
}

.category-tile em,
.category-card em {
  margin-top: 10px;
  color: var(--muted);
  font-style: normal;
  line-height: 1.7;
}

.category-card {
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.category-images {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 150px;
  overflow: hidden;
  background: #111827;
}

.category-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-info {
  display: grid;
  gap: 8px;
  padding: 22px;
}

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

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

.movie-card {
  display: grid;
  overflow: hidden;
  border-radius: 18px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.09);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 28px 62px rgba(15, 23, 42, 0.15);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

.poster-wrap img,
.detail-poster img,
.player-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-wrap img {
  transition: transform 0.5s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.card-year {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  font-weight: 900;
}

.card-tags {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-tags {
  opacity: 1;
}

.card-tags span {
  border-radius: 7px;
  padding: 4px 7px;
  color: #ffffff;
  background: var(--amber);
  font-size: 12px;
  font-weight: 800;
}

.card-tags span:nth-child(2n) {
  background: #2563eb;
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.card-body strong,
.small-info strong {
  overflow: hidden;
  display: -webkit-box;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body em,
.small-info em {
  overflow: hidden;
  display: -webkit-box;
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body span,
.small-info span {
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

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

.rank-panel {
  align-self: start;
  position: sticky;
  top: 96px;
  border-radius: 26px;
  padding: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

.compact-head h2 {
  font-size: 24px;
}

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

.rank-item,
.ranking-row,
.small-card {
  display: grid;
  grid-template-columns: auto 74px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  border-radius: 16px;
  padding: 10px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover,
.ranking-row:hover,
.small-card:hover {
  background: #fff7ed;
  transform: translateX(2px);
}

.rank-number,
.ranking-index {
  color: var(--amber);
  font-size: 20px;
  font-weight: 950;
}

.rank-item img,
.ranking-row img,
.small-poster {
  width: 74px;
  height: 96px;
  border-radius: 12px;
  overflow: hidden;
  object-fit: cover;
  background: #111827;
}

.rank-item strong,
.ranking-row strong {
  display: block;
  overflow: hidden;
  margin-bottom: 4px;
  font-weight: 900;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-item em,
.ranking-row em {
  overflow: hidden;
  display: -webkit-box;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-main {
  padding-top: 72px;
}

.page-hero {
  color: #ffffff;
  background: radial-gradient(circle at 18% 20%, rgba(217, 119, 6, 0.48), transparent 32%), linear-gradient(135deg, #09090b, #1f2937 55%, #111827);
}

.page-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0 78px;
}

.compact-hero .page-hero-inner,
.category-hero .page-hero-inner,
.search-hero .page-hero-inner,
.rank-hero .page-hero-inner {
  padding-top: 74px;
  padding-bottom: 64px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.card-filter-input {
  flex: 1;
  min-width: 0;
  border-radius: 16px;
  background: #ffffff;
}

.card-filter-select {
  min-width: 150px;
  border-radius: 16px;
}

.empty-state {
  margin: 32px 0 0;
  border-radius: 20px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
  background: #ffffff;
}

.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  border-radius: 32px;
  padding: 28px;
  background: linear-gradient(135deg, #111827, #030712);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  background: #111827;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

.detail-copy {
  color: #ffffff;
}

.detail-copy .lead-line {
  color: rgba(255, 255, 255, 0.82);
}

.movie-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0 0;
}

.movie-meta div {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.movie-meta dt {
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 13px;
}

.movie-meta dd {
  margin: 0;
  font-weight: 900;
}

.player-section {
  scroll-margin-top: 96px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 16 / 9;
  background: #000000;
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.24);
}

.player-shell video,
.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-shell video {
  z-index: 1;
  background: #000000;
}

.player-cover {
  z-index: 2;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000000;
}

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

.player-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.2));
}

.play-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  padding-left: 6px;
  color: #ffffff;
  background: var(--amber);
  font-size: 34px;
  box-shadow: 0 22px 46px rgba(217, 119, 6, 0.36);
  transform: translate(-50%, -50%);
}

.detail-text-section {
  padding-top: 20px;
}

.detail-article {
  display: grid;
  gap: 16px;
  border-radius: 28px;
  padding: 34px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.detail-article h2 {
  margin: 0;
  font-size: 26px;
}

.detail-article p {
  margin: 0 0 8px;
  color: #374151;
  font-size: 17px;
  line-height: 2;
}

.plain-tags span {
  color: var(--amber-dark);
  background: #ffedd5;
}

.ranking-row {
  grid-template-columns: 52px 92px minmax(0, 1fr);
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.ranking-row img {
  width: 92px;
  height: 124px;
}

.ranking-copy span {
  display: block;
  margin-top: 8px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
}

.hero-search {
  max-width: 680px;
  margin-top: 28px;
}

.hero-search input {
  flex: 1;
  min-width: 0;
  min-height: 52px;
}

.hero-search button {
  min-height: 52px;
  padding-left: 26px;
  padding-right: 26px;
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(180deg, #111827, #000000);
}

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

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

.site-footer p {
  color: #9ca3af;
  line-height: 1.8;
}

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

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

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

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

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 16px 28px;
  color: #9ca3af;
  text-align: center;
}

@media (max-width: 1080px) {
  .top-search {
    display: none;
  }

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

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

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

  .rank-panel {
    position: static;
  }

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

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

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

  .home-hero {
    height: 620px;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 78px;
  }

  .hero-nav {
    display: none;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .category-grid,
  .category-list-grid,
  .featured-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .detail-poster {
    max-width: 340px;
    width: 100%;
    margin: 0 auto;
  }

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

@media (max-width: 560px) {
  .nav-inner {
    width: calc(100% - 24px);
    min-height: 64px;
  }

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

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .home-hero {
    height: 560px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 34px;
  }

  .content-section,
  .page-hero-inner,
  .breadcrumb,
  .detail-hero {
    width: calc(100% - 24px);
  }

  .content-section {
    padding-top: 42px;
    padding-bottom: 42px;
  }

  .surface-section {
    padding-left: 12px;
    padding-right: 12px;
  }

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

  .card-body {
    padding: 12px;
  }

  .filter-bar,
  .hero-search,
  .mobile-search {
    align-items: stretch;
    flex-direction: column;
  }

  .card-filter-select,
  .top-search input,
  .mobile-search input,
  .hero-search input {
    width: 100%;
  }

  .detail-hero,
  .detail-article {
    padding: 18px;
    border-radius: 22px;
  }

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

  .play-circle {
    width: 68px;
    height: 68px;
    font-size: 26px;
  }

  .ranking-row {
    grid-template-columns: 42px 74px minmax(0, 1fr);
  }

  .ranking-row img {
    width: 74px;
    height: 100px;
  }
}
