* {
  box-sizing: border-box;
}

:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-300: #fcd34d;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-400: #a8a29e;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --white: #ffffff;
  --shadow-soft: 0 20px 40px rgba(41, 37, 36, 0.12);
  --shadow-card: 0 12px 30px rgba(41, 37, 36, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--stone-50);
  color: var(--stone-800);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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: var(--white);
  background: linear-gradient(135deg, var(--amber-600), var(--amber-700));
  box-shadow: 0 10px 28px rgba(120, 53, 15, 0.22);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand:hover {
  opacity: 0.86;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--amber-700);
  background: var(--white);
}

.brand-icon svg {
  fill: currentColor;
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 21px;
  letter-spacing: 0.02em;
}

.brand-text em {
  margin-top: 3px;
  color: var(--amber-100);
  font-size: 12px;
  font-style: normal;
}

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

.main-nav a {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--amber-100);
}

.site-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-search-form input {
  width: 210px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}

.site-search-form input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.site-search-form button,
.btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.site-search-form button {
  color: var(--amber-700);
  background: var(--white);
}

.site-search-form button:hover,
.btn:hover {
  transform: translateY(-1px);
}

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

.mobile-panel {
  display: none;
  padding: 12px 16px 18px;
  background: rgba(120, 53, 15, 0.24);
}

.mobile-panel a {
  display: block;
  padding: 10px 0;
  color: var(--white);
  font-weight: 600;
}

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

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(28, 25, 23, 0.92) 0%, rgba(28, 25, 23, 0.72) 44%, rgba(28, 25, 23, 0.22) 100%), linear-gradient(0deg, rgba(28, 25, 23, 0.82), rgba(28, 25, 23, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  min-height: 560px;
  gap: 48px;
  color: var(--white);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--amber-300);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 660px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 20px;
}

.hero-tags,
.detail-tags,
.detail-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-tags span,
.detail-tags span,
.detail-tag-cloud span {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.btn-primary {
  color: var(--white);
  background: var(--amber-600);
  box-shadow: 0 16px 32px rgba(217, 119, 6, 0.28);
}

.btn-primary:hover {
  background: var(--amber-700);
}

.btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
}

.hero-poster img {
  width: 100%;
  height: 440px;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--white);
  font-weight: 800;
  background: rgba(217, 119, 6, 0.92);
}

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

.hero-dots button {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--amber-300);
}

.search-panel {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
  align-items: center;
  margin-top: -44px;
  border-radius: var(--radius-xl);
  padding: 28px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.search-panel h2,
.section-heading h2,
.ranking-head h2,
.detail-main-card h2,
.detail-side-card h2 {
  margin: 0;
  color: var(--stone-800);
  font-size: 26px;
  line-height: 1.2;
}

.wide-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.wide-search input {
  width: 100%;
  border-color: var(--stone-200);
  color: var(--stone-800);
  background: var(--stone-100);
}

.wide-search input::placeholder {
  color: var(--stone-500);
}

.wide-search button {
  color: var(--white);
  background: var(--amber-600);
}

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

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

.section-heading p {
  margin: 8px 0 0;
  color: var(--stone-500);
}

.section-more,
.rank-more {
  color: var(--amber-700);
  font-weight: 800;
}

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

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

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

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(41, 37, 36, 0.14);
}

.movie-poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--stone-200);
}

.movie-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease;
}

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

.movie-type {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 8px;
  padding: 4px 8px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
}

.movie-hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  color: var(--white);
  text-align: center;
  opacity: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.78));
  transition: opacity 0.25s ease;
}

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

.play-circle {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  color: var(--white);
  background: var(--amber-600);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.28);
}

.movie-hover p {
  align-self: end;
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card-body {
  padding: 16px;
}

.movie-card-body h3 {
  min-height: 48px;
  margin: 0 0 8px;
  color: var(--stone-800);
  font-size: 17px;
  line-height: 1.4;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card-body p {
  margin: 0 0 12px;
  color: var(--stone-500);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-meta-line {
  display: flex;
  justify-content: space-between;
  color: var(--stone-500);
  font-size: 13px;
}

.movie-card-small .movie-card-body h3 {
  min-height: auto;
  font-size: 15px;
}

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

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

.category-tile {
  display: grid;
  gap: 10px;
  min-height: 150px;
  border-radius: var(--radius-xl);
  padding: 24px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), var(--stone-900));
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease;
}

.category-tile:nth-child(even) {
  background: linear-gradient(135deg, var(--stone-800), var(--amber-700));
}

.category-tile:hover {
  transform: translateY(-3px);
}

.category-tile span {
  font-size: 24px;
  font-weight: 900;
}

.category-tile strong {
  font-size: 36px;
  line-height: 1;
}

.category-tile em {
  color: rgba(255, 255, 255, 0.78);
  font-style: normal;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 26px;
}

.ranking-panel {
  align-self: start;
  border-radius: var(--radius-xl);
  padding: 24px;
  background: var(--stone-900);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}

.ranking-panel h2 {
  color: var(--white);
}

.rank-list,
.rank-page-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.rank-list li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.rank-list a {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  padding: 13px 0;
}

.rank-list span {
  color: var(--amber-300);
  font-weight: 900;
}

.rank-list strong,
.rank-list em {
  display: block;
}

.rank-list strong {
  color: var(--white);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-list em {
  color: var(--stone-400);
  font-size: 12px;
  font-style: normal;
}

.rank-more {
  display: inline-block;
  margin-top: 18px;
  color: var(--amber-300);
}

.page-hero {
  color: var(--white);
  background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.45), transparent 32%), linear-gradient(135deg, var(--stone-900), var(--amber-700));
}

.page-hero .container {
  padding: 76px 0;
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.genre-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.genre-chip {
  border-radius: 999px;
  padding: 11px 17px;
  color: var(--stone-800);
  background: var(--white);
  box-shadow: var(--shadow-card);
  font-weight: 800;
}

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

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

.rank-row a {
  display: grid;
  grid-template-columns: 76px 86px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  border-radius: var(--radius-lg);
  padding: 14px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.rank-row.top-rank a {
  background: linear-gradient(135deg, var(--amber-50), var(--white));
}

.rank-number {
  color: var(--amber-700);
  font-size: 28px;
  font-weight: 900;
}

.rank-row img {
  width: 86px;
  height: 116px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-row strong {
  display: block;
  color: var(--stone-800);
  font-size: 20px;
}

.rank-row p {
  margin: 7px 0;
  color: var(--stone-500);
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-row em {
  color: var(--stone-500);
  font-style: normal;
}

.search-page-panel {
  padding-bottom: 16px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 160px 100px;
  gap: 12px;
  margin-bottom: 18px;
}

.filter-bar input,
.filter-bar select,
.filter-bar button {
  border: 1px solid var(--stone-200);
  border-radius: 999px;
  padding: 12px 14px;
  color: var(--stone-800);
  background: var(--white);
  outline: none;
}

.filter-bar button {
  color: var(--white);
  border-color: var(--amber-600);
  background: var(--amber-600);
  cursor: pointer;
}

.search-summary {
  margin-bottom: 18px;
  color: var(--stone-500);
}

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

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(16px) saturate(1.1);
  transform: scale(1.12);
  opacity: 0.38;
}

.detail-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(28, 25, 23, 0.98), rgba(28, 25, 23, 0.68));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  padding: 58px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.detail-poster img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--amber-300);
  font-weight: 700;
}

.detail-one-line {
  max-width: 780px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #000000;
  box-shadow: var(--shadow-soft);
}

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

.video-play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.68));
  cursor: pointer;
}

.video-play-overlay.is-hidden {
  display: none;
}

.video-play-overlay span {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: var(--amber-600);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  font-size: 36px;
}

.video-play-overlay strong {
  font-size: 20px;
}

.player-message {
  position: absolute;
  left: 18px;
  bottom: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

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

.detail-main-card,
.detail-side-card {
  border-radius: var(--radius-xl);
  padding: 28px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.detail-main-card h2 + p {
  margin-top: 10px;
}

.detail-main-card p {
  color: var(--stone-600);
  font-size: 17px;
}

.detail-tag-cloud span {
  color: var(--amber-700);
  border-color: var(--amber-100);
  background: var(--amber-50);
}

.detail-side-card dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px 14px;
  margin: 18px 0 0;
}

.detail-side-card dt {
  color: var(--stone-500);
}

.detail-side-card dd {
  margin: 0;
  color: var(--stone-800);
  font-weight: 700;
}

.site-footer {
  margin-top: 72px;
  padding: 44px 0;
  color: var(--stone-400);
  background: var(--stone-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 30px;
}

.footer-brand {
  color: var(--white);
  font-size: 24px;
  font-weight: 900;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: var(--white);
}

.site-footer a {
  display: block;
  margin: 7px 0;
}

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

@media (max-width: 1024px) {
  .main-nav,
  .header-inner > .site-search-form {
    display: none;
  }

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

  .mobile-panel.is-open {
    display: block;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 70px 0 84px;
  }

  .hero-poster {
    display: none;
  }

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

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

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

  .brand-text em {
    display: none;
  }

  .hero-carousel,
  .hero-content {
    min-height: 520px;
  }

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

  .search-panel {
    grid-template-columns: 1fr;
    margin-top: -26px;
    padding: 20px;
  }

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

  .movie-grid,
  .compact-grid,
  .archive-grid,
  .category-grid,
  .category-grid-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

  .detail-hero-inner {
    grid-template-columns: 1fr;
    padding: 36px 0;
  }

  .detail-poster {
    width: 210px;
  }

  .detail-poster img {
    height: 280px;
  }

  .rank-row a {
    grid-template-columns: 52px 70px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-row img {
    width: 70px;
    height: 96px;
  }

  .rank-row p {
    display: none;
  }

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

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

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

  .btn {
    text-align: center;
  }
}
