:root {
  --yellow: #facc15;
  --amber: #f59e0b;
  --orange: #f97316;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #fffbeb;
  --panel: #ffffff;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 45%, #fef3c7 100%);
  min-height: 100vh;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #facc15, #fde047, #f59e0b);
  box-shadow: 0 10px 30px rgba(146, 64, 14, 0.18);
}

.header-inner {
  min-height: 76px;
  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: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #b45309;
  background: #ffffff;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(120, 53, 15, 0.22);
}

.brand-copy strong,
.footer-brand strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
}

.brand-copy small {
  color: #4b5563;
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-weight: 700;
}

.site-nav a {
  padding: 10px 0;
  color: #374151;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: #111827;
  border-bottom-color: #111827;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.7);
  font-weight: 800;
  color: #374151;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  background: radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.55), transparent 26%), linear-gradient(135deg, #facc15 0%, #fde047 45%, #f59e0b 100%);
}

.hero-glow {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image: radial-gradient(circle at 12% 22%, #ffffff 0 0.8%, transparent 0.9%), radial-gradient(circle at 82% 18%, #ffffff 0 1.2%, transparent 1.3%), radial-gradient(circle at 34% 74%, #ffffff 0 1%, transparent 1.1%);
  background-size: 280px 280px;
}

.hero-track {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(36px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(250, 204, 21, 0.95) 0%, rgba(250, 204, 21, 0.8) 44%, rgba(17, 24, 39, 0.58) 100%), var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.08);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: 48px;
  padding: 72px 0;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #78350f;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(120, 53, 15, 0.12);
}

.hero-copy h1,
.hero-copy h2 {
  margin: 20px 0 16px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  color: #111827;
}

.hero-copy p {
  max-width: 630px;
  color: #374151;
  font-size: 19px;
  line-height: 1.85;
}

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

.btn,
.rank-action,
.search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 999px;
  padding: 12px 22px;
  border: 0;
  background: #111827;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(17, 24, 39, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.rank-action:hover,
.search-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.26);
}

.btn.light {
  background: #ffffff;
  color: #111827;
}

.hero-poster {
  position: relative;
  border-radius: 30px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 24px 55px rgba(17, 24, 39, 0.22);
}

.hero-poster-card {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  padding: 18px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.42), rgba(17, 24, 39, 0.9));
}

.hero-poster-card strong {
  display: block;
  font-size: 22px;
  margin-bottom: 8px;
}

.hero-poster-card span {
  display: inline-flex;
  margin-right: 8px;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.9);
  color: #111827;
  font-size: 12px;
  font-weight: 800;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.28);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.hero-search {
  position: relative;
  z-index: 5;
  margin-top: -44px;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-panel input,
.local-filter,
.search-page-input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  color: #111827;
  background: #ffffff;
  outline: none;
  font-size: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-panel input:focus,
.local-filter:focus,
.search-page-input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}

.section {
  padding: 74px 0;
}

.section.soft {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
}

.section.white {
  background: #ffffff;
}

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

.section-head h1,
.section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-head p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.feature-tile {
  padding: 24px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.feature-tile strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
}

.feature-tile p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
}

.movie-cover img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.movie-card:hover .movie-cover img {
  transform: scale(1.08);
  filter: saturate(1.08) brightness(0.92);
}

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(17, 24, 39, 0.66));
  transition: opacity 0.25s ease;
}

.movie-card:hover .movie-cover::after {
  opacity: 1;
}

.cover-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  width: 60px;
  height: 60px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: var(--yellow);
  font-weight: 900;
  transform: translate(-50%, -50%) scale(0.78);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: inline-flex;
  min-width: 42px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: var(--yellow);
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.18);
}

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

.movie-card h2,
.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 19px;
  line-height: 1.35;
}

.movie-card h2 a,
.movie-card h3 a {
  transition: color 0.2s ease;
}

.movie-card h2 a:hover,
.movie-card h3 a:hover {
  color: #ca8a04;
}

.movie-card p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 13px;
}

.movie-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f3f4f6;
}

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

.tag-row span {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  color: #a16207;
  background: #fef3c7;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  min-height: 210px;
  padding: 24px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card a:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.category-icon {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: #111827;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  font-weight: 900;
}

.category-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.75;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-samples span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 12px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  margin: 0 0 26px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
}

.filter-note {
  color: var(--muted);
  font-size: 14px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 142px 58px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.07);
}

.rank-cover img {
  width: 142px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 18px;
}

.rank-number {
  font-size: 28px;
  font-weight: 900;
  color: #d97706;
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

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

.breadcrumb {
  padding: 22px 0 0;
  color: #6b7280;
  font-size: 14px;
}

.breadcrumb a {
  color: #92400e;
  font-weight: 700;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0;
  color: #ffffff;
  background-image: linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.72), rgba(17, 24, 39, 0.34)), var(--detail-bg);
  background-size: cover;
  background-position: center;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(240px, 350px) 1fr;
  gap: 38px;
  align-items: center;
}

.detail-poster {
  padding: 12px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 20px;
}

.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-copy p {
  max-width: 760px;
  margin: 0;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.85;
}

.detail-actions .btn.light {
  color: #111827;
}

.player-section {
  padding: 54px 0 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000000;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.22);
}

.player-shell video {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 28px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.14), rgba(17, 24, 39, 0.72));
  text-align: center;
}

.player-shell.is-playing .player-overlay {
  display: none;
}

.player-button {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: #111827;
  background: var(--yellow);
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 18px 45px rgba(250, 204, 21, 0.34);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.player-button:hover {
  transform: scale(1.06);
  box-shadow: 0 22px 55px rgba(250, 204, 21, 0.44);
}

.player-title {
  font-size: 24px;
  font-weight: 900;
}

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

.detail-article,
.side-panel {
  padding: 28px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
}

.detail-article h2,
.side-panel h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.detail-article p {
  margin: 0 0 22px;
  color: #374151;
  line-height: 2;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.info-list div {
  padding: 14px;
  border-radius: 16px;
  background: #f9fafb;
}

.info-list dt {
  color: #6b7280;
  font-size: 13px;
}

.info-list dd {
  margin: 6px 0 0;
  font-weight: 800;
}

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

.related-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
}

.related-item img {
  width: 92px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 14px;
}

.related-item strong {
  display: block;
  margin-bottom: 6px;
}

.related-item span {
  color: var(--muted);
  font-size: 13px;
}

.search-page {
  min-height: 430px;
}

.search-page-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  margin-bottom: 28px;
}

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

.empty-state {
  display: none;
  padding: 26px;
  border-radius: 22px;
  background: #ffffff;
  color: var(--muted);
  text-align: center;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.08);
}

.empty-state.show {
  display: block;
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(90deg, #111827, #1f2937, #111827);
}

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

.footer-brand p,
.site-footer p {
  color: #9ca3af;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--yellow);
  font-size: 18px;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li + li {
  margin-top: 10px;
}

.site-footer a {
  color: #d1d5db;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--yellow);
}

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: #9ca3af;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: none;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  color: #111827;
  background: var(--yellow);
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.back-top.show {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 980px) {
  .hero-content,
  .detail-layout,
  .detail-sections,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .search-results,
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .rank-row {
    grid-template-columns: 110px 46px 1fr;
  }

  .rank-action {
    grid-column: 3;
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .header-inner {
    min-height: 68px;
  }

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

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 12px 14px;
    border-radius: 12px;
    border-bottom: 0;
  }

  .site-nav a.active,
  .site-nav a:hover {
    background: #fef3c7;
  }

  .hero-carousel,
  .hero-track,
  .hero-content {
    min-height: 760px;
  }

  .hero-content {
    padding: 46px 0 90px;
  }

  .hero-poster {
    max-width: 420px;
    margin: 0 auto;
  }

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

  .section-head {
    display: block;
  }

  .movie-grid,
  .movie-grid.three,
  .search-results,
  .feature-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 92px 40px 1fr;
    gap: 12px;
  }

  .rank-cover img {
    width: 92px;
  }

  .rank-info p {
    display: none;
  }

  .rank-action {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .detail-hero {
    padding: 38px 0;
  }

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