* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f9fafb;
  color: #111827;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #d97706, #ea580c);
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(120, 53, 15, 0.22);
}

.nav-shell {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 15px;
}

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

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

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

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.focus-slider {
  position: relative;
  height: 500px;
  overflow: hidden;
  background: #111827;
}

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

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

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

.focus-overlay,
.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.12));
}

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

.focus-copy {
  max-width: 680px;
  color: #ffffff;
}

.focus-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.focus-tags span,
.card-label {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  background: #d97706;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
}

.focus-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 6vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.focus-copy p {
  margin: 0 0 26px;
  color: #e5e7eb;
  font-size: 19px;
  max-width: 640px;
}

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

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

.primary-btn {
  background: #d97706;
  color: #ffffff;
  padding: 0 28px;
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.28);
  border: 0;
  cursor: pointer;
}

.primary-btn:hover {
  background: #b45309;
  transform: translateY(-1px);
}

.primary-btn.compact {
  min-height: 40px;
  padding: 0 20px;
  border-radius: 10px;
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  padding: 0 20px;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.slider-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.slider-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.slider-prev {
  left: 22px;
}

.slider-next {
  right: 22px;
}

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

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

.focus-dot.active {
  width: 34px;
  background: #d97706;
}

.section {
  padding: 68px 0;
}

.intro-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 36px;
  padding: 30px;
  border-radius: 22px;
  background: linear-gradient(135deg, #fffbeb, #fff7ed);
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.08);
}

.intro-panel h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.intro-panel p {
  margin: 0;
  color: #4b5563;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.2;
}

.section-heading p {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 14px;
}

.section-heading span {
  flex: 1;
  height: 4px;
  min-width: 80px;
  border-radius: 999px;
  background: linear-gradient(90deg, #d97706, rgba(217, 119, 6, 0));
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid #f3f4f6;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
}

.toolbar.single {
  justify-content: flex-start;
}

.search-box {
  min-width: min(420px, 100%);
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f9fafb;
  padding: 10px 14px;
}

.search-box span {
  color: #d97706;
  font-weight: 800;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111827;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-pill {
  border: 0;
  border-radius: 999px;
  color: #92400e;
  background: #fffbeb;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.filter-pill.active,
.filter-pill:hover {
  background: #d97706;
  color: #ffffff;
}

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

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

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

.movie-card.is-hidden,
.category-card.is-hidden,
.ranking-row.is-hidden {
  display: none;
}

.movie-card a {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card a:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 42px rgba(17, 24, 39, 0.16);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

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

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

.poster-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.38);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card a:hover .poster-mask {
  opacity: 1;
}

.play-badge {
  width: 60px;
  height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #d97706;
  color: #ffffff;
  font-size: 28px;
  box-shadow: 0 16px 28px rgba(217, 119, 6, 0.32);
}

.card-label {
  position: absolute;
  left: 12px;
  top: 12px;
}

.duration {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.category-strip {
  background: #ffffff;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: 18px;
  background: #111827;
  color: #ffffff;
  box-shadow: 0 16px 32px rgba(17, 24, 39, 0.14);
}

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

.category-card:hover img {
  opacity: 0.74;
  transform: scale(1.06);
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 2;
  display: block;
}

.category-card span {
  padding: 90px 20px 4px;
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  padding: 0 20px 20px;
  color: #e5e7eb;
  font-size: 14px;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.12));
}

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

.category-card.large {
  min-height: 210px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.95fr);
  gap: 28px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  border-radius: 20px;
  background: #ffffff;
  padding: 24px;
  box-shadow: 0 18px 38px rgba(17, 24, 39, 0.1);
}

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

.panel-head h2 {
  margin: 0;
  font-size: 24px;
}

.panel-head a {
  color: #d97706;
  font-weight: 800;
}

.ranking-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ranking-list li + li {
  border-top: 1px solid #f3f4f6;
}

.ranking-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
}

.rank-no {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #fffbeb;
  color: #d97706;
  font-weight: 900;
}

.rank-no.big {
  width: 48px;
  height: 48px;
  font-size: 18px;
}

.ranking-list strong {
  display: block;
  color: #111827;
}

.ranking-list em {
  display: block;
  color: #6b7280;
  font-style: normal;
  font-size: 13px;
}

.subpage-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #78350f 55%, #ea580c);
  color: #ffffff;
}

.subpage-hero {
  padding: 92px 0 76px;
}

.compact-hero {
  padding: 72px 0 58px;
}

.subpage-hero p {
  margin: 0 0 10px;
  color: #fbbf24;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.subpage-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 6vw, 54px);
}

.subpage-hero span {
  color: #f3f4f6;
  font-size: 18px;
}

.full-ranking {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.full-ranking li {
  border: 0;
}

.ranking-row a {
  min-height: 124px;
  padding: 16px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
}

.ranking-row img {
  width: 120px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
  background: #fef3c7;
}

.ranking-row p {
  margin: 3px 0 4px;
  color: #4b5563;
  font-size: 14px;
}

.detail-hero {
  min-height: 390px;
}

.detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 82px 0 54px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  color: #fde68a;
  font-size: 14px;
  margin-bottom: 24px;
}

.breadcrumb strong {
  color: #ffffff;
}

.detail-hero h1 {
  max-width: 900px;
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.08;
}

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

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

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

.watch-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #d97706;
  color: #ffffff;
  font-size: 38px;
  box-shadow: 0 18px 42px rgba(217, 119, 6, 0.38);
}

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

.detail-article {
  margin-top: 28px;
  border-radius: 22px;
  background: #ffffff;
  padding: 30px;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.08);
}

.detail-article h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-article p {
  margin: 0 0 24px;
  color: #374151;
  font-size: 16px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.tag-cloud a {
  border-radius: 999px;
  background: #fffbeb;
  color: #92400e;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 13px;
}

.detail-side {
  display: grid;
  gap: 18px;
}

.cover-card,
.info-list {
  border-radius: 22px;
  background: #ffffff;
  padding: 18px;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.08);
}

.cover-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 16px;
  background: #fef3c7;
}

.cover-card .primary-btn {
  width: 100%;
}

.info-list {
  list-style: none;
  margin: 0;
}

.info-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
}

.info-list li:last-child {
  border-bottom: 0;
}

.info-list span {
  color: #6b7280;
}

.info-list strong {
  text-align: right;
  color: #111827;
}

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

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  padding: 48px 0;
}

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

.footer-grid p {
  margin: 0;
  color: #9ca3af;
  font-size: 14px;
}

.footer-grid a {
  display: block;
  color: #d1d5db;
  margin: 8px 0;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-grid a:hover {
  color: #f59e0b;
}

.footer-brand {
  margin-bottom: 12px;
  color: #ffffff;
}

.footer-brand .brand-mark {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.14);
}

.footer-bottom {
  border-top: 1px solid #1f2937;
  padding: 20px 16px;
  text-align: center;
  color: #6b7280;
  font-size: 13px;
}

.footer-bottom p {
  margin: 0;
}

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

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

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

  .ranking-panel {
    position: static;
  }

  .full-ranking {
    grid-template-columns: 1fr;
  }

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

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

  .mobile-toggle {
    display: block;
  }

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

  .focus-slider {
    height: 560px;
  }

  .focus-content {
    padding-bottom: 74px;
  }

  .focus-copy p {
    font-size: 16px;
  }

  .slider-arrow {
    width: 38px;
    height: 38px;
    font-size: 26px;
  }

  .intro-panel,
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .section {
    padding: 46px 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .section-heading span {
    width: 100%;
  }

  .movie-grid,
  .small-grid,
  .category-page-grid,
  .related-grid,
  .category-grid,
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: 180px;
  }

  .ranking-row a {
    align-items: flex-start;
  }

  .ranking-row img {
    display: none;
  }

  .detail-hero-inner {
    padding: 58px 0 42px;
  }

  .detail-article,
  .cover-card,
  .info-list {
    padding: 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
