* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #e5e7eb;
  background: #020617;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
  border-bottom: 1px solid rgba(51, 65, 85, 0.9);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
}

.header-inner {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #dc2626);
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.28);
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link,
.mobile-link {
  color: #cbd5e1;
  border-radius: 10px;
  transition: 0.2s ease;
}

.nav-link {
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #ffffff;
  background: rgba(51, 65, 85, 0.9);
}

.header-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #475569;
  background: #334155;
  border-radius: 12px;
}

.header-search input,
.mobile-search input,
.search-panel input,
.filter-bar input,
.search-tools select {
  border: 0;
  outline: 0;
  color: #ffffff;
  background: #334155;
}

.header-search input {
  width: 230px;
  padding: 9px 12px;
}

.header-search button,
.mobile-search button,
.search-panel button {
  border: 0;
  color: #ffffff;
  padding: 9px 14px;
  background: linear-gradient(135deg, #f97316, #dc2626);
  cursor: pointer;
}

.menu-button {
  display: none;
  color: #e5e7eb;
  border: 0;
  border-radius: 10px;
  padding: 9px 12px;
  background: #334155;
}

.quick-chips {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 12px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
}

.quick-chips a {
  flex: 0 0 auto;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  background: #334155;
  transition: 0.2s ease;
}

.quick-chips a:hover {
  color: #ffffff;
  background: #ea580c;
}

.mobile-menu {
  display: none;
  padding: 14px 24px 18px;
  border-top: 1px solid #334155;
  background: #0f172a;
}

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

.mobile-search {
  display: flex;
  border: 1px solid #475569;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 12px;
}

.mobile-search input {
  flex: 1;
  padding: 10px 12px;
}

.mobile-link {
  display: block;
  padding: 10px 12px;
  margin: 4px 0;
}

.hero-carousel {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: #0f172a;
}

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

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.16));
}

.hero-content {
  position: absolute;
  inset: 0;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero-label,
.section-kicker {
  display: inline-flex;
  width: max-content;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 999px;
  background: #f97316;
}

.hero-content h1 {
  max-width: 720px;
  margin: 18px 0 16px;
  color: #ffffff;
  font-size: clamp(38px, 7vw, 64px);
  line-height: 1.05;
}

.hero-content p {
  max-width: 700px;
  color: #d1d5db;
  font-size: 18px;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}

.hero-meta span,
.detail-meta span {
  color: #ffffff;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.86);
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  padding: 12px 22px;
  transition: 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #dc2626);
  box-shadow: 0 18px 35px rgba(249, 115, 22, 0.24);
}

.primary-button:hover,
.movie-card:hover,
.category-card:hover,
.category-overview-card:hover,
.compact-card:hover,
.ranking-card:hover {
  transform: translateY(-4px);
}

.ghost-button {
  color: #ffffff;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.32);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  font-size: 36px;
  line-height: 1;
  background: rgba(0, 0, 0, 0.48);
  cursor: pointer;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.content-section,
.page-main,
.player-section,
.detail-content-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px;
}

.highlight-section {
  margin-top: 20px;
  border-radius: 28px;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.94), rgba(51, 65, 85, 0.76));
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-article h2,
.detail-side h2 {
  color: #ffffff;
  margin: 10px 0 0;
}

.section-heading h2 {
  font-size: 30px;
}

.section-heading a {
  color: #fb923c;
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #1e293b;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
  transition: 0.25s ease;
}

.movie-card a {
  display: block;
  height: 100%;
}

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #334155);
}

.wide-card .poster-frame {
  aspect-ratio: 16 / 9;
}

.poster-frame img,
.compact-card img,
.related-card img,
.ranking-card img,
.category-card img,
.category-overview-card img,
.detail-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.poster-frame img,
.category-card img {
  transition: 0.35s ease;
}

.type-badge,
.rating-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
  border-radius: 999px;
}

.type-badge {
  left: 12px;
  background: #f97316;
}

.rating-badge {
  right: 12px;
  background: rgba(0, 0, 0, 0.7);
}

.play-hover {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  color: #ffffff;
  border-radius: 999px;
  background: #f97316;
  transition: 0.2s ease;
}

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

.card-body {
  padding: 16px;
}

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

.card-meta,
.card-desc {
  margin: 0;
  color: #94a3b8;
  font-size: 14px;
}

.card-desc {
  margin-top: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

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

.category-card,
.category-overview-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  border-radius: 22px;
  background: #1e293b;
  transition: 0.25s ease;
}

.category-card img,
.category-overview-card img {
  position: absolute;
  inset: 0;
  opacity: 0.5;
}

.category-card::after,
.category-overview-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.92));
}

.category-card span,
.category-card p,
.category-overview-card div {
  position: absolute;
  z-index: 2;
  left: 20px;
  right: 20px;
}

.category-card span {
  bottom: 70px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  bottom: 18px;
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
}

.category-overview-card div {
  bottom: 22px;
}

.category-overview-card h2 {
  margin: 0 0 8px;
  color: #ffffff;
}

.category-overview-card p {
  margin: 0 0 12px;
  color: #cbd5e1;
}

.category-overview-card span {
  color: #fb923c;
  font-weight: 800;
}

.ranking-panel {
  border-radius: 24px;
  padding: 24px;
  background: linear-gradient(180deg, #1e293b, #0f172a);
  border: 1px solid rgba(71, 85, 105, 0.7);
}

.compact-heading {
  align-items: center;
}

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

.rank-list li + li {
  border-top: 1px solid rgba(71, 85, 105, 0.72);
}

.rank-list a {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
}

.rank-no,
.ranking-number {
  color: #fb923c;
  font-weight: 900;
}

.rank-list strong {
  color: #ffffff;
}

.rank-list em,
.compact-card em {
  color: #facc15;
  font-style: normal;
}

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

.compact-card {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  background: #1e293b;
  transition: 0.25s ease;
}

.compact-card img {
  aspect-ratio: 3 / 4;
}

.compact-card span,
.compact-card em {
  display: block;
  padding: 0 12px;
}

.compact-card span {
  margin-top: 10px;
  color: #ffffff;
  font-weight: 800;
}

.compact-card em {
  padding-bottom: 12px;
}

.page-hero {
  border-radius: 28px;
  background: radial-gradient(circle at top left, rgba(249, 115, 22, 0.22), transparent 36%), linear-gradient(135deg, #1e293b, #0f172a);
}

.small-hero {
  padding: 54px;
  margin-top: 34px;
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 54px);
}

.page-hero p {
  max-width: 760px;
  color: #cbd5e1;
  font-size: 18px;
}

.filter-bar,
.search-panel {
  display: flex;
  max-width: 660px;
  margin-top: 26px;
  overflow: hidden;
  border: 1px solid #475569;
  border-radius: 16px;
  background: #334155;
}

.filter-bar input,
.search-panel input {
  flex: 1;
  padding: 14px 16px;
}

.search-panel button {
  padding: 14px 22px;
}

.search-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.search-tools select {
  padding: 11px 14px;
  border-radius: 12px;
}

.ranking-list {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.ranking-card {
  margin-bottom: 16px;
  border-radius: 18px;
  background: #1e293b;
  overflow: hidden;
  transition: 0.25s ease;
}

.ranking-card a {
  display: grid;
  grid-template-columns: 76px 116px 1fr;
  align-items: center;
  gap: 18px;
  padding: 16px;
}

.ranking-card img {
  width: 116px;
  height: 154px;
  border-radius: 14px;
}

.ranking-card h2 {
  margin: 0 0 8px;
  color: #ffffff;
}

.ranking-card p {
  margin: 0 0 10px;
  color: #94a3b8;
}

.ranking-card span:last-child {
  color: #facc15;
  font-weight: 800;
}

.detail-main {
  background: #020617;
}

.detail-hero {
  min-height: 560px;
  background-size: cover;
  background-position: center;
}

.detail-shell {
  max-width: 1280px;
  min-height: 560px;
  margin: 0 auto;
  padding: 56px 24px;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.46);
  background: #1e293b;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #cbd5e1;
  margin-bottom: 16px;
}

.breadcrumb a {
  color: #fb923c;
}

.detail-info h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
}

.detail-one-line {
  max-width: 850px;
  color: #d1d5db;
  font-size: 18px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.tag-row span {
  color: #fed7aa;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.16);
  border: 1px solid rgba(251, 146, 60, 0.26);
}

.player-section {
  padding-top: 44px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.42));
  cursor: pointer;
}

.player-overlay.is-hidden {
  display: none;
}

.player-overlay span {
  width: 86px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f97316, #dc2626);
  box-shadow: 0 22px 45px rgba(249, 115, 22, 0.36);
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 32px;
  padding-top: 12px;
}

.detail-article,
.detail-side {
  border-radius: 24px;
  padding: 28px;
  background: #1e293b;
}

.detail-article p {
  color: #cbd5e1;
  font-size: 16px;
}

.info-list {
  display: grid;
  gap: 12px;
}

.info-list div {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
}

.info-list dt {
  color: #94a3b8;
}

.info-list dd {
  margin: 0;
  color: #ffffff;
}

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

.related-card a {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: center;
}

.related-card img {
  width: 84px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  background: #0f172a;
}

.related-card strong {
  display: block;
  color: #ffffff;
}

.related-card span {
  display: block;
  color: #94a3b8;
  font-size: 14px;
}

.site-footer {
  border-top: 1px solid #1e293b;
  background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 52px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}

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

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: #94a3b8;
}

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

.footer-grid li {
  margin: 8px 0;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 34px;
  border-top: 1px solid #1e293b;
  text-align: center;
}

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

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

  .split-section,
  .detail-content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .menu-button {
    display: inline-flex;
    margin-left: auto;
  }

  .header-inner {
    padding: 0 16px;
  }

  .hero-carousel {
    height: 520px;
  }

  .hero-content {
    padding: 0 20px;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .small-hero {
    padding: 34px 22px;
  }

  .ranking-card a {
    grid-template-columns: 44px 82px 1fr;
  }

  .ranking-card img {
    width: 82px;
    height: 110px;
  }

  .detail-shell {
    grid-template-columns: 1fr;
    padding: 36px 20px;
  }

  .detail-poster {
    max-width: 260px;
  }
}

@media (max-width: 540px) {
  .brand-text {
    font-size: 17px;
  }

  .movie-grid,
  .wide-grid,
  .compact-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .content-section,
  .page-main,
  .player-section,
  .detail-content-grid {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .hero-content h1 {
    font-size: 36px;
  }

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

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

  .ranking-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
}
