* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  backdrop-filter: saturate(180%) blur(12px);
}

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

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

.brand-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: #ffffff;
  background: #f97316;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.3);
  transition: background 0.2s ease, transform 0.2s ease;
}

.brand:hover .brand-icon {
  background: #ea580c;
  transform: translateY(-1px);
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #374151;
  font-size: 15px;
}

.main-nav a,
.mobile-nav a {
  transition: color 0.2s ease;
}

.main-nav a:hover,
.mobile-nav a:hover {
  color: #f97316;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 260px;
}

.header-search input,
.search-panel input {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 10px 14px;
  outline: none;
  background: #ffffff;
  color: #111827;
}

.header-search input:focus,
.search-panel input:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.header-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #ffffff;
  background: #f97316;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  font-size: 24px;
  color: #374151;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  border-top: 1px solid #f3f4f6;
}

.mobile-nav nav {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 0 18px;
}

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

.hero-section {
  padding: 32px 0 18px;
  background: linear-gradient(135deg, #fff7ed 0%, #fdf8f6 44%, #f9fafb 100%);
}

.hero-section h1 {
  margin: 0 0 22px;
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1.18;
  color: #111827;
  letter-spacing: -0.04em;
}

.hero-carousel {
  position: relative;
  min-height: 480px;
  overflow: hidden;
  border-radius: 22px;
  background: #111827;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

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

.hero-image img {
  transform: scale(1.04);
}

.hero-overlay {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.55) 46%, rgba(0, 0, 0, 0.16) 100%), linear-gradient(0deg, rgba(0, 0, 0, 0.45), transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 660px;
  padding: clamp(34px, 8vw, 82px);
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  color: #fed7aa;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hero-content h2 {
  margin: 0 0 16px;
  font-size: clamp(32px, 7vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-content p {
  margin: 0 0 22px;
  max-width: 560px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

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

.hero-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
}

.hero-tags span {
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

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

.primary-btn,
.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: #f97316;
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
}

.primary-btn:hover,
.header-search button:hover {
  background: #ea580c;
  transform: translateY(-1px);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

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

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

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

.section {
  padding: 36px 0;
}

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

.section-title h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
}

.section-title p {
  margin: 6px 0 0;
  color: #6b7280;
}

.section-more {
  min-height: 36px;
  color: #f97316;
  background: #fff7ed;
}

.section-more:hover {
  color: #ffffff;
  background: #f97316;
}

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

.movie-card,
.featured-card,
.text-card,
.detail-info,
.side-card,
.player-card {
  overflow: hidden;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.movie-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 30px rgba(15, 23, 42, 0.16);
}

.poster-wrap,
.featured-media,
.category-tile,
.side-list a,
.player-shell,
.cover-bg {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ffedd5, #fdba74 45%, #111827);
}

.poster-wrap {
  height: 260px;
}

.poster-wrap img,
.featured-media img,
.category-tile img,
.side-list img,
.cover-bg img {
  position: relative;
  z-index: 2;
  transition: transform 0.45s ease, opacity 0.2s ease;
}

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

.image-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.26), transparent 34%), linear-gradient(135deg, #f97316, #111827);
}

img.image-hidden {
  opacity: 0;
}

.type-badge,
.rank-badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(17, 24, 39, 0.78);
  backdrop-filter: blur(6px);
}

.type-badge {
  right: 12px;
}

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

.play-hover,
.play-circle {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: #f97316;
  border-radius: 999px;
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.38);
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.play-hover {
  width: 52px;
  height: 52px;
}

.play-circle {
  width: 64px;
  height: 64px;
  font-size: 24px;
}

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

.card-body {
  padding: 16px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 8px;
  overflow: hidden;
  color: #111827;
  font-size: 17px;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: #f97316;
}

.card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: #6b7280;
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.meta-row,
.info-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: #6b7280;
  font-size: 14px;
}

.meta-row span,
.info-meta span {
  display: inline-flex;
  align-items: center;
}

.meta-row span::before,
.info-meta span::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 999px;
  background: #f97316;
}

.featured-card a {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  min-height: 360px;
}

.featured-media {
  min-height: 360px;
}

.featured-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 4vw, 46px);
}

.featured-copy h2 {
  margin: 0 0 12px;
  color: #111827;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
}

.featured-copy p {
  margin: 0 0 20px;
  color: #4b5563;
  font-size: 17px;
}

.soft-panel,
.category-strip {
  width: min(1280px, calc(100% - 32px));
  border-radius: 20px;
  padding-left: 24px;
  padding-right: 24px;
  background: linear-gradient(135deg, #fff7ed, #fdf8f6);
}

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

.category-tile {
  min-height: 176px;
  padding: 18px;
  border-radius: 16px;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.18));
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 4;
}

.category-tile span {
  display: block;
  margin-top: 80px;
  font-size: 18px;
  font-weight: 800;
}

.category-tile p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.page-hero {
  padding: 56px 0;
  color: #ffffff;
  background: radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.55), transparent 30%), linear-gradient(135deg, #111827, #1f2937 48%, #7c2d12);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.08;
}

.page-hero p {
  margin: 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.compact-hero {
  padding: 48px 0;
}

.rank-hero {
  background: radial-gradient(circle at 20% 20%, rgba(253, 186, 116, 0.5), transparent 28%), linear-gradient(135deg, #111827, #451a03);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.pagination a,
.pagination strong,
.pagination span {
  min-width: 40px;
  border-radius: 10px;
  padding: 9px 12px;
  text-align: center;
  color: #374151;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.pagination strong,
.pagination a:hover {
  color: #ffffff;
  background: #f97316;
}

.search-panel {
  display: flex;
  gap: 12px;
  max-width: 640px;
  margin-top: 24px;
}

.search-panel input {
  min-height: 46px;
}

.detail-page {
  padding: 32px 0 10px;
}

.back-row {
  margin-bottom: 18px;
}

.back-row a {
  display: inline-flex;
  border-radius: 999px;
  padding: 8px 14px;
  color: #4b5563;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.back-row a:hover {
  color: #f97316;
}

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

.player-card {
  padding: 0;
  background: #000000;
}

.player-shell {
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-shell video,
.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-shell video {
  z-index: 1;
  background: #000000;
}

.player-cover {
  z-index: 4;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000000;
}

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

.cover-bg,
.cover-mask {
  position: absolute;
  inset: 0;
}

.cover-mask {
  z-index: 5;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.28));
}

.cover-play {
  position: relative;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin: auto;
  color: #ffffff;
  font-size: 28px;
  background: #f97316;
  border-radius: 999px;
  box-shadow: 0 18px 34px rgba(249, 115, 22, 0.4);
}

.detail-info {
  margin-top: 20px;
  padding: clamp(22px, 4vw, 34px);
}

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.12;
}

.detail-info .lead {
  margin: 0 0 22px;
  padding-left: 16px;
  color: #4b5563;
  font-size: 18px;
  border-left: 4px solid #f97316;
}

.info-meta {
  margin-bottom: 20px;
}

.tag-list {
  margin-bottom: 24px;
}

.tag-list span {
  color: #c2410c;
  background: #ffedd5;
}

.detail-info h2,
.side-card h2,
.text-card h2 {
  margin: 24px 0 12px;
  color: #111827;
  font-size: 24px;
}

.detail-info p,
.text-card p {
  color: #374151;
  font-size: 16px;
}

.detail-side {
  position: sticky;
  top: 88px;
}

.side-card {
  padding: 20px;
}

.side-card h2 {
  margin-top: 0;
}

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

.side-list a {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 74px;
  border-radius: 12px;
  background: #f9fafb;
}

.side-list img {
  height: 74px;
}

.side-list span {
  padding-right: 12px;
  color: #111827;
  font-weight: 700;
  line-height: 1.35;
}

.side-list a:hover span {
  color: #f97316;
}

.related-section {
  padding-top: 18px;
}

.text-page {
  padding: 32px 0;
}

.text-card {
  padding: clamp(24px, 4vw, 42px);
}

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

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

.site-footer h3 {
  margin: 0 0 12px;
  color: #ffffff;
}

.site-footer p {
  margin: 0;
  color: #d1d5db;
}

.site-footer a {
  display: inline-flex;
  margin: 0 14px 8px 0;
  color: #d1d5db;
}

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

.footer-bottom {
  border-top: 1px solid #1f2937;
  padding: 18px;
  text-align: center;
  color: #9ca3af;
}

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

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

  .header-search {
    margin-left: auto;
  }

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

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

@media (max-width: 860px) {
  .header-inner {
    gap: 12px;
  }

  .header-search {
    display: none;
  }

  .hero-carousel {
    min-height: 560px;
  }

  .hero-overlay {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.28));
  }

  .hero-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 32px;
  }

  .featured-card a,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }

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

@media (max-width: 560px) {
  .container,
  .section,
  .soft-panel,
  .category-strip {
    width: min(100% - 24px, 1280px);
  }

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

  .hero-section h1 {
    font-size: 24px;
  }

  .hero-carousel {
    min-height: 520px;
    border-radius: 18px;
  }

  .hero-content {
    padding: 24px;
  }

  .hero-content h2 {
    font-size: 34px;
  }

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

  .hero-dots {
    left: 24px;
    right: auto;
    bottom: 18px;
  }

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

  .card-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .poster-wrap {
    height: 320px;
  }

  .search-panel {
    flex-direction: column;
  }

  .side-list a {
    grid-template-columns: 80px minmax(0, 1fr);
  }
}
