html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: #f9fafb;
  color: #1f2937;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: #ffffff;
  background: linear-gradient(90deg, #f97316 0%, #ef4444 50%, #ec4899 100%);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.22);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

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

.brand {
  font-size: 24px;
  white-space: nowrap;
}

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.65);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
  transform: rotate(12deg) scale(1.05);
}

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

.nav-link,
.mobile-link {
  color: rgba(255, 255, 255, 0.92);
  transition: color 0.2s ease, background 0.2s ease;
}

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

.header-search,
.mobile-search {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search input,
.mobile-search input,
.search-page-form input,
.filter-bar input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  outline: none;
  border-radius: 999px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.header-search input {
  width: 256px;
  padding: 9px 42px 9px 16px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

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

.header-search input:focus,
.mobile-search input:focus {
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22);
}

.header-search button {
  position: absolute;
  right: 12px;
  color: #ffffff;
  font-size: 20px;
}

.mobile-toggle {
  display: none;
  padding: 8px 11px;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.mobile-panel {
  display: none;
  padding: 14px 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel nav {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.mobile-search input {
  padding: 10px 88px 10px 16px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.mobile-search button {
  position: absolute;
  right: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #050505;
}

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #111827, #f97316);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #000000 0%, rgba(0, 0, 0, 0.72) 36%, rgba(0, 0, 0, 0.2) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  height: 100%;
  padding-bottom: 72px;
}

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

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.hero-meta span {
  padding: 6px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: #dc2626;
  font-size: 14px;
  font-weight: 800;
}

.hero-meta strong {
  color: #fed7aa;
  font-weight: 650;
}

.hero h1 {
  margin-bottom: 16px;
  color: #ffffff;
  font-size: clamp(36px, 7vw, 64px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 690px;
  margin-bottom: 22px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-bottom: 26px;
}

.hero-tags span,
.detail-tags span {
  padding: 6px 12px;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.15);
  border: 1px solid rgba(251, 146, 60, 0.25);
}

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

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

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

.btn-primary {
  color: #ffffff;
  background: #ea580c;
  box-shadow: 0 16px 28px rgba(234, 88, 12, 0.26);
}

.btn-primary:hover {
  background: #c2410c;
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(8px);
}

.hero-dots {
  position: absolute;
  right: 42px;
  bottom: 38px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 32px;
  background: #f97316;
}

.section {
  margin-top: 48px;
  margin-bottom: 48px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1f2937;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-header h2 span {
  color: #ef4444;
}

.section-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #ea580c;
  font-weight: 800;
}

.feature-panel {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
  padding: 32px;
  border-radius: 32px;
  background: linear-gradient(135deg, #fff7ed 0%, #fdf2f8 100%);
}

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

.compact-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.movie-card {
  min-width: 0;
}

.card-link {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-link:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 36px rgba(15, 23, 42, 0.14);
}

.card-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #111827, #f97316);
}

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

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

.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.16), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.card-link:hover .card-overlay {
  opacity: 1;
}

.card-overlay p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
  line-height: 1.55;
}

.card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 7px;
}

.badge {
  padding: 4px 8px;
  border-radius: 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.badge-hot {
  background: #dc2626;
}

.badge-year {
  background: rgba(0, 0, 0, 0.72);
}

.card-play {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #ffffff;
  background: #f97316;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.card-link:hover .card-play {
  opacity: 1;
  transform: scale(1);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  overflow: hidden;
  margin-bottom: 9px;
  color: #1f2937;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.card-link:hover .card-body h3 {
  color: #ea580c;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #6b7280;
  font-size: 12px;
}

.card-tags {
  margin-top: 10px;
}

.card-tags span {
  padding: 3px 8px;
  border-radius: 999px;
  color: #ea580c;
  background: #fff7ed;
  font-size: 12px;
}

.category-entry {
  margin-top: 38px;
}

.category-grid,
.category-large-grid {
  display: grid;
  gap: 24px;
}

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

.category-tile {
  position: relative;
  min-height: 178px;
  overflow: hidden;
  border-radius: 26px;
  background: #111827;
  box-shadow: 0 18px 28px rgba(15, 23, 42, 0.13);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  transition: transform 0.4s ease;
}

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

.category-tile div {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  min-height: 178px;
  padding: 22px;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), transparent);
}

.category-tile span {
  margin-bottom: 8px;
  font-size: 24px;
  font-weight: 900;
}

.category-tile strong {
  color: #f3f4f6;
  font-size: 14px;
  line-height: 1.65;
}

.ranking-panel {
  padding: 32px;
  border-radius: 32px;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.rank-link {
  display: grid;
  grid-template-columns: 46px 70px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.1);
}

.rank-number {
  color: #ef4444;
  font-size: 22px;
  font-weight: 950;
}

.rank-link img {
  width: 70px;
  height: 94px;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, #111827, #f97316);
}

.rank-link h3 {
  margin-bottom: 6px;
  color: #111827;
  font-weight: 850;
}

.rank-link p {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 6px;
  color: #4b5563;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
  line-height: 1.55;
}

.rank-link span:last-child {
  color: #ea580c;
  font-size: 12px;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 78px 0;
  color: #ffffff;
  background: radial-gradient(circle at 18% 0%, rgba(251, 146, 60, 0.45), transparent 30%), linear-gradient(135deg, #111827, #7f1d1d 52%, #9d174d);
}

.page-hero h1 {
  margin-bottom: 16px;
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  color: #f3f4f6;
  font-size: 18px;
  line-height: 1.8;
}

.breadcrumb {
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
  padding: 16px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.07);
}

.filter-bar input {
  max-width: 420px;
  padding: 12px 18px;
  color: #1f2937;
  border-color: #fed7aa;
  background: #fff7ed;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chips button {
  padding: 8px 14px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-weight: 800;
}

.filter-chips button.is-active {
  color: #ffffff;
  background: #ea580c;
}

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

.category-card-large {
  overflow: hidden;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.1);
}

.category-card-large a {
  display: block;
}

.category-collage {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  height: 210px;
  background: #111827;
}

.category-collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #111827, #f97316);
}

.category-card-body {
  padding: 24px;
}

.category-card-body h2 {
  margin-bottom: 10px;
  font-size: 28px;
  font-weight: 950;
}

.category-card-body p {
  margin-bottom: 16px;
  color: #4b5563;
  line-height: 1.75;
}

.category-card-body span {
  color: #ea580c;
  font-weight: 850;
}

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

.rank-page-list .rank-link {
  grid-template-columns: 58px 82px 1fr;
}

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

.detail-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.22)), linear-gradient(0deg, #050505, transparent 48%);
  backdrop-filter: blur(2px);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 36px;
  align-items: end;
  min-height: 520px;
  padding-top: 56px;
  padding-bottom: 56px;
}

.detail-poster {
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  box-shadow: 0 28px 44px rgba(0, 0, 0, 0.42);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, #111827, #f97316);
}

.detail-copy h1 {
  margin-bottom: 16px;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.detail-one-line {
  max-width: 780px;
  margin-bottom: 18px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta span {
  color: #fed7aa;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(270px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.player-box {
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  border-radius: 26px;
  background: #000000;
  box-shadow: 0 22px 42px rgba(15, 23, 42, 0.2);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.06));
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  padding-left: 5px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-size: 34px;
  box-shadow: 0 20px 34px rgba(239, 68, 68, 0.35);
}

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

.content-card,
.side-card {
  margin-bottom: 24px;
  padding: 26px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.content-card h2,
.side-card h2 {
  margin-bottom: 14px;
  color: #111827;
  font-size: 24px;
  font-weight: 900;
}

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

.side-card dl {
  display: grid;
  grid-template-columns: 74px 1fr;
  row-gap: 12px;
  column-gap: 12px;
}

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

.side-card dd {
  color: #111827;
  font-weight: 750;
}

.side-card a {
  color: #ea580c;
}

.search-page-form {
  display: flex;
  max-width: 660px;
  gap: 12px;
  margin-top: 24px;
}

.search-page-form input {
  padding: 13px 18px;
  color: #111827;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.6);
}

.search-result-head {
  margin-bottom: 24px;
}

.search-result-head h2 {
  font-size: 28px;
  font-weight: 900;
}

.site-footer {
  margin-top: 60px;
  color: #d1d5db;
  background: linear-gradient(180deg, #111827 0%, #030712 100%);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 36px;
  padding-top: 48px;
  padding-bottom: 36px;
}

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

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

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

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

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

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

.back-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 70;
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 14px 28px rgba(239, 68, 68, 0.3);
}

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

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

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

  .hero {
    height: 540px;
  }

  .category-grid,
  .rank-list,
  .category-large-grid,
  .footer-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

  .brand {
    font-size: 20px;
  }

  .hero {
    height: 560px;
  }

  .hero-content {
    padding-bottom: 86px;
  }

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

  .hero-dots {
    right: auto;
    left: 16px;
    bottom: 34px;
  }

  .section,
  .feature-panel,
  .ranking-panel {
    margin-top: 34px;
    margin-bottom: 34px;
  }

  .feature-panel,
  .ranking-panel {
    width: min(100% - 24px, 1180px);
    padding: 20px;
    border-radius: 24px;
  }

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

  .card-body {
    padding: 12px;
  }

  .card-tags span:nth-child(n+3) {
    display: none;
  }

  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-bar input {
    max-width: none;
  }

  .rank-link,
  .rank-page-list .rank-link {
    grid-template-columns: 42px 58px 1fr;
    gap: 10px;
  }

  .rank-link img {
    width: 58px;
    height: 78px;
  }

  .rank-link p {
    -webkit-line-clamp: 1;
  }

  .detail-hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: end;
  }

  .detail-poster {
    width: 170px;
  }

  .content-card,
  .side-card {
    padding: 20px;
    border-radius: 20px;
  }

  .search-page-form {
    flex-direction: column;
  }

  .footer-grid {
    gap: 24px;
  }
}
