:root {
  --amber: #d97706;
  --amber-dark: #b45309;
  --orange: #f97316;
  --gold: #f59e0b;
  --ink: #1f2937;
  --muted: #6b7280;
  --soft: #f8fafc;
  --card: #ffffff;
  --line: #e5e7eb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #fff7ed 0%, #f8fafc 36%, #ffffff 100%);
  color: var(--ink);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, var(--amber-dark), var(--orange));
  box-shadow: 0 14px 32px rgba(180, 83, 9, 0.28);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  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-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

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

.site-nav a {
  opacity: 0.94;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.site-nav a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

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

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.6) 42%, rgba(0, 0, 0, 0.12) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.76) 0%, rgba(0, 0, 0, 0.05) 44%, rgba(0, 0, 0, 0.42) 100%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100% - 1180px) / 2));
  right: 32px;
  bottom: 82px;
  max-width: 790px;
  color: #fff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.26);
}

.hero h1 {
  margin: 22px 0 10px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  font-weight: 900;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.42);
}

.hero h2 {
  margin: 0 0 14px;
  font-size: clamp(25px, 3vw, 42px);
  font-weight: 850;
  color: #fde68a;
}

.hero p {
  max-width: 720px;
  margin: 0 0 28px;
  font-size: clamp(16px, 1.7vw, 22px);
  color: #e5e7eb;
}

.hero-actions,
.detail-stats,
.filter-row,
.card-meta,
.card-tags,
.tag-cloud,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

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

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

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  box-shadow: 0 16px 30px rgba(245, 158, 11, 0.32);
}

.button-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(12px);
}

.button.full {
  width: 100%;
  margin-top: 18px;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.25s ease, transform 0.25s ease;
}

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

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.page-stack {
  padding: 54px 0 10px;
  display: grid;
  gap: 58px;
}

.page-main {
  padding: 42px 0 16px;
}

.content-section {
  position: relative;
}

.spotlight-section,
.category-section,
.search-section {
  padding: clamp(24px, 4vw, 44px);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.94), rgba(255, 237, 213, 0.86));
  box-shadow: var(--shadow);
}

.ranking-preview,
.related-section {
  padding: clamp(24px, 4vw, 44px);
  border-radius: 32px;
  background: #fff;
  box-shadow: var(--shadow);
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading.with-link {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.section-heading h2 {
  margin: 0 0 6px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.18;
  font-weight: 900;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.text-link {
  color: var(--amber-dark);
  font-weight: 800;
}

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

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

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

.movie-card {
  min-width: 0;
}

.card-link {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.card-link:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

.card-poster {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #78350f, #111827);
}

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

.movie-card-featured .card-poster {
  aspect-ratio: 4 / 3;
}

.card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.42s ease;
}

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

.card-duration {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.68);
  font-size: 12px;
  font-weight: 700;
}

.card-body {
  padding: 16px;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
}

.movie-card-compact .card-body {
  padding: 12px;
}

.card-body h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 850;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.movie-card-compact h3 {
  font-size: 14px;
  -webkit-line-clamp: 1;
}

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

.movie-card-compact p {
  display: none;
}

.card-meta {
  margin-top: auto;
  color: #4b5563;
  font-size: 13px;
}

.card-meta span:first-child {
  color: #ca8a04;
  font-weight: 800;
}

.card-tags span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 9px;
}

.region-layout {
  display: grid;
  gap: 28px;
}

.region-block h3 {
  margin: 0 0 14px;
  padding-left: 12px;
  border-left: 5px solid var(--gold);
  font-size: 22px;
}

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

.category-tile,
.category-card {
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile {
  min-height: 142px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #fde68a;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.16);
}

.category-tile strong,
.category-main h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
}

.category-tile span,
.category-main p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.category-overview {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 48px;
}

.category-card {
  overflow: hidden;
}

.category-main {
  display: block;
  padding: 26px;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
}

.category-main span {
  display: inline-flex;
  margin-top: 16px;
  color: var(--amber-dark);
  font-weight: 850;
}

.category-samples {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 26px 24px;
}

.category-samples a {
  color: #4b5563;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.rank-number {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  font-size: 18px;
  font-weight: 900;
}

.movie-row a {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  gap: 16px;
  min-height: 112px;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.09);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-row a:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 34px rgba(15, 23, 42, 0.16);
}

.movie-row img {
  width: 144px;
  height: 100%;
  object-fit: cover;
}

.movie-row div {
  min-width: 0;
  padding: 16px 18px 16px 0;
}

.movie-row h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.movie-row span {
  color: #6b7280;
  font-size: 13px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 36px;
  padding: clamp(34px, 6vw, 72px);
  border-radius: 32px;
  color: #fff;
  background: linear-gradient(135deg, #78350f, #f97316);
  box-shadow: var(--shadow);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.46;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.08));
}

.page-hero > * {
  position: relative;
  z-index: 1;
}

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

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

.page-hero span {
  display: block;
  max-width: 760px;
  color: #f3f4f6;
  font-size: 17px;
}

.filter-panel {
  margin: 0 0 30px;
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 800;
}

.search-box {
  margin-bottom: 16px;
}

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

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

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

.player-shell {
  padding: 26px 0 34px;
  background: #050505;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: #d1d5db;
  font-size: 14px;
}

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

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.52);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.68));
  cursor: pointer;
}

.player-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 6px;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  box-shadow: 0 18px 44px rgba(245, 158, 11, 0.34);
  font-size: 34px;
}

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

.player-message {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 4;
  display: none;
  max-width: calc(100% - 36px);
  padding: 10px 14px;
  border-radius: 12px;
  color: #fff;
  background: rgba(220, 38, 38, 0.92);
  font-weight: 700;
}

.player-message.is-visible {
  display: block;
}

.detail-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 36px;
  padding: 44px 0 10px;
}

.detail-poster {
  position: sticky;
  top: 92px;
  align-self: start;
}

.detail-poster img {
  width: 100%;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.detail-content {
  min-width: 0;
  padding: clamp(24px, 4vw, 42px);
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-kicker {
  margin: 0 0 10px;
  color: var(--amber-dark);
  font-weight: 900;
}

.detail-content h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.05;
  font-weight: 950;
}

.detail-one-line {
  margin: 0 0 18px;
  color: #4b5563;
  font-size: 19px;
}

.detail-stats span {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-weight: 800;
  font-size: 13px;
}

.detail-stats span:first-child {
  color: #92400e;
  background: #fef3c7;
}

.detail-content h2 {
  margin: 30px 0 10px;
  font-size: 24px;
  font-weight: 900;
}

.detail-content p {
  color: #374151;
  font-size: 16px;
}

.detail-table {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-table dl {
  margin: 0;
  padding: 14px;
  border-radius: 16px;
  background: #f9fafb;
}

.detail-table dt {
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}

.detail-table dd {
  margin: 4px 0 0;
  font-weight: 850;
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: 30px;
}

.footer-inner h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 22px;
}

.footer-inner p {
  margin: 0;
  max-width: 640px;
}

.footer-links a {
  color: #fef3c7;
  font-size: 14px;
  font-weight: 800;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px;
  text-align: center;
  font-size: 13px;
  color: #9ca3af;
}

[data-card].is-hidden {
  display: none;
}

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

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

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

@media (max-width: 820px) {
  .header-inner {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 11px 0;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .site-nav {
    width: 100%;
    display: none;
    padding: 12px 0 4px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 10px 0;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    left: 24px;
    bottom: 72px;
  }

  .hero-control {
    width: 44px;
    height: 44px;
    font-size: 32px;
  }

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

  .section-heading.with-link,
  .footer-inner,
  .detail-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .detail-poster {
    position: static;
    max-width: 320px;
  }
}

@media (max-width: 560px) {
  .container,
  .header-inner,
  .footer-inner {
    width: min(100% - 22px, 1180px);
  }

  .brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .hero {
    min-height: 590px;
  }

  .hero-content {
    left: 16px;
    right: 16px;
  }

  .hero-actions {
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .hero-prev,
  .hero-next {
    display: none;
  }

  .page-stack {
    gap: 38px;
  }

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .category-grid,
  .category-overview,
  .filter-row,
  .detail-table {
    grid-template-columns: 1fr;
  }

  .movie-row a {
    grid-template-columns: 106px minmax(0, 1fr);
  }

  .movie-row img {
    width: 106px;
  }

  .movie-row div {
    padding: 12px 12px 12px 0;
  }

  .movie-row h3 {
    font-size: 16px;
  }

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

  .rank-number {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }

  .player-wrap {
    border-radius: 18px;
  }

  .player-overlay span {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
