:root {
  --color-amber: #d97706;
  --color-orange: #ea580c;
  --color-red: #dc2626;
  --color-dark: #111827;
  --color-gray: #4b5563;
  --color-soft: #f9fafb;
  --shadow-card: 0 16px 40px rgba(17, 24, 39, 0.12);
  --shadow-soft: 0 10px 28px rgba(17, 24, 39, 0.08);
  --radius-lg: 24px;
  --radius-md: 18px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--color-dark);
  background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: #ffffff;
  background: linear-gradient(90deg, var(--color-amber), var(--color-orange), var(--color-red));
  box-shadow: 0 12px 30px rgba(194, 65, 12, 0.28);
}

.site-nav {
  width: min(100% - 32px, var(--max-width));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 26px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--color-orange);
  background: #ffffff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4), 0 8px 20px rgba(0, 0, 0, 0.14);
}

.brand-text {
  font-size: 1.35rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  font-weight: 700;
}

.nav-links a,
.mobile-panel a {
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover {
  color: #ffedd5;
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.nav-search input {
  width: 190px;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
  padding: 8px 10px;
}

.nav-search input::placeholder {
  color: rgba(255, 255, 255, 0.82);
}

.nav-search button,
.hero-search button,
.primary-button {
  border: 0;
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-orange), var(--color-red));
  box-shadow: 0 12px 24px rgba(234, 88, 12, 0.28);
}

.nav-search button {
  padding: 8px 14px;
  background: #ffffff;
  color: var(--color-orange);
  box-shadow: none;
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-panel {
  display: none;
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-panel.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #ffffff;
  background: #000000;
}

.hero-slides,
.hero-slide,
.hero-slide img,
.hero-gradient {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transition: opacity 0.9s ease;
}

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

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

.hero-gradient {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.12)), linear-gradient(0deg, #000000, transparent 45%);
}

.hero-content {
  position: absolute;
  z-index: 5;
  left: max(24px, calc((100vw - var(--max-width)) / 2));
  bottom: 120px;
  width: min(720px, calc(100% - 48px));
}

.eyebrow,
.eyebrow-dark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow {
  color: #fed7aa;
}

.eyebrow-dark {
  color: var(--color-orange);
}

.hero h1,
.hero-movie-title,
.hero-site-title {
  margin: 0;
  font-weight: 900;
  line-height: 1.08;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 4.7rem);
}

.hero-movie-title {
  margin-top: 12px;
  font-size: clamp(1.8rem, 4vw, 3.8rem);
}

.hero-site-title {
  font-size: clamp(1.9rem, 4vw, 4rem);
}

.hero p {
  max-width: 680px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.08rem;
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.cover-badge,
.rank-badge {
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-tags span {
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
}

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

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, background 0.2s ease;
}

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

.ghost-button {
  color: #ffffff;
  font-weight: 800;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.hero-control {
  position: absolute;
  z-index: 10;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(8px);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

.hero-dots {
  position: absolute;
  z-index: 10;
  left: max(24px, calc((100vw - var(--max-width)) / 2));
  bottom: 84px;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

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

.hero-search {
  position: absolute;
  z-index: 10;
  left: 50%;
  bottom: 24px;
  width: min(860px, calc(100% - 32px));
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 13px 18px;
  border-radius: 999px;
  color: var(--color-dark);
  background: #ffffff;
}

.hero-search button {
  padding: 0 24px;
}

.section {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  padding: 56px 0;
}

.section-wide {
  width: 100%;
  padding: 56px max(16px, calc((100vw - var(--max-width)) / 2));
  background: linear-gradient(90deg, #fff7ed, #fef2f2);
}

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

.section-heading h2,
.page-hero h1,
.detail-copy h1,
.content-card h2 {
  margin: 0;
  line-height: 1.18;
  color: var(--color-dark);
}

.section-heading h2,
.page-hero h1 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.text-link {
  color: var(--color-orange);
  font-weight: 900;
}

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

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

.category-card,
.movie-card,
.content-card,
.search-panel,
.ranking-panel {
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.88);
  box-shadow: var(--shadow-soft);
}

.category-card {
  padding: 20px;
  border-radius: var(--radius-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-main-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--color-dark);
  font-size: 1.05rem;
  font-weight: 900;
}

.category-main-link strong {
  color: var(--color-orange);
  font-size: 0.9rem;
}

.category-card p {
  margin: 12px 0 0;
  color: var(--color-gray);
  font-size: 0.92rem;
}

.category-samples {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  color: var(--color-orange);
  font-size: 0.9rem;
  font-weight: 700;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #f97316, #dc2626);
}

.movie-card-compact .movie-cover {
  aspect-ratio: 16 / 9;
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.cover-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 2.4rem;
  background: rgba(0, 0, 0, 0.28);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.movie-card:hover .cover-play {
  opacity: 1;
}

.cover-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  color: #ffffff;
  background: rgba(234, 88, 12, 0.92);
}

.cover-badge {
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
}

.rank-badge {
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-orange), var(--color-red));
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.26);
}

.movie-info {
  padding: 18px;
}

.movie-info h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  line-height: 1.3;
}

.movie-info h3 a:hover {
  color: var(--color-orange);
}

.movie-info p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--color-gray);
  font-size: 0.94rem;
}

.movie-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 0.86rem;
}

.movie-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #d1d5db;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  padding: 5px 9px;
  color: #c2410c;
  background: #ffedd5;
}

.ribbon-section {
  width: 100%;
  max-width: none;
  padding: 56px max(16px, calc((100vw - var(--max-width)) / 2));
  background: linear-gradient(90deg, #fff7ed, #fef2f2);
}

.horizontal-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 300px);
  gap: 20px;
  overflow-x: auto;
  padding: 4px 4px 20px;
  scroll-snap-type: x mandatory;
}

.horizontal-scroll .movie-card {
  scroll-snap-align: start;
}

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

.compact-heading {
  margin-bottom: 20px;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
  border-radius: var(--radius-lg);
}

.ranking-list {
  display: grid;
  gap: 16px;
}

.ranking-list .movie-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
}

.ranking-list .movie-info {
  padding: 14px;
}

.ranking-list .movie-info p,
.related-grid .movie-info p {
  min-height: 0;
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(90deg, var(--color-orange), var(--color-red));
  padding: 72px max(16px, calc((100vw - var(--max-width)) / 2));
}

.page-hero h1,
.page-hero p {
  color: #ffffff;
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.08rem;
}

.hero-count {
  display: inline-flex;
  margin-top: 20px;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.16);
}

.search-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 18px;
  border-radius: var(--radius-md);
}

.search-panel label {
  color: var(--color-dark);
  font-weight: 900;
}

.search-panel input {
  width: 100%;
  border: 1px solid #e5e7eb;
  outline: 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff7ed;
}

.search-panel input:focus {
  border-color: var(--color-orange);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.inline-search {
  grid-template-columns: 200px minmax(0, 1fr);
  align-items: center;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 28px;
}

.filter-bar button {
  border: 0;
  cursor: pointer;
  padding: 9px 15px;
  border-radius: 999px;
  color: #9a3412;
  font-weight: 900;
  background: #ffedd5;
}

.filter-bar button.is-active {
  color: #ffffff;
  background: linear-gradient(90deg, var(--color-orange), var(--color-red));
}

.result-line {
  margin: 0 0 18px;
  color: var(--color-gray);
  font-weight: 800;
}

.empty-state {
  display: none;
  margin: 28px 0 0;
  padding: 22px;
  text-align: center;
  color: var(--color-gray);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.empty-state.is-visible {
  display: block;
}

.detail-hero {
  min-height: 560px;
  background-image: var(--detail-cover);
  background-position: center;
  background-size: cover;
  background-color: #111827;
}

.detail-hero-overlay {
  min-height: 560px;
  color: #ffffff;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.2));
}

.detail-inner {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
  margin-top: 36px;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-copy h1 {
  color: #ffffff;
  font-size: clamp(2.1rem, 5vw, 4.6rem);
}

.detail-one-line {
  max-width: 820px;
  margin: 18px 0 20px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
}

.detail-meta span {
  padding: 7px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.detail-tags span {
  color: #ffedd5;
  background: rgba(234, 88, 12, 0.28);
}

.detail-copy .primary-button {
  margin-top: 26px;
}

.detail-section {
  padding-top: 42px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000000;
  box-shadow: 0 28px 80px rgba(17, 24, 39, 0.28);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  text-align: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.55));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  border-radius: 999px;
  font-size: 2.2rem;
  background: linear-gradient(135deg, var(--color-orange), var(--color-red));
  box-shadow: 0 18px 34px rgba(220, 38, 38, 0.36);
}

.play-overlay strong {
  max-width: min(760px, 90%);
  font-size: clamp(1.2rem, 3vw, 2rem);
}

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

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.content-card {
  padding: 26px;
  border-radius: var(--radius-lg);
}

.content-card h2 {
  margin-bottom: 14px;
  font-size: 1.45rem;
}

.content-card p {
  margin: 0;
  color: var(--color-gray);
  text-align: justify;
}

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

.site-footer {
  color: #d1d5db;
  background: linear-gradient(90deg, #111827, #1f2937, #111827);
  margin-top: 40px;
}

.footer-inner {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
}

.footer-brand {
  color: #ffffff;
  font-size: 1.3rem;
}

.site-footer p {
  margin: 14px 0 0;
  max-width: 420px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 1.05rem;
}

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

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

.footer-copy {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  padding: 20px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: #9ca3af;
}

[data-search-card].is-hidden {
  display: none;
}

@media (max-width: 1080px) {
  .nav-links,
  .nav-search {
    display: none;
  }

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

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

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

  .two-column-section {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }

  .detail-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .site-nav {
    height: 62px;
  }

  .brand-text {
    font-size: 1.08rem;
  }

  .hero {
    min-height: 660px;
  }

  .hero-content {
    bottom: 160px;
  }

  .hero-control {
    display: none;
  }

  .hero-search {
    flex-direction: column;
    border-radius: 24px;
  }

  .hero-search button {
    min-height: 46px;
  }

  .section,
  .section-wide,
  .ribbon-section {
    padding-top: 40px;
    padding-bottom: 40px;
  }

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

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

  .ranking-list .movie-card {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .page-hero {
    padding-top: 52px;
    padding-bottom: 52px;
  }

  .inline-search {
    grid-template-columns: 1fr;
  }

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

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

  .detail-content {
    grid-template-columns: 1fr;
  }

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