:root {
  --site-bg: #fff7ed;
  --panel-bg: rgba(255, 255, 255, 0.86);
  --panel-solid: #ffffff;
  --text-main: #111827;
  --text-soft: #6b7280;
  --brand: #f59e0b;
  --brand-dark: #ea580c;
  --brand-deep: #7c2d12;
  --line: rgba(251, 146, 60, 0.24);
  --shadow: 0 18px 45px rgba(124, 45, 18, 0.16);
}

* {
  box-sizing: border-box;
}

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

img {
  max-width: 100%;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(251, 146, 60, 0.18);
  box-shadow: 0 12px 36px rgba(124, 45, 18, 0.08);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 900;
  color: var(--brand-deep);
}

.site-logo-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: white;
  font-size: 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 12px 26px rgba(234, 88, 12, 0.28);
}

.site-logo-text {
  font-size: 21px;
  letter-spacing: 0.02em;
}

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

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

.nav-link:hover,
.nav-link.active {
  color: var(--brand-deep);
  background: rgba(251, 146, 60, 0.14);
  transform: translateY(-1px);
}

.header-search,
.mobile-search,
.hero-search,
.page-search-form {
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(251, 146, 60, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
}

.header-search input,
.mobile-search input,
.hero-search input,
.page-search-form input {
  min-width: 0;
  width: 220px;
  padding: 11px 16px;
  color: #111827;
  outline: none;
  background: transparent;
}

.header-search button,
.mobile-search button,
.hero-search button,
.page-search-form button {
  padding: 0 18px;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.mobile-menu-button {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(251, 146, 60, 0.12);
}

.mobile-menu-button span {
  width: 22px;
  height: 2px;
  background: var(--brand-deep);
}

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid rgba(251, 146, 60, 0.16);
}

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

.hero-cinema {
  position: relative;
  overflow: hidden;
  min-height: 760px;
  color: white;
  background: #111827;
}

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

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

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

.hero-bg,
.hero-bg img,
.detail-hero-bg,
.detail-hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-bg img,
.detail-hero-bg img {
  object-fit: cover;
  filter: saturate(1.08) contrast(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.92) 0%, rgba(17, 24, 39, 0.68) 46%, rgba(17, 24, 39, 0.24) 100%), radial-gradient(circle at 65% 28%, rgba(245, 158, 11, 0.3), transparent 32rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 132px;
}

.hero-kicker,
.eyebrow {
  margin-bottom: 12px;
  color: #fbbf24;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 86px);
  font-weight: 950;
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.hero-content p {
  max-width: 660px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.85;
}

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

.hero-tags span,
.movie-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  color: #7c2d12;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  background: rgba(254, 243, 199, 0.92);
}

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

.primary-button,
.ghost-button,
.section-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  font-weight: 900;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 16px 32px rgba(234, 88, 12, 0.34);
}

.ghost-button {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.44);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.primary-button:hover,
.ghost-button:hover,
.section-action:hover {
  transform: translateY(-2px);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
}

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

.hero-side-panel {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 24px;
  padding-top: 530px;
  padding-bottom: 82px;
}

.hero-search-card {
  padding: 24px;
  color: #111827;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-search-card h2 {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 950;
}

.hero-search-card p {
  color: var(--text-soft);
  line-height: 1.75;
}

.hero-search {
  margin-top: 20px;
}

.hero-search input,
.page-search-form input {
  width: 100%;
}

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

.page-stack {
  display: grid;
  gap: 36px;
  padding: 44px 0 64px;
}

.content-section,
.text-panel,
.detail-panel,
.player-section,
.filter-panel {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--panel-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.content-section {
  padding: 28px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-action {
  color: var(--brand-deep);
  background: rgba(251, 146, 60, 0.14);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(251, 146, 60, 0.18);
  border-radius: 24px;
  background: white;
  box-shadow: 0 14px 28px rgba(124, 45, 18, 0.1);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  border-color: rgba(245, 158, 11, 0.56);
  transform: translateY(-7px);
  box-shadow: 0 28px 52px rgba(124, 45, 18, 0.17);
}

.movie-card-link {
  display: block;
  height: 100%;
}

.movie-poster {
  position: relative;
  aspect-ratio: 7 / 10;
  overflow: hidden;
  background: #111827;
}

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

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

.movie-year,
.movie-type {
  position: absolute;
  top: 12px;
  padding: 6px 10px;
  color: white;
  font-size: 12px;
  font-weight: 900;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(8px);
}

.movie-year {
  left: 12px;
}

.movie-type {
  right: 12px;
}

.movie-card-body {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.movie-card-body h2 {
  min-height: 2.9em;
  margin: 0;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.35;
}

.movie-meta,
.movie-one-line {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.65;
}

.movie-one-line {
  min-height: 4.6em;
}

.compact-card .movie-card-body h2 {
  min-height: auto;
  font-size: 16px;
}

.compact-card .movie-one-line {
  min-height: auto;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 28px;
  align-items: start;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 46px 62px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 247, 237, 0.86);
  transition: transform 0.2s ease, background 0.2s ease;
}

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

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

.rank-num {
  color: var(--brand-dark);
  font-size: 22px;
  font-weight: 950;
}

.rank-title {
  overflow: hidden;
  font-weight: 900;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-info {
  grid-column: 3;
  color: var(--text-soft);
  font-size: 13px;
}

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

.category-tile {
  min-height: 128px;
  padding: 22px;
  color: white;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.96), rgba(234, 88, 12, 0.92));
  box-shadow: 0 18px 38px rgba(234, 88, 12, 0.22);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:nth-child(2n) {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.94), rgba(168, 85, 247, 0.9));
}

.category-tile:nth-child(3n) {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.94), rgba(20, 184, 166, 0.9));
}

.category-tile:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 30px 54px rgba(124, 45, 18, 0.24);
}

.category-tile span {
  display: block;
  margin-bottom: 10px;
  font-size: 24px;
  font-weight: 950;
}

.category-tile small {
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.65;
}

.category-grid-large .category-tile {
  min-height: 170px;
}

.page-hero {
  color: white;
  background: radial-gradient(circle at 20% 10%, rgba(251, 191, 36, 0.42), transparent 28rem), linear-gradient(135deg, #431407, #9a3412 44%, #f59e0b);
}

.small-hero .site-shell {
  padding: 82px 0 72px;
}

.small-hero h1 {
  max-width: 820px;
  margin: 0 0 16px;
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 950;
  letter-spacing: -0.05em;
}

.small-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.filter-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  min-height: 38px;
  padding: 0 14px;
  color: var(--brand-deep);
  font-weight: 850;
  border-radius: 999px;
  background: rgba(251, 146, 60, 0.13);
}

.filter-chip.active,
.filter-chip:hover {
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.filter-input {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(251, 146, 60, 0.25);
  border-radius: 16px;
  outline: none;
  background: white;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.pagination a,
.pagination strong,
.pagination span {
  display: inline-grid;
  min-width: 42px;
  height: 42px;
  place-items: center;
  padding: 0 12px;
  color: var(--brand-deep);
  font-weight: 900;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(251, 146, 60, 0.2);
}

.pagination strong {
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.rank-card-list {
  display: grid;
  gap: 18px;
}

.rank-card a {
  position: relative;
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.rank-card img {
  width: 138px;
  height: 190px;
  object-fit: cover;
  border-radius: 18px;
}

.rank-card h2 {
  margin: 12px 0 8px;
  font-size: 26px;
  font-weight: 950;
}

.rank-card p {
  color: var(--text-soft);
  line-height: 1.75;
}

.rank-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 6px 12px;
  color: white;
  font-weight: 950;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: white;
  background: #111827;
}

.detail-hero-bg {
  filter: blur(8px) scale(1.05);
}

.detail-hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.72)), radial-gradient(circle at 65% 30%, rgba(245, 158, 11, 0.32), transparent 30rem);
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
  padding: 74px 0;
}

.detail-cover img {
  width: 310px;
  height: 450px;
  object-fit: cover;
  border: 7px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
}

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 950;
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 820px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.detail-meta span {
  padding: 8px 12px;
  color: white;
  font-weight: 800;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.detail-layout {
  display: grid;
  gap: 28px;
  padding: 44px 0 68px;
}

.player-section {
  overflow: hidden;
  padding: 0;
  background: #050505;
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #050505;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  color: white;
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.34), rgba(124, 45, 18, 0.4));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-circle {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  padding-left: 6px;
  font-size: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 20px 48px rgba(234, 88, 12, 0.36);
}

.detail-panel,
.text-panel {
  padding: 30px;
}

.detail-panel h2,
.text-panel h2 {
  margin: 0 0 16px;
  font-size: 28px;
  font-weight: 950;
}

.detail-panel p,
.text-panel p {
  margin: 0 0 16px;
  color: #374151;
  font-size: 17px;
  line-height: 1.95;
}

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

.genre-links a {
  padding: 9px 14px;
  color: var(--brand-deep);
  font-weight: 850;
  border-radius: 999px;
  background: rgba(251, 146, 60, 0.14);
}

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

.search-status {
  padding: 14px 18px;
  color: var(--brand-deep);
  font-weight: 850;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
}

.site-footer {
  color: white;
  background: linear-gradient(135deg, #111827, #431407);
}

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

.footer-logo {
  margin-bottom: 12px;
  font-size: 28px;
  font-weight: 950;
  color: #fbbf24;
}

.footer-brand p,
.footer-links a,
.footer-bottom {
  color: rgba(255, 255, 255, 0.76);
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 950;
}

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

.footer-links a:hover {
  color: #fbbf24;
}

.footer-bottom {
  padding: 18px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.back-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  display: none;
  padding: 12px 14px;
  color: white;
  font-weight: 900;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 12px 28px rgba(234, 88, 12, 0.28);
}

.back-top.visible {
  display: inline-flex;
}

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

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

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

  .hero-side-panel,
  .split-section,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .mobile-menu-button {
    display: flex;
    margin-left: auto;
  }

  .hero-cinema {
    min-height: 820px;
  }

  .hero-content {
    padding-top: 92px;
  }

  .hero-side-panel {
    padding-top: 440px;
  }

  .movie-grid,
  .split-section .movie-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-cover img {
    width: 240px;
    height: 350px;
  }

  .rank-card a {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .rank-card img {
    width: 96px;
    height: 136px;
  }
}

@media (max-width: 560px) {
  .site-shell {
    width: min(100% - 22px, 1180px);
  }

  .hero-mini-grid,
  .movie-grid,
  .split-section .movie-grid,
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .content-section,
  .detail-panel,
  .text-panel,
  .filter-panel {
    border-radius: 22px;
    padding: 20px;
  }

  .hero-content p,
  .small-hero p,
  .detail-one-line {
    font-size: 16px;
  }

  .footer-grid {
    padding: 34px 0;
  }
}
