:root {
  --bg: #fff7ed;
  --panel: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --soft: #fef3c7;
  --brand: #ea580c;
  --brand-dark: #92400e;
  --brand-soft: #f59e0b;
  --line: #fed7aa;
  --shadow: 0 18px 45px rgba(124, 45, 18, 0.14);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, #fff7ed 0%, #fff 40%, #fff7ed 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

img {
  display: block;
  width: 100%;
  height: auto;
}

input,
select,
button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, #78350f 0%, #c2410c 54%, #78350f 100%);
  box-shadow: 0 8px 30px rgba(124, 45, 18, 0.28);
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1240px;
  min-height: 72px;
  margin: 0 auto;
  padding: 0 22px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #7c2d12;
  background: linear-gradient(135deg, #fde68a, #f97316);
  border-radius: 14px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32), 0 12px 28px rgba(0, 0, 0, 0.18);
}

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

.brand-text strong {
  font-size: 21px;
  letter-spacing: 0.03em;
}

.brand-text small {
  margin-top: 3px;
  color: #fde68a;
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  color: #fff7ed;
  border: 0;
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 4px;
  width: 320px;
  padding: 12px;
  color: #7c2d12;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  padding: 9px 10px;
  border-radius: 10px;
  color: #7c2d12;
}

.dropdown-menu a:hover {
  background: #ffedd5;
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 280px;
  margin-left: 4px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.header-search input,
.mobile-search input,
.hero-search input,
.filter-bar input,
.filter-bar select {
  min-width: 0;
  border: 0;
  outline: 0;
}

.header-search input {
  width: 100%;
  padding: 10px 12px 10px 18px;
  color: #fff;
  background: transparent;
}

.header-search input::placeholder,
.mobile-search input::placeholder,
.hero-search input::placeholder {
  color: rgba(255, 237, 213, 0.86);
}

.header-search button,
.mobile-search button,
.hero-search button {
  border: 0;
  color: #7c2d12;
  background: #fde68a;
  font-weight: 700;
  cursor: pointer;
}

.header-search button {
  align-self: stretch;
  padding: 0 16px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  color: #fff;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-panel {
  display: none;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px 18px;
}

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

.mobile-search {
  display: flex;
  margin: 8px 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-search input {
  flex: 1;
  padding: 12px 14px;
  color: #fff;
  background: transparent;
}

.mobile-search button {
  padding: 0 18px;
}

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

.hero-section {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at 18% 12%, rgba(253, 186, 116, 0.34), transparent 30%), linear-gradient(120deg, #78350f 0%, #c2410c 46%, #7c2d12 100%);
}

.hero-glow {
  position: absolute;
  inset: auto -15% -30% auto;
  width: 520px;
  height: 520px;
  background: rgba(251, 191, 36, 0.18);
  filter: blur(20px);
  border-radius: 999px;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  gap: 38px;
  align-items: center;
  max-width: 1240px;
  min-height: 640px;
  margin: 0 auto;
  padding: 82px 22px 70px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 7px 12px;
  color: #7c2d12;
  background: #fde68a;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 780px;
  margin: 0 0 20px;
  font-size: clamp(38px, 5.5vw, 70px);
  line-height: 1.08;
  letter-spacing: -0.05em;
  text-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 26px;
  color: #ffedd5;
  font-size: 19px;
}

.hero-search {
  display: flex;
  max-width: 620px;
  padding: 7px;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hero-search input {
  flex: 1;
  padding: 14px 18px;
  color: #fff;
  background: transparent;
}

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

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}

.primary-btn,
.ghost-btn,
.more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #7c2d12;
  background: linear-gradient(135deg, #fde68a, #fb923c);
  box-shadow: 0 14px 30px rgba(251, 146, 60, 0.35);
}

.ghost-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
}

.primary-btn:hover,
.ghost-btn:hover,
.more-link:hover {
  transform: translateY(-2px);
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-chips a {
  padding: 7px 12px;
  color: #ffedd5;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

.hero-chips a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

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

.hero-card {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
  transform: translateZ(0);
}

.hero-card:nth-child(2) {
  margin-top: 38px;
}

.hero-card:nth-child(3) {
  margin-top: 76px;
}

.hero-card img,
.card-poster img,
.category-tile img,
.detail-poster img,
.side-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-card img,
.card-poster img,
.category-tile img {
  transition: transform 0.45s ease;
}

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

.hero-card-shade,
.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.84));
}

.hero-label {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 11px;
  color: #7c2d12;
  background: #fbbf24;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hero-card-text {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
}

.hero-card-text strong {
  display: block;
  margin-bottom: 6px;
  font-size: 22px;
  line-height: 1.22;
}

.hero-card-text em {
  display: -webkit-box;
  color: #e5e7eb;
  font-style: normal;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.content-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 50px 22px;
}

.first-section {
  padding-top: 62px;
}

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

.section-heading h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-kicker {
  margin-bottom: 10px;
  color: #9a3412;
  background: #ffedd5;
}

.more-link {
  color: #ea580c;
  background: #ffedd5;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(251, 146, 60, 0.18);
  border-radius: var(--radius);
  box-shadow: 0 12px 36px rgba(124, 45, 18, 0.09);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

.movie-card:not(.compact) .card-poster {
  aspect-ratio: 16 / 10;
}

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 1;
  padding: 5px 9px;
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
}

.year-badge {
  top: 10px;
  right: 10px;
}

.rank-badge {
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
}

.card-body {
  padding: 16px;
}

.card-body h2 {
  display: -webkit-box;
  min-height: 1.35em;
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.compact .card-body h2 {
  font-size: 16px;
}

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

.card-meta,
.card-line {
  display: -webkit-box;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-line {
  color: #4b5563;
}

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

.tag-row span {
  padding: 4px 8px;
  color: #9a3412;
  background: #ffedd5;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

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

.ranking-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px;
  background: #fff;
  border: 1px solid rgba(251, 146, 60, 0.16);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(124, 45, 18, 0.08);
}

.side-link:hover {
  border-color: rgba(234, 88, 12, 0.38);
  transform: translateY(-2px);
}

.side-link img {
  flex: 0 0 76px;
  width: 76px;
  height: 92px;
  border-radius: 12px;
  background: #fed7aa;
}

.side-link span {
  min-width: 0;
}

.side-link strong,
.side-link em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-link strong {
  color: #111827;
  white-space: nowrap;
}

.side-link em {
  margin-top: 4px;
  color: #6b7280;
  font-size: 13px;
  font-style: normal;
  white-space: nowrap;
}

.list-rank {
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #7c2d12;
  background: #fde68a;
  border-radius: 10px;
  font-weight: 900;
}

.page-hero {
  color: #fff;
  background: radial-gradient(circle at 18% 4%, rgba(253, 186, 116, 0.34), transparent 30%), linear-gradient(120deg, #78350f, #c2410c 55%, #7c2d12);
}

.slim-hero .page-hero-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 62px 22px 56px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 18px;
  color: #ffedd5;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fff;
}

.page-hero h1,
.detail-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: #ffedd5;
  font-size: 18px;
}

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

.category-tile {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.category-content {
  position: absolute;
  right: 22px;
  bottom: 22px;
  left: 22px;
  color: #fff;
}

.category-content strong {
  display: block;
  margin-bottom: 8px;
  font-size: 28px;
}

.category-content em {
  display: block;
  color: #e5e7eb;
  font-style: normal;
}

.filter-section {
  padding-top: 34px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 190px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  background: #fff;
  border: 1px solid rgba(251, 146, 60, 0.18);
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(124, 45, 18, 0.08);
}

.search-filter-bar {
  grid-template-columns: minmax(260px, 1fr) repeat(3, 170px);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: #111827;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 14px;
}

.result-count {
  min-height: 24px;
  margin: -8px 0 18px;
  color: #9a3412;
  font-weight: 700;
}

.detail-hero {
  position: relative;
  color: #fff;
  background-image: linear-gradient(90deg, rgba(69, 26, 3, 0.96), rgba(124, 45, 18, 0.86), rgba(124, 45, 18, 0.58)), var(--detail-bg);
  background-size: cover;
  background-position: center;
}

.detail-hero-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px 22px 58px;
}

.detail-head-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
  background: #fed7aa;
}

.detail-copy p {
  max-width: 780px;
  margin: 0 0 18px;
  color: #ffedd5;
  font-size: 18px;
}

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

.detail-meta span {
  padding: 7px 12px;
  color: #fff7ed;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.detail-tags span {
  color: #7c2d12;
  background: #fde68a;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.player-panel,
.text-panel,
.pager-panel,
.detail-side {
  background: #fff;
  border: 1px solid rgba(251, 146, 60, 0.16);
  border-radius: 24px;
  box-shadow: 0 12px 36px rgba(124, 45, 18, 0.08);
}

.player-panel {
  overflow: hidden;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #111827;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.62));
  cursor: pointer;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  padding-left: 5px;
  color: #7c2d12;
  background: linear-gradient(135deg, #fde68a, #f97316);
  border-radius: 999px;
  font-size: 34px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

.play-overlay strong {
  font-size: 20px;
}

.play-overlay.is-hidden {
  display: none;
}

.text-panel {
  margin-top: 22px;
  padding: 28px;
}

.text-panel h2,
.detail-side h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.text-panel p {
  margin: 0 0 24px;
  color: #374151;
  font-size: 17px;
}

.text-panel p:last-child {
  margin-bottom: 0;
}

.pager-panel {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding: 18px;
}

.pager-panel a {
  flex: 1;
  padding: 12px 14px;
  color: #9a3412;
  background: #ffedd5;
  border-radius: 14px;
  font-weight: 800;
}

.detail-side {
  align-self: start;
  position: sticky;
  top: 96px;
  padding: 20px;
}

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

.site-footer {
  margin-top: 44px;
  color: #ffedd5;
  background: linear-gradient(90deg, #78350f, #9a3412, #78350f);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.15fr;
  gap: 28px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 46px 22px;
}

.footer-grid h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 18px;
}

.footer-grid p,
.footer-grid ul {
  margin: 0;
  padding: 0;
  color: #fed7aa;
  list-style: none;
}

.footer-grid li + li {
  margin-top: 8px;
}

.footer-grid a:hover {
  color: #fff;
}

.footer-brand {
  margin-bottom: 14px;
  color: #fff;
  font-weight: 900;
  font-size: 20px;
}

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 22px 26px;
  color: #fed7aa;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
}

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

@media (max-width: 1120px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-feature-grid {
    max-width: 760px;
  }

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

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

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

  .detail-side {
    position: static;
  }
}

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

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

  .hero-inner {
    min-height: auto;
    padding-top: 58px;
  }

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

  .hero-card,
  .hero-card:nth-child(2),
  .hero-card:nth-child(3) {
    min-height: 260px;
    margin-top: 0;
  }

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

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

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

  .detail-poster {
    max-width: 280px;
  }

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

@media (max-width: 620px) {
  .site-header-inner {
    min-height: 64px;
    padding: 0 16px;
  }

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

  .brand-text small {
    display: none;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 34px;
  }

  .hero-search {
    display: grid;
    gap: 8px;
    border-radius: 18px;
  }

  .hero-search button {
    min-height: 44px;
  }

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

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

  .content-section {
    padding-right: 16px;
    padding-left: 16px;
  }

  .pager-panel {
    flex-direction: column;
  }

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