* {
  box-sizing: border-box;
}

:root {
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --orange: #f97316;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --card: #ffffff;
  --shadow: 0 18px 42px rgba(17, 24, 39, 0.12);
  --radius: 20px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

img {
  display: block;
  width: 100%;
  height: auto;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, var(--accent-dark), var(--orange));
  box-shadow: 0 12px 30px rgba(217, 119, 6, 0.25);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  font-weight: 700;
}

.desktop-nav a,
.mobile-nav a {
  opacity: 0.88;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  opacity: 1;
  transform: translateY(-1px);
}

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 2px;
  background: #ffffff;
}

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

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

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

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.52) 45%, rgba(0, 0, 0, 0.2));
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100% - 1180px) / 2));
  bottom: 72px;
  width: min(760px, calc(100% - 64px));
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 7px 14px;
  border-radius: 999px;
  color: #fff7ed;
  background: rgba(245, 158, 11, 0.9);
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.06;
  text-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.hero p {
  max-width: 720px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 2.2vw, 22px);
  line-height: 1.8;
}

.hero-meta,
.movie-meta,
.movie-submeta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hero-meta {
  margin-bottom: 26px;
  color: #ffffff;
}

.hero-meta span:first-child,
.detail-meta span:first-child {
  color: #ffffff;
  background: var(--accent);
}

.hero-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  font-weight: 700;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 16px 26px rgba(245, 158, 11, 0.32);
}

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

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

.primary-button:hover {
  background: var(--accent-dark);
}

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

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.05);
}

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

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

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

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

.hero-dot.active {
  width: 32px;
  background: var(--accent);
}

.quick-search-panel {
  margin-top: -32px;
  position: relative;
  z-index: 4;
}

.quick-search-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px;
  border-radius: 24px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 24px;
  align-items: center;
  backdrop-filter: blur(14px);
}

.quick-search-inner h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.quick-search-inner p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.main-stack {
  padding: 56px 0 20px;
  display: grid;
  gap: 64px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-heading div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-heading span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--accent-dark);
  background: #fffbeb;
  font-weight: 900;
}

.section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 34px);
}

.section-heading a {
  color: var(--accent-dark);
  font-weight: 800;
}

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

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

.poster-card,
.horizontal-card,
.ranking-card,
.content-card,
.side-card,
.wide-category,
.category-tile {
  background: var(--card);
  border: 1px solid rgba(229, 231, 235, 0.92);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
}

.poster-card {
  overflow: hidden;
  border-radius: 16px;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.poster-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 34px rgba(17, 24, 39, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

.poster-link img,
.horizontal-cover img,
.ranking-cover img,
.category-tile img,
.wide-cover img,
.poster-side img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.poster-card:hover .poster-link img,
.horizontal-card:hover .horizontal-cover img,
.ranking-card:hover .ranking-cover img,
.category-tile:hover img,
.wide-category:hover img {
  transform: scale(1.08);
}

.duration-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.poster-body {
  padding: 14px;
}

.movie-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.movie-title:hover {
  color: var(--accent-dark);
}

.movie-meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  justify-content: space-between;
}

.movie-meta span:first-child {
  color: var(--accent-dark);
  font-weight: 900;
}

.movie-submeta {
  margin-top: 8px;
  color: #9ca3af;
  font-size: 12px;
  justify-content: space-between;
}

.feature-band {
  padding: 36px;
  border-radius: 30px;
  background: linear-gradient(90deg, #fffbeb, #fff7ed);
  box-shadow: var(--shadow);
}

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

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 22px;
  color: #ffffff;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.18));
}

.category-tile img {
  position: absolute;
  inset: 0;
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 1;
  display: block;
}

.category-tile span {
  margin: 122px 18px 8px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile p {
  margin: 0 18px 18px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.6;
}

.ranking-band {
  padding: 36px;
  border-radius: 30px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  overflow: hidden;
  border-radius: 16px;
}

.ranking-cover {
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: #111827;
}

.ranking-info {
  padding: 16px 18px 16px 0;
}

.ranking-info p,
.horizontal-body p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

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

.horizontal-card {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  overflow: hidden;
  border-radius: 16px;
}

.horizontal-cover {
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: #111827;
}

.horizontal-body {
  padding: 18px 18px 18px 0;
}

.site-footer {
  margin-top: 72px;
  color: #d1d5db;
  background: linear-gradient(90deg, #1f2937, #111827);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}

.footer-grid h2,
.footer-grid h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.footer-grid p {
  margin: 0;
  line-height: 1.8;
}

.footer-grid a {
  display: block;
  margin-bottom: 10px;
  transition: color 0.2s ease;
}

.footer-grid a:hover {
  color: #fbbf24;
}

.subpage {
  padding-bottom: 20px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #d97706, #f97316 52%, #111827);
}

.page-hero {
  min-height: 300px;
  display: grid;
  place-items: center;
  text-align: center;
}

.page-hero div {
  width: min(760px, calc(100% - 32px));
  padding: 54px 0;
}

.page-hero p {
  margin: 0 0 12px;
  color: #fffbeb;
  font-weight: 900;
}

.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
}

.page-hero span {
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.8;
}

.mini-hero {
  min-height: 260px;
}

.page-toolbar {
  padding: 42px 0 0;
}

.filter-bar {
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: 1fr 180px 160px;
  gap: 14px;
}

.compact-filter {
  grid-template-columns: 1fr 170px;
  margin-bottom: 0;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.empty-state {
  display: none;
  margin: 30px auto 0;
  padding: 24px;
  border-radius: 18px;
  text-align: center;
  color: var(--muted);
  background: #ffffff;
}

.empty-state.show {
  display: block;
}

.wide-category-grid {
  padding-top: 42px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.wide-category {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 22px;
  align-items: center;
  overflow: hidden;
  border-radius: 22px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wide-category:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.wide-cover {
  height: 170px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  background: #111827;
}

.wide-category h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.wide-category p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.7;
}

.wide-category span {
  color: var(--accent-dark);
  font-weight: 900;
}

.rank-row {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 16px;
  align-items: stretch;
}

.rank-number {
  display: grid;
  place-items: center;
  min-height: 126px;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--orange));
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(245, 158, 11, 0.26);
}

.detail-hero {
  min-height: 520px;
}

.detail-hero > img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
}

.detail-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.24));
}

.detail-hero-content {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 88px 0 70px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

.crumbs a:hover {
  color: #ffffff;
}

.detail-hero h1 {
  max-width: 900px;
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.1;
}

.detail-hero p {
  max-width: 820px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  line-height: 1.8;
}

.detail-layout {
  margin-top: -60px;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
  object-fit: contain;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.45));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  padding-left: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.36);
  font-size: 36px;
}

.player-shell.playing .play-overlay {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.content-card,
.side-card {
  margin-top: 24px;
  padding: 26px;
  border-radius: 22px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.content-card p,
.side-card p {
  margin: 0;
  color: #4b5563;
  line-height: 2;
}

.detail-side {
  align-self: start;
  position: sticky;
  top: 88px;
}

.poster-side img {
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 3 / 4;
  background: #111827;
}

.poster-side h2 {
  margin-top: 18px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-cloud span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #92400e;
  background: #fffbeb;
  font-weight: 800;
  font-size: 13px;
}

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

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

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

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

  .detail-side {
    position: static;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero-content {
    bottom: 78px;
  }

  .hero-arrow {
    display: none;
  }

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

  .filter-bar,
  .compact-filter {
    grid-template-columns: 1fr;
  }

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

  .feature-band,
  .ranking-band {
    padding: 24px;
  }

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

  .horizontal-card,
  .ranking-card,
  .wide-category {
    grid-template-columns: 130px 1fr;
  }

  .wide-cover {
    height: 150px;
    grid-template-columns: 1fr;
  }

  .wide-cover img:nth-child(2) {
    display: none;
  }

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

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

@media (max-width: 560px) {
  .brand {
    font-size: 18px;
  }

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

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

  .hero-content {
    left: 20px;
    width: calc(100% - 40px);
  }

  .poster-grid,
  .small-grid,
  .feature-grid,
  .category-grid {
    gap: 14px;
  }

  .poster-body {
    padding: 12px;
  }

  .horizontal-card,
  .ranking-card,
  .wide-category,
  .rank-row {
    grid-template-columns: 1fr;
  }

  .ranking-info,
  .horizontal-body {
    padding: 14px;
  }

  .rank-number {
    min-height: 54px;
  }

  .detail-layout {
    margin-top: -36px;
  }

  .content-card,
  .side-card {
    padding: 20px;
  }
}
