:root {
  --bg: #fff7ed;
  --surface: #ffffff;
  --surface-soft: #fffbeb;
  --text: #451a03;
  --muted: #92400e;
  --brand: #d97706;
  --brand-dark: #92400e;
  --brand-soft: #fef3c7;
  --line: #fde68a;
  --shadow: 0 18px 45px rgba(146, 64, 14, 0.15);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.28), transparent 32rem),
    linear-gradient(180deg, #fff7ed 0%, #fffdf7 38%, #fff7ed 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(253, 230, 138, 0.9);
  background: rgba(255, 251, 235, 0.92);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 10px 25px rgba(180, 83, 9, 0.25);
}

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

.brand-text strong,
.footer-brand strong {
  font-size: 18px;
  letter-spacing: 0.02em;
}

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

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

.nav-link,
.mobile-link {
  position: relative;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--brand-dark);
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 3px;
  border-radius: 999px;
  background: var(--brand);
}

.header-search,
.mobile-search,
.large-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.large-search input,
.filter-panel input,
.filter-panel select {
  min-width: 0;
  border: 1px solid #fcd34d;
  border-radius: 999px;
  outline: none;
  background: #fff;
  color: var(--text);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.header-search input {
  width: 190px;
  padding: 9px 14px;
  font-size: 13px;
}

.header-search input:focus,
.mobile-search input:focus,
.large-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.header-search button,
.mobile-search button,
.large-search button,
.btn-primary,
.btn-wide {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 12px 24px rgba(180, 83, 9, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.header-search button,
.mobile-search button {
  padding: 9px 14px;
  font-size: 13px;
}

.btn-primary,
.btn-wide,
.large-search button {
  padding: 13px 22px;
}

.header-search button:hover,
.mobile-search button:hover,
.large-search button:hover,
.btn-primary:hover,
.btn-wide:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 35px rgba(180, 83, 9, 0.28);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--brand-dark);
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px 20px 18px;
  background: #fffaf0;
}

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

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

.mobile-search input {
  flex: 1;
  padding: 11px 14px;
}

.hero-carousel {
  position: relative;
  max-width: 1200px;
  min-height: 620px;
  margin: 28px auto 0;
  overflow: hidden;
  border-radius: 34px;
  box-shadow: var(--shadow);
  background: #1c1206;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  filter: saturate(1.08) contrast(1.05);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 24%, rgba(245, 158, 11, 0.18), transparent 24rem),
    linear-gradient(90deg, rgba(28, 18, 6, 0.92), rgba(28, 18, 6, 0.58) 44%, rgba(28, 18, 6, 0.2)),
    linear-gradient(0deg, rgba(28, 18, 6, 0.82), transparent 46%);
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.5fr);
  align-items: center;
  gap: 36px;
  min-height: 620px;
  padding: 72px;
}

.hero-copy {
  max-width: 650px;
  color: #fff;
}

.eyebrow,
.hero-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #92400e;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  background: #fef3c7;
}

.hero-kicker {
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(252, 211, 77, 0.45);
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero-summary {
  max-width: 600px;
  margin: 0 0 22px;
  color: #fffbeb;
  font-size: 19px;
  line-height: 1.75;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  padding: 7px 12px;
  color: #fff7ed;
  background: rgba(255, 251, 235, 0.14);
  border: 1px solid rgba(255, 251, 235, 0.2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  border: 1px solid rgba(255, 251, 235, 0.38);
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  transition: transform 0.25s ease, background 0.25s ease;
}

.btn-ghost:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.2);
}

.hero-poster {
  position: relative;
  justify-self: end;
  width: min(310px, 100%);
  overflow: hidden;
  border: 8px solid rgba(255, 251, 235, 0.12);
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #78350f, #f59e0b);
}

.hero-poster span {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, #f59e0b, #b45309);
}

.hero-controls {
  position: absolute;
  left: 72px;
  right: 72px;
  bottom: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-controls button {
  pointer-events: auto;
  border: none;
  cursor: pointer;
}

.hero-controls > button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #fff;
  font-size: 30px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

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

.hero-dot.is-active {
  width: 32px;
  background: #fbbf24;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 56px;
}

.quick-search-panel,
.content-section,
.page-hero,
.detail-card,
.side-info,
.filter-panel {
  border: 1px solid rgba(253, 230, 138, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.quick-search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 0.8fr);
  align-items: center;
  gap: 28px;
  margin-top: 26px;
  padding: 32px;
}

.quick-search-panel h2,
.section-heading h2,
.aside-title h2,
.page-hero h1,
.detail-card h1,
.prose-card h2 {
  margin: 0;
  color: var(--text);
  line-height: 1.15;
}

.quick-search-panel p,
.section-heading p,
.page-hero p,
.footer-brand p,
.prose-card p,
.movie-card p,
.category-card p {
  color: var(--muted);
  line-height: 1.75;
}

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

.content-section {
  margin-top: 26px;
  padding: 28px;
}

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

.section-heading h2,
.aside-title h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.section-heading p {
  margin: 10px 0 0;
}

.section-more {
  display: inline-flex;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--brand-dark);
  font-weight: 800;
  background: var(--brand-soft);
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(253, 230, 138, 0.85);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(146, 64, 14, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: #fbbf24;
  box-shadow: 0 20px 35px rgba(146, 64, 14, 0.16);
}

.movie-link {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #78350f, #fbbf24);
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.score-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 10px 20px rgba(120, 53, 15, 0.25);
}

.score-pill {
  right: 10px;
  bottom: 10px;
  min-width: 44px;
  height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 13px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 15px;
}

.category-pill {
  display: inline-flex;
  width: max-content;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
  background: var(--brand-soft);
}

.movie-card h3 {
  display: -webkit-box;
  min-height: 44px;
  margin: 11px 0 8px;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  overflow: hidden;
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  color: #a16207;
  font-size: 12px;
  font-weight: 800;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  padding: 5px 9px;
  color: #92400e;
  background: #fff7ed;
}

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

.ranking-aside {
  position: sticky;
  top: 92px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(180deg, #451a03, #78350f);
  color: #fff;
  box-shadow: 0 20px 45px rgba(69, 26, 3, 0.25);
}

.ranking-aside .eyebrow {
  color: #fef3c7;
  background: rgba(254, 243, 199, 0.12);
}

.ranking-aside h2 {
  color: #fff;
}

.ranking-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 22px;
  padding: 0;
  list-style: none;
}

.ranking-list a {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.25s ease, transform 0.25s ease;
}

.ranking-list a:hover {
  transform: translateX(3px);
  background: rgba(255, 255, 255, 0.18);
}

.rank-no {
  color: #fcd34d;
  font-weight: 900;
}

.ranking-list strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-list em {
  font-style: normal;
  color: #fbbf24;
  font-weight: 900;
  text-align: right;
}

.btn-wide {
  width: 100%;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 160px;
  padding: 24px;
  border: 1px solid #fde68a;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 251, 235, 0.96), rgba(254, 243, 199, 0.9)),
    radial-gradient(circle at right top, rgba(245, 158, 11, 0.24), transparent 14rem);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 35px rgba(146, 64, 14, 0.14);
}

.category-card span {
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin-bottom: 0;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: #fff7ed;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 34px 20px;
}

.footer-brand p {
  max-width: 520px;
  margin: 6px 0 0;
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.listing-main,
.detail-main {
  padding-top: 28px;
}

.page-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 34px;
}

.page-hero h1 {
  font-size: clamp(32px, 5vw, 52px);
}

.page-hero p {
  max-width: 720px;
  margin: 12px 0 0;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin-top: 20px;
  padding: 18px;
}

.filter-panel input,
.filter-panel select {
  padding: 12px 15px;
}

.empty-state {
  margin: 26px 0 0;
  padding: 20px;
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  background: var(--surface-soft);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 26px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.28);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), transparent);
}

.player-overlay button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  transition: transform 0.25s ease, background 0.25s ease;
}

.player-overlay button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.26);
}

.fullscreen-button {
  margin-left: auto;
}

.detail-card,
.side-info {
  margin-top: 18px;
  padding: 24px;
}

.detail-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
}

.detail-topline strong {
  color: var(--brand-dark);
  font-size: 20px;
}

.detail-card h1 {
  margin-top: 16px;
  font-size: clamp(30px, 5vw, 46px);
}

.lead-text {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.detail-tags span {
  padding: 7px 12px;
}

.prose-card h2 {
  margin-top: 20px;
  font-size: 24px;
}

.prose-card h2:first-child {
  margin-top: 0;
}

.prose-card p {
  font-size: 16px;
}

.detail-side {
  position: sticky;
  top: 96px;
}

.side-poster {
  display: block;
  overflow: hidden;
  border-radius: 26px;
  background: linear-gradient(135deg, #78350f, #fbbf24);
  box-shadow: var(--shadow);
}

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

.side-info dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.side-info div {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
}

.side-info dt {
  color: #a16207;
  font-weight: 900;
}

.side-info dd {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
}

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

.search-page .page-search {
  min-width: min(460px, 100%);
}

[hidden] {
  display: none !important;
}

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

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .header-search {
    display: none;
  }

  .hero-content,
  .quick-search-panel,
  .split-layout,
  .watch-layout,
  .page-hero {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding: 52px;
  }

  .hero-poster,
  .ranking-aside,
  .detail-side {
    position: static;
  }

  .hero-poster {
    justify-self: start;
    width: 240px;
  }

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

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

@media (max-width: 760px) {
  .header-inner {
    padding: 12px 14px;
  }

  .brand-text em {
    display: none;
  }

  .hero-carousel {
    min-height: 650px;
    margin: 14px 14px 0;
    border-radius: 26px;
  }

  .hero-content {
    min-height: 650px;
    padding: 34px 24px 92px;
  }

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

  .hero-controls {
    left: 24px;
    right: 24px;
    bottom: 24px;
  }

  main {
    padding: 0 14px 42px;
  }

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

  .section-heading,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .large-search,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .large-search {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .movie-card h3 {
    min-height: auto;
    font-size: 14px;
  }

  .movie-card p {
    display: none;
  }

  .watch-layout {
    gap: 16px;
  }

  .side-info div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .catalog-grid,
  .movie-grid,
  .small-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    width: 190px;
  }
}
