* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #e2e8f0;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 32rem),
    radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.12), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #111827 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

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

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

.brand-icon {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 15px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b 54%, #b45309);
  box-shadow: 0 0 32px rgba(245, 158, 11, 0.34);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text strong,
.footer-brand {
  font-size: 21px;
  line-height: 1.1;
  font-weight: 800;
  color: transparent;
  background: linear-gradient(90deg, #fde68a, #fef3c7, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
}

.brand-text em {
  color: #94a3b8;
  font-style: normal;
  font-size: 12px;
  margin-top: 2px;
}

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

.nav-link {
  position: relative;
  color: #cbd5e1;
  font-weight: 650;
  padding: 8px 0;
  transition: color 0.22s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 2px;
  height: 2px;
  border-radius: 999px;
  background: #f59e0b;
  transition: right 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fbbf24;
}

.nav-link:hover::after,
.nav-link.active::after {
  right: 0;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(245, 158, 11, 0.36);
  border-radius: 14px;
  color: #fbbf24;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, 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.94);
}

.mobile-nav .nav-link {
  display: block;
  padding: 12px;
}

.page-shell,
.hero,
.section,
.detail-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 640px;
  display: grid;
  align-items: center;
  padding: 72px 0 54px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 32px -24px 0;
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: 44px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.62), rgba(30, 41, 59, 0.34));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
}

.hero-slide {
  position: relative;
  z-index: 1;
  display: none;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.72fr);
  gap: 44px;
  align-items: center;
}

.hero-slide.active {
  display: grid;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  padding: 7px 12px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 22px 0 18px;
  color: #fff7ed;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 650px;
  margin: 0 0 28px;
  color: #cbd5e1;
  font-size: 18px;
}

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

.button,
.button-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 15px;
  font-weight: 800;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.button {
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.28);
}

.button:hover,
.button-ghost:hover,
.movie-card:hover,
.category-card:hover,
.rank-item:hover {
  transform: translateY(-3px);
}

.button-ghost {
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.36);
  background: rgba(15, 23, 42, 0.64);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 34px;
  aspect-ratio: 3 / 4;
  background: #0f172a;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.48);
}

.hero-poster img,
.movie-thumb img,
.detail-poster img,
.player-poster img,
.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster::after,
.movie-thumb::after,
.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 28%, rgba(2, 6, 23, 0.84));
  pointer-events: none;
}

.hero-badge {
  position: absolute;
  left: 20px;
  bottom: 20px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-badge span,
.movie-tags span,
.detail-tags span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.78);
}

.hero-badge span {
  padding: 7px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 12px;
  font-weight: 700;
}

.hero-control {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: #475569;
  cursor: pointer;
  transition: width 0.22s ease, background 0.22s ease;
}

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

.section {
  padding: 58px 0 18px;
}

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

.section-title h2,
.page-title h1,
.detail-title h1 {
  margin: 12px 0 8px;
  color: #fff7ed;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-title p,
.page-title p,
.detail-title p,
.detail-text {
  color: #94a3b8;
  margin: 0;
}

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

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

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

.movie-card,
.category-card,
.rank-item,
.info-panel,
.player-card,
.detail-card {
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.56);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 22px;
}

.movie-card:hover,
.category-card:hover,
.rank-item:hover {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(30, 41, 59, 0.72);
  box-shadow: 0 24px 60px rgba(245, 158, 11, 0.08);
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  padding: 10px;
}

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

.movie-thumb-small {
  border-radius: 16px;
}

.movie-thumb img {
  transition: transform 0.42s ease;
}

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

.movie-year {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: rgba(251, 191, 36, 0.94);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.84);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-card-body {
  position: relative;
  padding: 14px;
}

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

.movie-card-body p {
  min-height: 46px;
  margin: 0 0 12px;
  color: #94a3b8;
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-tags,
.movie-meta,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.movie-tags span {
  padding: 4px 8px;
  font-size: 12px;
}

.movie-meta span {
  padding: 3px 0;
  color: #64748b;
  background: transparent;
  font-size: 12px;
}

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

.category-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 26px;
}

.category-card img {
  position: absolute;
  inset: 0;
}

.category-card-content {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 20px;
}

.category-card h2,
.category-card h3 {
  margin: 0 0 8px;
  color: #fff7ed;
}

.category-card p {
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 18px;
}

.rank-no {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  font-weight: 900;
}

.rank-info h2,
.rank-info h3 {
  margin: 0 0 4px;
  color: #f8fafc;
  font-size: 18px;
}

.rank-info p {
  margin: 0;
  color: #94a3b8;
  font-size: 14px;
}

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

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

.page-title {
  max-width: 780px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 26px;
}

.filter-bar input {
  width: min(520px, 100%);
  height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  color: #e2e8f0;
  outline: none;
  background: rgba(15, 23, 42, 0.72);
}

.filter-bar input:focus {
  border-color: rgba(245, 158, 11, 0.56);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.filter-empty {
  display: none;
  padding: 32px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.54);
  text-align: center;
}

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

.detail-shell {
  padding: 34px 0 26px;
}

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

.player-card {
  overflow: hidden;
  border-radius: 30px;
}

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

.player-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #111827;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.78));
  cursor: pointer;
}

.player-overlay.is-hidden {
  display: none;
}

.player-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 18px 52px rgba(245, 158, 11, 0.36);
  font-size: 34px;
  padding-left: 5px;
}

.detail-title {
  padding: 24px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 0;
}

.detail-meta span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.82);
  font-size: 13px;
}

.detail-side {
  display: grid;
  gap: 18px;
}

.detail-poster,
.detail-card {
  overflow: hidden;
  border-radius: 26px;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  background: #111827;
}

.detail-card {
  padding: 22px;
}

.detail-card h2 {
  margin: 0 0 12px;
  color: #fff7ed;
  font-size: 20px;
}

.detail-card p {
  margin: 0;
  color: #cbd5e1;
}

.detail-tags span {
  padding: 6px 10px;
  font-size: 13px;
}

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

.prev-next {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}

.prev-next a {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.54);
}

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

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

.footer-grid h2 {
  margin: 0 0 14px;
  color: #f8fafc;
  font-size: 16px;
}

.footer-grid p {
  max-width: 480px;
  margin: 14px 0 0;
  color: #94a3b8;
}

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

.footer-links a {
  color: #94a3b8;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  color: #64748b;
  text-align: center;
}

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

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

  .hero-poster,
  .detail-side {
    max-width: 420px;
  }
}

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

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

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

  .hero {
    min-height: auto;
    padding-top: 42px;
  }

  .hero::before {
    inset: 18px -10px 0;
    border-radius: 28px;
  }

  .section-head,
  .filter-bar,
  .prev-next {
    align-items: stretch;
    flex-direction: column;
  }

  .movie-grid,
  .movie-grid.compact,
  .movie-list,
  .category-grid,
  .related-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .rank-item {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .rank-meta {
    display: none;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .page-shell,
  .hero,
  .section,
  .detail-shell,
  .page-hero,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1180px);
  }

  .brand-text strong {
    font-size: 17px;
  }

  .brand-text em {
    display: none;
  }

  .movie-grid,
  .movie-grid.compact,
  .movie-list,
  .category-grid,
  .related-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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