:root {
  --orange: #f97316;
  --orange-dark: #ea580c;
  --red: #ef4444;
  --pink: #ec4899;
  --blue: #2563eb;
  --green: #16a34a;
  --purple: #7c3aed;
  --text: #1f2937;
  --muted: #6b7280;
  --soft: #f9fafb;
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

* {
  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(--text);
  background: #f3f4f6;
  line-height: 1.65;
}

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: 60;
  color: #ffffff;
  background: linear-gradient(90deg, var(--orange), var(--red), var(--pink));
  box-shadow: 0 10px 25px rgba(239, 68, 68, 0.25);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
  flex-shrink: 0;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 600;
  white-space: nowrap;
  flex: 1;
}

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

.main-nav a:hover {
  color: #fed7aa;
  opacity: 1;
}

.top-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input {
  width: 210px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  padding: 9px 16px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  outline: none;
}

.top-search input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.top-search button {
  border: 0;
  border-radius: 999px;
  padding: 9px 15px;
  color: var(--orange-dark);
  background: #ffffff;
  cursor: pointer;
  font-weight: 700;
}

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

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

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.1));
}

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

.hero-content h1 {
  max-width: 780px;
  margin: 18px 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 760px;
  margin: 0 0 22px;
  font-size: 18px;
  color: #e5e7eb;
}

.hero-tags,
.hero-info,
.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-tags a,
.hero-tags span {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 700;
}

.hero-tags a {
  background: #dc2626;
}

.hero-tags span {
  color: #fdba74;
  background: rgba(255, 255, 255, 0.12);
}

.hero-info {
  color: #d1d5db;
  margin-bottom: 26px;
}

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

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

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

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.hero-dots {
  position: absolute;
  right: 48px;
  bottom: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.hero-dot.is-active {
  width: 34px;
  background: var(--orange);
}

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

.content-section,
.ranking-block,
.category-strip,
.filter-panel,
.detail-card,
.side-card,
.player-card {
  margin-bottom: 44px;
}

.content-section,
.ranking-block,
.filter-panel,
.detail-card,
.side-card {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
}

.content-section,
.ranking-block {
  padding: 28px;
}

.section-gradient {
  background: linear-gradient(135deg, #fff7ed, #fdf2f8);
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.section-more {
  color: var(--orange-dark);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-card {
  min-width: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.poster-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  color: #ffffff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.18), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-mask {
  opacity: 1;
}

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

.poster-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.poster-badges span,
.hot-badge {
  border-radius: 8px;
  padding: 4px 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  line-height: 1;
}

.hot-badge {
  background: #dc2626;
}

.play-mark {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 50%;
  background: var(--orange);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
  transform: scale(1.06);
}

.movie-card-body {
  padding: 16px;
}

.movie-card-body h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-row span {
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--orange-dark);
  background: #fff7ed;
  font-size: 12px;
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 26px;
  padding: 24px;
  color: #ffffff;
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 0.5s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,0.78), rgba(0,0,0,0.18));
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile div {
  position: relative;
  z-index: 2;
}

.category-tile span {
  display: inline-flex;
  margin-bottom: 8px;
  border-radius: 999px;
  padding: 4px 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 700;
}

.category-tile h2 {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.1;
}

.category-tile p {
  margin: 0;
  color: #f3f4f6;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 58px 1fr;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px;
  background: #ffffff;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  border-color: #fdba74;
}

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

.rank-item img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-title {
  display: block;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-item small {
  grid-column: 3;
  color: var(--muted);
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 32px;
  border-radius: 30px;
  padding: 44px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--red), var(--pink));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.05em;
}

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

.crumb {
  display: inline-flex;
  margin-bottom: 14px;
  color: #fed7aa;
  font-weight: 800;
}

.category-hero.pink,
.slim-hero.blue {
  background: linear-gradient(135deg, #ec4899, #f97316);
}

.category-hero.orange,
.slim-hero.orange {
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.category-hero.blue {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.category-hero.green {
  background: linear-gradient(135deg, #16a34a, #14b8a6);
}

.category-hero.purple {
  background: linear-gradient(135deg, #7c3aed, #db2777);
}

.category-hero.rose {
  background: linear-gradient(135deg, #f43f5e, #ec4899);
}

.category-hero.red {
  background: linear-gradient(135deg, #dc2626, #f97316);
}

.category-hero.gray {
  background: linear-gradient(135deg, #374151, #111827);
}

.filter-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
}

.page-filter,
.sort-select {
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 14px;
  background: #ffffff;
  outline: none;
}

.page-filter {
  flex: 1;
}

.detail-main {
  max-width: 1320px;
}

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

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.player-card {
  border-radius: 24px;
  overflow: hidden;
  background: #000000;
  box-shadow: var(--shadow);
}

.video-shell {
  position: relative;
  background: #000000;
}

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

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

.play-overlay span {
  width: 74px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 18px 40px rgba(249, 115, 22, 0.38);
  font-size: 30px;
}

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

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

.detail-card {
  padding: 28px;
}

.detail-chips,
.detail-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.detail-chips a,
.detail-chips span,
.detail-meta span,
.tag-section span {
  border-radius: 999px;
  padding: 6px 12px;
  background: #fff7ed;
  color: var(--orange-dark);
  font-weight: 700;
  font-size: 14px;
}

.detail-chips a {
  color: #ffffff;
  background: linear-gradient(90deg, var(--orange), var(--red));
}

.detail-card h1 {
  margin: 18px 0 12px;
  font-size: clamp(32px, 5vw, 50px);
  line-height: 1.15;
  letter-spacing: -0.05em;
}

.detail-meta {
  margin-bottom: 26px;
  color: var(--muted);
}

.detail-section {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 24px;
}

.detail-section h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.detail-section p {
  margin: 0 0 12px;
  color: #374151;
  white-space: pre-wrap;
}

.lead-text {
  font-size: 18px;
  font-weight: 800;
}

.tag-section div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.review-box {
  border: 0;
  border-radius: 22px;
  padding: 24px;
  background: linear-gradient(135deg, #fff7ed, #fef2f2);
}

.detail-side {
  min-width: 0;
}

.detail-side > div {
  position: sticky;
  top: 86px;
}

.side-poster {
  margin-bottom: 20px;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

.side-card {
  padding: 20px;
}

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

.compact-card {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.side-related .compact-card .poster-wrap {
  aspect-ratio: 16 / 10;
}

.side-related .compact-card .movie-card-body {
  padding: 12px;
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(180deg, #111827, #030712);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
}

.footer-logo {
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

.footer-brand p {
  max-width: 520px;
  margin: 0;
}

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

.footer-links h3 {
  margin: 0 0 6px;
  color: #ffffff;
}

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

.copyright {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 18px 24px;
  text-align: center;
  color: #9ca3af;
}

.back-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 50;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.back-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.is-hidden-card {
  display: none !important;
}

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

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

  .header-inner.is-open {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding-bottom: 14px;
  }

  .header-inner.is-open .main-nav {
    order: 5;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

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

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

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

  .detail-side > div {
    position: static;
  }

  .side-poster {
    display: none;
  }
}

@media (max-width: 760px) {
  .header-inner {
    padding: 0 16px;
  }

  .brand {
    font-size: 20px;
  }

  .top-search {
    order: 6;
    width: 100%;
  }

  .top-search input {
    width: 100%;
    flex: 1;
  }

  .header-inner.is-open .main-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-carousel {
    height: 520px;
  }

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

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

  .hero-dots {
    right: 20px;
    bottom: 26px;
  }

  .page-main,
  .detail-main {
    padding: 22px 14px 40px;
  }

  .content-section,
  .ranking-block {
    padding: 18px;
    border-radius: 20px;
  }

  .section-head,
  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .movie-grid,
  .all-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .category-strip-inner,
  .rank-list {
    grid-template-columns: 1fr;
  }

  .category-tile {
    min-height: 160px;
  }

  .rank-item {
    grid-template-columns: 42px 54px 1fr;
  }

  .page-hero,
  .detail-card {
    padding: 24px;
    border-radius: 22px;
  }

  .detail-card h1 {
    font-size: 30px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    padding: 36px 18px;
  }
}
