*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-300: #fcd34d;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --orange-600: #ea580c;
  --orange-700: #c2410c;
  --shadow: 0 4px 6px -1px rgba(120, 53, 15, 0.2), 0 2px 4px -1px rgba(120, 53, 15, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(120, 53, 15, 0.3), 0 4px 6px -2px rgba(120, 53, 15, 0.15);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.026) 2px, rgba(0, 0, 0, 0.026) 4px);
  opacity: 0.55;
  z-index: -1;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(90deg, var(--stone-900), #451a03, var(--stone-900));
  color: var(--amber-100);
  box-shadow: var(--shadow-lg);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.14), var(--shadow);
}

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

.desktop-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--amber-100);
  transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: #fff;
  background: rgba(251, 191, 36, 0.16);
}

.header-search {
  width: min(330px, 30vw);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(253, 230, 138, 0.22);
  backdrop-filter: blur(8px);
}

.header-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 10px 14px;
}

.header-search input::placeholder {
  color: rgba(254, 243, 199, 0.68);
}

.header-search button,
.mobile-panel button,
.search-page-form button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
  padding: 10px 16px;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(253, 230, 138, 0.24);
  border-radius: 12px;
  color: var(--amber-100);
  background: rgba(255, 255, 255, 0.1);
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-panel form {
  display: flex;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(253, 230, 138, 0.22);
}

.mobile-panel input {
  flex: 1;
  min-width: 0;
  color: #fff;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 12px 14px;
}

.mobile-panel nav {
  display: grid;
  gap: 10px;
  padding-top: 14px;
}

.mobile-panel nav a {
  padding: 10px 0;
  color: var(--amber-100);
}

.page-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 64px;
}

.hero {
  position: relative;
  min-height: 560px;
  margin: 30px auto 56px;
  overflow: hidden;
  border-radius: 28px;
  color: #fff;
  background: var(--stone-900);
  box-shadow: var(--shadow-lg);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.55s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(245, 158, 11, 0.25), transparent 34%), linear-gradient(90deg, rgba(28, 25, 23, 0.94), rgba(28, 25, 23, 0.66) 48%, rgba(28, 25, 23, 0.14));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(620px, calc(100% - 40px));
  padding: 64px 0 68px 54px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--amber-200);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero p {
  max-width: 610px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.hero-meta,
.detail-meta,
.ranking-meta,
.compact-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.13);
  color: var(--amber-100);
  border: 1px solid rgba(253, 230, 138, 0.2);
  backdrop-filter: blur(8px);
}

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

.btn-primary,
.btn-soft,
.filter-panel button,
.category-card .category-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  min-height: 44px;
  padding: 10px 20px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary,
.filter-panel button.active,
.category-card .category-link {
  color: #fff;
  background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
  box-shadow: var(--shadow);
}

.btn-soft {
  color: var(--amber-100);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(253, 230, 138, 0.2);
  backdrop-filter: blur(8px);
}

.btn-primary:hover,
.btn-soft:hover,
.category-card:hover .category-link {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.hero-controls {
  position: absolute;
  z-index: 3;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-controls button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(8px);
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 54px;
  bottom: 28px;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 36px;
  background: #fff;
}

.section {
  margin-bottom: 58px;
}

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

.section-heading h2,
.page-hero h1,
.category-card h2,
.search-panel h1,
.ranking-page h1 {
  margin: 0;
  color: var(--stone-900);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-line {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber-600), transparent);
}

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

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

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

.movie-card {
  min-width: 0;
}

.movie-card.hidden,
.ranking-item.hidden {
  display: none;
}

.movie-card-link,
.compact-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card-link:hover,
.compact-link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

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

.poster-frame img,
.compact-poster img,
.ranking-item img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.rating-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 42px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
  box-shadow: var(--shadow);
}

.movie-card-body {
  padding: 14px;
  background: #fff;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.03) 2px, rgba(0, 0, 0, 0.03) 4px);
}

.movie-card-body h3,
.compact-body h3,
.ranking-item h3 {
  margin: 0 0 8px;
  color: var(--stone-900);
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-body p,
.compact-body p,
.ranking-item p {
  margin: 8px 0 0;
  color: var(--stone-600);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta,
.compact-meta,
.ranking-meta {
  color: var(--stone-600);
  font-size: 12px;
}

.movie-meta span:first-child,
.compact-meta span:first-child,
.ranking-meta span:first-child {
  color: var(--amber-700);
  font-weight: 800;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

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

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

.compact-link {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: stretch;
  padding: 12px;
}

.compact-poster {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 3 / 4;
  background: var(--stone-200);
}

.compact-body {
  min-width: 0;
  align-self: center;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 24px;
  padding: 24px;
  color: var(--stone-900);
  background: linear-gradient(135deg, #fff, var(--amber-50));
  box-shadow: var(--shadow);
}

.category-card::after {
  content: "";
  position: absolute;
  right: -45px;
  top: -45px;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
}

.category-card p {
  margin: 10px 0 22px;
  color: var(--stone-600);
}

.page-hero,
.search-panel,
.filter-panel {
  margin-bottom: 30px;
  border-radius: 28px;
  padding: 34px;
  background: linear-gradient(135deg, #fff, var(--amber-50));
  box-shadow: var(--shadow);
}

.page-hero p,
.search-panel p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--stone-600);
  font-size: 17px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  align-items: center;
  padding: 22px;
}

.filter-panel input,
.filter-panel select,
.search-page-form input,
.search-page-form select {
  width: 100%;
  border: 1px solid var(--stone-200);
  border-radius: 999px;
  background: #fff;
  color: var(--stone-900);
  outline: 0;
  padding: 12px 16px;
}

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

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

.ranking-item a {
  display: grid;
  grid-template-columns: 58px 84px 1fr;
  gap: 16px;
  align-items: center;
  border-radius: 18px;
  padding: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-item a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.rank-no {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
}

.ranking-item img {
  width: 84px;
  height: 112px;
  border-radius: 12px;
  background: var(--stone-200);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  color: var(--stone-600);
  font-size: 14px;
}

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow-lg);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 24px;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.46));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: 34px;
  padding-left: 6px;
  background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

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

.detail-copy {
  margin-top: 26px;
  border-radius: 24px;
  padding: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-copy h1 {
  color: var(--stone-900);
  font-size: clamp(30px, 4vw, 44px);
}

.detail-copy h2,
.related-section h2,
.side-card h2 {
  margin: 26px 0 10px;
  color: var(--stone-900);
  font-size: 24px;
}

.detail-copy p {
  margin: 10px 0;
  color: var(--stone-700);
  font-size: 16px;
  text-align: justify;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.detail-side {
  display: grid;
  gap: 20px;
  align-content: start;
}

.detail-poster,
.side-card {
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-poster {
  aspect-ratio: 3 / 4;
}

.side-card {
  padding: 22px;
}

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

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--stone-200);
  padding-bottom: 10px;
}

.info-list span:first-child {
  color: var(--stone-600);
}

.info-list span:last-child {
  color: var(--stone-900);
  font-weight: 800;
  text-align: right;
}

.related-section {
  margin-top: 42px;
}

.search-page-form {
  display: grid;
  grid-template-columns: 1fr 180px 180px auto;
  gap: 14px;
  margin-top: 24px;
}

.empty-state {
  display: none;
  padding: 48px;
  border-radius: 22px;
  color: var(--stone-600);
  text-align: center;
  background: #fff;
  box-shadow: var(--shadow);
}

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

.site-footer {
  margin-top: 40px;
  color: var(--amber-100);
  background: linear-gradient(90deg, var(--stone-900), #451a03, var(--stone-900));
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.6fr;
  gap: 30px;
  padding: 42px 0;
}

.footer-brand strong {
  display: block;
  margin-bottom: 10px;
  color: var(--amber-200);
  font-size: 22px;
}

.footer-brand p {
  margin: 0;
  color: var(--amber-300);
}

.footer-links,
.footer-cats {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 10px 16px;
}

.footer-links a,
.footer-cats a {
  color: var(--amber-200);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid rgba(253, 230, 138, 0.16);
  padding: 18px 0 24px;
  color: var(--amber-300);
  font-size: 14px;
}

@media (max-width: 1060px) {
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .feature-grid,
  .category-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-side {
    grid-template-columns: 220px 1fr;
  }
}

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

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

  .hero {
    min-height: 610px;
    border-radius: 22px;
  }

  .hero-slide::before {
    background: linear-gradient(180deg, rgba(28, 25, 23, 0.84), rgba(28, 25, 23, 0.78));
  }

  .hero-content {
    width: 100%;
    padding: 44px 24px 100px;
  }

  .hero-dots {
    left: 24px;
  }

  .hero-controls {
    right: 18px;
  }

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

  .feature-grid,
  .compact-grid,
  .category-strip {
    grid-template-columns: 1fr;
  }

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

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

  .compact-link {
    grid-template-columns: 92px 1fr;
  }

  .ranking-item a {
    grid-template-columns: 44px 66px 1fr;
    gap: 10px;
  }

  .ranking-item img {
    width: 66px;
    height: 88px;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .mobile-panel,
  .page-content,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    font-size: 19px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .page-hero,
  .search-panel,
  .filter-panel,
  .detail-copy,
  .side-card {
    padding: 20px;
    border-radius: 20px;
  }

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

  .movie-card-body p,
  .tag-row {
    display: none;
  }
}
