:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --black: #000000;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.nav-container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #78350f;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
  border-radius: 12px;
  box-shadow: 0 12px 25px rgba(217, 119, 6, 0.25);
}

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

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

.nav-links a,
.mobile-panel a {
  color: var(--gray-700);
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.mobile-panel a:hover {
  color: var(--amber-700);
}

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

.nav-search input,
.mobile-panel input,
.search-hero input,
.filter-input {
  border: 1px solid var(--gray-200);
  background: var(--white);
  border-radius: 999px;
  padding: 12px 16px;
  outline: none;
  min-width: 230px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.mobile-panel input:focus,
.search-hero input:focus,
.filter-input:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}

.nav-search button,
.mobile-panel button,
.primary-btn,
.secondary-btn,
.hero-link,
.filter-chip,
.player-start {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button,
.mobile-panel button,
.primary-btn,
.hero-link {
  background: var(--amber-600);
  color: var(--white);
  padding: 12px 18px;
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.24);
}

.nav-search button:hover,
.mobile-panel button:hover,
.primary-btn:hover,
.hero-link:hover {
  background: var(--amber-700);
  transform: translateY(-1px);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--gray-900);
  margin: 5px 0;
  border-radius: 10px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid var(--gray-200);
}

.mobile-panel.is-open {
  display: grid;
  gap: 14px;
}

.mobile-panel form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 35%, rgba(245, 158, 11, 0.45), transparent 32%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.54) 48%, rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  z-index: 2;
}

.hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  color: var(--white);
}

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

.hero-labels,
.card-meta,
.detail-meta,
.tag-row,
.movie-tags,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-labels span,
.poster-badge,
.tag-row span,
.movie-tags span,
.filter-chip,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
}

.hero-labels span {
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
}

.hero-labels span:first-child,
.poster-badge {
  background: var(--amber-600);
  color: var(--white);
}

.hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero h2 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.08;
}

.hero p {
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  font-size: 28px;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.68);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 5;
  display: flex;
  gap: 10px;
  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.2s ease, background 0.2s ease;
}

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

main {
  display: block;
}

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

.section {
  padding: 72px 0;
}

.section-alt {
  background: linear-gradient(180deg, var(--amber-50), var(--white));
}

.section-gray {
  background: var(--gray-100);
}

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

.section-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--amber-700);
  font-weight: 800;
}

.section-head h1,
.section-head h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.category-copy p,
.detail-title p,
.detail-body p {
  color: var(--gray-500);
  line-height: 1.8;
}

.grid {
  display: grid;
  gap: 24px;
}

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

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

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

.movie-card,
.category-card,
.rank-card,
.detail-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(17, 24, 39, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #1f2937, #78350f);
}

.card-large .poster-wrap {
  aspect-ratio: 16 / 10;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(0, 0, 0, 0.72));
}

.poster-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 800;
}

.rank-mark {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
  font-weight: 900;
}

.card-body {
  padding: 18px;
}

.card-meta span,
.detail-meta span {
  padding: 5px 9px;
  background: var(--gray-100);
  color: var(--gray-500);
  font-size: 12px;
}

.card-body h3 {
  min-height: 2.8em;
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.4;
}

.card-body p {
  min-height: 3.4em;
  margin: 0 0 14px;
  color: var(--gray-500);
  line-height: 1.7;
  font-size: 14px;
}

.tag-row span,
.movie-tags span {
  padding: 5px 9px;
  color: #92400e;
  background: var(--amber-50);
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  padding: 22px;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.category-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: var(--gray-500);
  line-height: 1.7;
}

.category-card span {
  margin-top: 18px;
  color: var(--amber-700);
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.06);
}

.rank-item:hover .rank-title {
  color: var(--amber-700);
}

.rank-num {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--white);
  background: var(--gray-900);
  font-weight: 900;
}

.rank-title {
  font-weight: 800;
  transition: color 0.2s ease;
}

.rank-info {
  color: var(--gray-500);
  font-size: 14px;
}

.page-hero {
  padding: 72px 0 42px;
  background: linear-gradient(135deg, #111827, #78350f 52%, #d97706);
  color: var(--white);
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
}

.breadcrumb a {
  color: var(--white);
}

.filter-panel,
.search-hero {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 8px 25px rgba(17, 24, 39, 0.08);
  margin-bottom: 26px;
}

.filter-row {
  margin-top: 16px;
}

.filter-chip {
  padding: 9px 14px;
  background: var(--gray-100);
  color: var(--gray-700);
}

.filter-chip.is-active,
.filter-chip:hover {
  background: var(--amber-600);
  color: var(--white);
}

.search-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.55fr);
  gap: 30px;
  align-items: start;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--black);
  box-shadow: var(--shadow);
}

.player-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--black);
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.35);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-start {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px;
  color: var(--white);
  background: var(--amber-600);
  box-shadow: 0 18px 40px rgba(217, 119, 6, 0.32);
}

.player-start:hover {
  background: var(--amber-700);
  transform: translateY(-2px);
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: none;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.72);
}

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

.detail-card {
  padding: 24px;
}

.detail-title h1 {
  margin-bottom: 14px;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

.detail-body h2 {
  margin: 28px 0 12px;
  font-size: 24px;
}

.detail-body p {
  margin: 0 0 14px;
}

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

.side-link {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  align-items: center;
  background: var(--white);
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.06);
}

.side-link img {
  width: 70px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
}

.side-link strong {
  display: block;
  margin-bottom: 6px;
}

.side-link span {
  color: var(--gray-500);
  font-size: 13px;
}

.site-footer {
  margin-top: 72px;
  background: var(--gray-900);
  color: rgba(255, 255, 255, 0.72);
}

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

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

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

.site-footer p {
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 10px;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  font-size: 14px;
}

.is-hidden-card {
  display: none;
}

.empty-state {
  display: none;
  padding: 28px;
  text-align: center;
  background: var(--white);
  border-radius: var(--radius);
  color: var(--gray-500);
}

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

@media (max-width: 980px) {
  .nav-links,
  .nav-search {
    display: none;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .hero {
    min-height: 620px;
  }

  .hero-control {
    display: none;
  }

  .grid-3,
  .grid-4,
  .grid-5,
  .category-grid,
  .footer-inner,
  .detail-layout {
    grid-template-columns: 1fr 1fr;
  }

  .rank-item {
    grid-template-columns: 46px 1fr;
  }

  .rank-info {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  .nav-container,
  .mobile-panel,
  .section,
  .content-wrap,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

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

  .hero {
    height: auto;
    min-height: 680px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero h2 {
    font-size: 28px;
  }

  .section {
    padding: 50px 0;
  }

  .grid-3,
  .grid-4,
  .grid-5,
  .category-grid,
  .footer-inner,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

  .rank-item {
    grid-template-columns: 42px 1fr;
  }

  .card-large .poster-wrap {
    aspect-ratio: 2 / 3;
  }
}
