:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-300: #fcd34d;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-800: #92400e;
  --amber-900: #78350f;
  --orange-50: #fff7ed;
  --text: #321806;
  --muted: #8a5a18;
  --line: rgba(180, 83, 9, 0.18);
  --shadow: 0 18px 45px rgba(120, 53, 15, 0.14);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 247, 237, 0.96), rgba(255, 251, 235, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 22px rgba(146, 64, 14, 0.08);
  backdrop-filter: blur(14px);
}

.header-inner {
  width: min(1220px, calc(100% - 32px));
  height: 66px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

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

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--amber-900);
  letter-spacing: 0.04em;
}

.brand-subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: var(--amber-700);
}

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

.nav-link,
.mobile-link {
  font-size: 15px;
  font-weight: 650;
  color: var(--amber-900);
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.hero-search input,
.listing-tools input,
.listing-tools select {
  border: 1px solid var(--amber-200);
  border-radius: 999px;
  background: white;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 230px;
  padding: 9px 16px;
}

.header-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.listing-tools input:focus,
.listing-tools select:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.header-search button,
.mobile-search button,
.hero-search button,
.primary-button,
.text-button {
  border: none;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
  box-shadow: 0 12px 25px rgba(217, 119, 6, 0.26);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.header-search button {
  padding: 9px 16px;
}

.header-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.primary-button:hover,
.text-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 30px rgba(217, 119, 6, 0.34);
  filter: saturate(1.04);
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  border: none;
  background: transparent;
  color: var(--amber-900);
  font-size: 28px;
}

.mobile-menu {
  display: none;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 18px;
  border-top: 1px solid var(--line);
}

.mobile-menu.open {
  display: grid;
  gap: 12px;
}

.mobile-search {
  display: flex;
  gap: 8px;
}

.mobile-search input {
  width: 100%;
  padding: 10px 14px;
}

.mobile-search button {
  padding: 10px 16px;
}

.hero {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-100), #fed7aa, var(--amber-200));
}

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

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

.hero-media {
  position: absolute;
  inset: 0;
}

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

.hero-media span,
.category-page-hero span {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(92, 38, 7, 0.9) 0%, rgba(120, 53, 15, 0.68) 42%, rgba(120, 53, 15, 0.12) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1220px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1220px;
}

.hero-content > * {
  max-width: 680px;
}

.hero-kicker {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 16px;
  padding: 7px 12px;
  border: 1px solid rgba(253, 230, 138, 0.36);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(120, 53, 15, 0.34);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  color: white;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.hero h2 {
  margin: 18px 0 0;
  color: #fef3c7;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.18;
}

.hero p,
.page-hero p {
  margin: 20px 0 0;
  color: #fffbeb;
  font-size: clamp(16px, 1.8vw, 20px);
}

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

.primary-button,
.secondary-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  font-weight: 800;
}

.secondary-button {
  border: 1px solid rgba(253, 230, 138, 0.42);
  border-radius: 999px;
  color: #fffbeb;
  background: rgba(255, 251, 235, 0.1);
  backdrop-filter: blur(12px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.secondary-button:hover {
  background: rgba(255, 251, 235, 0.18);
  transform: translateY(-1px);
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 251, 235, 0.48);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.section,
.detail-layout {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 54px 0;
}

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

.section-heading h2 {
  margin: 0;
  color: var(--amber-900);
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

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

.section-more {
  flex-shrink: 0;
  color: var(--amber-700);
  font-weight: 800;
}

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

.category-card {
  position: relative;
  height: 170px;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--amber-100);
}

.category-card img,
.category-overview-image img,
.movie-cover img,
.related-cover img,
.poster-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.category-card:hover img,
.movie-card:hover .movie-cover img,
.category-overview-card:hover .category-overview-image img {
  transform: scale(1.08);
}

.category-card-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(92, 38, 7, 0.82));
}

.category-card-copy {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  color: white;
}

.category-card-copy strong,
.category-card-copy em {
  display: block;
}

.category-card-copy strong {
  font-size: 19px;
  font-weight: 850;
}

.category-card-copy em {
  margin-top: 4px;
  color: #fef3c7;
  font-size: 13px;
  font-style: normal;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(253, 230, 138, 0.68);
  border-radius: 18px;
  background: white;
  box-shadow: 0 8px 24px rgba(146, 64, 14, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 42px rgba(146, 64, 14, 0.18);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--amber-100);
}

.cover-gradient {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.58));
  transition: opacity 0.25s ease;
}

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

.duration-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.duration-badge {
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.68);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
  box-shadow: 0 8px 18px rgba(120, 53, 15, 0.25);
}

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

.category-pill,
.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  color: var(--amber-700);
  background: var(--amber-100);
  font-weight: 750;
}

.category-pill {
  padding: 5px 10px;
  font-size: 12px;
}

.movie-card h3 {
  margin: 12px 0 8px;
  color: var(--amber-900);
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.related-title:hover,
.category-overview-card h2 a:hover {
  color: var(--amber-600);
}

.movie-card p {
  min-height: 48px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  color: var(--amber-700);
  font-size: 12px;
}

.movie-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--amber-50);
}

.ranking-preview {
  padding-top: 18px;
}

.ranking-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-list a {
  display: grid;
  grid-template-columns: 44px 78px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 94px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: 0 8px 20px rgba(146, 64, 14, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-list a:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 35px rgba(146, 64, 14, 0.15);
}

.rank-number {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: var(--amber-600);
  font-weight: 900;
}

.ranking-list img {
  width: 78px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
}

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

.rank-copy strong {
  color: var(--amber-900);
  font-weight: 850;
}

.rank-copy em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  display: grid;
  align-items: center;
  background: linear-gradient(135deg, var(--amber-900), var(--amber-700));
}

.page-hero > div {
  position: relative;
  z-index: 2;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.compact-hero {
  min-height: 300px;
}

.compact-hero p {
  max-width: 760px;
}

.category-page-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
}

.breadcrumb {
  margin: 0 0 16px;
  color: var(--amber-700);
  font-size: 14px;
}

.page-hero .breadcrumb {
  color: #fde68a;
}

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

.page-hero .breadcrumb a:hover {
  color: white;
}

.category-overview-grid {
  display: grid;
  gap: 22px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}

.category-overview-image {
  overflow: hidden;
  min-height: 210px;
  background: var(--amber-100);
}

.category-overview-body {
  padding: 28px;
}

.category-overview-body h2 {
  margin: 0 0 10px;
  color: var(--amber-900);
  font-size: 26px;
}

.category-overview-body p {
  margin: 0;
  color: var(--muted);
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.mini-links a {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--amber-700);
  background: var(--amber-50);
  font-size: 13px;
}

.text-button {
  min-height: 40px;
  padding: 0 18px;
}

.listing-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 26px rgba(146, 64, 14, 0.08);
}

.listing-tools label {
  display: grid;
  gap: 8px;
  color: var(--amber-900);
  font-weight: 800;
}

.listing-tools input {
  min-width: min(420px, 80vw);
  padding: 11px 16px;
}

.listing-tools select {
  min-width: 180px;
  padding: 11px 16px;
}

.empty-state {
  display: none;
  margin: 30px 0 0;
  padding: 28px;
  border: 1px dashed var(--amber-300);
  border-radius: 18px;
  color: var(--muted);
  background: white;
  text-align: center;
}

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

.hero-search {
  display: flex;
  gap: 10px;
  width: min(650px, 100%);
  margin-top: 28px;
}

.hero-search input {
  flex: 1;
  padding: 14px 18px;
}

.hero-search button {
  padding: 0 24px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 28px;
  padding: 34px 0 0;
}

.video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background: #050505;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.34);
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: black;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: none;
  color: white;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.56));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  box-shadow: 0 16px 40px rgba(245, 158, 11, 0.34);
  font-size: 34px;
}

.player-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 16px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), transparent);
}

.player-controls button {
  min-width: 72px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  padding: 8px 12px;
  transition: background 0.2s ease;
}

.player-controls button:hover {
  background: rgba(255, 255, 255, 0.24);
}

.detail-card,
.side-card {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}

.detail-card h1 {
  margin: 16px 0 12px;
  color: var(--amber-900);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
}

.detail-card h2,
.side-card h2 {
  margin: 24px 0 10px;
  color: var(--amber-900);
  font-size: 22px;
}

.detail-card p {
  color: var(--text);
}

.lead-text {
  color: var(--amber-800);
  font-size: 18px;
  font-weight: 650;
}

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

.detail-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--amber-700);
  background: var(--amber-50);
  font-size: 14px;
  font-weight: 700;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.tag {
  padding: 6px 12px;
  font-size: 13px;
}

.detail-side {
  position: relative;
}

.detail-side .side-card:first-child {
  margin-top: 40px;
}

.poster-card img {
  aspect-ratio: 16 / 11;
  overflow: hidden;
  border-radius: 14px;
  background: var(--amber-100);
}

.poster-card p {
  color: var(--muted);
}

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

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

.related-cover {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: var(--amber-100);
}

.related-title {
  color: var(--amber-900);
  font-weight: 850;
  line-height: 1.35;
}

.related-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  margin-top: 42px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.92), rgba(255, 247, 237, 0.96));
}

.footer-inner {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.footer-inner strong {
  color: var(--amber-900);
  font-size: 20px;
}

.footer-inner p {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-content: flex-start;
}

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

.copyright {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

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

  .mobile-menu-button {
    display: block;
  }

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

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

  .detail-side .side-card:first-child {
    margin-top: 0;
  }
}

@media (max-width: 760px) {
  .header-inner {
    width: min(100% - 22px, 1220px);
  }

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

  .brand-subtitle {
    display: none;
  }

  .hero {
    height: 620px;
  }

  .hero-media span,
  .category-page-hero span {
    background: linear-gradient(180deg, rgba(92, 38, 7, 0.86), rgba(120, 53, 15, 0.72));
  }

  .hero-content {
    width: min(100% - 28px, 1220px);
  }

  .hero-actions,
  .hero-search,
  .footer-inner,
  .section-heading,
  .listing-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .section,
  .detail-layout {
    width: min(100% - 28px, 1220px);
  }

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

  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .listing-tools input,
  .listing-tools select {
    width: 100%;
    min-width: 0;
  }

  .ranking-list a {
    grid-template-columns: 36px 72px 1fr;
  }

  .player-controls {
    justify-content: center;
  }

  .player-controls button {
    min-width: 64px;
    padding: 7px 10px;
  }

  .detail-card,
  .side-card {
    padding: 18px;
  }
}
