:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.62);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(245, 158, 11, 0.28);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --radius: 20px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  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: radial-gradient(circle at top left, rgba(245, 158, 11, 0.10), transparent 32rem), linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.94));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.30);
}

.nav-wrap {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 68px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #111827;
  background: var(--amber);
  box-shadow: 0 0 32px rgba(245, 158, 11, 0.42);
}

.brand-text {
  display: grid;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

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

.desktop-nav a,
.nav-more button,
.mobile-nav a {
  color: var(--muted-2);
  padding: 10px 14px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.nav-more:hover button,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: #ffffff;
  background: rgba(51, 65, 85, 0.72);
}

.nav-more {
  position: relative;
}

.nav-more-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  padding: 10px;
  display: none;
  grid-template-columns: 1fr;
  gap: 4px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

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

.nav-search,
.mobile-search {
  position: relative;
}

.nav-search input,
.mobile-search input,
.wide-search input {
  width: 220px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  padding: 11px 16px;
}

.nav-search input:focus,
.mobile-search input:focus,
.wide-search input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, 90vw);
  display: none;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
  z-index: 60;
}

.search-results.show {
  display: grid;
  gap: 8px;
}

.search-result-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  padding: 8px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.search-result-item:hover {
  background: rgba(51, 65, 85, 0.74);
}

.search-result-item img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
}

.search-result-item strong {
  display: block;
  color: #ffffff;
  margin-bottom: 4px;
}

.search-result-item span {
  color: var(--muted);
  font-size: 13px;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.8);
  padding: 8px 11px;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px 18px;
  border-top: 1px solid var(--line);
}

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

main {
  min-height: 70vh;
}

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

.hero-track,
.hero-slide {
  height: 100%;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 0%, rgba(15, 23, 42, 0.82) 42%, rgba(15, 23, 42, 0.12) 100%), linear-gradient(90deg, rgba(2, 6, 23, 0.82), transparent 62%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 64px;
  width: min(1180px, calc(100% - 44px));
  transform: translateX(-50%);
}

.hero-tags,
.detail-meta,
.hero-meta,
.tag-line,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags span,
.detail-meta span,
.detail-tags span,
.tag-line span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--muted-2);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.hero-tags span:first-child,
.detail-meta span:first-child {
  color: #111827;
  background: var(--amber);
  border-color: transparent;
  font-weight: 800;
}

.hero-content h1 {
  margin: 18px 0 16px;
  max-width: 820px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  text-shadow: 0 12px 42px rgba(0, 0, 0, 0.64);
}

.hero-content p {
  max-width: 760px;
  margin: 0 0 18px;
  color: #e2e8f0;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.7;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.56);
}

.hero-meta {
  margin-bottom: 28px;
  color: var(--muted-2);
}

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

.primary-btn,
.ghost-btn,
.wide-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-btn,
.wide-search button {
  color: #111827;
  background: var(--amber);
  border: 0;
}

.ghost-btn {
  color: #ffffff;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid var(--line);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  right: 46px;
  bottom: 78px;
  display: flex;
  gap: 8px;
  z-index: 3;
}

.hero-dots button {
  width: 40px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.58);
  cursor: pointer;
}

.hero-dots button.active {
  width: 62px;
  background: var(--amber);
}

.home-search-panel,
.content-section,
.sub-hero,
.detail-page {
  width: min(1280px, calc(100% - 44px));
  margin: 0 auto;
}

.home-search-panel {
  margin-top: -42px;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
  gap: 24px;
  align-items: center;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.home-search-panel h2,
.section-head h2,
.sub-hero h1,
.detail-card h1 {
  margin: 0;
  color: #ffffff;
  letter-spacing: -0.03em;
}

.home-search-panel p,
.section-head p,
.sub-hero p,
.detail-card p,
.category-card-large p,
.movie-card p {
  color: var(--muted);
}

.wide-search {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.wide-search input {
  width: 100%;
}

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

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

.section-head.stacked {
  align-items: start;
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 36px);
}

.section-head p {
  margin: 8px 0 0;
}

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

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

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

.movie-card {
  min-width: 0;
}

.movie-card a {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.24);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card a:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  background: rgba(30, 41, 59, 0.86);
}

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

.movie-card.compact .poster-wrap {
  aspect-ratio: 2 / 3;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 52%);
}

.year-badge,
.type-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  backdrop-filter: blur(10px);
}

.year-badge {
  top: 10px;
  left: 10px;
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.72);
}

.type-badge {
  right: 10px;
  bottom: 10px;
  color: var(--amber);
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid var(--line-strong);
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p {
  min-height: 44px;
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.category-grid,
.category-overview-grid {
  display: grid;
  gap: 18px;
}

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

.category-chip,
.category-card-large {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.86));
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
}

.category-chip {
  padding: 20px;
  min-height: 130px;
  display: grid;
  align-content: start;
  gap: 10px;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-chip:hover,
.category-card-large:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

.category-chip strong,
.category-card-large h2 {
  color: #ffffff;
  font-size: 20px;
}

.category-chip span {
  color: var(--muted);
  line-height: 1.65;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: 42px 54px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.58);
}

.rank-item img {
  width: 54px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-num,
.ranking-number {
  color: var(--amber);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.rank-title {
  color: #ffffff;
  font-weight: 800;
}

.rank-meta {
  grid-column: 3;
  color: var(--muted);
  font-size: 13px;
}

.sub-hero {
  padding: 76px 0 20px;
}

.sub-hero span {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--amber);
  font-weight: 900;
}

.sub-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
  max-width: 900px;
}

.sub-hero p {
  max-width: 760px;
  font-size: 18px;
  line-height: 1.8;
}

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

.category-card-large {
  padding: 24px;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

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

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-samples a {
  color: var(--muted-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  color: var(--muted-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.66);
  padding: 9px 14px;
  cursor: pointer;
}

.filter-btn.active,
.filter-btn:hover {
  color: #111827;
  background: var(--amber);
  border-color: var(--amber);
}

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

.ranking-row a {
  display: grid;
  grid-template-columns: 72px 86px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.58);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-row a:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}

.ranking-row img {
  width: 86px;
  height: 116px;
  object-fit: cover;
  border-radius: 12px;
}

.ranking-row h2 {
  margin: 0 0 8px;
  color: #ffffff;
}

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

.detail-page {
  padding: 28px 0 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  margin: 0 0 22px;
}

.breadcrumb a:hover {
  color: var(--amber);
}

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

.detail-main {
  display: grid;
  gap: 22px;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #020617;
  box-shadow: var(--shadow);
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  color: #ffffff;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.22));
  cursor: pointer;
  z-index: 3;
}

.player-cover.hidden {
  display: none;
}

.play-icon {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: var(--amber);
  box-shadow: 0 0 44px rgba(245, 158, 11, 0.46);
  font-size: 28px;
}

.player-cover strong {
  font-size: clamp(18px, 3vw, 28px);
}

.detail-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--bg-card);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
}

.detail-card {
  padding: 26px;
}

.detail-card h1 {
  font-size: clamp(30px, 4vw, 46px);
  margin-bottom: 14px;
}

.detail-card section {
  margin-top: 24px;
}

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

.detail-card p {
  margin: 0;
  line-height: 1.9;
  font-size: 16px;
}

.detail-tags {
  margin-top: 24px;
}

.detail-side {
  min-width: 0;
}

.sticky-card {
  position: sticky;
  top: 96px;
  padding: 18px;
}

.side-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  object-fit: cover;
}

.side-card dl {
  margin: 18px 0 0;
}

.side-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.side-card dl div:last-child {
  border-bottom: 0;
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
  color: #ffffff;
  font-weight: 700;
  text-align: right;
}

.side-card a {
  color: var(--amber);
}

.related-section {
  width: 100%;
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.74);
}

.footer-grid {
  width: min(1280px, calc(100% - 44px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 0.8fr;
  gap: 38px;
}

.footer-brand {
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 12px;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
}

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

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

.footer-links a:hover {
  color: var(--amber);
}

.footer-bottom {
  width: min(1280px, calc(100% - 44px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: #64748b;
  border-top: 1px solid var(--line);
}

@media (max-width: 1180px) {
  .movie-grid,
  .movie-grid.large {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

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

  .hero-slider {
    height: 68vh;
    min-height: 520px;
  }

  .hero-arrow,
  .hero-dots {
    display: none;
  }

  .home-search-panel,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-side {
    order: -1;
  }

  .sticky-card {
    position: static;
  }

  .ranking-row a {
    grid-template-columns: 50px 72px 1fr;
  }

  .ranking-row strong {
    display: none;
  }
}

@media (max-width: 680px) {
  .nav-wrap,
  .mobile-nav,
  .home-search-panel,
  .content-section,
  .sub-hero,
  .detail-page,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 28px, 1280px);
    padding-left: 0;
    padding-right: 0;
  }

  .nav-wrap {
    width: 100%;
    padding: 0 14px;
  }

  .brand-text small {
    display: none;
  }

  .hero-content {
    bottom: 34px;
    width: calc(100% - 28px);
  }

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

  .home-search-panel {
    margin-top: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .wide-search {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: grid;
    align-items: start;
  }

  .movie-grid,
  .movie-grid.large,
  .category-grid,
  .category-overview-grid,
  .rank-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .card-body {
    padding: 12px;
  }

  .card-body p,
  .card-meta {
    display: none;
  }

  .detail-card,
  .side-card {
    border-radius: 18px;
  }

  .detail-card {
    padding: 18px;
  }

  .ranking-row a {
    grid-template-columns: 42px 62px 1fr;
    gap: 12px;
  }

  .ranking-row img {
    width: 62px;
    height: 84px;
  }
}
