:root {
  --dawn-50: #fff9f0;
  --dawn-100: #fff0d9;
  --dawn-200: #ffe4b8;
  --dawn-500: #ffb347;
  --dawn-600: #ff9f24;
  --dawn-700: #e88412;
  --morning-500: #0d96f8;
  --text-main: #111827;
  --text-muted: #6b7280;
  --bg-soft: #f9fafb;
  --border-soft: #e5e7eb;
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 16px 40px rgba(17, 24, 39, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 48%, #fff9f0 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(229, 231, 235, 0.84);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.06);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--dawn-600);
  white-space: nowrap;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--dawn-500), var(--morning-500));
  box-shadow: 0 8px 24px rgba(255, 159, 36, 0.28);
  font-size: 14px;
}

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

.nav-link {
  color: #374151;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--dawn-600);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
  border: 1px solid #d1d5db;
  border-radius: 999px;
  outline: none;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 220px;
  padding: 10px 16px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--dawn-500);
  box-shadow: 0 0 0 4px rgba(255, 179, 71, 0.18);
}

.header-search button,
.mobile-search button,
.filter-bar button,
.hero-action,
.section-link,
.category-card .category-link,
.player-button {
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--dawn-600);
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button {
  padding: 10px 16px;
}

.header-search button:hover,
.mobile-search button:hover,
.filter-bar button:hover,
.hero-action:hover,
.section-link:hover,
.category-card .category-link:hover,
.player-button:hover {
  transform: translateY(-1px);
  background: var(--dawn-700);
  box-shadow: 0 12px 28px rgba(255, 159, 36, 0.28);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #374151;
  background: var(--dawn-50);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--border-soft);
  background: #ffffff;
  padding: 16px;
}

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

.mobile-search input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
}

.mobile-search button {
  padding: 10px 16px;
}

.mobile-nav {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.hero {
  position: relative;
  height: 64vh;
  min-height: 520px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s 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-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.58) 38%, rgba(0, 0, 0, 0.12) 100%), linear-gradient(0deg, rgba(0, 0, 0, 0.74) 0%, rgba(0, 0, 0, 0) 54%);
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: max(24px, calc((100vw - 1180px) / 2));
  bottom: 84px;
  width: min(640px, calc(100% - 48px));
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 179, 71, 0.18);
  color: #ffd99e;
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0;
  max-width: 600px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 2.2vw, 21px);
  line-height: 1.7;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 28px;
}

.hero-tags span,
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--dawn-50);
  color: #a75d00;
  font-size: 13px;
  font-weight: 700;
}

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

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

.hero-action {
  display: inline-flex;
  padding: 14px 26px;
}

.hero-ghost {
  display: inline-flex;
  padding: 13px 24px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  color: #ffffff;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.hero-ghost:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.hero-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.48);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

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

.hero-arrow.prev {
  left: 22px;
}

.hero-arrow.next {
  right: 22px;
}

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

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

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

.section {
  padding: 58px 0;
}

.section-alt {
  background: linear-gradient(90deg, var(--dawn-50), #fff7ed);
}

.section-blue {
  background: linear-gradient(90deg, #f9fafb, #eff6ff);
}

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

.section-title {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-subtitle {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 16px;
}

.section-link {
  display: inline-flex;
  padding: 10px 18px;
  white-space: nowrap;
}

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

.movie-grid.compact-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}

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

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 18px;
  background: #111827;
  box-shadow: var(--shadow-card);
  transform: translateZ(0);
}

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0) 58%);
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-cover {
  box-shadow: var(--shadow-card-hover);
}

.movie-card:hover .card-cover img {
  transform: scale(1.06);
  opacity: 0.9;
}

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

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--dawn-600);
  font-size: 13px;
  font-weight: 800;
  padding: 5px 9px;
}

.rank-badge {
  right: auto;
  left: 12px;
  background: rgba(17, 24, 39, 0.82);
}

.play-mask {
  position: absolute;
  z-index: 4;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: inline-flex;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 159, 36, 0.92);
  font-size: 14px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-mask {
  opacity: 1;
  transform: translateY(0);
}

.card-body {
  padding: 14px 2px 0;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 800;
}

.card-body h3 a {
  transition: color 0.2s ease;
}

.movie-card:hover h3 a {
  color: var(--dawn-600);
}

.card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #4b5563;
  font-size: 13px;
}

.card-meta span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.08);
}

.movie-card-compact .card-body h3 {
  font-size: 16px;
}

.movie-card-compact .card-body p {
  display: none;
}

.horizontal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 260px);
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: thin;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border-radius: 22px;
  padding: 26px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--dawn-500), #f97316 56%, var(--morning-500));
  box-shadow: var(--shadow-card);
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, var(--morning-500), #2563eb 55%, var(--dawn-500));
}

.category-card::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -54px;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.category-card h3 {
  position: relative;
  z-index: 2;
  margin: 0 0 12px;
  font-size: 26px;
}

.category-card p {
  position: relative;
  z-index: 2;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.65;
}

.category-card .category-link {
  position: relative;
  z-index: 2;
  display: inline-flex;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(135deg, var(--dawn-500), #f97316 50%, var(--morning-500));
  padding: 70px 0;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.page-hero p {
  margin: 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 19px;
  line-height: 1.7;
}

.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.filter-bar input,
.filter-bar select {
  min-height: 44px;
  padding: 0 16px;
}

.filter-bar input {
  min-width: min(360px, 100%);
  flex: 1;
}

.filter-bar button {
  min-height: 44px;
  padding: 0 18px;
}

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

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

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

.ranking-item {
  display: grid;
  grid-template-columns: 70px 96px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.ranking-number {
  font-size: 30px;
  font-weight: 900;
  color: var(--dawn-600);
  text-align: center;
}

.ranking-item img {
  width: 96px;
  height: 128px;
  border-radius: 14px;
  object-fit: cover;
}

.ranking-info h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.ranking-info p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--text-muted);
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ranking-meta {
  color: #4b5563;
  font-size: 14px;
}

.player-stage {
  background: #000000;
}

.player-wrap {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(255, 179, 71, 0.16), rgba(0, 0, 0, 0.58));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  font-size: 34px;
  line-height: 1;
}

.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.92fr);
  gap: 32px;
  padding: 42px 0 64px;
}

.detail-title {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #4b5563;
  background: #ffffff;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.08);
}

.content-card,
.related-card {
  border-radius: 20px;
  background: #ffffff;
  padding: 26px;
  box-shadow: var(--shadow-card);
}

.content-card + .content-card {
  margin-top: 22px;
}

.content-card h2,
.related-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: #4b5563;
  font-size: 16px;
  line-height: 1.85;
}

.content-card p + p {
  margin-top: 14px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  padding: 8px 12px;
}

.related-card {
  position: sticky;
  top: 88px;
}

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

.media-link {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: center;
}

.media-link img {
  width: 88px;
  height: 116px;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.media-link strong {
  display: -webkit-box;
  margin-bottom: 8px;
  overflow: hidden;
  color: #111827;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

.media-link:hover strong {
  color: var(--dawn-600);
}

.media-link em {
  color: var(--text-muted);
  font-size: 13px;
  font-style: normal;
}

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

.breadcrumbs a {
  color: var(--dawn-700);
  font-weight: 700;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  padding: 48px 0 34px;
}

.site-footer p {
  color: #9ca3af;
  line-height: 1.7;
}

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

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

.footer-links a {
  color: #d1d5db;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--dawn-500);
}

.footer-bottom {
  padding: 22px 0;
  border-top: 1px solid #1f2937;
  color: #9ca3af;
  font-size: 14px;
}

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

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

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

  .related-card {
    position: static;
  }

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

@media (max-width: 720px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    height: 72vh;
    min-height: 560px;
  }

  .hero-content {
    left: 18px;
    right: 18px;
    bottom: 72px;
    width: auto;
  }

  .hero-arrow {
    display: none;
  }

  .hero-actions {
    flex-wrap: wrap;
  }

  .section {
    padding: 42px 0;
  }

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

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

  .card-cover {
    border-radius: 14px;
  }

  .card-body h3 {
    font-size: 16px;
  }

  .ranking-item {
    grid-template-columns: 42px 78px 1fr;
  }

  .ranking-item img {
    width: 78px;
    height: 104px;
  }

  .ranking-meta {
    display: none;
  }

  .ranking-info h3 {
    font-size: 17px;
  }

  .ranking-info p {
    font-size: 14px;
  }

  .content-card,
  .related-card {
    padding: 20px;
  }

  .player-button {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }

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