:root {
  --bg: #ffffff;
  --soft: #fafaf9;
  --stone: #e7e5e4;
  --line: #d6d3d1;
  --text: #1e293b;
  --muted: #64748b;
  --light: #f8fafc;
  --amber: #d97706;
  --amber-dark: #b45309;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.scrolled,
.site-header:hover {
  background: rgba(250, 250, 249, 0.96);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  max-width: 1280px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 12px 24px rgba(217, 119, 6, 0.28);
  font-size: 14px;
}

.desktop-nav {
  display: flex;
  gap: 6px;
}

.nav-link {
  padding: 10px 15px;
  border-radius: 12px;
  color: #334155;
  font-weight: 650;
  transition: all 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber-dark);
  background: rgba(251, 191, 36, 0.12);
}

.menu-button {
  display: none;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  padding: 8px 12px;
  color: #0f172a;
}

.mobile-nav {
  display: none;
  padding: 10px 20px 18px;
  background: rgba(250, 250, 249, 0.98);
  border-top: 1px solid var(--stone);
}

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

.hero {
  position: relative;
  height: 85vh;
  min-height: 620px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 55% 20%, rgba(245, 158, 11, 0.25), transparent 35%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.25) 55%, rgba(0, 0, 0, 0.35));
}

.hero-content {
  position: absolute;
  left: 50%;
  top: 54%;
  transform: translate(-50%, -50%);
  width: min(920px, calc(100% - 40px));
  text-align: center;
  color: white;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(120, 53, 15, 0.46);
  border: 1px solid rgba(251, 191, 36, 0.34);
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 760px;
  margin: 0 auto 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-tags span,
.detail-tags span {
  padding: 6px 12px;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.hero-actions,
.scroll-actions,
.section-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: all 0.25s ease;
}

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

.primary-button:hover {
  transform: translateY(-2px) scale(1.02);
}

.ghost-button {
  color: white;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 34px;
  line-height: 1;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  transition: all 0.3s ease;
}

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

.quick-search,
.section,
.footer-grid,
.page-main,
.breadcrumbs {
  width: min(1280px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}

.quick-search {
  margin-top: -44px;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 22px;
  align-items: center;
  padding: 26px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.quick-search h2,
.section-head h2,
.footer-grid h2,
.detail-section h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 28px;
  line-height: 1.2;
}

.quick-search p,
.section-head p,
.footer-grid p,
.category-card p,
.category-panel p,
.page-hero p,
.detail-section p {
  margin: 0;
  color: var(--muted);
}

input[type="search"] {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 18px;
  color: var(--text);
  background: white;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.03);
}

input[type="search"]:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.section {
  padding: 72px 0;
}

.section-soft {
  width: 100%;
  max-width: none;
  padding-left: max(20px, calc((100vw - 1280px) / 2));
  padding-right: max(20px, calc((100vw - 1280px) / 2));
  background: linear-gradient(180deg, var(--soft), #ffffff);
}

.section-head {
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-more {
  color: var(--amber-dark);
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.scroll-actions button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--stone);
  border-radius: 12px;
  color: #475569;
  background: white;
  font-size: 24px;
}

.movie-scroll {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 12px;
  scrollbar-width: none;
}

.movie-scroll::-webkit-scrollbar {
  display: none;
}

.scroll-item {
  width: min(360px, 82vw);
  flex: 0 0 auto;
}

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

.movie-card,
.movie-row {
  overflow: hidden;
  border: 1px solid rgba(214, 211, 209, 0.8);
  border-radius: 20px;
  background: white;
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.movie-row:hover,
.category-card:hover,
.category-panel:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.card-image,
.row-image {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.card-image {
  aspect-ratio: 16 / 9;
}

.card-image img,
.row-image img,
.category-card img,
.category-covers img,
.poster-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover img,
.movie-row:hover img,
.category-card:hover img,
.category-panel:hover img {
  transform: scale(1.08);
}

.play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: all 0.25s ease;
}

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

.year-badge,
.rank-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 5px 9px;
  border-radius: 10px;
  color: white;
  background: rgba(0, 0, 0, 0.58);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: 12px;
  right: auto;
  background: linear-gradient(135deg, #f59e0b, #b45309);
}

.card-body,
.row-body {
  padding: 16px;
}

.card-title,
.row-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 48px;
  color: #0f172a;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
}

.card-title:hover,
.row-title:hover {
  color: var(--amber-dark);
}

.card-body p,
.row-body p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-meta span {
  padding: 5px 8px;
  border-radius: 9px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
}

.movie-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 145px;
}

.row-image {
  min-height: 145px;
}

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

.category-card,
.category-panel {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--stone);
  background: white;
  box-shadow: var(--soft-shadow);
  transition: all 0.25s ease;
}

.category-card {
  position: relative;
  min-height: 230px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: white;
}

.category-card img {
  position: absolute;
  inset: 0;
  z-index: 0;
  filter: brightness(0.56);
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 1;
}

.category-card span {
  font-size: 20px;
  font-weight: 900;
}

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

.page-main {
  padding-top: 104px;
}

.page-hero {
  min-height: 320px;
  padding: 70px 48px;
  border-radius: 30px;
  color: white;
  background:
    radial-gradient(circle at 80% 15%, rgba(245, 158, 11, 0.36), transparent 32%),
    linear-gradient(135deg, #111827, #334155 62%, #78350f);
  box-shadow: var(--shadow);
}

.small-hero h1 {
  max-width: 820px;
}

.small-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.filter-bar {
  max-width: 560px;
  margin-top: 26px;
}

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

.category-panel {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 22px;
  padding: 18px;
  align-items: center;
}

.category-covers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  height: 150px;
}

.category-covers img {
  border-radius: 16px;
}

.category-panel h2 {
  margin: 0 0 10px;
  color: #0f172a;
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: var(--amber-dark);
}

.detail-main {
  width: min(1280px, calc(100% - 40px));
}

.detail-hero {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 36px;
  align-items: center;
  padding: 34px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 90% 10%, rgba(245, 158, 11, 0.2), transparent 34%),
    linear-gradient(135deg, #111827, #334155);
  color: white;
  box-shadow: var(--shadow);
}

.poster-card {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.detail-info h1 {
  font-size: clamp(34px, 5vw, 62px);
}

.detail-line {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
}

.detail-tags {
  justify-content: flex-start;
  margin: 26px 0;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.detail-meta div {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
}

.detail-meta dt {
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.detail-meta dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.player-section {
  margin: 36px 0 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #020617;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 0;
  color: white;
  background: rgba(2, 6, 23, 0.42);
  cursor: pointer;
}

.play-layer.hidden {
  display: none;
}

.play-layer span {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 20px 45px rgba(217, 119, 6, 0.32);
  font-size: 30px;
}

.play-layer strong {
  max-width: 80%;
  font-size: 22px;
}

.detail-section {
  width: 100%;
  padding: 42px 0 20px;
}

.detail-section h2 {
  margin-top: 28px;
}

.detail-section p {
  max-width: 960px;
  font-size: 18px;
}

.site-footer {
  margin-top: 40px;
  padding: 54px 0 28px;
  background: #f5f5f4;
  border-top: 1px solid var(--stone);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
}

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

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--amber-dark);
}

.copyright {
  width: min(1280px, calc(100% - 40px));
  margin: 34px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.is-hidden {
  display: none !important;
}

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

  .detail-hero {
    grid-template-columns: 280px 1fr;
  }
}

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

  .menu-button {
    display: block;
  }

  .hero {
    height: 78vh;
    min-height: 560px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search,
  .section-head,
  .footer-grid,
  .detail-hero,
  .category-panel,
  .category-panel-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
  }

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

  .movie-row {
    grid-template-columns: 150px 1fr;
  }

  .detail-hero {
    padding: 22px;
  }

  .poster-card {
    max-width: 320px;
  }
}

@media (max-width: 560px) {
  .nav-wrap,
  .quick-search,
  .section,
  .footer-grid,
  .page-main,
  .breadcrumbs,
  .detail-main {
    width: min(100% - 24px, 1280px);
  }

  .nav-wrap {
    height: 64px;
    padding: 0 12px;
  }

  .brand,
  .footer-brand {
    font-size: 18px;
  }

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

  .page-hero {
    padding: 54px 22px;
    border-radius: 24px;
  }

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

  .movie-row {
    grid-template-columns: 1fr;
  }

  .row-image {
    aspect-ratio: 16 / 9;
  }

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