:root {
  --amber: #d97706;
  --amber-dark: #b45309;
  --orange: #f97316;
  --ink: #111827;
  --muted: #6b7280;
  --paper: #ffffff;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, var(--amber) 0%, var(--orange) 100%);
  box-shadow: 0 10px 30px rgba(180, 83, 9, 0.28);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--amber);
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.16);
}

.brand-name {
  font-size: 24px;
  letter-spacing: 0.02em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.nav-link {
  position: relative;
  font-weight: 600;
  opacity: 0.96;
  white-space: nowrap;
}

.nav-link::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 2px;
  content: "";
  background: #fff;
  border-radius: 999px;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.header-search,
.mobile-search {
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.header-search input,
.mobile-search input {
  width: 210px;
  border: 0;
  outline: 0;
  color: #fff;
  padding: 10px 14px;
  background: transparent;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.8);
}

.header-search button,
.mobile-search button {
  border: 0;
  color: var(--amber-dark);
  background: #fff;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 2px;
}

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

.mobile-link {
  display: block;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
}

.mobile-link:hover {
  background: rgba(255, 255, 255, 0.14);
}

.hero {
  position: relative;
  height: 520px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.48) 48%, rgba(0, 0, 0, 0.82) 100%), linear-gradient(90deg, rgba(17, 24, 39, 0.88), rgba(17, 24, 39, 0.2));
}

.hero-copy {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 70px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 12px;
  color: #fbbf24;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
  max-width: 840px;
  margin: 0 0 18px;
  font-size: clamp(36px, 7vw, 64px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-summary {
  max-width: 760px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.7;
}

.hero-tags,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags span,
.detail-meta span {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

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

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

.primary-btn,
.search-large button,
.quick-search-panel button {
  color: #fff;
  background: linear-gradient(90deg, var(--amber) 0%, var(--orange) 100%);
  box-shadow: 0 15px 30px rgba(217, 119, 6, 0.32);
  border: 0;
  cursor: pointer;
}

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

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.search-large button:hover,
.quick-search-panel button:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #fff;
  font-size: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-arrow.left {
  left: 24px;
}

.hero-arrow.right {
  right: 24px;
}

.hero-dots {
  position: absolute;
  right: 0;
  bottom: 24px;
  left: 0;
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 8px;
}

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

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

.quick-search-panel,
.content-section,
.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin-right: auto;
  margin-left: auto;
}

.quick-search-panel {
  position: relative;
  z-index: 4;
  margin-top: -38px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.quick-search-panel form,
.search-large {
  display: flex;
  gap: 12px;
}

.quick-search-panel input,
.search-large input,
.filter-bar input {
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
}

.category-pills {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin-top: 16px;
  padding-bottom: 4px;
}

.category-pills a,
.search-chips button {
  flex: 0 0 auto;
  color: var(--amber-dark);
  font-weight: 800;
  padding: 8px 14px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
}

.content-section {
  padding: 56px 0 0;
}

.content-section.no-pad {
  width: 100%;
  padding-top: 26px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  font-weight: 900;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  min-height: 40px;
  color: var(--amber-dark);
  background: #fff;
  border: 1px solid #fed7aa;
  box-shadow: 0 10px 22px rgba(217, 119, 6, 0.12);
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 285px;
  gap: 22px;
  overflow-x: auto;
  padding: 6px 2px 18px;
}

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

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

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

.movie-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.85);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #111827;
}

.movie-card.wide .poster-link {
  aspect-ratio: 16 / 10;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgba(0, 0, 0, 0.36);
  transition: opacity 0.24s ease;
}

.play-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--amber);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .poster-shade,
.movie-card:hover .play-dot {
  opacity: 1;
}

.movie-card:hover .play-dot {
  transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  color: #fff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  border-radius: 999px;
  font-weight: 900;
}

.movie-info {
  padding: 15px;
}

.movie-info h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-info h3 a:hover {
  color: var(--amber-dark);
}

.movie-info p {
  display: -webkit-box;
  min-height: 42px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  gap: 6px;
  margin-top: 12px;
  color: #6b7280;
  font-size: 12px;
}

.movie-meta span + span::before {
  content: "·";
  margin-right: 6px;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span,
.detail-tags span {
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}

.feature-panel,
.side-panel,
.detail-card {
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.feature-panel {
  padding: 24px;
}

.feature-panel.warm,
.side-panel.warm {
  background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 100%);
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: auto 58px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: #fbbf24;
}

.rank-item strong {
  color: var(--amber-dark);
  font-size: 18px;
  font-weight: 900;
}

.rank-item img {
  width: 58px;
  height: 76px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-item b,
.rank-item em {
  display: block;
}

.rank-item b {
  font-size: 14px;
  line-height: 1.4;
}

.rank-item em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.category-cards-small,
.category-overview-grid {
  display: grid;
  gap: 16px;
}

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

.category-cards-small a,
.category-overview-card,
.category-side-link {
  display: block;
  padding: 18px;
  background: #fff;
  border: 1px solid #fed7aa;
  border-radius: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-cards-small a:hover,
.category-overview-card:hover,
.category-side-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(217, 119, 6, 0.14);
}

.category-cards-small strong,
.category-overview-card strong,
.category-side-link {
  color: #9a3412;
  font-weight: 900;
}

.category-cards-small span,
.category-overview-card span,
.category-side-link span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

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

.category-overview-card em {
  display: inline-flex;
  margin-top: 16px;
  color: var(--amber-dark);
  font-style: normal;
  font-weight: 900;
}

.page-shell {
  padding-top: 32px;
}

.page-hero {
  padding: 42px;
  color: #fff;
  background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.38), transparent 30%), linear-gradient(135deg, #111827 0%, #78350f 100%);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 880px;
  margin: 0 0 14px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.1;
  font-weight: 900;
}

.page-hero p:last-child {
  max-width: 820px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.8;
}

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

.breadcrumb a:hover {
  color: var(--amber-dark);
}

.filter-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.filter-bar label {
  display: grid;
  gap: 8px;
  width: min(520px, 100%);
  font-weight: 900;
}

.filter-bar a {
  color: var(--amber-dark);
  font-weight: 900;
}

.search-page {
  padding-bottom: 40px;
}

.search-large {
  margin-bottom: 16px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.search-chips button {
  cursor: pointer;
}

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

.detail-main {
  display: grid;
  gap: 22px;
}

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

.movie-player {
  width: 100%;
  height: 100%;
  background: #000;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #000;
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

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

.big-play {
  position: absolute;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  color: #fff;
  font-size: 34px;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  border-radius: 999px;
  box-shadow: 0 20px 42px rgba(217, 119, 6, 0.35);
}

.detail-card {
  padding: 26px;
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
  font-weight: 900;
}

.detail-card h2 {
  margin: 28px 0 10px;
  font-size: 20px;
  font-weight: 900;
  border-left: 4px solid var(--amber);
  padding-left: 12px;
}

.detail-card p {
  margin: 0;
  color: #374151;
  line-height: 1.9;
}

.lead-text {
  color: #92400e !important;
  font-size: 18px;
  font-weight: 700;
}

.detail-meta {
  color: #fff;
  margin-bottom: 12px;
}

.detail-meta span {
  background: linear-gradient(90deg, var(--amber), var(--orange));
  border: 0;
}

.detail-tags {
  margin: 16px 0 2px;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 20px;
}

.side-panel {
  padding: 22px;
  position: sticky;
  top: 96px;
}

.side-panel + .side-panel {
  position: static;
}

.side-panel h2 {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 900;
}

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

.pager-links a {
  padding: 14px 16px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 16px;
  font-weight: 800;
}

.site-footer {
  margin-top: 72px;
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 40px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.site-footer p {
  margin: 0;
  line-height: 1.8;
}

.site-footer ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  color: #9ca3af;
  text-align: center;
  border-top: 1px solid #1f2937;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #fff;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 14px 32px rgba(217, 119, 6, 0.32);
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

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

  .menu-toggle {
    display: block;
  }

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

  .header-search {
    margin-left: auto;
  }

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

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

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

  .side-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: 64px;
  }

  .brand-name {
    font-size: 20px;
  }

  .header-search {
    display: none;
  }

  .hero {
    height: 560px;
  }

  .hero-copy {
    padding-bottom: 76px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search-panel form,
  .search-large,
  .filter-bar,
  .pager-links {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .movie-grid.six,
  .movie-grid.four,
  .category-overview-grid,
  .ranking-grid,
  .category-cards-small,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-panel,
  .detail-card,
  .page-hero {
    padding: 20px;
    border-radius: 20px;
  }

  .detail-layout {
    gap: 18px;
  }
}

@media (max-width: 520px) {
  .movie-grid.six,
  .movie-grid.four,
  .category-overview-grid,
  .ranking-grid,
  .category-cards-small,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .scroll-row {
    grid-auto-columns: 78vw;
  }

  .rank-item {
    grid-template-columns: auto 52px 1fr;
  }

  .rank-item img {
    width: 52px;
    height: 70px;
  }
}
