
:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --orange-500: #f97316;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

.site-body {
  min-height: 100vh;
  margin: 0;
  color: var(--gray-900);
  background: linear-gradient(180deg, var(--gray-50), var(--gray-100));
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: var(--white);
  background: linear-gradient(90deg, var(--amber-600), var(--orange-500));
  box-shadow: 0 8px 24px rgba(120, 53, 15, 0.24);
}

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

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

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: var(--amber-700);
  background: var(--white);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.brand-text {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-link {
  padding: 9px 12px;
  border-radius: 999px;
  font-weight: 650;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber-100);
  background: rgba(255, 255, 255, 0.14);
}

.header-search,
.mobile-search,
.large-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.header-search input,
.mobile-search input,
.large-search input {
  width: 220px;
  min-width: 0;
  padding: 10px 14px;
  color: var(--white);
  background: transparent;
  border: 0;
  outline: 0;
}

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

.header-search button,
.mobile-search button,
.large-search button {
  padding: 10px 16px;
  color: var(--amber-700);
  font-weight: 800;
  background: var(--white);
  border: 0;
  cursor: pointer;
}

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

.mobile-nav {
  padding: 0 16px 16px;
  background: rgba(146, 64, 14, 0.18);
}

.mobile-link {
  display: block;
  padding: 11px 12px;
  border-radius: 12px;
  font-weight: 700;
}

.mobile-link:hover,
.mobile-link.active {
  background: rgba(255, 255, 255, 0.14);
}

.mobile-search {
  margin-top: 10px;
}

.mobile-search input {
  width: 100%;
}

.hero-carousel {
  position: relative;
  height: 500px;
  overflow: hidden;
  background: var(--gray-900);
}

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

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

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

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

.hero-copy {
  position: absolute;
  left: 50%;
  bottom: 44px;
  transform: translateX(-50%);
  color: var(--white);
}

.hero-kicker {
  display: inline-flex;
  padding: 7px 13px;
  margin-bottom: 14px;
  border-radius: 999px;
  color: var(--amber-100);
  background: rgba(217, 119, 6, 0.52);
  backdrop-filter: blur(8px);
  font-weight: 800;
}

.hero-copy h1 {
  max-width: 820px;
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 900;
}

.hero-copy p {
  max-width: 760px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.65;
}

.hero-meta,
.hero-tags,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span,
.hero-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 750;
}

.hero-meta span {
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.16);
}

.hero-tags {
  margin: 14px 0 22px;
}

.hero-tags span {
  padding: 5px 10px;
  color: var(--amber-100);
  background: rgba(255, 255, 255, 0.12);
}

.primary-btn,
.ghost-btn,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: var(--white);
  background: linear-gradient(90deg, var(--amber-600), var(--orange-500));
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.28);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(8px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(0, 0, 0, 0.46);
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

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

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

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

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

.page-main {
  padding: 34px 0 0;
}

.content-section {
  margin-top: 44px;
}

.search-panel,
.page-hero-card,
.detail-card,
.side-card,
.category-overview-card {
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 560px);
  gap: 24px;
  align-items: center;
  margin-top: -34px;
  padding: 24px;
  position: relative;
  z-index: 6;
}

.search-panel h2,
.section-title h2,
.page-hero-card h1,
.detail-card h1,
.side-card h2 {
  margin: 0;
  font-weight: 900;
  color: var(--gray-900);
}

.search-panel p,
.section-title p,
.page-hero-card p {
  margin: 8px 0 0;
  color: var(--gray-600);
  line-height: 1.7;
}

.large-search {
  background: var(--amber-50);
  border-color: var(--amber-100);
}

.large-search input {
  width: 100%;
  color: var(--gray-900);
}

.large-search input::placeholder {
  color: var(--gray-500);
}

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

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

.section-title h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.section-link {
  color: var(--amber-700);
  background: var(--amber-100);
}

.movie-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 300px);
  gap: 20px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x mandatory;
}

.movie-grid {
  display: grid;
  gap: 20px;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  scroll-snap-align: start;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.16);
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: var(--gray-200);
}

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

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

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

.type-badge,
.year-badge {
  position: absolute;
  top: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 850;
  background: rgba(0, 0, 0, 0.58);
}

.type-badge {
  left: 10px;
}

.year-badge {
  right: 10px;
}

.play-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 38px;
  opacity: 0;
  background: rgba(0, 0, 0, 0.34);
  transition: opacity 0.25s ease;
}

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

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

.card-body strong {
  color: var(--gray-900);
  font-size: 16px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-desc {
  min-height: 42px;
  color: var(--gray-600);
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  color: var(--gray-500);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta b {
  margin: 0 6px;
  color: var(--amber-600);
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span,
.detail-tags span {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--amber-700);
  background: var(--amber-100);
  font-size: 12px;
  font-weight: 800;
}

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

.category-tile,
.category-overview-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 180px;
  padding: 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--white), var(--amber-50));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.09);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-name,
.category-overview-main span {
  color: var(--gray-900);
  font-size: 22px;
  font-weight: 900;
}

.category-desc,
.category-overview-card p {
  color: var(--gray-600);
  line-height: 1.7;
}

.category-samples,
.sample-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-samples a,
.sample-links a,
.footer-links a {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--amber-700);
  background: var(--amber-100);
  font-size: 12px;
  font-weight: 800;
}

.category-overview-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-overview-main strong {
  color: var(--white);
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--amber-600);
}

.ranking-section {
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(90deg, var(--amber-50), #fff7ed);
  box-shadow: var(--shadow);
}

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

.ranking-item,
.ranking-row {
  display: grid;
  align-items: center;
  gap: 12px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.ranking-item {
  grid-template-columns: 44px 64px 1fr;
  padding: 10px;
}

.rank-no,
.ranking-row-no {
  color: var(--amber-600);
  font-weight: 950;
  text-align: center;
}

.ranking-item img {
  width: 64px;
  height: 86px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-info {
  min-width: 0;
}

.rank-info strong,
.ranking-row-copy strong {
  display: block;
  color: var(--gray-900);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info em,
.ranking-row-copy em,
.ranking-row-copy b {
  display: block;
  color: var(--gray-500);
  font-style: normal;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.ranking-row {
  grid-template-columns: 52px 84px 1fr auto;
  padding: 12px;
}

.ranking-row img {
  width: 84px;
  height: 112px;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-action {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--white);
  font-weight: 850;
  background: var(--amber-600);
}

.page-hero-card {
  padding: 28px;
}

.page-hero-card h1 {
  font-size: clamp(30px, 4vw, 46px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  color: var(--gray-500);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--amber-700);
  font-weight: 800;
}

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

.search-filter-bar {
  grid-template-columns: 1fr 180px 180px;
}

.filter-bar input,
.filter-bar select {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  color: var(--gray-900);
  background: var(--white);
  outline: 0;
}

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

.detail-main {
  padding-top: 28px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.85fr);
  gap: 28px;
  align-items: start;
}

.detail-primary {
  min-width: 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.26);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--white);
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.28));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 50%;
  color: var(--amber-700);
  background: var(--white);
  font-size: 42px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

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

.detail-card {
  margin-top: 22px;
  padding: 26px;
}

.detail-card h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
}

.detail-card h2 {
  margin: 26px 0 10px;
  padding-left: 12px;
  border-left: 4px solid var(--amber-600);
  color: var(--gray-900);
  font-size: 22px;
}

.detail-card p {
  margin: 0;
  color: var(--gray-700);
  line-height: 1.9;
  font-size: 16px;
}

.lead-text {
  color: var(--amber-700) !important;
  font-weight: 750;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.detail-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--gray-700);
  background: var(--gray-100);
  font-weight: 800;
}

.detail-side {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 18px;
}

.side-card {
  padding: 18px;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  object-fit: cover;
  margin-bottom: 14px;
}

.full {
  width: 100%;
}

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

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

.mini-card img {
  width: 70px;
  height: 94px;
  border-radius: 12px;
  object-fit: cover;
}

.mini-card strong {
  display: block;
  color: var(--gray-900);
  line-height: 1.35;
}

.mini-card em {
  display: block;
  margin-top: 5px;
  color: var(--gray-500);
  font-style: normal;
  font-size: 13px;
}

.site-footer {
  margin-top: 70px;
  padding: 48px 0 20px;
  color: #d1d5db;
  background: var(--gray-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
}

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

.site-footer p {
  margin: 0;
  color: #9ca3af;
  line-height: 1.8;
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
  text-align: center;
}

.back-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 90;
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: var(--amber-600);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.back-top.is-visible {
  display: block;
}

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

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

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

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

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

@media (max-width: 860px) {
  .hero-carousel {
    height: 430px;
  }

  .hero-copy {
    bottom: 42px;
  }

  .hero-actions {
    gap: 8px;
  }

  .search-panel,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }

  .ranking-list {
    grid-template-columns: 1fr;
  }

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

  .ranking-row {
    grid-template-columns: 42px 68px 1fr;
  }

  .ranking-row img {
    width: 68px;
    height: 92px;
  }

  .ranking-action {
    display: none;
  }
}

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

  .header-inner {
    min-height: 58px;
  }

  .brand-text {
    font-size: 20px;
  }

  .header-search {
    display: none;
  }

  .hero-carousel {
    height: 410px;
  }

  .hero-arrow {
    width: 38px;
    height: 38px;
    font-size: 28px;
  }

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

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

  .hero-copy h1 {
    font-size: 32px;
  }

  .hero-copy p {
    font-size: 15px;
    line-height: 1.55;
  }

  .primary-btn,
  .ghost-btn,
  .section-link {
    min-height: 38px;
    padding: 0 13px;
    font-size: 14px;
  }

  .six-grid,
  .four-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .movie-grid {
    gap: 14px;
  }

  .category-tile,
  .category-overview-card,
  .detail-card,
  .side-card,
  .page-hero-card,
  .search-panel {
    padding: 16px;
  }

  .card-body {
    padding: 12px;
  }

  .card-desc {
    min-height: 40px;
  }

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

  .play-circle {
    width: 70px;
    height: 70px;
    font-size: 34px;
  }
}
