:root {
  --site-bg: #fafaf9;
  --card-bg: #ffffff;
  --text: #292524;
  --muted: #78716c;
  --line: #e7e5e4;
  --amber: #b45309;
  --amber-bright: #f59e0b;
  --amber-soft: #fef3c7;
  --dark: #1c1917;
  --shadow: 0 20px 50px rgba(41, 37, 36, 0.12);
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--site-bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(231, 229, 228, 0.9);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--dark);
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #d97706, #92400e);
  box-shadow: 0 10px 28px rgba(180, 83, 9, 0.28);
}

.logo-text {
  font-size: 18px;
  white-space: nowrap;
}

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

.nav-link,
.mobile-nav-link {
  color: #57534e;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.top-search {
  width: 260px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 999px;
}

.top-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px 10px;
  color: var(--text);
}

.top-search button,
.hero-search button,
.filter-bar button,
.primary-button,
.ghost-button,
.ranking-action,
.section-more {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--amber);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.top-search button:hover,
.hero-search button:hover,
.filter-bar button:hover,
.primary-button:hover,
.ranking-action:hover,
.section-more:hover {
  background: #92400e;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(146, 64, 14, 0.22);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.24);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--amber-soft);
  padding: 10px;
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #92400e;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 24px 18px;
}

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

.main-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 24px 64px;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  color: #ffffff;
  background: #1c1917;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.65fr);
  gap: 42px;
  align-items: center;
  padding: 118px max(24px, calc((100vw - 1280px) / 2 + 24px)) 72px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(28, 25, 23, 0.92), rgba(28, 25, 23, 0.68), rgba(28, 25, 23, 0.25));
  z-index: 1;
}

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

.hero-content,
.hero-poster-wrap {
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.28);
  font-weight: 800;
  margin-bottom: 20px;
}

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

.hero p {
  max-width: 720px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.hero-search {
  max-width: 560px;
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  padding: 12px 14px;
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.68);
}

.hero-poster-wrap {
  justify-self: end;
  width: min(360px, 100%);
  border-radius: 30px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
}

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

.hero-dots {
  position: absolute;
  z-index: 4;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 32px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.content-section {
  margin-top: 56px;
}

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

.section-heading h2,
.page-heading h1 {
  margin: 0 0 8px;
  color: var(--dark);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-heading p {
  margin: 0;
  color: var(--muted);
  max-width: 720px;
}

.section-more {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--card-bg);
  border: 1px solid rgba(231, 229, 228, 0.92);
  box-shadow: 0 12px 30px rgba(41, 37, 36, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

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

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

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

.poster-year,
.poster-play {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
}

.poster-year {
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(146, 64, 14, 0.9);
  font-size: 13px;
}

.poster-play {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

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

.movie-card-meta,
.ranking-meta,
.detail-meta,
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.movie-card-meta a,
.detail-meta a,
.breadcrumb a {
  color: var(--amber);
  font-weight: 800;
}

.movie-card h3 {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  color: var(--dark);
}

.movie-card h3 a:hover,
.ranking-info h3 a:hover,
.detail-related h3 a:hover {
  color: var(--amber);
}

.movie-card p {
  margin: 0;
  color: #625b55;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.movie-tags span,
.detail-tags span {
  padding: 5px 9px;
  color: #92400e;
  background: #fef3c7;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border-radius: var(--radius-md);
  color: #ffffff;
  box-shadow: var(--shadow);
}

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

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

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28, 25, 23, 0.9), rgba(28, 25, 23, 0.22));
}

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

.category-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 950;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(41, 37, 36, 0.06);
}

.filter-bar input,
.filter-bar select {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  padding: 12px 14px;
  background: #fafaf9;
  color: var(--text);
}

.no-results {
  display: none;
  padding: 40px;
  text-align: center;
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--muted);
  border: 1px solid var(--line);
}

.no-results.show {
  display: block;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 58px 96px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 26px rgba(41, 37, 36, 0.06);
}

.rank-number {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #d97706, #78350f);
  font-weight: 950;
}

.ranking-poster img {
  width: 96px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.ranking-info h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 950;
}

.ranking-info p {
  margin: 0 0 8px;
  color: #625b55;
}

.ranking-meta span {
  padding: 4px 9px;
  border-radius: 999px;
  background: #f5f5f4;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000000;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.18));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(245, 158, 11, 0.92);
  font-size: 30px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.36);
}

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

.detail-card,
.side-card {
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 16px 38px rgba(41, 37, 36, 0.08);
}

.detail-card {
  padding: 28px;
  margin-top: 22px;
}

.detail-card h1 {
  margin: 14px 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  font-weight: 950;
  color: var(--dark);
  letter-spacing: -0.04em;
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 12px;
  color: var(--dark);
  font-size: 24px;
  font-weight: 950;
}

.detail-card p {
  color: #57534e;
  margin: 0 0 18px;
}

.detail-cover {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #1c1917;
  box-shadow: var(--shadow);
}

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

.side-card {
  padding: 20px;
  margin-top: 18px;
}

.detail-related {
  display: grid;
  gap: 14px;
}

.related-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

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

.related-item h3 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 900;
}

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

.breadcrumb {
  margin-bottom: 18px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 24px;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 28px;
}

.footer-inner p {
  margin: 12px 0 0;
  color: var(--muted);
  max-width: 560px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #57534e;
  background: #f5f5f4;
  font-weight: 700;
}

.footer-links a:hover {
  color: #92400e;
  background: #fef3c7;
}

.footer-bottom {
  padding: 18px 24px 28px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

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

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

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

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

  .detail-sidebar {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 18px;
  }

  .side-card {
    margin-top: 0;
  }
}

@media (max-width: 800px) {
  .header-inner {
    min-height: 64px;
    padding: 0 16px;
  }

  .desktop-nav {
    display: none;
  }

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

  .logo-text {
    font-size: 16px;
  }

  .hero {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 92px 18px 70px;
  }

  .hero-slide::before {
    background: linear-gradient(to top, rgba(28, 25, 23, 0.95), rgba(28, 25, 23, 0.68), rgba(28, 25, 23, 0.28));
  }

  .hero-poster-wrap {
    justify-self: start;
    width: 210px;
  }

  .hero-dots {
    left: 18px;
  }

  .hero-search {
    flex-direction: column;
    border-radius: 18px;
  }

  .hero-search button {
    width: 100%;
  }

  .main-wrap {
    padding: 28px 16px 48px;
  }

  .section-heading,
  .page-heading {
    display: block;
  }

  .section-more {
    margin-top: 14px;
  }

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

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

  .filter-bar {
    display: grid;
  }

  .ranking-item {
    grid-template-columns: 44px 76px minmax(0, 1fr);
  }

  .ranking-action {
    grid-column: 2 / 4;
    text-align: center;
  }

  .ranking-poster img {
    width: 76px;
  }

  .detail-card {
    padding: 22px;
  }

  .detail-sidebar {
    display: block;
  }

  .detail-cover {
    max-width: 260px;
  }

  .side-card {
    margin-top: 18px;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

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

  .ranking-poster {
    display: none;
  }

  .ranking-action {
    grid-column: 1 / 3;
  }

  .player-overlay span {
    width: 66px;
    height: 66px;
    font-size: 24px;
  }
}
