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

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: #ffffff;
  background: linear-gradient(90deg, var(--brand) 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;
  min-height: 64px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  color: var(--brand);
  background: #ffffff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.logo-text {
  font-size: 24px;
}

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

.nav-link {
  opacity: 0.9;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  opacity: 1;
  transform: translateY(-1px);
}

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

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #ffffff;
  border-radius: 999px;
}

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

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

.mobile-nav-link {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
}

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

.hero-track,
.hero-slide,
.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.46) 48%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.92) 0%, rgba(17, 24, 39, 0.05) 46%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 100%;
  color: #ffffff;
}

.hero-text {
  width: min(720px, 100%);
  padding-top: 22px;
}

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

.hero-text h1,
.hero-text h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-weight: 900;
  line-height: 1.08;
}

.hero-text h1 {
  max-width: 920px;
  font-size: clamp(34px, 5vw, 62px);
}

.hero-text h2 {
  margin-top: 10px;
  font-size: clamp(28px, 4vw, 48px);
}

.hero-text p:not(.eyebrow) {
  max-width: 680px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.7;
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 10px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-size: 12px;
  font-weight: 800;
}

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

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

.primary-button {
  min-height: 46px;
  padding: 0 24px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--brand) 0%, var(--orange) 100%);
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.36);
}

.ghost-button {
  min-height: 46px;
  padding: 0 22px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(12px);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.42);
  font-size: 34px;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

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

.hero-search {
  position: absolute;
  right: max(16px, calc((100% - 1180px) / 2));
  bottom: 78px;
  z-index: 5;
  display: flex;
  width: min(440px, calc(100% - 32px));
  padding: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 16px;
  color: var(--ink);
  background: transparent;
}

.hero-search button {
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  color: #ffffff;
  background: var(--brand);
  font-weight: 900;
  cursor: pointer;
}

.hero-category-strip {
  position: absolute;
  left: max(16px, calc((100% - 1180px) / 2));
  bottom: 78px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 600px;
}

.hero-category-strip a {
  padding: 9px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 800;
}

.content-section {
  margin-top: 56px;
}

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

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

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-more {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 18px;
  color: var(--brand-dark);
  background: var(--brand-soft);
}

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

.horizontal-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 280px);
  gap: 20px;
  overflow-x: auto;
  padding: 6px 2px 18px;
  scrollbar-width: thin;
}

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e5e7eb;
}

.movie-card-compact .movie-cover {
  aspect-ratio: 16 / 10;
}

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

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

.cover-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(217, 119, 6, 0.88);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.84);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 42px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  text-align: center;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25);
}

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

.movie-card-body h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

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

.movie-card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
}

.movie-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #d1d5db;
}

.movie-card .tag-list {
  margin-top: 12px;
}

.category-panel {
  padding: 34px;
  border-radius: 28px;
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 62%, #ffedd5 100%);
  box-shadow: 0 14px 38px rgba(217, 119, 6, 0.12);
}

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

.category-card,
.category-overview-card {
  display: grid;
  gap: 8px;
  padding: 20px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-card strong,
.category-overview-card h2 {
  color: var(--brand-dark);
  font-size: 20px;
}

.category-card span,
.category-overview-card p {
  color: var(--muted);
  line-height: 1.7;
}

.ranking-strip {
  padding: 34px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

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

.page-main {
  padding-top: 34px;
}

.page-hero {
  padding: 42px;
  border-radius: 30px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(146, 64, 14, 0.94), rgba(249, 115, 22, 0.88)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.24), transparent 34%);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(30px, 4vw, 50px);
}

.page-hero p:not(.eyebrow) {
  max-width: 820px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.compact-hero {
  min-height: 220px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: #374151;
  font-size: 13px;
  font-weight: 900;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 44px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  outline: 0;
  padding: 0 14px;
  color: var(--ink);
  background: #ffffff;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.13);
}

.empty-state {
  padding: 34px;
  border-radius: 22px;
  color: var(--muted);
  background: #ffffff;
  text-align: center;
}

.category-overview-head {
  display: grid;
  gap: 8px;
}

.mini-card-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.mini-card-row a {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.mini-card-row img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  background: #e5e7eb;
}

.mini-card-row span {
  overflow: hidden;
  color: #374151;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 22px 0;
  color: #6b7280;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--brand-dark);
  font-weight: 800;
}

.detail-main {
  background: linear-gradient(180deg, #111827 0, #111827 360px, #f8fafc 360px, #f8fafc 100%);
}

.detail-main .breadcrumb {
  color: rgba(255, 255, 255, 0.72);
}

.detail-main .breadcrumb a {
  color: #fbbf24;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr);
  gap: 28px;
  align-items: center;
  padding-bottom: 38px;
  color: #ffffff;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
}

.player-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.46) 100%);
  cursor: pointer;
}

.play-overlay.is-hidden,
.player-card.is-playing .play-overlay {
  display: none;
}

.play-circle {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  padding-left: 6px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(90deg, var(--brand), var(--orange));
  font-size: 34px;
  box-shadow: 0 18px 44px rgba(217, 119, 6, 0.45);
}

.detail-info h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.detail-one-line {
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

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

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

.detail-tags {
  margin: 18px 0 24px;
}

.detail-button {
  width: fit-content;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
  margin-top: 38px;
}

.detail-article,
.detail-side {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.detail-article {
  padding: 30px;
}

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

.detail-article p {
  margin: 0 0 24px;
  color: #374151;
  font-size: 17px;
  line-height: 1.9;
}

.detail-side {
  padding: 24px;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  margin: 0;
}

.detail-side dt {
  color: #6b7280;
  font-weight: 900;
}

.detail-side dd {
  margin: 0;
  color: #111827;
  font-weight: 800;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
  padding: 44px 0;
}

.footer-logo {
  color: #ffffff;
  font-size: 22px;
}

.site-footer p {
  max-width: 520px;
  color: #9ca3af;
  line-height: 1.8;
}

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

.site-footer a:not(.footer-logo) {
  display: block;
  margin: 8px 0;
  color: #d1d5db;
}

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

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

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: var(--brand);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.back-to-top.is-visible {
  display: block;
}

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

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

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

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

  .detail-main {
    background: linear-gradient(180deg, #111827 0, #111827 520px, #f8fafc 520px, #f8fafc 100%);
  }
}

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

  .menu-toggle {
    display: block;
  }

  .logo-text {
    font-size: 20px;
  }

  .hero-slider {
    height: 650px;
  }

  .hero-content {
    align-items: flex-start;
    padding-top: 74px;
  }

  .hero-search {
    left: 16px;
    right: 16px;
    bottom: 76px;
    width: auto;
  }

  .hero-category-strip {
    left: 16px;
    right: 16px;
    bottom: 132px;
    max-width: none;
  }

  .hero-arrow {
    display: none;
  }

  .section-heading,
  .footer-grid {
    display: grid;
  }

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

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

  .page-hero,
  .category-panel,
  .ranking-strip {
    padding: 24px;
    border-radius: 22px;
  }

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

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

  .hero-slider {
    height: 720px;
  }

  .hero-text h1 {
    font-size: 34px;
  }

  .hero-text h2,
  .detail-info h1,
  .page-hero h1 {
    font-size: 28px;
  }

  .hero-actions,
  .hero-search {
    flex-direction: column;
    border-radius: 24px;
  }

  .hero-search input,
  .hero-search button {
    width: 100%;
    min-height: 44px;
  }

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

  .horizontal-scroller {
    grid-auto-columns: minmax(240px, 82vw);
  }

  .detail-article,
  .detail-side {
    padding: 20px;
  }
}
