* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #f8fafc;
  background: #020617;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(30, 41, 59, 0.95);
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(10px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 16px 30px rgba(245, 158, 11, 0.22);
}

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

.desktop-nav a,
.mobile-nav a {
  padding: 10px 14px;
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover {
  color: #ffffff;
  background: #1e293b;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #1e293b;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #ffffff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 16px;
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
}

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.70) 46%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.55) 46%, rgba(2, 6, 23, 0.16) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 92px 24px 88px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow,
.movie-category,
.section-heading span,
.category-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.eyebrow {
  padding: 10px 14px;
  margin-bottom: 22px;
}

.hero h1 {
  max-width: 780px;
  margin: 0 0 20px;
  color: #ffffff;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 660px;
  margin: 0 0 30px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.7;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: #f59e0b;
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.22);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  background: #d97706;
}

.btn-secondary {
  color: #ffffff;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.btn-secondary:hover {
  background: #334155;
}

.hero-controls {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 22px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 999px;
  opacity: 0.55;
}

.hero-dot.active {
  width: 32px;
  opacity: 1;
  background: #f59e0b;
}

.main-section,
.page-hero,
.content-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.main-section {
  padding-top: 72px;
  padding-bottom: 72px;
}

.section-shaded {
  background: rgba(15, 23, 42, 0.5);
}

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

.section-heading span,
.movie-category,
.category-label {
  padding: 7px 10px;
}

.section-heading h2 {
  margin: 12px 0 0;
  color: #ffffff;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.16;
}

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

.section-more {
  flex: 0 0 auto;
  color: #fbbf24;
  font-weight: 700;
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(30, 41, 59, 0.95);
  border-radius: 18px;
  background: #0f172a;
  box-shadow: 0 12px 36px rgba(2, 6, 23, 0.26);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.35);
  background: #111c31;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.34);
}

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

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

.movie-score {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 6px 9px;
  border-radius: 10px;
  color: #ffffff;
  background: rgba(245, 158, 11, 0.95);
  font-size: 12px;
  font-weight: 800;
}

.movie-info {
  padding: 18px;
}

.movie-info h3,
.ranking-info h3 {
  display: -webkit-box;
  margin: 12px 0 8px;
  overflow: hidden;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-info h3 a,
.ranking-info h3 a {
  transition: color 0.2s ease;
}

.movie-info h3 a:hover,
.ranking-info h3 a:hover {
  color: #fbbf24;
}

.movie-info p,
.ranking-info p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 14px;
  overflow: hidden;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #64748b;
  font-size: 13px;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

.movie-card-horizontal .movie-cover {
  height: 100%;
  aspect-ratio: auto;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.85);
  border-radius: 22px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

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

.category-card-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 210px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.02), rgba(2, 6, 23, 0.86));
}

.category-card h3 {
  margin: 12px 0 10px;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.6;
}

.page-hero {
  padding-top: 64px;
  padding-bottom: 38px;
}

.page-hero .crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #94a3b8;
  font-size: 14px;
}

.page-hero .crumbs a {
  color: #fbbf24;
}

.page-hero h1 {
  max-width: 880px;
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

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

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid rgba(51, 65, 85, 0.85);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.82);
}

.toolbar input,
.toolbar select {
  min-height: 44px;
  border: 1px solid rgba(71, 85, 105, 0.85);
  border-radius: 12px;
  color: #ffffff;
  background: #020617;
  outline: none;
}

.toolbar input {
  flex: 1 1 280px;
  padding: 0 14px;
}

.toolbar select {
  padding: 0 12px;
}

.empty-state {
  display: none;
  padding: 30px;
  border-radius: 18px;
  color: #94a3b8;
  background: #0f172a;
  text-align: center;
}

.empty-state.show {
  display: block;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 64px 132px minmax(0, 1fr) 80px;
  gap: 16px;
  align-items: center;
  padding: 12px;
}

.ranking-index {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #ffffff;
  background: #1e293b;
  font-weight: 900;
}

.ranking-row:nth-child(-n+3) .ranking-index {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.ranking-thumb {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  background: #1e293b;
}

.ranking-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-info p {
  min-height: 0;
}

.ranking-score {
  color: #fbbf24;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

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

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.9);
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.player-start span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 148px;
  height: 56px;
  padding: 0 22px;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.32);
  font-weight: 900;
}

.player-card.is-playing .player-start {
  display: none;
}

.detail-panel,
.content-panel {
  border: 1px solid rgba(51, 65, 85, 0.85);
  border-radius: 22px;
  background: #0f172a;
}

.detail-panel {
  overflow: hidden;
}

.poster-large {
  aspect-ratio: 16 / 10;
  background: #1e293b;
}

.poster-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-side-body {
  padding: 20px;
}

.detail-side-body dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-side-body div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: #cbd5e1;
  font-size: 14px;
}

.detail-side-body dt {
  color: #64748b;
}

.detail-side-body dd {
  margin: 0;
  text-align: right;
}

.content-panel {
  margin-top: 28px;
  padding: 26px;
}

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

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

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tags span {
  padding: 8px 11px;
  border-radius: 999px;
  color: #cbd5e1;
  background: #1e293b;
  font-size: 13px;
}

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

.next-prev {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.next-prev a {
  padding: 18px;
  border: 1px solid rgba(51, 65, 85, 0.85);
  border-radius: 18px;
  color: #cbd5e1;
  background: #0f172a;
}

.next-prev strong {
  display: block;
  margin-top: 8px;
  color: #ffffff;
}

.site-footer {
  margin-top: 48px;
  border-top: 1px solid rgba(30, 41, 59, 0.9);
  background: #020617;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 24px;
  color: #94a3b8;
}

.footer-inner p {
  max-width: 720px;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 18px;
}

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

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

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

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

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

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

  .mobile-toggle {
    display: block;
  }

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

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

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

  .ranking-score {
    display: none;
  }
}

@media (max-width: 640px) {
  .nav-wrap,
  .mobile-nav,
  .main-section,
  .page-hero,
  .content-shell,
  .hero-content,
  .footer-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero {
    min-height: 78vh;
  }

  .hero-content {
    padding-top: 72px;
  }

  .hero-controls {
    left: 16px;
    right: auto;
  }

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

  .grid-2,
  .grid-3,
  .grid-4,
  .grid-5,
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .ranking-info p,
  .movie-info p {
    -webkit-line-clamp: 2;
  }

  .next-prev {
    grid-template-columns: 1fr;
  }
}
