* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #f8fafc;
  background: linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #0f172a;
  font-weight: 900;
  background: linear-gradient(135deg, #fde68a, #f59e0b, #fb923c);
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.42);
}

.brand-text {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fde68a, #fbbf24, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  padding: 9px 13px;
  border-radius: 999px;
  color: #dbeafe;
  font-size: 14px;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff7ed;
  background: rgba(251, 191, 36, 0.16);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: #f8fafc;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  background: radial-gradient(circle at 20% 18%, rgba(245, 158, 11, 0.24), transparent 30%), radial-gradient(circle at 78% 8%, rgba(59, 130, 246, 0.25), transparent 30%), #020617;
}

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) brightness(0.72);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.45)), linear-gradient(0deg, #020617 0%, transparent 34%, rgba(2, 6, 23, 0.3) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 620px;
  margin: 0 auto;
  padding: 88px 22px 70px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 390px;
  align-items: center;
  gap: 54px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #fbbf24;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 26px;
  color: #dbeafe;
  font-size: 19px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.14);
}

.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fbbf24, #fb923c);
}

.hero-panel {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
}

.hero-panel img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  position: static;
  filter: none;
}

.hero-panel-body {
  padding: 20px;
}

.hero-panel-body h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.hero-panel-body p {
  margin: 0;
  font-size: 14px;
  color: #cbd5e1;
}

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

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

.hero-dot.active {
  background: #f59e0b;
}

main,
.page-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 22px;
}

.section {
  margin-bottom: 72px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
}

.section-action {
  color: #fbbf24;
  font-weight: 800;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.28);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 22px 70px rgba(245, 158, 11, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.55s ease, filter 0.55s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.06);
  filter: brightness(1.08);
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  color: #0f172a;
  background: #fbbf24;
  box-shadow: 0 10px 30px rgba(251, 191, 36, 0.32);
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 38px;
  height: 38px;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  box-shadow: 0 10px 28px rgba(239, 68, 68, 0.35);
}

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

.card-meta,
.detail-meta,
.category-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #93c5fd;
  font-size: 13px;
  font-weight: 700;
}

.card-meta span,
.detail-meta span,
.category-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.11);
}

.movie-card h3 {
  min-height: 54px;
  margin: 12px 0 8px;
  font-size: 19px;
  line-height: 1.35;
}

.movie-card p {
  min-height: 52px;
  margin: 0 0 12px;
  color: #cbd5e1;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  padding: 5px 9px;
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.09);
  font-size: 12px;
}

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

.category-card,
.info-card,
.search-panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 26px;
  background: linear-gradient(155deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.86));
  box-shadow: 0 16px 55px rgba(0, 0, 0, 0.25);
}

.category-card {
  padding: 24px;
  min-height: 190px;
  position: relative;
  overflow: hidden;
}

.category-card::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -45px;
  top: -45px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.35), transparent 66%);
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 25px;
}

.category-card p {
  color: #cbd5e1;
  margin: 0 0 18px;
}

.category-card strong {
  color: #fbbf24;
  font-size: 28px;
}

.page-hero {
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.22), transparent 28%), linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 64, 175, 0.7), rgba(2, 6, 23, 0.95));
}

.page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 74px 22px 66px;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.05;
}

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

.search-panel {
  padding: 22px;
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
}

.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  outline: none;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.78);
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: rgba(251, 191, 36, 0.65);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.12);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  background: #020617;
}

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

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.62)), linear-gradient(0deg, #020617, transparent 46%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 70px 22px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
}

.detail-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
}

.detail-copy p {
  max-width: 850px;
  color: #dbeafe;
  font-size: 18px;
}

.breadcrumb {
  margin-bottom: 18px;
  color: #bfdbfe;
  font-size: 14px;
}

.breadcrumb a {
  color: #fbbf24;
}

.player-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 22px 22px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #000;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.4);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18), rgba(2, 6, 23, 0.72) 52%, rgba(2, 6, 23, 0.88));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-ring {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #0f172a;
  background: linear-gradient(135deg, #fbbf24, #fb923c);
  box-shadow: 0 0 44px rgba(245, 158, 11, 0.5);
  font-size: 34px;
  transform: translateZ(0);
}

.player-overlay strong {
  font-size: 22px;
}

.detail-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.article-block,
.side-box {
  padding: 26px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 26px;
  background: linear-gradient(155deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.86));
  box-shadow: 0 16px 55px rgba(0, 0, 0, 0.22);
}

.article-block h2,
.side-box h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

.article-block p {
  color: #dbeafe;
  font-size: 17px;
}

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

.side-link {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-link img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.side-link strong {
  display: block;
  line-height: 1.35;
}

.side-link span {
  color: #93c5fd;
  font-size: 13px;
}

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

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 22px;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 26px;
}

.footer-grid h3 {
  margin: 0 0 12px;
  color: #fbbf24;
}

.footer-grid p,
.footer-grid a {
  display: block;
  margin: 0 0 8px;
  color: #94a3b8;
}

.footer-brand {
  margin-bottom: 14px;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 22px 30px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.empty-state {
  display: none;
  padding: 42px;
  text-align: center;
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.compact-card .movie-card-body p {
  min-height: 0;
}

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

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

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

  .hero-panel {
    display: none;
  }

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

@media (max-width: 860px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
  }

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

  .hero,
  .hero-content {
    min-height: 560px;
  }

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

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

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

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

  .detail-poster {
    max-width: 320px;
  }

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

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

@media (max-width: 560px) {
  .nav-inner,
  main,
  .page-main,
  .page-hero-inner,
  .player-section,
  .detail-content,
  .detail-hero-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    letter-spacing: -0.03em;
  }

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

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

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