:root {
  --bg: #fff7ed;
  --bg-soft: #fffaf5;
  --text: #1f2937;
  --muted: #6b7280;
  --line: rgba(249, 115, 22, 0.16);
  --brand: #f97316;
  --brand-2: #ef4444;
  --brand-3: #ec4899;
  --dark: #111827;
  --card: #ffffff;
  --shadow: 0 20px 55px rgba(31, 41, 55, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(251, 146, 60, 0.22), transparent 34rem),
    linear-gradient(180deg, #fff7ed 0%, #ffffff 28%, #fff7ed 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: #ffffff;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--brand-3));
  box-shadow: 0 16px 40px rgba(239, 68, 68, 0.28);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: min(1180px, calc(100% - 2rem));
  height: 4.25rem;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex: 0 0 auto;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  color: var(--brand);
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
}

.brand-text {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

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

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

.site-search-form {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}

.site-search-form input {
  width: min(17rem, 32vw);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  padding: 0.68rem 1rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  outline: none;
  backdrop-filter: blur(12px);
}

.site-search-form input::placeholder {
  color: rgba(255, 255, 255, 0.76);
}

.site-search-form button,
.primary-button,
.ghost-button,
.text-link {
  border: 0;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.site-search-form button {
  border-radius: 999px;
  padding: 0.68rem 1rem;
  color: var(--brand-2);
  background: #ffffff;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #ffffff;
  background: transparent;
  font-size: 1.55rem;
  cursor: pointer;
}

.mobile-panel {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.75rem 0 1rem;
}

.mobile-link {
  display: block;
  padding: 0.65rem 0;
}

.mobile-search {
  margin: 0.75rem 0 0;
}

.mobile-search input {
  width: 100%;
}

main {
  min-height: 60vh;
}

.hero-carousel {
  position: relative;
  width: min(1180px, calc(100% - 2rem));
  min-height: clamp(31rem, 70vh, 43rem);
  margin: 1.5rem auto 2rem;
  overflow: hidden;
  border-radius: 2rem;
  background: var(--dark);
  box-shadow: var(--shadow);
}

.hero-track,
.hero-slide,
.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.92) 0%, rgba(17, 24, 39, 0.62) 44%, rgba(17, 24, 39, 0.18) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.88), transparent 54%);
}

.hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 44rem;
  min-height: clamp(31rem, 70vh, 43rem);
  padding: clamp(2rem, 5vw, 5rem);
  color: #ffffff;
}

.hero-badge,
.eyebrow {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.42rem 0.8rem;
  color: #ffffff;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 1rem 0 0.85rem;
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 42rem;
  margin: 0 0 1.25rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height: 1.8;
}

.hero-tags,
.detail-meta,
.detail-tags,
.card-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.hero-tags span,
.detail-meta span,
.detail-tags span,
.tag-row span {
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.7rem;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  border-radius: 999px;
  padding: 0.8rem 1.35rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  box-shadow: 0 14px 30px rgba(239, 68, 68, 0.35);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.hero-dots {
  position: absolute;
  left: clamp(2rem, 5vw, 5rem);
  bottom: 2rem;
  z-index: 8;
  display: flex;
  gap: 0.6rem;
}

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

.hero-dot.is-active {
  width: 2.2rem;
  background: #ffffff;
}

.home-search-band,
.content-section,
.page-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.home-search-band {
  display: grid;
  grid-template-columns: 1fr minmax(18rem, 34rem);
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 3rem;
  border: 1px solid var(--line);
  border-radius: 1.8rem;
  padding: 1.4rem;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 45px rgba(249, 115, 22, 0.11);
  backdrop-filter: blur(18px);
}

.home-search-band h2,
.section-heading h2,
.rank-panel h2,
.page-hero h1,
.detail-info h1,
.story-panel h2,
.side-panel h2 {
  margin: 0;
  color: #111827;
  font-weight: 950;
  letter-spacing: -0.035em;
}

.home-search-band p,
.page-hero p,
.category-card p,
.category-overview-card p,
.movie-card p,
.story-panel p,
.site-footer p {
  color: var(--muted);
  line-height: 1.75;
}

.large-search {
  margin: 0;
}

.large-search input,
.inline-filter input,
.search-page-form input {
  width: 100%;
  border: 1px solid rgba(249, 115, 22, 0.22);
  border-radius: 999px;
  padding: 0.9rem 1.1rem;
  color: var(--text);
  background: #ffffff;
  outline: none;
}

.large-search input::placeholder,
.inline-filter input::placeholder,
.search-page-form input::placeholder {
  color: #9ca3af;
}

.large-search button,
.search-page-form button {
  color: #ffffff;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.content-section {
  margin-bottom: 4rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.section-heading h2,
.rank-panel h2 {
  margin-top: 0.45rem;
  font-size: clamp(1.65rem, 3vw, 2.4rem);
}

.section-heading > a,
.text-link {
  color: var(--brand-2);
  font-weight: 900;
}

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

.category-card,
.category-overview-card,
.movie-card,
.rank-panel,
.ranking-list-panel,
.story-panel,
.side-panel,
.home-search-band,
.page-hero {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 42px rgba(31, 41, 55, 0.08);
  backdrop-filter: blur(16px);
}

.category-card {
  display: block;
  min-height: 10.5rem;
  border-radius: 1.5rem;
  padding: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.movie-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-card span {
  display: block;
  color: #111827;
  font-size: 1.15rem;
  font-weight: 950;
}

.featured-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22rem;
  gap: 1.5rem;
  align-items: start;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 1.35rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease, filter 0.32s ease;
}

.movie-card:hover .card-cover img {
  transform: scale(1.07);
  filter: saturate(1.12);
}

.card-score,
.card-play {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 950;
}

.card-score {
  top: 0.75rem;
  left: 0.75rem;
  border-radius: 999px;
  padding: 0.32rem 0.58rem;
  background: rgba(249, 115, 22, 0.9);
}

.card-play {
  right: 0.75rem;
  bottom: 0.75rem;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.card-body {
  padding: 1rem;
}

.card-meta {
  color: var(--brand-2);
  font-size: 0.78rem;
  font-weight: 850;
}

.card-body h3 {
  margin: 0.65rem 0 0.45rem;
  color: #111827;
  font-size: 1.08rem;
  font-weight: 950;
  line-height: 1.35;
}

.card-body p {
  display: -webkit-box;
  min-height: 3.4rem;
  margin: 0 0 0.8rem;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row span {
  color: var(--brand-2);
  background: rgba(249, 115, 22, 0.1);
}

.rank-panel {
  position: sticky;
  top: 5.3rem;
  border-radius: 1.5rem;
  padding: 1.2rem;
}

.rank-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.rank-item,
.ranking-row {
  display: grid;
  align-items: center;
  gap: 0.75rem;
  color: #111827;
}

.rank-item {
  grid-template-columns: 2rem 4.2rem 1fr;
}

.rank-num,
.ranking-number {
  color: var(--brand-2);
  font-weight: 950;
}

.rank-item img {
  width: 4.2rem;
  height: 3rem;
  border-radius: 0.7rem;
  object-fit: cover;
}

.rank-text {
  min-width: 0;
}

.rank-text strong,
.ranking-info strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-text small,
.ranking-info small {
  color: var(--muted);
}

.page-shell {
  padding: 2rem 0 4rem;
}

.page-hero {
  border-radius: 1.8rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  margin-bottom: 1.6rem;
}

.page-hero h1 {
  margin-top: 0.8rem;
  font-size: clamp(2.2rem, 4.5vw, 4.2rem);
}

.category-hero {
  display: grid;
  grid-template-columns: 1fr minmax(17rem, 26rem);
  gap: 1.5rem;
  align-items: end;
}

.inline-filter {
  margin: 0;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 1.2rem;
  border-radius: 1.5rem;
  padding: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-poster-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.35rem;
}

.category-poster-stack img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 0.8rem;
  object-fit: cover;
}

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

.detail-backdrop,
.detail-overlay {
  position: absolute;
  inset: 0;
}

.detail-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(3px) saturate(1.12);
  transform: scale(1.04);
}

.detail-overlay {
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.72), rgba(17, 24, 39, 0.38)),
    linear-gradient(0deg, #111827, transparent 62%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(13rem, 18rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.4rem);
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-radius: 1.5rem;
  object-fit: cover;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.35);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.detail-info h1 {
  margin-top: 1rem;
  color: #ffffff;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 1.05;
}

.detail-one-line {
  max-width: 53rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height: 1.8;
}

.detail-meta,
.detail-tags {
  margin-top: 1rem;
}

.detail-tags span {
  color: #ffffff;
  background: rgba(249, 115, 22, 0.34);
}

.player-section,
.detail-content-grid,
.related-section {
  width: min(1180px, calc(100% - 2rem));
  margin: 2rem auto;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  gap: 0.75rem;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.68));
  cursor: pointer;
}

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

.play-ring {
  display: grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  box-shadow: 0 16px 38px rgba(239, 68, 68, 0.42);
  font-size: 2rem;
}

.player-overlay strong {
  font-size: 1.2rem;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  gap: 1.5rem;
  align-items: start;
}

.story-panel,
.side-panel {
  border-radius: 1.5rem;
  padding: clamp(1.2rem, 3vw, 2rem);
}

.story-panel h2 + p {
  margin-top: 0.8rem;
}

.story-panel p {
  font-size: 1.03rem;
}

.side-panel dl {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 0.75rem 1rem;
  margin: 1rem 0 0;
}

.side-panel dt {
  color: var(--muted);
  font-weight: 800;
}

.side-panel dd {
  margin: 0;
  color: #111827;
  font-weight: 850;
}

.ranking-list-panel {
  display: grid;
  gap: 0.4rem;
  border-radius: 1.5rem;
  padding: 1rem;
}

.ranking-row {
  grid-template-columns: 4rem 5.5rem minmax(0, 1fr) 3.5rem;
  border-radius: 1rem;
  padding: 0.75rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-row:hover {
  background: rgba(249, 115, 22, 0.08);
  transform: translateX(3px);
}

.ranking-row img {
  width: 5.5rem;
  height: 3.5rem;
  border-radius: 0.8rem;
  object-fit: cover;
}

.ranking-score {
  color: var(--brand-2);
  font-weight: 950;
  text-align: right;
}

.search-page-form {
  max-width: 42rem;
  margin-top: 1.2rem;
}

.search-results-wrap {
  margin-top: 2rem;
}

.site-footer {
  margin-top: 3rem;
  color: rgba(255, 255, 255, 0.86);
  background: #111827;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.2rem 0;
}

.site-footer strong {
  color: #ffffff;
  font-size: 1.2rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.8rem 1.2rem;
  max-width: 34rem;
}

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

@media (max-width: 1080px) {
  .featured-layout,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }

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

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

  .menu-toggle {
    display: block;
  }

  .hero-carousel {
    min-height: 34rem;
    border-radius: 1.3rem;
  }

  .hero-content {
    min-height: 34rem;
    padding: 1.5rem;
  }

  .home-search-band,
  .category-hero,
  .detail-hero-inner,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

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

  .detail-poster {
    max-width: 16rem;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .header-inner {
    height: 3.8rem;
  }

  .brand-mark {
    width: 2rem;
    height: 2rem;
  }

  .hero-carousel {
    width: calc(100% - 1rem);
    margin-top: 0.5rem;
  }

  .hero-content h1,
  .detail-info h1,
  .page-hero h1 {
    letter-spacing: -0.04em;
  }

  .hero-dots {
    left: 1.5rem;
    bottom: 1.2rem;
  }

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

  .ranking-row {
    grid-template-columns: 3rem 4.5rem minmax(0, 1fr);
  }

  .ranking-score {
    display: none;
  }

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