:root {
  --bg: #0a0e1a;
  --bg-soft: #111827;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-strong: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.12);
  --text: #f3f4f6;
  --muted: #aeb7c8;
  --muted-strong: #cbd5e1;
  --amber: #f59e0b;
  --amber-soft: #fbbf24;
  --orange: #f97316;
  --danger: #ef4444;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --radius: 20px;
}

* {
  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.16), transparent 34rem),
    radial-gradient(circle at 85% 12%, rgba(249, 115, 22, 0.12), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 14, 26, 0.78);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.32);
  color: #0a0e1a;
  font-size: 16px;
}

.brand-name,
.footer-brand {
  font-size: 21px;
  background: linear-gradient(90deg, var(--amber-soft), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.nav-link,
.mobile-link {
  color: var(--muted-strong);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--amber-soft);
}

.header-search,
.mobile-search,
.search-panel {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.search-panel input,
.filter-select {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  outline: none;
}

.header-search input,
.mobile-search input {
  width: 210px;
  padding: 10px 14px;
}

.header-search button,
.mobile-search button,
.search-panel button,
.primary-button,
.watch-link {
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #111827;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(245, 158, 11, 0.24);
  cursor: pointer;
}

.header-search button,
.mobile-search button,
.search-panel button {
  padding: 10px 16px;
}

.primary-button,
.ghost-button,
.watch-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
}

.ghost-button {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  backdrop-filter: blur(12px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  padding: 9px;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--text);
}

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

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

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #050812;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 14, 26, 0.96) 0%, rgba(10, 14, 26, 0.72) 42%, rgba(10, 14, 26, 0.24) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(10, 14, 26, 0.58) 38%, transparent 72%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  height: 100%;
  min-height: 640px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: end;
  gap: 54px;
  padding: 120px 0 86px;
}

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

.hero-copy h1 {
  margin: 0 0 10px;
  font-size: clamp(36px, 5vw, 66px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.hero-movie-title {
  margin: 0 0 18px;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.08;
  font-weight: 900;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.38);
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 28px;
  color: #d1d5db;
  font-size: 19px;
  line-height: 1.8;
}

.hero-tags,
.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.movie-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: var(--amber-soft);
  font-size: 13px;
  font-weight: 700;
}

.hero-tags {
  margin-bottom: 16px;
}

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

.hero-poster {
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: translateY(16px);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(10, 14, 26, 0.46);
  color: var(--text);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 32px;
  height: 5px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

.hero-dot.active {
  background: linear-gradient(90deg, var(--amber), var(--orange));
}

.section {
  padding: 58px 0;
}

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

.section-heading h2,
.page-title h1,
.detail-copy h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-title p,
.category-intro,
.movie-desc,
.rank-content p,
.detail-copy p {
  color: var(--muted);
  line-height: 1.78;
}

.section-more,
.text-link {
  color: var(--amber-soft);
  font-weight: 800;
}

.search-hero {
  margin-top: -54px;
  position: relative;
  z-index: 8;
}

.search-box {
  padding: 22px;
  border-radius: var(--radius);
}

.search-panel input {
  flex: 1;
  min-width: 220px;
  padding: 14px 18px;
}

.filter-select {
  padding: 13px 16px;
}

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

.category-card {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: auto -50px -80px auto;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.22), transparent 68%);
}

.category-card h2,
.category-card h3,
.movie-card h3,
.rank-content h3,
.detail-info h1,
.compact-card strong {
  margin: 0;
}

.category-card h2,
.category-card h3 {
  position: relative;
  font-size: 24px;
  font-weight: 900;
}

.category-card p {
  position: relative;
  margin: 12px 0 0;
  color: var(--muted);
}

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

.movie-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img,
.compact-card:hover img,
.rank-cover:hover img {
  transform: scale(1.06);
}

.poster-badge,
.compact-rank {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(10, 14, 26, 0.72);
  color: var(--amber-soft);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

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

.movie-card h3 {
  margin-top: 12px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-meta {
  margin: 8px 0 0;
  color: #d1d5db;
  font-size: 13px;
}

.movie-desc {
  min-height: 74px;
  margin: 10px 0 0;
  font-size: 14px;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.watch-link {
  padding: 9px 13px;
  font-size: 13px;
}

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

.compact-card {
  position: relative;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  background: #111827;
}

.compact-card::after {
  content: "";
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(0deg, rgba(10, 14, 26, 0.95), rgba(10, 14, 26, 0));
}

.compact-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.compact-card strong,
.compact-card small {
  position: relative;
  z-index: 2;
}

.compact-card strong {
  font-size: 18px;
  line-height: 1.35;
}

.compact-card small {
  margin-top: 6px;
  color: var(--muted);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 90px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius);
}

.rank-item .rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(249, 115, 22, 0.16));
  color: var(--amber-soft);
  font-weight: 900;
}

.rank-cover {
  display: block;
  overflow: hidden;
  border-radius: 14px;
}

.rank-cover img {
  width: 90px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.rank-content h3 {
  font-size: 18px;
  font-weight: 900;
}

.rank-content p {
  margin: 8px 0;
  font-size: 14px;
}

.rank-meta {
  color: #d1d5db;
  font-size: 13px;
}

.page-title {
  padding: 58px 0 24px;
}

.page-title h1 {
  margin-bottom: 12px;
}

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

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

.breadcrumb a {
  color: var(--amber-soft);
}

.detail-main {
  padding: 34px 0 62px;
}

.detail-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
  gap: 28px;
  padding: 22px;
  border-radius: 28px;
  align-items: start;
}

.video-player {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  box-shadow: var(--shadow);
}

.video-player video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 22px;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: linear-gradient(0deg, rgba(10, 14, 26, 0.32), rgba(10, 14, 26, 0.1));
  color: #111827;
  cursor: pointer;
}

.play-overlay span {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 18px 48px rgba(245, 158, 11, 0.32);
  font-size: 30px;
  transform: translateX(2px);
}

.video-player.is-playing .play-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.detail-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-info h1 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.12;
  font-weight: 900;
}

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

.detail-meta span {
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #d1d5db;
  font-size: 14px;
}

.detail-one-line {
  color: var(--muted-strong);
  font-size: 17px;
  line-height: 1.8;
}

.detail-poster {
  overflow: hidden;
  border-radius: 18px;
}

.detail-poster img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  margin-top: 24px;
}

.detail-copy,
.related-box,
.info-box {
  padding: 24px;
  border-radius: var(--radius);
}

.detail-copy h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 28px;
}

.detail-copy p + h2 {
  margin-top: 28px;
}

.info-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.info-list span {
  color: var(--muted);
}

.related-stack {
  display: grid;
  gap: 12px;
}

.related-mini {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.related-mini img {
  width: 74px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.related-mini strong {
  display: block;
  font-size: 15px;
}

.related-mini small {
  color: var(--muted);
}

.pagination-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.pagination-row a {
  flex: 1;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted-strong);
}

.pagination-row a:last-child {
  text-align: right;
}

.search-results-note {
  margin: 12px 0 22px;
  color: var(--muted);
}

.load-more-row {
  margin-top: 24px;
  text-align: center;
}

.load-more-row button {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  padding: 12px 22px;
  cursor: pointer;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(5, 8, 18, 0.76);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 16px;
  color: var(--muted-strong);
}

@media (max-width: 1100px) {
  .header-search {
    display: none;
  }

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

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

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

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

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

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

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

  .hero-content {
    grid-template-columns: 1fr;
    align-items: end;
    gap: 24px;
    padding: 96px 0 72px;
  }

  .hero-poster {
    display: none;
  }

  .hero-arrow {
    display: none;
  }

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

  .category-grid,
  .feature-strip,
  .rank-list {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 44px 80px 1fr;
  }

  .rank-cover img {
    width: 80px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .header-inner {
    min-height: 64px;
  }

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

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

  .section {
    padding: 42px 0;
  }

  .movie-grid {
    gap: 14px;
  }

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

  .card-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .search-panel input,
  .filter-select {
    width: 100%;
  }

  .detail-hero-card,
  .detail-copy,
  .related-box,
  .info-box {
    padding: 16px;
  }

  .pagination-row {
    flex-direction: column;
  }

  .pagination-row a:last-child {
    text-align: left;
  }
}
