:root {
  --bg: #ffffff;
  --paper: #f8f7f4;
  --paper-deep: #e7e5e0;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #f1f5f9;
  --line: #e7e5e4;
  --accent: #d97706;
  --accent-deep: #b45309;
  --accent-soft: #fffbeb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 6px 18px rgba(15, 23, 42, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  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, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(250, 250, 249, 0.95);
  border-color: rgba(231, 229, 228, 0.85);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

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

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 12px 24px rgba(217, 119, 6, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  color: #334155;
  font-weight: 650;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.home-page .site-header.transparent:not(.scrolled) .nav-link,
.home-page .site-header.transparent:not(.scrolled) .brand {
  color: #fff;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-deep);
  background: rgba(255, 251, 235, 0.86);
}

.menu-toggle {
  display: none;
  border: 0;
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  border-radius: 12px;
  width: 42px;
  height: 42px;
}

.mobile-nav {
  display: none;
  padding: 10px 24px 18px;
  background: rgba(250, 250, 249, 0.98);
  border-top: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

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

.hero {
  position: relative;
  min-height: 86vh;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.22));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 880px;
  padding: 120px 24px 180px;
  text-align: center;
  color: #fff;
}

.eyebrow {
  margin: 0 0 14px;
  color: #fbbf24;
  font-size: 13px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.eyebrow.dark {
  color: var(--accent-deep);
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero h1 {
  font-size: clamp(42px, 8vw, 84px);
}

.hero h2 {
  margin-top: 18px;
  font-size: clamp(28px, 5vw, 56px);
}

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

.hero-actions {
  margin-top: 34px;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 30px rgba(217, 119, 6, 0.3);
}

.btn.primary:hover {
  background: var(--accent-deep);
}

.btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(8px);
}

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  font-size: 34px;
  line-height: 1;
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.32);
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

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

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

.hero-picks {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 72px;
  width: min(1060px, calc(100% - 48px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.content-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px;
}

.intro-block {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.8fr);
  gap: 32px;
  align-items: center;
}

.intro-copy h2,
.section-head h2,
.player-section h2,
.detail-content h2 {
  margin: 0;
  color: #1e293b;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  font-weight: 850;
}

.intro-copy p:last-child {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.quick-search,
.filter-bar {
  display: flex;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.quick-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 16px;
  color: var(--ink);
  outline: none;
}

.quick-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--accent);
}

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

.section-head a {
  color: var(--accent-deep);
  font-weight: 750;
}

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

.movie-card {
  display: block;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(231, 229, 228, 0.72);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: rgba(217, 119, 6, 0.22);
}

.poster,
.thumb {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e7e5e4;
}

.poster {
  aspect-ratio: 16 / 10;
}

.poster.wide {
  aspect-ratio: 16 / 9;
}

.poster img,
.thumb img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.card-body strong {
  color: #1e293b;
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

.card-body em {
  min-height: 44px;
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.tag-line,
.meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag-line span,
.meta-row span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  color: #92400e;
  background: var(--accent-soft);
}

.meta-row span {
  color: #475569;
  background: #f1f5f9;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 118px 1fr;
  align-items: stretch;
}

.horizontal-card .thumb {
  min-height: 112px;
}

.horizontal-card .card-body strong {
  -webkit-line-clamp: 2;
}

.horizontal-card .card-body em {
  min-height: auto;
}

.large-card {
  position: relative;
  color: #fff;
}

.large-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 24px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.16), transparent);
}

.large-overlay strong {
  font-size: 24px;
  line-height: 1.2;
}

.large-overlay em {
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-style: normal;
}

.large-info {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  color: #475569;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}

.movie-rail {
  position: relative;
}

.rail-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 8px 2px 18px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.rail-track::-webkit-scrollbar {
  display: none;
}

.rail-item {
  flex: 0 0 360px;
}

.rail-btn {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 42px;
  height: 42px;
  transform: translateY(-50%);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 28px;
  box-shadow: var(--shadow-soft);
}

.rail-btn.left {
  left: -12px;
}

.rail-btn.right {
  right: -12px;
}

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

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

.category-card {
  position: relative;
  min-height: 172px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 22px;
  overflow: hidden;
  border-radius: 20px;
  color: #fff;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-soft);
  isolation: isolate;
}

.category-card.tall {
  min-height: 240px;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.2));
  transition: background 0.2s ease;
}

.category-card:hover::before {
  background: linear-gradient(to top, rgba(180, 83, 9, 0.8), rgba(0, 0, 0, 0.26));
}

.category-card span {
  font-size: 24px;
  font-weight: 850;
}

.category-card strong {
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 500;
}

.rank-section {
  background: linear-gradient(to bottom, #fff, #fafaf9);
}

.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.rank-list li a {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 68px;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.rank-list span {
  color: var(--accent-deep);
  font-size: 24px;
  font-weight: 850;
}

.rank-list strong {
  font-size: 18px;
}

.rank-list em {
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
}

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

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

.page-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px 36px;
}

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

.page-hero p:last-child {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.small-hero,
.category-hero {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.search-page-bar {
  margin-bottom: 28px;
}

.search-page-bar select {
  max-width: 180px;
}

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

.breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 0;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--accent-deep);
  font-weight: 700;
}

.detail-main {
  background: linear-gradient(to bottom, #fafaf9, #fff 420px);
}

.detail-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 24px 48px;
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 40px;
  align-items: center;
}

.detail-cover {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow);
  background: #e7e5e4;
}

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

.lead {
  margin: 22px 0 0;
  color: #334155;
  font-size: 20px;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #334155;
  background: #f1f5f9;
  font-size: 14px;
  font-weight: 700;
}

.detail-tags {
  margin-top: 18px;
}

.player-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 52px;
}

.player-section h2 {
  margin-bottom: 20px;
}

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

.video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.56));
  transition: opacity 0.2s ease;
}

.play-layer span {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 14px 36px rgba(217, 119, 6, 0.35);
  font-size: 30px;
}

.play-layer strong {
  font-size: 18px;
}

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

.detail-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 24px;
  display: grid;
  gap: 28px;
}

.detail-content article {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.detail-content p {
  margin: 16px 0 0;
  color: #334155;
  font-size: 17px;
}

.related-section {
  padding-top: 44px;
}

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

.site-footer {
  margin-top: 40px;
  background: linear-gradient(to bottom, #f5f5f4, #e7e5e4);
  border-top: 1px solid var(--line);
}

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

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

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

.footer-links a {
  padding: 9px 12px;
  border-radius: 999px;
  color: #334155;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.footer-bottom {
  padding: 18px 24px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid rgba(214, 211, 209, 0.8);
  font-size: 14px;
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-picks {
    display: none;
  }

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

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

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

@media (max-width: 780px) {
  .nav-inner {
    height: 64px;
    padding: 0 16px;
  }

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

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

  .hero {
    min-height: 78vh;
  }

  .hero-content {
    padding: 96px 20px 118px;
  }

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

  .hero h2 {
    font-size: 30px;
  }

  .hero-arrow {
    display: none;
  }

  .content-section,
  .page-hero,
  .player-section,
  .detail-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .intro-block,
  .footer-inner,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .quick-search,
  .filter-bar {
    flex-direction: column;
  }

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

  .rail-item {
    flex-basis: 300px;
  }

  .rank-list li a {
    grid-template-columns: 44px 1fr;
  }

  .rank-list em {
    grid-column: 2;
  }

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

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

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

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

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

  .horizontal-card {
    grid-template-columns: 104px 1fr;
  }
}
