* {
  box-sizing: border-box;
}

:root {
  --orange: #ea580c;
  --orange-dark: #c2410c;
  --orange-soft: #ffedd5;
  --amber-soft: #fef3c7;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 24px 50px rgba(15, 23, 42, 0.18);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #ea580c 0%, #f97316 100%);
  box-shadow: 0 10px 25px rgba(194, 65, 12, 0.24);
}

.nav-wrap {
  max-width: 1180px;
  height: 64px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

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

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

.nav-link:hover,
.nav-link.is-active {
  color: #ffedd5;
  opacity: 1;
}

.nav-search,
.mobile-search,
.wide-search,
.search-page-form {
  display: flex;
  align-items: center;
}

.nav-search {
  position: relative;
  width: 210px;
}

.nav-search input,
.mobile-search input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  padding: 10px 40px 10px 16px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  outline: none;
}

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

.nav-search button {
  position: absolute;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 0;
  color: #ffffff;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 22px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 14px 20px 18px;
  background: #c2410c;
}

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

.mobile-search {
  gap: 10px;
  margin-bottom: 12px;
}

.mobile-search button,
.search-page-form button,
.wide-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 20px;
  color: #ffffff;
  background: #111827;
  cursor: pointer;
  font-weight: 800;
}

.mobile-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.hero {
  position: relative;
  height: 580px;
  overflow: hidden;
  background: linear-gradient(90deg, #111827, #1f2937);
}

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

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

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

.hero-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.2));
}

.hero-content {
  position: absolute;
  left: 50%;
  right: 0;
  bottom: 0;
  width: min(1180px, calc(100% - 40px));
  transform: translateX(-50%);
  padding: 0 0 70px;
  color: #ffffff;
}

.hero-badge,
.detail-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  background: var(--orange);
  box-shadow: 0 10px 20px rgba(234, 88, 12, 0.28);
}

.hero h1 {
  max-width: 820px;
  margin: 18px 0 18px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 720px;
  margin: 0;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin: 20px 0 0;
}

.hero-tags span,
.card-tags span,
.detail-tags span {
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-height: 46px;
  padding: 0 28px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: var(--orange);
}

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

.primary-btn:hover {
  background: var(--orange-dark);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(10px);
}

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

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

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

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

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

.home-search-panel,
.content-section,
.page-main,
.detail-main {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.home-search-panel {
  margin-top: -32px;
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  align-items: center;
  padding-top: 28px;
  padding-bottom: 28px;
  border-radius: 24px;
  color: #111827;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-strong);
}

.home-search-panel h2,
.page-hero h1,
.section-title h2,
.list-toolbar h2,
.detail-text h2 {
  margin: 0;
  color: #111827;
}

.home-search-panel p,
.page-hero p,
.list-toolbar p,
.card-body p,
.detail-copy p,
.detail-text p,
.rank-row p,
.category-card p,
.site-footer p {
  color: var(--muted);
  line-height: 1.75;
}

.wide-search {
  gap: 12px;
}

.wide-search input,
.search-page-form input,
.list-toolbar input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 14px 18px;
  background: #ffffff;
  outline: none;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.content-section {
  padding-top: 56px;
}

.warm-section {
  margin-top: 56px;
  padding: 34px 28px;
  border-radius: 28px;
  background: linear-gradient(90deg, #fff7ed, #fef3c7);
}

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

.section-title.compact {
  margin-bottom: 18px;
}

.section-title span,
.page-hero span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-title h2,
.list-toolbar h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.section-title a {
  color: var(--orange);
  font-weight: 900;
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

.card-link,
.category-card a,
.rank-row a {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-link:hover,
.category-card a:hover,
.rank-row a:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-strong);
}

.card-cover {
  position: relative;
  height: 210px;
  margin: 0;
  overflow: hidden;
  background: #111827;
}

.movie-card.large .card-cover {
  height: 275px;
}

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

.card-link:hover .card-cover img,
.category-card a:hover img,
.rank-row a:hover img {
  transform: scale(1.08);
}

.card-cover figcaption {
  position: absolute;
  right: 12px;
  top: 12px;
  margin: 0;
}

.card-cover figcaption span {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  font-weight: 800;
  font-size: 12px;
}

.card-body {
  padding: 18px;
}

.movie-card.large .card-body {
  padding: 22px;
}

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

.card-link:hover h2 {
  color: var(--orange);
}

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

.card-meta,
.rank-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.movie-card.horizontal .card-link {
  display: grid;
  grid-template-columns: 210px 1fr;
}

.movie-card.horizontal .card-cover {
  height: 100%;
  min-height: 155px;
}

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

.category-card a {
  position: relative;
  min-height: 230px;
  color: #ffffff;
  background: #111827;
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
  opacity: 0.64;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-card a:hover img {
  opacity: 0.82;
}

.category-card div {
  position: absolute;
  inset: auto 0 0 0;
  padding: 22px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0));
}

.category-card h2 {
  margin: 0 0 8px;
}

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

.category-card span {
  color: #fed7aa;
  font-weight: 900;
}

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

.ranking-box {
  position: sticky;
  top: 88px;
  border-radius: 24px;
  padding: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.rank-list {
  display: grid;
  gap: 14px;
}

.rank-row a {
  display: grid;
  grid-template-columns: 54px 92px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
}

.rank-list.small .rank-row a {
  grid-template-columns: 40px 72px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
}

.rank-num {
  color: var(--orange);
  font-weight: 900;
  font-size: 22px;
  text-align: center;
}

.rank-row img {
  width: 92px;
  height: 68px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-list.small img {
  width: 72px;
  height: 54px;
}

.rank-row h2 {
  margin: 0 0 6px;
  font-size: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-row p {
  margin: 0 0 8px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-main,
.detail-main {
  padding-top: 32px;
}

.page-hero {
  border-radius: 28px;
  padding: 46px;
  color: #111827;
  background: linear-gradient(120deg, #fff7ed, #ffffff 55%, #fef3c7);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
}

.list-toolbar {
  align-items: center;
  padding: 20px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.list-toolbar input {
  max-width: 340px;
}

.all-list {
  align-items: stretch;
}

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

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

.search-page-form {
  gap: 12px;
  margin-bottom: 28px;
  padding: 20px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--orange);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(340px, 0.8fr);
  gap: 26px;
  align-items: stretch;
}

.player-card,
.detail-info,
.detail-text {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.player-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000000;
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
  object-fit: contain;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.62));
  cursor: pointer;
}

.play-overlay span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 5px;
  font-size: 36px;
  color: #ffffff;
  background: var(--orange);
  box-shadow: 0 18px 36px rgba(234, 88, 12, 0.34);
}

.play-overlay strong {
  font-size: 18px;
}

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

.detail-info {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 18px;
  padding: 18px;
}

.detail-info > img {
  width: 145px;
  height: 210px;
  border-radius: 18px;
  object-fit: cover;
  background: #111827;
}

.detail-copy h1 {
  margin: 14px 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
}

.detail-copy p {
  margin: 0 0 16px;
}

.detail-tags {
  margin-top: 16px;
}

.detail-text {
  padding: 30px;
}

.detail-text h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 26px;
}

.detail-text h2 + p {
  margin-top: 0;
}

.detail-text p + h2 {
  margin-top: 28px;
}

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

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 46px 20px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
}

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

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

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

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

.footer-copy {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 14px;
}

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

  .nav-wrap {
    justify-content: space-between;
  }

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

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

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

  .ranking-box {
    position: static;
  }
}

@media (max-width: 760px) {
  .hero {
    height: 520px;
  }

  .hero-content {
    width: calc(100% - 32px);
    padding-bottom: 62px;
  }

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

  .hero-arrow {
    display: none;
  }

  .home-search-panel,
  .footer-inner,
  .detail-info,
  .movie-card.horizontal .card-link,
  .rank-row a {
    grid-template-columns: 1fr;
  }

  .home-search-panel {
    margin-left: 16px;
    margin-right: 16px;
  }

  .wide-search,
  .search-page-form,
  .section-title,
  .list-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

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

  .card-cover,
  .movie-card.large .card-cover {
    height: 220px;
  }

  .list-toolbar input {
    max-width: none;
  }

  .page-hero {
    padding: 32px 24px;
  }

  .detail-info > img {
    width: 100%;
    height: 340px;
  }

  .rank-row img,
  .rank-list.small img {
    width: 100%;
    height: 160px;
  }
}

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

  .brand-mark {
    width: 28px;
    height: 28px;
  }

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

  .mobile-links {
    grid-template-columns: 1fr;
  }

  .card-cover,
  .movie-card.large .card-cover {
    height: 250px;
  }
}
