* {
  box-sizing: border-box;
}

:root {
  --stone-950: #0c0a09;
  --stone-900: #1c1917;
  --stone-800: #292524;
  --stone-700: #44403c;
  --stone-600: #57534e;
  --stone-500: #78716c;
  --stone-300: #d6d3d1;
  --stone-200: #e7e5e4;
  --stone-100: #f5f5f4;
  --stone-50: #fafaf9;
  --amber-700: #b45309;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-300: #fcd34d;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(28, 25, 23, 0.14);
  --soft-shadow: 0 10px 25px rgba(28, 25, 23, 0.1);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--stone-800);
  background: linear-gradient(180deg, var(--stone-50), var(--stone-100));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: var(--white);
  background: linear-gradient(90deg, var(--stone-800), var(--stone-700), var(--stone-800));
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.22);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 72px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.logo-icon {
  width: 36px;
  height: 36px;
  color: var(--amber-500);
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong,
.footer-logo span {
  font-size: 20px;
  letter-spacing: 0.04em;
}

.brand-text small {
  color: var(--stone-300);
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  border-radius: 12px;
  color: var(--stone-200);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 13px;
  font-size: 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--white);
  background: var(--amber-600);
}

.header-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.header-search input {
  width: 150px;
  border: 0;
  outline: none;
  color: var(--white);
  background: transparent;
  padding: 10px 12px;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.66);
}

.header-search button,
.search-page-form button {
  border: 0;
  color: var(--white);
  background: var(--amber-600);
  padding: 10px 15px;
  cursor: pointer;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

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

.mobile-link {
  padding: 12px 14px;
}

.hero {
  position: relative;
  height: 72vh;
  min-height: 540px;
  overflow: hidden;
  background: var(--stone-900);
}

.hero-stage,
.hero-slide,
.detail-bg {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transition: opacity 0.65s ease;
  pointer-events: none;
}

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

.hero-slide img,
.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.hero-overlay,
.detail-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(28, 25, 23, 0.98), rgba(28, 25, 23, 0.56), rgba(28, 25, 23, 0.2));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  padding-bottom: 78px;
  color: var(--white);
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  color: var(--white);
  background: var(--amber-600);
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.eyebrow.dark {
  background: rgba(245, 158, 11, 0.16);
  color: var(--amber-300);
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  max-width: 820px;
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.08;
}

.hero p,
.page-hero p,
.detail-copy .lead {
  max-width: 760px;
  margin: 0 0 24px;
  color: var(--stone-200);
  font-size: clamp(17px, 2.1vw, 22px);
}

.hero-tags,
.tag-list,
.rank-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-list span {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  padding: 5px 10px;
  font-size: 13px;
  backdrop-filter: blur(12px);
}

.hero-actions,
.detail-actions,
.ranking-strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
  color: var(--white);
  background: var(--amber-600);
  padding: 13px 24px;
  box-shadow: 0 12px 30px rgba(217, 119, 6, 0.28);
}

.primary-button:hover,
.header-search button:hover,
.search-page-form button:hover {
  background: var(--amber-500);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  padding: 12px 22px;
}

.ghost-button.light {
  color: var(--stone-800);
  border-color: var(--stone-300);
  background: rgba(255, 255, 255, 0.92);
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover,
.movie-card:hover,
.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  right: 40px;
  bottom: 34px;
  z-index: 5;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 32px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--amber-500);
}

.hero-picks {
  margin-top: -46px;
  position: relative;
  z-index: 6;
}

.section-block {
  padding: 58px 0;
}

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

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

.section-heading h2,
.content-card h2,
.related-panel h2 {
  margin: 0 0 8px;
  color: var(--stone-800);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
}

.section-heading p,
.content-card p,
.related-panel p {
  margin: 0;
  color: var(--stone-600);
}

.text-link {
  color: var(--amber-700);
  padding: 8px 0;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--stone-800);
}

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

.movie-card:hover .poster-link img,
.related-mini:hover img,
.rank-item:hover img {
  transform: scale(1.07);
}

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.poster-badge {
  position: absolute;
  top: 10px;
  border-radius: 10px;
  color: var(--white);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

.category-badge {
  left: 10px;
  background: var(--amber-600);
}

.year-badge {
  right: 10px;
  background: rgba(28, 25, 23, 0.78);
  backdrop-filter: blur(12px);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: var(--stone-800);
  font-size: 17px;
  line-height: 1.35;
}

.card-body h3 a:hover,
.rank-copy h3 a:hover,
.related-mini:hover span {
  color: var(--amber-600);
}

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

.card-meta,
.rank-meta {
  color: var(--stone-500);
  font-size: 12px;
}

.card-meta span,
.rank-meta span {
  border-radius: 999px;
  background: var(--stone-100);
  padding: 4px 8px;
}

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

.category-card,
.category-overview-main {
  display: flex;
  min-height: 130px;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: var(--radius);
  color: var(--white);
  padding: 20px;
  box-shadow: var(--soft-shadow);
}

.category-card span,
.category-overview-main span {
  font-size: 24px;
  font-weight: 800;
}

.category-card small,
.category-overview-main small {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
}

.cat-action,
.ranking-hero {
  background: linear-gradient(135deg, #991b1b, #b45309);
}

.cat-suspense {
  background: linear-gradient(135deg, #312e81, #7c2d12);
}

.cat-scifi,
.search-hero {
  background: linear-gradient(135deg, #075985, #4c1d95);
}

.cat-romance {
  background: linear-gradient(135deg, #be185d, #9f1239);
}

.cat-comedy {
  background: linear-gradient(135deg, #ca8a04, #ea580c);
}

.cat-costume {
  background: linear-gradient(135deg, #7c2d12, #92400e);
}

.cat-crime {
  background: linear-gradient(135deg, #111827, #57534e);
}

.cat-urban,
.categories-hero {
  background: linear-gradient(135deg, #0f766e, #57534e);
}

.cat-animation {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.cat-doc {
  background: linear-gradient(135deg, #166534, #0f766e);
}

.ranking-strip {
  margin: 20px 0;
  color: var(--white);
  background: linear-gradient(90deg, var(--stone-800), var(--stone-900));
}

.ranking-strip-inner {
  justify-content: space-between;
  padding: 48px 0;
}

.ranking-strip h2 {
  margin: 12px 0 8px;
  font-size: clamp(26px, 3vw, 40px);
}

.ranking-strip p {
  margin: 0;
  color: var(--stone-300);
}

.page-hero {
  color: var(--white);
  padding: 72px 0;
}

.page-hero .breadcrumb {
  margin-bottom: 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--amber-300);
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 16px;
  margin-bottom: 24px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--stone-600);
  font-size: 14px;
}

.filter-panel input,
.filter-panel select,
.search-page-form input {
  width: 100%;
  border: 1px solid var(--stone-200);
  border-radius: 14px;
  outline: none;
  padding: 12px 14px;
  color: var(--stone-800);
  background: var(--stone-50);
}

.filter-panel input:focus,
.filter-panel select:focus,
.search-page-form input:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.category-overview-card {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease;
}

.category-samples {
  display: grid;
  gap: 8px;
  padding: 18px;
  background: var(--white);
}

.category-samples a {
  color: var(--stone-700);
  font-size: 14px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 72px 220px 1fr;
  align-items: center;
  gap: 18px;
  border-radius: var(--radius);
  background: var(--white);
  padding: 16px;
  box-shadow: var(--soft-shadow);
}

.rank-number {
  color: var(--amber-600);
  font-size: 34px;
  font-weight: 900;
  text-align: center;
}

.rank-cover {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 9;
  background: var(--stone-800);
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.rank-copy h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-copy p {
  margin: 0 0 12px;
  color: var(--stone-600);
}

.search-page-form {
  display: grid;
  grid-template-columns: 1fr 110px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.search-page-form input {
  border-radius: 16px 0 0 16px;
  border-right: 0;
  background: var(--white);
}

.search-heading {
  margin-top: 28px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: var(--stone-900);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 46px 0 64px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

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

.detail-copy h1 {
  margin-top: 14px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 720px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.detail-meta li {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 12px;
  backdrop-filter: blur(12px);
}

.detail-meta span {
  display: block;
  color: var(--stone-300);
  font-size: 12px;
}

.detail-meta strong {
  color: var(--white);
  font-size: 15px;
}

.player-section {
  margin-top: -42px;
  position: relative;
  z-index: 5;
}

.player-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--stone-900);
  box-shadow: var(--shadow);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.66));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: var(--amber-600);
  box-shadow: 0 18px 42px rgba(217, 119, 6, 0.34);
  font-size: 34px;
  line-height: 1;
  padding-left: 5px;
}

.play-title {
  max-width: 80%;
  font-size: 22px;
  font-weight: 800;
  text-align: center;
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
  padding: 56px 0 18px;
}

.detail-article {
  display: grid;
  gap: 22px;
}

.content-card,
.related-panel {
  border-radius: var(--radius);
  background: var(--white);
  padding: 26px;
  box-shadow: var(--soft-shadow);
}

.content-card p {
  color: var(--stone-700);
  white-space: pre-line;
}

.highlight-card {
  background: linear-gradient(135deg, #fffbeb, #fff7ed);
}

.related-panel {
  align-self: start;
  position: sticky;
  top: 96px;
}

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

.related-mini {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: center;
}

.related-mini img {
  width: 110px;
  height: 68px;
  border-radius: 12px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-mini span {
  color: var(--stone-800);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.site-footer {
  margin-top: 50px;
  color: var(--stone-300);
  background: linear-gradient(180deg, var(--stone-800), var(--stone-900));
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
  padding: 46px 0;
}

.footer-brand p {
  max-width: 520px;
  color: var(--stone-300);
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px max(16px, calc((100vw - 1180px) / 2));
  color: var(--stone-500);
  font-size: 14px;
}

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

.empty-message {
  grid-column: 1 / -1;
  border-radius: var(--radius);
  background: var(--white);
  padding: 28px;
  color: var(--stone-600);
  text-align: center;
  box-shadow: var(--soft-shadow);
}

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

  .menu-button {
    display: block;
  }

  .header-search {
    margin-left: auto;
  }

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

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

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

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

  .related-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .header-inner {
    gap: 10px;
    min-height: 66px;
  }

  .brand-text strong {
    font-size: 17px;
  }

  .brand-text small {
    display: none;
  }

  .header-search {
    display: none;
  }

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

  .hero-content {
    padding-bottom: 86px;
  }

  .hero-controls {
    right: 20px;
    bottom: 24px;
  }

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

  .section-heading.with-link,
  .ranking-strip-inner,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-panel,
  .search-page-form,
  .rank-item,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-number {
    text-align: left;
  }

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

  .detail-hero-inner {
    padding-top: 32px;
  }

  .play-circle {
    width: 68px;
    height: 68px;
    font-size: 27px;
  }

  .play-title {
    font-size: 18px;
  }
}
