:root {
  color-scheme: light;
  --bg: #fffaf2;
  --surface: #ffffff;
  --surface-soft: #fffbeb;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #f3d9a4;
  --brand: #b45309;
  --brand-dark: #78350f;
  --brand-soft: #f59e0b;
  --shadow: 0 18px 45px rgba(120, 53, 15, 0.14);
  --shadow-soft: 0 10px 28px rgba(120, 53, 15, 0.10);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 10%, rgba(245, 158, 11, 0.14), transparent 28rem),
    linear-gradient(180deg, #fffbeb 0%, #ffffff 45%, #fffaf2 100%);
  color: var(--ink);
  min-height: 100vh;
}

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: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 255, 255, 0.96), rgba(255, 251, 235, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 28px rgba(120, 53, 15, 0.08);
  backdrop-filter: blur(14px);
}

.nav-wrap,
.container,
.footer-grid,
.detail-shell,
.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-wrap {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #d97706, #92400e);
  box-shadow: 0 10px 22px rgba(146, 64, 14, 0.28);
  font-weight: 900;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong,
.footer-brand strong {
  font-size: 20px;
  color: var(--brand-dark);
  letter-spacing: -0.02em;
}

.brand-text em {
  font-size: 12px;
  color: var(--brand);
  font-style: normal;
  margin-top: 3px;
}

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

.nav-link,
.mobile-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #4b5563;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--brand-dark);
  background: rgba(245, 158, 11, 0.14);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  border: 0;
  color: var(--brand-dark);
  background: rgba(245, 158, 11, 0.14);
  border-radius: 12px;
  padding: 9px 12px;
  cursor: pointer;
}

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

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

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #111827;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.88), rgba(17, 24, 39, 0.52), rgba(120, 53, 15, 0.2)),
    linear-gradient(0deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.08) 48%, rgba(17, 24, 39, 0.35));
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  top: 50%;
  width: min(640px, calc(100% - 48px));
  transform: translateY(-50%);
  color: #fff;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  color: #fbbf24;
  font-size: 13px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero h1,
.page-hero h1,
.detail-info-card h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

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

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

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #92400e;
  font-size: 13px;
  font-weight: 800;
}

.hero .tag {
  color: #fde68a;
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.24);
}

.tag.small {
  min-height: 24px;
  padding: 5px 9px;
  font-size: 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}

.hero-actions.single-line {
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 13px;
  font-weight: 900;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, #d97706, #92400e);
  box-shadow: 0 14px 26px rgba(146, 64, 14, 0.28);
}

.btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
}

.btn.ghost.light {
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.72);
}

.btn.text {
  color: #fde68a;
}

.btn.small {
  min-height: 38px;
  padding: 0 14px;
  color: #fff;
  background: var(--brand);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 8;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.36);
}

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

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

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.hero-thumbs {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 86px;
  z-index: 8;
  display: grid;
  width: min(410px, 40vw);
  gap: 12px;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(14px);
  color: #fff;
  font-weight: 900;
}

.hero-thumb img {
  width: 72px;
  height: 52px;
  border-radius: 11px;
  object-fit: cover;
}

.quick-search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  margin-top: -34px;
  position: relative;
  z-index: 10;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(251, 191, 36, 0.28);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

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

.search-bar input,
.filter-input {
  width: 100%;
  border: 1px solid #f1c376;
  border-radius: 14px;
  background: #fffaf2;
  color: var(--ink);
  outline: none;
  min-height: 46px;
  padding: 0 16px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.search-bar input:focus,
.filter-input:focus {
  border-color: #d97706;
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.14);
}

.search-bar button {
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--brand);
  padding: 0 22px;
  font-weight: 900;
  cursor: pointer;
}

.quick-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-links a {
  padding: 10px 13px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: rgba(245, 158, 11, 0.13);
  font-weight: 800;
}

.section-block {
  padding: 64px 0 0;
}

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

.section-head h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 3.8vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-more {
  color: var(--brand-dark);
  font-weight: 900;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  white-space: nowrap;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(245, 158, 11, 0.18);
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(217, 119, 6, 0.40);
  box-shadow: var(--shadow);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #fef3c7;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.02), rgba(17, 24, 39, 0.58));
  opacity: 0.88;
}

.type-badge,
.score-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  min-height: 28px;
  padding: 0 10px;
  backdrop-filter: blur(8px);
}

.type-badge {
  top: 12px;
  left: 12px;
  background: rgba(146, 64, 14, 0.86);
}

.score-badge {
  right: 12px;
  bottom: 12px;
  background: rgba(217, 119, 6, 0.88);
}

.rank-badge {
  left: 12px;
  bottom: 12px;
  background: rgba(17, 24, 39, 0.74);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.28;
}

.card-body h3 a:hover {
  color: var(--brand);
}

.card-meta {
  margin: 0 0 10px;
  color: #8a5b18;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.card-desc {
  margin: 0 0 13px;
  color: var(--muted);
  line-height: 1.7;
  min-height: 74px;
}

.card-desc.small {
  min-height: 54px;
  font-size: 14px;
}

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

.category-card,
.category-overview-card {
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, #fffbeb);
  border: 1px solid rgba(245, 158, 11, 0.22);
  box-shadow: var(--shadow-soft);
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card span,
.category-title {
  display: block;
  color: var(--brand-dark);
  font-size: 22px;
  font-weight: 1000;
  margin-bottom: 8px;
}

.category-card strong,
.category-overview-card p {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.page-shell {
  padding-bottom: 24px;
}

.page-hero {
  min-height: 310px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(120, 53, 15, 0.94), rgba(217, 119, 6, 0.78)),
    radial-gradient(circle at 50% 20%, rgba(251, 191, 36, 0.46), transparent 26rem);
  padding: 68px 24px;
}

.page-hero > * {
  max-width: 880px;
}

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

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

.category-hero,
.ranking-hero {
  min-height: 360px;
}

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

.sample-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.sample-links a {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: rgba(245, 158, 11, 0.13);
  font-size: 13px;
  font-weight: 800;
}

.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(245, 158, 11, 0.20);
  box-shadow: var(--shadow-soft);
}

.filter-toolbar.wide {
  position: sticky;
  top: 84px;
  z-index: 20;
}

.filter-input {
  flex: 1 1 260px;
}

.filter-input.large {
  flex-basis: 420px;
}

.filter-chip {
  border: 1px solid rgba(217, 119, 6, 0.24);
  border-radius: 999px;
  background: #fff7ed;
  color: var(--brand-dark);
  min-height: 38px;
  padding: 0 14px;
  font-weight: 900;
  cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
  color: #fff;
  background: var(--brand);
}

.ranking-panel {
  margin-top: -58px;
  position: relative;
  z-index: 4;
}

.ranking-top {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  border: 1px solid rgba(245, 158, 11, 0.22);
}

.ranking-row {
  display: grid;
  grid-template-columns: 44px 86px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-row:hover {
  background: #fffbeb;
  transform: translateX(4px);
}

.ranking-index {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: var(--brand);
  font-weight: 1000;
}

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

.ranking-info {
  display: grid;
  gap: 5px;
}

.ranking-info strong {
  font-size: 17px;
}

.ranking-info em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.ranking-score {
  color: var(--brand-dark);
  font-size: 22px;
  font-weight: 1000;
}

.detail-shell {
  padding: 28px 0 0;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  padding-top: 18px;
}

.breadcrumb a {
  color: var(--brand-dark);
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(310px, 0.85fr);
  gap: 24px;
  margin-top: 22px;
  align-items: start;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  background: #0f172a;
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.28);
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #0f172a;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.62));
  cursor: pointer;
}

.play-layer span {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 6px;
  background: linear-gradient(135deg, #d97706, #92400e);
  box-shadow: 0 20px 42px rgba(146, 64, 14, 0.38);
  font-size: 42px;
}

.player-wrap.playing .play-layer {
  opacity: 0;
  pointer-events: none;
}

.detail-info-card {
  display: grid;
  gap: 18px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(245, 158, 11, 0.22);
  box-shadow: var(--shadow-soft);
}

.detail-info-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 18px;
}

.detail-info-card h1 {
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
}

.detail-info-card p {
  color: var(--muted);
  line-height: 1.8;
}

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

.detail-meta span,
.detail-meta strong {
  padding: 8px 11px;
  border-radius: 999px;
  color: #8a5b18;
  background: #fffbeb;
  font-weight: 900;
  font-size: 13px;
}

.detail-meta strong {
  color: #fff;
  background: var(--brand);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 24px auto 0;
  width: min(1180px, calc(100% - 32px));
}

.content-card {
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(245, 158, 11, 0.18);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.content-card h2 {
  margin: 0 0 12px;
  color: var(--brand-dark);
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: #4b5563;
  line-height: 1.9;
}

.related-block {
  padding-top: 52px;
}

.site-footer {
  margin-top: 70px;
  background: linear-gradient(180deg, #fffbeb, #fef3c7);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 34px;
  padding: 42px 0 28px;
}

.footer-grid p {
  color: var(--muted);
  line-height: 1.8;
  max-width: 520px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: var(--brand-dark);
  font-size: 18px;
}

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

.footer-links a {
  color: #6b4a18;
  font-weight: 700;
}

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

.footer-bottom {
  text-align: center;
  color: #6b4a18;
  border-top: 1px solid rgba(217, 119, 6, 0.20);
  padding: 18px 0;
  font-size: 14px;
}

.hidden-by-filter {
  display: none !important;
}

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

  .hero-thumbs {
    display: none;
  }

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

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

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

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

  .hero {
    min-height: 560px;
  }

  .hero-content {
    top: 52%;
  }

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

  .hero-arrow {
    display: none;
  }

  .quick-search-panel {
    grid-template-columns: 1fr;
    margin-top: -24px;
  }

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

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

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

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

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .nav-wrap,
  .container,
  .footer-grid,
  .detail-shell,
  .breadcrumb {
    width: min(100% - 22px, 1180px);
  }

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

  .brand-text em {
    display: none;
  }

  .hero {
    min-height: 520px;
  }

  .hero-content {
    left: 18px;
    width: calc(100% - 36px);
  }

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

  .hero-actions {
    gap: 8px;
  }

  .btn {
    min-height: 40px;
    padding: 0 14px;
  }

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

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

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

  .ranking-score {
    grid-column: 3;
  }

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

  .filter-toolbar.wide {
    position: static;
  }

  .play-layer span {
    width: 72px;
    height: 72px;
    font-size: 34px;
  }
}
