:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(30, 41, 59, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(245, 158, 11, 0.35);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --brand: #f59e0b;
  --brand-light: #fbbf24;
  --brand-deep: #ea580c;
  --radius: 1rem;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 28rem),
    radial-gradient(circle at 78% 12%, rgba(14, 165, 233, 0.12), transparent 24rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
  max-width: 100%;
}

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

button,
input,
select {
  font: inherit;
}

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

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, #fcd34d, #f97316);
  box-shadow: 0 0 34px rgba(245, 158, 11, 0.46);
}

.brand-name {
  font-size: 1.12rem;
  background: linear-gradient(90deg, #fde68a, #f59e0b);
  -webkit-background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--soft);
  font-size: 0.95rem;
}

.desktop-nav a,
.footer-links a,
.mobile-nav a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.footer-links a:hover,
.mobile-nav a:hover {
  color: var(--brand-light);
}

.top-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(420px, 34vw);
}

.top-search input,
.search-panel input,
.filter-input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  outline: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  padding: 12px 16px;
}

.top-search input:focus,
.search-panel input:focus,
.filter-input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.top-search button,
.primary-button,
.secondary-button,
.filter-button {
  border: 0;
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.top-search button,
.primary-button {
  color: white;
  background: linear-gradient(90deg, var(--brand), var(--brand-deep));
  padding: 12px 18px;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

.primary-button:hover,
.top-search button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 44px rgba(245, 158, 11, 0.36);
}

.secondary-button,
.filter-button {
  color: var(--soft);
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.72);
  padding: 12px 18px;
}

.secondary-button:hover,
.filter-button:hover,
.filter-button.active {
  color: #fff;
  border-color: var(--line-strong);
  background: rgba(245, 158, 11, 0.16);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
}

.mobile-menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: #e2e8f0;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

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

main {
  padding-top: 72px;
}

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

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.62) 45%, rgba(2, 6, 23, 0.16)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 46%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  min-height: 72vh;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 76px 0 54px;
}

.hero-copy {
  width: min(720px, 100%);
}

.eyebrow,
.pill,
.tag,
.meta-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.82rem;
  line-height: 1;
}

.eyebrow {
  gap: 8px;
  padding: 8px 12px;
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.32);
  background: rgba(245, 158, 11, 0.12);
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-title h1 {
  margin: 18px 0 16px;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-copy h1,
.hero-copy h2 {
  max-width: 840px;
  font-size: clamp(2.6rem, 8vw, 5.8rem);
}

.hero-copy p {
  max-width: 760px;
  color: #cbd5e1;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.75;
}

.hero-meta,
.card-section-header,
.movie-meta-row,
.stat-row,
.detail-meta,
.tag-list,
.hero-actions,
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hero-meta {
  margin: 24px 0;
  color: #cbd5e1;
}

.meta-chip {
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: max(16px, calc((100% - 1280px) / 2));
  bottom: 34px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.5);
}

.hero-dot.active {
  width: 54px;
  background: var(--brand-light);
}

.content-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
}

.section-block {
  margin-bottom: 70px;
}

.card-section-header {
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
}

.section-title h2,
.section-title h3 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.1;
}

.section-more {
  color: var(--brand-light);
  font-weight: 700;
}

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

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

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

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.22), rgba(15, 23, 42, 0.96));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.25);
}

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

.poster-link:hover img,
.category-card:hover img,
.related-item:hover img,
.rank-item:hover img {
  transform: scale(1.08);
}

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

.poster-link:hover .poster-shade {
  opacity: 1;
}

.duration-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 0.76rem;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(10px);
}

.duration-badge {
  right: 12px;
}

.rank-badge {
  left: 12px;
  color: #fff;
  background: rgba(245, 158, 11, 0.86);
}

.play-hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  font-size: 1.6rem;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.poster-link:hover .play-hover {
  opacity: 1;
  transform: scale(1);
}

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

.movie-meta-row,
.stat-row {
  color: var(--muted);
  font-size: 0.82rem;
}

.pill {
  color: #fbbf24;
  padding: 6px 9px;
  background: rgba(245, 158, 11, 0.12);
}

.movie-card h3 {
  margin: 10px 0 8px;
  color: #fff;
  font-size: 1.02rem;
  line-height: 1.45;
  transition: color 0.2s ease;
}

.movie-card h3:hover,
.related-item strong:hover {
  color: var(--brand-light);
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.stat-row {
  justify-content: space-between;
  margin-top: 12px;
}

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

.category-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

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

.category-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.2));
}

.category-card-text {
  position: absolute;
  inset: auto 18px 18px 18px;
}

.category-card-text strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.32rem;
}

.category-card-text em {
  display: block;
  color: #cbd5e1;
  font-size: 0.9rem;
  font-style: normal;
  line-height: 1.6;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 46px 104px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  border-color: var(--line-strong);
  background: rgba(30, 41, 59, 0.72);
  transform: translateY(-1px);
}

.rank-number {
  color: #fbbf24;
  font-size: 1.25rem;
  font-weight: 900;
}

.rank-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  margin-bottom: 5px;
  color: #fff;
}

.rank-info em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.86rem;
}

.rank-score {
  color: #fbbf24;
  font-weight: 800;
}

.page-hero {
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.14), transparent 42%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(2, 6, 23, 0));
}

.page-hero-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 46px;
}

.page-hero h1 {
  max-width: 960px;
  font-size: clamp(2.1rem, 5vw, 4.2rem);
}

.page-hero p {
  max-width: 820px;
  color: #cbd5e1;
  line-height: 1.75;
  font-size: 1.05rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumb a {
  color: #fbbf24;
}

.filter-panel,
.search-panel,
.info-panel,
.detail-card,
.player-card {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.filter-panel,
.search-panel {
  margin-bottom: 28px;
  padding: 20px;
}

.filter-bar {
  gap: 10px;
}

.filter-input {
  flex: 1 1 320px;
}

.filter-button {
  padding: 10px 14px;
}

.detail-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 112px 0 62px;
}

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

.player-card {
  position: relative;
  overflow: hidden;
  background: #000;
}

.player-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  cursor: pointer;
  background:
    radial-gradient(circle, rgba(245, 158, 11, 0.18), transparent 34%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.32));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, var(--brand), var(--brand-deep));
  padding: 16px 26px;
  font-weight: 800;
  box-shadow: 0 18px 44px rgba(245, 158, 11, 0.38);
}

.player-button span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #111827;
  background: #fff;
}

.detail-title {
  padding: 28px 0 10px;
}

.detail-title h1 {
  font-size: clamp(2rem, 5vw, 4rem);
}

.detail-meta {
  color: #cbd5e1;
  margin: 18px 0;
}

.tag-list {
  margin-top: 16px;
}

.tag {
  padding: 8px 10px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.18);
}

.detail-card,
.info-panel {
  padding: 24px;
  margin-top: 24px;
}

.detail-card h2,
.info-panel h2,
.info-panel h3 {
  margin: 0 0 14px;
  font-size: 1.38rem;
}

.detail-card p,
.info-panel p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
  white-space: pre-line;
}

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

.related-item {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.related-item:hover {
  background: rgba(51, 65, 85, 0.5);
}

.related-item span:first-child {
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 16 / 10;
  background: rgba(15, 23, 42, 0.9);
}

.related-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.related-item strong,
.related-item em {
  display: block;
}

.related-item strong {
  color: #fff;
  line-height: 1.45;
}

.related-item em {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
}

.search-results-info {
  margin: 18px 0;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.72);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding: 34px 0;
}

.footer-inner p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #cbd5e1;
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: #64748b;
  font-size: 0.9rem;
}

.no-results {
  display: none;
  padding: 28px;
  color: var(--muted);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.66);
}

@media (max-width: 1100px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-grid,
  .rank-layout {
    grid-template-columns: 1fr;
  }
}

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

  .mobile-menu-button {
    display: block;
    margin-left: auto;
  }

  .hero-content {
    min-height: 78vh;
  }

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

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .content-shell,
  .page-hero-inner,
  .detail-shell,
  .footer-inner,
  .footer-bottom,
  .mobile-nav {
    width: min(100% - 24px, 1280px);
  }

  .brand-name {
    font-size: 1rem;
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 2.5rem;
  }

  .movie-grid,
  .movie-grid.three,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 36px 92px 1fr;
  }

  .rank-score {
    grid-column: 3;
  }

  .related-item {
    grid-template-columns: 96px 1fr;
  }
}
