* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: #111827;
  background: linear-gradient(180deg, #ffffff 0%, #faf8f5 45%, #f2ede4 100%);
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 66px;
}

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

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #f0691b, #e14f11);
  box-shadow: 0 8px 20px rgba(225, 79, 17, 0.25);
}

.brand-text {
  font-size: 20px;
  background: linear-gradient(90deg, #e14f11, #f0691b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link,
.mobile-nav-link {
  position: relative;
  color: #374151;
  font-size: 14px;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: #e14f11;
}

.nav-link.active::after {
  position: absolute;
  right: 0;
  bottom: -22px;
  left: 0;
  height: 3px;
  border-radius: 99px;
  background: #e14f11;
  content: "";
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 6px;
  border: 1px solid #f2ede4;
  border-radius: 999px;
  background: #faf8f5;
}

.header-search input,
.hero-search input,
.search-page-form input,
.filter-bar input,
.filter-bar select {
  min-width: 0;
  border: 0;
  outline: 0;
  color: #111827;
  background: transparent;
}

.header-search input {
  width: 220px;
  padding: 8px 12px;
}

.header-search button,
.hero-search button,
.search-page-form button {
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: #e14f11;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button {
  padding: 8px 16px;
}

.header-search button:hover,
.hero-search button:hover,
.search-page-form button:hover {
  background: #ba3910;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: #f2ede4;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: #374151;
}

.mobile-nav {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 0 16px 14px;
}

.mobile-nav.open {
  display: grid;
}

.mobile-nav-link {
  padding: 10px;
  border-radius: 12px;
  text-align: center;
  background: #faf8f5;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(90deg, #111827, #1f2937);
}

.hero-slides,
.hero-slide,
.hero-slide img,
.hero-overlay {
  position: absolute;
  inset: 0;
}

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

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

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

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.48), rgba(17, 24, 39, 0.2)),
    linear-gradient(0deg, rgba(17, 24, 39, 0.9), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 600px;
  padding-bottom: 120px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 7px 13px;
  border-radius: 999px;
  color: #fff8c2;
  background: rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
}

.eyebrow.dark {
  color: #e14f11;
  background: #fdebd6;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(36px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
  max-width: 760px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.75;
}

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

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

.hero-tags span,
.tag-row span {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  padding: 7px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: #ffffff;
  background: #e14f11;
  box-shadow: 0 14px 28px rgba(225, 79, 17, 0.3);
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.btn.light {
  color: #111827;
  background: rgba(255, 255, 255, 0.86);
}

.hero-panel {
  position: absolute;
  right: 0;
  bottom: 28px;
  left: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 18px;
  align-items: center;
}

.hero-search,
.search-page-form,
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.hero-search input,
.search-page-form input {
  flex: 1;
  padding: 13px 16px;
}

.hero-search button,
.search-page-form button {
  padding: 13px 24px;
}

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

.hero-thumb {
  position: relative;
  min-height: 88px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 16px;
  color: #ffffff;
  background: #111827;
  cursor: pointer;
}

.hero-thumb.active {
  border-color: #f38941;
}

.hero-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hero-thumb:hover img,
.hero-thumb.active img {
  opacity: 0.8;
  transform: scale(1.08);
}

.hero-thumb span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section {
  padding: 58px 0;
}

.section-title {
  max-width: 780px;
  margin-bottom: 30px;
}

.section-title span {
  display: inline-flex;
  margin-bottom: 10px;
  color: #e14f11;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.section-title h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-title p {
  margin: 12px 0 0;
  color: #4b5563;
  line-height: 1.8;
}

.inline-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  max-width: none;
  gap: 24px;
}

.section-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  color: #e14f11;
  background: #fdebd6;
  font-weight: 800;
}

.section-link.light {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
}

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #1f2937, #111827);
}

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 55%);
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  color: #111827;
  background: rgba(255, 255, 255, 0.88);
}

.rank-badge {
  top: 12px;
  left: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f0691b, #e14f11);
}

.card-body {
  padding: 18px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

.card-body h3 {
  margin: 9px 0 8px;
  color: #111827;
  font-size: 18px;
  line-height: 1.25;
}

.card-body h3 a:hover {
  color: #e14f11;
}

.card-body p {
  display: -webkit-box;
  min-height: 52px;
  margin: 0 0 14px;
  overflow: hidden;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row span {
  padding: 5px 9px;
  color: #ba3910;
  background: #fef6ee;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 24px;
  color: #ffffff;
  background: #111827;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.category-tile img,
.category-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.category-tile img {
  object-fit: cover;
  opacity: 0.75;
  transition: transform 0.35s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-mask {
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.86), rgba(17, 24, 39, 0.1));
}

.category-tile strong,
.category-tile em {
  position: absolute;
  right: 18px;
  left: 18px;
}

.category-tile strong {
  bottom: 58px;
  font-size: 22px;
}

.category-tile em {
  bottom: 20px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-style: normal;
  line-height: 1.5;
}

.ranking-section {
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #1f2937);
}

.light-title h2,
.light-title p {
  color: #ffffff;
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 24px;
}

.ranking-large .movie-card {
  height: 100%;
}

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

.compact-card {
  display: grid;
  grid-template-columns: auto 64px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  color: #111827;
  background: rgba(255, 255, 255, 0.94);
  transition: transform 0.2s ease, background 0.2s ease;
}

.compact-card:hover {
  transform: translateX(4px);
  background: #ffffff;
}

.compact-rank {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: #e14f11;
  font-size: 12px;
  font-weight: 900;
}

.compact-card img {
  width: 64px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
}

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card strong {
  margin-bottom: 6px;
  font-size: 15px;
}

.compact-card em {
  color: #6b7280;
  font-size: 12px;
  font-style: normal;
}

.page-main {
  min-height: 60vh;
}

.page-hero {
  padding: 86px 0 64px;
  color: #111827;
  background:
    radial-gradient(circle at 20% 10%, rgba(240, 105, 27, 0.16), transparent 34%),
    linear-gradient(180deg, #ffffff, #f2ede4);
}

.page-hero p {
  color: #4b5563;
}

.filter-bar {
  max-width: 980px;
  margin-top: 28px;
  border: 1px solid #f2ede4;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.filter-bar input {
  flex: 1;
  padding: 13px 15px;
}

.filter-bar select {
  padding: 13px 34px 13px 14px;
  border-left: 1px solid #f2ede4;
  color: #4b5563;
  background: #ffffff;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.filter-chips button {
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  color: #ba3910;
  background: #fdebd6;
  cursor: pointer;
}

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

.category-block {
  padding: 24px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.category-block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.category-block h2 {
  margin: 0 0 8px;
}

.category-block p {
  margin: 0;
  color: #4b5563;
}

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

.compact-grid .compact-card {
  background: #faf8f5;
}

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

.search-page-form {
  max-width: 720px;
  margin-top: 28px;
}

.detail-main {
  background: #faf8f5;
}

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

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

.detail-bg {
  object-fit: cover;
  filter: blur(10px);
  transform: scale(1.08);
  opacity: 0.45;
}

.detail-bg-mask {
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.95), rgba(17, 24, 39, 0.58)),
    linear-gradient(0deg, rgba(17, 24, 39, 0.95), transparent 55%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  min-height: 520px;
  padding: 50px 0;
}

.detail-poster {
  overflow: hidden;
  border: 5px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

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

.detail-tags span {
  color: #fff8c2;
}

.detail-section {
  padding-top: 42px;
}

.player-card {
  overflow: hidden;
  border-radius: 28px;
  background: #111827;
  box-shadow: 0 28px 70px rgba(17, 24, 39, 0.25);
}

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

.player-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.28), rgba(17, 24, 39, 0.82));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-icon {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: #ffffff;
  font-size: 30px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
}

.player-overlay strong {
  font-size: 24px;
}

.player-overlay em {
  color: rgba(255, 255, 255, 0.76);
  font-style: normal;
}

.player-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  color: #d1d5db;
  font-size: 14px;
}

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

.content-card,
.side-card {
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.content-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-card p {
  margin: 0 0 24px;
  color: #374151;
  font-size: 16px;
  line-height: 1.9;
}

.content-card p:last-child {
  margin-bottom: 0;
}

.side-card dl {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px 14px;
  margin: 0;
}

.side-card dt {
  color: #6b7280;
  font-weight: 800;
}

.side-card dd {
  margin: 0;
  color: #111827;
}

.site-footer {
  padding: 44px 0;
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.footer-brand {
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 20px;
}

.site-footer p {
  max-width: 640px;
  margin: 0;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

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

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

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

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

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero {
    min-height: 720px;
  }

  .hero-content {
    min-height: 560px;
    padding-bottom: 220px;
  }

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

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

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

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

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

  .detail-poster {
    width: min(280px, 76vw);
  }

  .filter-bar {
    align-items: stretch;
    flex-direction: column;
    border-radius: 24px;
  }

  .filter-bar select {
    border-top: 1px solid #f2ede4;
    border-left: 0;
  }

  .inline-title,
  .category-block-head,
  .footer-grid,
  .player-meta {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  .hero-copy p,
  .page-hero p,
  .detail-copy p {
    font-size: 15px;
  }

  .hero-search,
  .search-page-form {
    align-items: stretch;
    flex-direction: column;
    border-radius: 24px;
  }

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

  .compact-card {
    grid-template-columns: auto 56px 1fr;
  }

  .compact-card img {
    width: 56px;
    height: 76px;
  }

  .card-body h3 {
    font-size: 17px;
  }

  .detail-hero {
    min-height: auto;
  }

  .detail-hero-inner {
    min-height: auto;
    padding: 38px 0;
  }

  .content-card,
  .side-card {
    padding: 22px;
  }
}
