:root {
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-400: #a8a29e;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-300: #fcd34d;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --orange-600: #ea580c;
  --red-900: #7f1d1d;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --white: #ffffff;
  --shadow-sm: 0 8px 24px rgba(28, 25, 23, 0.08);
  --shadow-md: 0 18px 50px rgba(28, 25, 23, 0.14);
  --radius-xl: 24px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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(90deg, #78350f, #9a3412, #7f1d1d);
  box-shadow: 0 12px 28px rgba(28, 25, 23, 0.24);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-icon,
.footer-brand span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: #78350f;
  background: var(--amber-500);
  box-shadow: inset 0 -4px 10px rgba(120, 53, 15, 0.18);
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0.02em;
}

.brand-text small {
  color: var(--amber-100);
  font-size: 12px;
}

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

.nav-link {
  color: #fff7ed;
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--amber-300);
  transform: translateY(-1px);
}

.header-search {
  position: relative;
  width: 260px;
}

.header-search input,
.mobile-menu input,
.big-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 0;
  outline: none;
}

.header-search input {
  height: 42px;
  padding: 0 46px 0 18px;
  color: var(--white);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.header-search input::placeholder,
.mobile-menu input::placeholder,
.big-search input::placeholder {
  color: #fde68a;
}

.header-search button {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  color: var(--amber-100);
  background: transparent;
  transform: translateY(-50%);
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.mobile-menu a {
  display: block;
  padding: 10px 0;
  color: #fff7ed;
  font-weight: 700;
}

.mobile-menu form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.mobile-menu input {
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
}

.mobile-menu button,
.big-search button {
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--amber-600);
  font-weight: 800;
  padding: 0 20px;
  cursor: pointer;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-900), #78350f, #9a3412);
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.56), rgba(15, 23, 42, 0.16));
}

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

.hero-copy {
  max-width: 780px;
  color: var(--white);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 18px;
  padding: 6px 16px;
  border-radius: 999px;
  color: var(--white);
  background: var(--amber-600);
  font-size: 14px;
  font-weight: 800;
}

.hero h1,
.page-hero h1 {
  margin: 0 0 22px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p {
  max-width: 760px;
  margin: 0 0 28px;
  color: #e7e5e4;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.75;
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-meta span,
.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  font-weight: 700;
}

.hero-tags,
.tag-row,
.tag-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin: 20px 0 28px;
}

.hero-tags span,
.tag-row span,
.tag-panel span,
.tag-panel a {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  color: #fde68a;
  background: rgba(251, 191, 36, 0.15);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
}

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

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

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

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 36px;
  border-radius: 999px;
  background: var(--amber-400);
}

.category-strip {
  padding: 28px 0;
  background: var(--stone-100);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.chip-row a {
  padding: 12px 22px;
  border-radius: 999px;
  color: var(--stone-700);
  background: var(--white);
  font-weight: 800;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.chip-row a:hover {
  color: var(--white);
  background: var(--amber-600);
  transform: translateY(-2px);
}

.section {
  padding: 72px 0;
  background: var(--stone-50);
}

.section-warm {
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

.section-dark {
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
}

.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
}

.section-title > span {
  font-size: 34px;
}

.section-title h2 {
  margin: 0 0 6px;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.1;
}

.section-title p {
  margin: 0;
  color: var(--stone-600);
}

.section-title.light p {
  color: var(--stone-400);
}

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

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

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

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

.section-dark .movie-card {
  background: rgba(51, 65, 85, 0.62);
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.cover-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #111827;
}

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

.movie-card:hover .cover-wrap img {
  transform: scale(1.09);
}

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

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

.duration,
.card-badge {
  position: absolute;
  padding: 5px 8px;
  border-radius: 8px;
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
}

.duration {
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.7);
}

.card-badge {
  top: 10px;
  right: 10px;
  background: #dc2626;
}

.card-body {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.card-body strong {
  color: var(--stone-800);
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.section-dark .card-body strong {
  color: var(--white);
}

.card-body em {
  min-height: 42px;
  color: var(--stone-600);
  font-size: 14px;
  line-height: 1.5;
  font-style: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.section-dark .card-body em {
  color: #d6d3d1;
}

.card-meta {
  justify-content: space-between;
  gap: 8px;
  color: var(--stone-600);
  font-size: 13px;
  font-weight: 800;
}

.section-dark .card-meta {
  color: #d6d3d1;
}

.tag-row span {
  color: #92400e;
  background: var(--amber-100);
}

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

.ranking-box,
.related-box,
.detail-card,
.filter-panel,
.category-card,
.rank-page-list {
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.ranking-box {
  position: sticky;
  top: 100px;
  padding: 24px;
}

.ranking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.ranking-head h2,
.related-box h2 {
  margin: 0;
  font-size: 26px;
}

.ranking-head a {
  color: var(--amber-700);
  font-weight: 900;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 14px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: var(--stone-100);
  transform: translateX(2px);
}

.rank-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--white);
  background: var(--amber-600);
  font-weight: 900;
}

.rank-item img {
  width: 106px;
  height: 66px;
  object-fit: cover;
  border-radius: 12px;
  flex: 0 0 auto;
}

.rank-item span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

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

.rank-item em {
  color: var(--stone-600);
  font-size: 13px;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-item small {
  color: var(--stone-400);
}

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

.page-hero {
  padding: 96px 0;
  color: var(--white);
  background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.32), transparent 30%), linear-gradient(135deg, var(--slate-900), #78350f, #9a3412);
}

.page-hero-small {
  padding: 72px 0;
}

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

.category-card {
  overflow: hidden;
}

.category-card-main {
  display: block;
  min-height: 210px;
  padding: 32px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
}

.category-card:nth-child(even) .category-card-main {
  background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
}

.category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 22px;
  border-radius: 16px;
  color: #78350f;
  background: var(--amber-300);
}

.category-card h2 {
  margin: 0 0 12px;
  font-size: 30px;
}

.category-card p {
  margin: 0;
  color: #fff7ed;
  line-height: 1.7;
}

.category-sample {
  display: grid;
  gap: 8px;
  padding: 22px 32px 28px;
}

.category-sample a {
  color: var(--stone-700);
  font-weight: 700;
}

.category-sample a:hover {
  color: var(--amber-700);
}

.filter-panel {
  margin-bottom: 28px;
  padding: 22px;
}

.filter-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 16px;
}

.filter-row label {
  display: grid;
  gap: 8px;
  color: var(--stone-600);
  font-size: 13px;
  font-weight: 900;
}

.filter-panel input,
.filter-panel select {
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  color: var(--stone-800);
  background: var(--stone-100);
}

.empty-state {
  display: none;
  padding: 42px;
  text-align: center;
  color: var(--stone-600);
  font-weight: 800;
}

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

.rank-page-list {
  display: grid;
  gap: 8px;
  padding: 20px;
}

.player-section {
  background: #000;
  padding: 22px 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.22));
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  color: var(--white);
  background: var(--amber-600);
  box-shadow: 0 20px 40px rgba(217, 119, 6, 0.44);
}

.detail-section {
  background: var(--stone-50);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: start;
}

.detail-card {
  padding: 32px;
}

.detail-head {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  margin-bottom: 34px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--stone-200);
}

.detail-head img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.detail-head h1 {
  margin: 0 0 14px;
  color: var(--stone-800);
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.16;
}

.detail-head p {
  margin: 0 0 20px;
  color: var(--stone-600);
  font-size: 18px;
  line-height: 1.75;
}

.detail-meta span {
  color: var(--stone-700);
  background: var(--stone-100);
}

.text-block,
.review-block {
  margin-top: 30px;
}

.text-block h2,
.review-block h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.text-block p,
.review-block p {
  margin: 0;
  color: var(--stone-600);
  font-size: 17px;
  line-height: 1.9;
}

.review-block {
  padding: 24px;
  border-left: 5px solid var(--amber-600);
  border-radius: 18px;
  background: linear-gradient(135deg, var(--amber-50), #fff7ed);
}

.tag-panel {
  margin-top: 30px;
}

.tag-panel span,
.tag-panel a {
  color: var(--stone-700);
  background: var(--stone-200);
}

.tag-panel a {
  color: var(--white);
  background: var(--amber-600);
}

.related-box {
  position: sticky;
  top: 100px;
  padding: 24px;
}

.related-box h2 {
  margin-bottom: 18px;
}

.big-search {
  display: flex;
  max-width: 720px;
  gap: 10px;
}

.big-search input {
  height: 56px;
  padding: 0 22px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.search-summary {
  margin-bottom: 24px;
  color: var(--stone-600);
  font-weight: 900;
}

.site-footer {
  color: #d6d3d1;
  background: linear-gradient(180deg, var(--stone-800), var(--stone-900));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 34px;
  padding: 52px 0 34px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--white);
  font-size: 20px;
}

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

.site-footer p,
.site-footer li {
  color: #a8a29e;
  line-height: 1.8;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #a8a29e;
  font-size: 14px;
}

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

  .menu-toggle {
    display: inline-flex;
  }

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

  .movie-grid-4,
  .movie-grid-3,
  .category-grid,
  .split-layout,
  .detail-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ranking-box,
  .related-box {
    position: static;
  }

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

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

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

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

  .hero {
    height: 620px;
  }

  .hero-content {
    align-items: flex-end;
    padding-bottom: 86px;
  }

  .hero-copy {
    max-width: 100%;
  }

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

  .hero p,
  .page-hero p {
    font-size: 16px;
  }

  .section {
    padding: 48px 0;
  }

  .movie-grid-4,
  .movie-grid-3,
  .category-grid,
  .split-layout,
  .detail-grid,
  .footer-grid,
  .filter-row {
    grid-template-columns: 1fr;
  }

  .detail-card {
    padding: 22px;
  }

  .big-search {
    flex-direction: column;
  }

  .big-search button {
    min-height: 48px;
  }

  .rank-item img {
    width: 90px;
    height: 56px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
}
