:root {
  --bg: #fafaf9;
  --ink: #292524;
  --muted: #78716c;
  --line: rgba(68, 64, 60, 0.14);
  --amber: #d97706;
  --amber-light: #fbbf24;
  --stone-dark: #1c1917;
  --stone-card: #292524;
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.18), transparent 28rem), var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #292524, #1c1917 55%, #292524);
  border-bottom: 2px solid var(--amber);
  box-shadow: 0 20px 45px rgba(12, 10, 9, 0.32);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #fef3c7;
}

.site-logo-mark {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 0.8rem;
  background: linear-gradient(135deg, var(--amber), var(--amber-light));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(217, 119, 6, 0.35);
}

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

.site-logo-text strong {
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.site-logo-text small {
  margin-top: 0.18rem;
  color: rgba(254, 243, 199, 0.72);
  font-size: 0.75rem;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.nav-link,
.mobile-nav-link {
  color: rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 0.55rem 0.9rem;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
}

.mobile-menu-button {
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 700;
}

.mobile-nav {
  display: grid;
  gap: 0.4rem;
  padding: 0 0 1rem;
}

.mobile-nav-link {
  padding: 0.75rem 0.9rem;
}

.hero-section {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: #0c0a09;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.65s ease, transform 1.1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay,
.detail-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12, 10, 9, 0.94), rgba(12, 10, 9, 0.62), rgba(12, 10, 9, 0.36)), linear-gradient(0deg, rgba(12, 10, 9, 0.86), transparent 56%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 680px;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
  padding-top: 4rem;
  padding-bottom: 5rem;
}

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

.hero-badge,
.detail-label,
.page-hero span,
.section-heading span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fef3c7;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.48rem 0.85rem;
  backdrop-filter: blur(6px);
}

.hero-copy h1,
.hero-main-title {
  margin-top: 1.25rem;
  color: #fff;
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  line-height: 0.95;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero-movie-title {
  margin-top: 1rem;
  color: #fbbf24;
  font-size: clamp(1.5rem, 4vw, 3rem);
  line-height: 1.08;
  font-weight: 900;
}

.hero-copy p {
  margin-top: 1.25rem;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.16rem;
  line-height: 1.8;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.3rem;
}

.hero-meta span,
.detail-meta span,
.detail-tags span,
.detail-genre-list span,
.movie-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-meta span,
.detail-meta span {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.88);
  padding: 0.42rem 0.75rem;
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  border-radius: 0.9rem;
  padding: 0.75rem 1.2rem;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--amber), var(--amber-light));
  color: #fff;
  box-shadow: 0 20px 40px rgba(217, 119, 6, 0.34);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  backdrop-filter: blur(8px);
}

.ghost-button.dark {
  border-color: rgba(68, 64, 60, 0.18);
  background: #fff;
  color: var(--ink);
}

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

.hero-poster-card {
  display: none;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
}

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

.hero-poster-card span {
  display: block;
  padding: 1rem;
  color: #fff;
  font-weight: 900;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: none;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 2rem;
  backdrop-filter: blur(8px);
}

.hero-prev {
  left: 1.5rem;
}

.hero-next {
  right: 1.5rem;
}

.hero-dots {
  position: absolute;
  right: 0;
  bottom: 2rem;
  left: 0;
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 0.55rem;
}

.hero-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 2rem;
  background: #fbbf24;
}

.quick-search {
  position: relative;
  z-index: 8;
  margin-top: -2.6rem;
}

.quick-search-box,
.search-panel {
  display: grid;
  gap: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.9rem;
  box-shadow: 0 22px 60px rgba(41, 37, 36, 0.16);
  backdrop-filter: blur(14px);
}

.quick-search-box input,
.quick-search-box button,
.inline-filter input,
.inline-filter select,
.search-panel input,
.search-panel select {
  min-height: 3rem;
  border-radius: 0.85rem;
  outline: none;
}

.quick-search-box input,
.inline-filter input,
.inline-filter select,
.search-panel input,
.search-panel select {
  border: 1px solid rgba(68, 64, 60, 0.16);
  background: #fff;
  color: var(--ink);
  padding: 0 1rem;
}

.quick-search-box button {
  background: var(--stone-dark);
  color: #fff;
  font-weight: 900;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.quick-links a {
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0.55rem 0.9rem;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(41, 37, 36, 0.08);
}

.content-section {
  padding-top: 4rem;
  padding-bottom: 2rem;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-heading span {
  background: #fef3c7;
  color: var(--amber);
}

.section-heading h2 {
  margin-top: 0.45rem;
  color: var(--ink);
  font-size: clamp(1.65rem, 3vw, 2.5rem);
  font-weight: 950;
  letter-spacing: -0.03em;
}

.section-heading a {
  color: var(--amber);
  font-weight: 900;
}

.section-heading.inverse h2,
.section-heading.inverse a {
  color: #fff;
}

.inline-filter {
  display: grid;
  width: 100%;
  gap: 0.6rem;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(68, 64, 60, 0.12);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 26px rgba(41, 37, 36, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  box-shadow: 0 24px 44px rgba(41, 37, 36, 0.14);
}

.movie-card.is-hidden {
  display: none;
}

.movie-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #292524;
}

.movie-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.28s ease, opacity 0.2s ease;
}

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

.movie-type,
.movie-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 0.32rem 0.58rem;
}

.movie-type {
  top: 0.6rem;
  left: 0.6rem;
  background: rgba(217, 119, 6, 0.94);
  color: #fff;
}

.movie-year {
  right: 0.6rem;
  bottom: 0.6rem;
  background: rgba(12, 10, 9, 0.78);
  color: #fff;
}

.rank-badge {
  top: 0.6rem;
  right: 0.6rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  background: #fbbf24;
  color: #1c1917;
}

.movie-card-body {
  padding: 0.9rem;
}

.movie-card-body h3 {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.35;
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 2.9rem;
  margin-top: 0.45rem;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-tags,
.detail-tags,
.detail-genre-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.movie-tags span {
  background: #f5f5f4;
  color: #57534e;
  padding: 0.28rem 0.5rem;
}

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

.category-card {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(68, 64, 60, 0.12);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 30px rgba(41, 37, 36, 0.09);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.6rem;
  background: #292524;
}

.category-thumbs img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 0.7rem;
  object-fit: cover;
}

.category-card-body {
  padding: 1rem;
}

.category-card-body h3 {
  font-size: 1.2rem;
  font-weight: 950;
}

.category-card-body p {
  margin-top: 0.45rem;
  color: var(--muted);
  line-height: 1.65;
}

.category-card-body span {
  display: inline-flex;
  margin-top: 0.8rem;
  color: var(--amber);
  font-weight: 900;
}

.rank-section {
  margin-top: 3rem;
  padding: 4rem 0;
  background: linear-gradient(135deg, #1c1917, #292524 60%, #0c0a09);
}

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

.page-main {
  min-height: 70vh;
}

.page-hero {
  padding-top: 4rem;
  padding-bottom: 1rem;
}

.page-hero span {
  background: #fef3c7;
  color: var(--amber);
}

.page-hero h1 {
  margin-top: 1rem;
  font-size: clamp(2.3rem, 6vw, 4.4rem);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.page-hero p {
  margin-top: 1rem;
  max-width: 760px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.8;
}

.search-panel {
  grid-template-columns: 1fr;
  margin-bottom: 1.4rem;
}

.detail-main {
  background: #0c0a09;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 700;
}

.breadcrumb a:hover {
  color: #fbbf24;
}

.detail-layout {
  display: grid;
  gap: 2rem;
  align-items: center;
  margin-top: 2rem;
}

.detail-poster {
  max-width: 320px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1.6rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

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

.detail-info {
  color: #fff;
}

.detail-label {
  background: rgba(251, 191, 36, 0.18);
}

.detail-info h1 {
  margin-top: 1rem;
  max-width: 860px;
  font-size: clamp(2rem, 6vw, 4.4rem);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.detail-one-line {
  margin-top: 1rem;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.12rem;
  line-height: 1.75;
}

.detail-tags span,
.detail-genre-list span {
  background: rgba(255, 255, 255, 0.11);
  color: #fef3c7;
  padding: 0.38rem 0.66rem;
}

.player-section {
  position: relative;
  z-index: 5;
  margin-top: -4rem;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 1.35rem;
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(217, 119, 6, 0.26), rgba(0, 0, 0, 0.45));
  cursor: pointer;
}

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

.player-button {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  border-radius: 999px;
  background: #fff;
  color: #1c1917;
  padding: 0.95rem 1.35rem;
  font-weight: 950;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.32);
}

.player-icon {
  display: grid;
  width: 2.45rem;
  height: 2.45rem;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--amber-light));
  color: #fff;
}

.detail-content {
  display: grid;
  gap: 1.2rem;
  padding-top: 3rem;
  padding-bottom: 1rem;
}

.detail-article,
.detail-side {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  padding: 1.2rem;
}

.detail-article h2,
.detail-side h2 {
  font-size: 1.35rem;
  font-weight: 950;
}

.detail-article p {
  margin-top: 0.85rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
  line-height: 1.9;
}

.detail-side .movie-card {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

.detail-side .movie-card-body h3 {
  color: #fff;
}

.detail-side .movie-card-body p {
  color: rgba(255, 255, 255, 0.7);
}

.side-list {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.detail-main .content-section h2,
.detail-main .section-heading h2 {
  color: #fff;
}

.detail-main .section-heading a {
  color: #fbbf24;
}

.site-footer {
  margin-top: 4rem;
  padding: 2.5rem 0;
  background: #1c1917;
  color: rgba(255, 255, 255, 0.72);
}

.footer-brand {
  color: #fef3c7;
  font-size: 1.25rem;
  font-weight: 950;
}

.site-footer p {
  margin-top: 0.4rem;
}

@media (min-width: 640px) {
  .quick-search-box {
    grid-template-columns: minmax(0, 1fr) auto;
  }

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

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

@media (min-width: 768px) {
  .desktop-nav {
    display: flex;
  }

  .mobile-menu-button {
    display: none;
  }

  .section-heading {
    flex-direction: row;
    align-items: end;
    justify-content: space-between;
  }

  .inline-filter {
    width: auto;
    grid-template-columns: 220px 160px;
  }

  .search-panel {
    grid-template-columns: minmax(0, 1fr) 220px 200px;
  }

  .detail-layout {
    grid-template-columns: 320px minmax(0, 1fr);
  }

  .detail-content {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
}

@media (min-width: 1024px) {
  .hero-content {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .hero-poster-card {
    display: block;
  }

  .hero-arrow {
    display: grid;
  }

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

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

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