* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #1c1917;
  --bg-deep: #0c0a09;
  --panel: #292524;
  --panel-soft: #3f3a37;
  --border: rgba(168, 162, 158, 0.18);
  --text: #fafaf9;
  --muted: #a8a29e;
  --dim: #78716c;
  --accent: #d97706;
  --accent-soft: #f59e0b;
  --accent-light: #fde68a;
  --danger: #ef4444;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(217, 119, 6, 0.2), transparent 26rem),
    radial-gradient(circle at 85% 20%, rgba(120, 53, 15, 0.32), transparent 28rem),
    linear-gradient(180deg, #1c1917 0%, #0c0a09 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(28, 25, 23, 0.92);
  border-bottom: 1px solid rgba(68, 64, 60, 0.9);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1240px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.3);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-title {
  color: #fffbeb;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 20px;
}

.logo-subtitle {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-links a {
  color: #d6d3d1;
  font-weight: 600;
  font-size: 15px;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--accent-soft);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-search {
  position: relative;
  width: 280px;
}

.header-search input,
.search-panel input,
.filter-select {
  width: 100%;
  border: 1px solid rgba(120, 113, 108, 0.8);
  background: rgba(41, 37, 36, 0.92);
  color: #f5f5f4;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
  height: 42px;
  padding: 0 16px 0 42px;
}

.search-panel input,
.filter-select {
  height: 48px;
  padding: 0 16px;
}

.header-search input:focus,
.search-panel input:focus,
.filter-select:focus {
  border-color: var(--accent-soft);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.18);
  background: rgba(41, 37, 36, 1);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dim);
  pointer-events: none;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: #e7e5e4;
  background: rgba(68, 64, 60, 0.72);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-panel a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: #d6d3d1;
  font-weight: 600;
}

.mobile-panel a:hover {
  color: var(--accent-soft);
  background: rgba(68, 64, 60, 0.56);
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: var(--bg-deep);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  filter: saturate(1.05) contrast(1.05);
}

.hero-slide.is-active .hero-image {
  animation: heroZoom 7s ease both;
}

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 10, 9, 0.98) 0%, rgba(28, 25, 23, 0.88) 34%, rgba(28, 25, 23, 0.55) 62%, rgba(12, 10, 9, 0.22) 100%),
    linear-gradient(0deg, rgba(12, 10, 9, 1) 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.65fr);
  gap: 44px;
  align-items: center;
  padding: 58px 0 70px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-light);
  background: rgba(146, 64, 14, 0.36);
  border: 1px solid rgba(245, 158, 11, 0.36);
  border-radius: 999px;
  padding: 7px 13px;
  font-weight: 700;
  font-size: 13px;
}

.hero h1,
.page-hero h1,
.detail-title,
.section-title h2 {
  margin: 0;
  color: #fffbeb;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.hero h1 {
  margin-top: 22px;
  font-size: clamp(40px, 7vw, 72px);
  max-width: 820px;
}

.hero p {
  margin: 20px 0 0;
  color: #d6d3d1;
  font-size: 18px;
  max-width: 660px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-meta span,
.tag,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(120, 53, 15, 0.55);
  border: 1px solid rgba(245, 158, 11, 0.26);
  font-size: 13px;
  font-weight: 650;
}

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

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

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 18px 32px rgba(217, 119, 6, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 22px 42px rgba(217, 119, 6, 0.38);
}

.btn-ghost {
  color: #fef3c7;
  background: rgba(41, 37, 36, 0.72);
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.hero-side {
  align-self: end;
  display: grid;
  gap: 14px;
}

.hero-side-card {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(41, 37, 36, 0.76);
  border: 1px solid rgba(168, 162, 158, 0.14);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.hero-side-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.4);
}

.hero-side-card img {
  width: 82px;
  height: 108px;
  border-radius: 12px;
  object-fit: cover;
  background: #44403c;
}

.hero-side-card strong {
  display: block;
  color: #fffbeb;
  margin-bottom: 4px;
}

.hero-side-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

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

.hero-dot {
  width: 34px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(214, 211, 209, 0.28);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--accent-soft);
}

.main-content {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 64px 0 0;
}

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

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

.section-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

.more-link {
  color: var(--accent-light);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(41, 37, 36, 0.9);
  border: 1px solid rgba(168, 162, 158, 0.12);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.2);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: var(--shadow);
}

.card-cover {
  position: relative;
  display: block;
  height: 255px;
  overflow: hidden;
  background: #44403c;
}

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

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.12));
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-cover::after {
  opacity: 1;
}

.play-badge {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
  color: white;
  background: rgba(217, 119, 6, 0.92);
  border-radius: 50%;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.year-pill {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(8px);
}

.card-content {
  padding: 16px;
}

.card-title {
  display: block;
  margin: 0 0 9px;
  color: #fafaf9;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.card-title:hover {
  color: var(--accent-soft);
}

.card-desc {
  height: 46px;
  overflow: hidden;
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 154px;
  border-radius: var(--radius);
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(120, 53, 15, 0.9), rgba(41, 37, 36, 0.92)),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.3), transparent 14rem);
  border: 1px solid rgba(245, 158, 11, 0.22);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.52);
}

.category-card h3 {
  margin: 0 0 10px;
  color: #fffbeb;
  font-size: 22px;
}

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

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 78px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(41, 37, 36, 0.88);
  border: 1px solid rgba(168, 162, 158, 0.12);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.36);
}

.rank-no {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-weight: 900;
  color: white;
  background: linear-gradient(135deg, #f59e0b, #92400e);
}

.rank-item img {
  width: 78px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  background: #44403c;
}

.rank-item strong {
  display: block;
  margin-bottom: 4px;
  color: #fffbeb;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.page-hero {
  padding: 64px 0 34px;
  border-bottom: 1px solid rgba(168, 162, 158, 0.1);
  background:
    radial-gradient(circle at 10% 0%, rgba(217, 119, 6, 0.24), transparent 25rem),
    linear-gradient(180deg, rgba(41, 37, 36, 0.74), transparent);
}

.page-hero .main-content {
  display: grid;
  gap: 18px;
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 56px);
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--dim);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--accent-light);
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 14px;
  padding: 18px;
  margin: 24px 0 8px;
  border-radius: 18px;
  background: rgba(41, 37, 36, 0.74);
  border: 1px solid rgba(168, 162, 158, 0.12);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(300px, 0.52fr);
  gap: 28px;
  align-items: start;
  padding-top: 34px;
}

.player-card,
.detail-card {
  border-radius: var(--radius);
  background: rgba(41, 37, 36, 0.88);
  border: 1px solid rgba(168, 162, 158, 0.14);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

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

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.16)),
    transparent;
  cursor: pointer;
}

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

.play-overlay span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.92);
  box-shadow: 0 16px 36px rgba(217, 119, 6, 0.36);
  font-size: 18px;
  font-weight: 900;
}

.detail-card {
  padding: 22px;
}

.detail-title {
  font-size: clamp(30px, 4vw, 48px);
}

.detail-poster {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 18px;
  background: #44403c;
}

.info-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.info-list li {
  display: flex;
  gap: 12px;
  color: #d6d3d1;
}

.info-list b {
  min-width: 54px;
  color: var(--accent-light);
}

.article-body {
  padding: 26px;
}

.article-body h2 {
  margin: 0 0 12px;
  color: #fffbeb;
  font-size: 26px;
}

.article-body p {
  margin: 0 0 18px;
  color: #d6d3d1;
  font-size: 16px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.empty-state {
  display: none;
  padding: 42px;
  text-align: center;
  color: var(--muted);
  border-radius: 18px;
  background: rgba(41, 37, 36, 0.72);
  border: 1px solid rgba(168, 162, 158, 0.14);
}

.site-footer {
  margin-top: 84px;
  border-top: 1px solid rgba(68, 64, 60, 0.9);
  background: rgba(12, 10, 9, 0.72);
}

.footer-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.25fr repeat(3, 0.75fr);
  gap: 28px;
}

.footer-wrap h3,
.footer-wrap h4 {
  margin: 0 0 12px;
  color: #fffbeb;
}

.footer-wrap p,
.footer-wrap a {
  color: var(--muted);
  font-size: 14px;
}

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

.back-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  width: 46px;
  height: 46px;
  display: none;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: white;
  background: var(--accent);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
  cursor: pointer;
}

.back-top.is-visible {
  display: grid;
}

@keyframes heroZoom {
  from {
    transform: scale(1.03);
  }
  to {
    transform: scale(1.1);
  }
}

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

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

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

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

@media (max-width: 860px) {
  .nav-links,
  .nav-actions {
    display: none;
  }

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

  .mobile-panel.is-open {
    display: block;
  }

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

  .hero-content {
    padding: 46px 0 76px;
  }

  .hero-side {
    display: none;
  }

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

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

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

@media (max-width: 560px) {
  .nav-wrap,
  .main-content,
  .footer-wrap,
  .mobile-panel {
    width: min(100% - 22px, 1240px);
  }

  .logo-title {
    font-size: 17px;
  }

  .logo-subtitle {
    font-size: 11px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero p {
    font-size: 16px;
  }

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

  .card-cover {
    height: 280px;
  }

  .rank-item {
    grid-template-columns: 42px 68px 1fr;
    gap: 10px;
  }

  .rank-item img {
    width: 68px;
    height: 86px;
  }

  .article-body,
  .detail-card {
    padding: 18px;
  }
}
