:root {
  --bg: #fff7ed;
  --paper: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #fed7aa;
  --brand: #f97316;
  --brand-dark: #ea580c;
  --accent: #ef4444;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  --radius: 22px;
}

* {
  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(--ink);
  background: linear-gradient(135deg, #fff7ed 0%, #fef2f2 48%, #ffffff 100%);
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(254, 215, 170, 0.85);
  backdrop-filter: blur(18px);
}

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.32);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 9px 13px;
  color: #4b5563;
  border-radius: 999px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand-dark);
  background: #ffedd5;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 13px;
  background: #ffedd5;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--brand-dark);
  border-radius: 999px;
}

.hero-slider {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #0f172a;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  opacity: 0.5;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.68), rgba(15, 23, 42, 0.24));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 640px;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 44px;
  align-items: center;
  padding: 70px 0 90px;
}

.hero-copy {
  color: #fff;
  max-width: 720px;
}

.hero-kicker,
.page-kicker {
  display: inline-flex;
  color: #fed7aa;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
  font-weight: 900;
}

.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(24px, 3.5vw, 42px);
  line-height: 1.16;
  color: #ffedd5;
  font-weight: 850;
}

.hero-copy p {
  margin: 0;
  max-width: 650px;
  color: #e5e7eb;
  font-size: 18px;
}

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

.hero-tags span,
.detail-tags span {
  display: inline-flex;
  padding: 6px 10px;
  color: #fff7ed;
  border: 1px solid rgba(254, 215, 170, 0.65);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

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

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

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

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 14px 32px rgba(249, 115, 22, 0.32);
}

.btn.ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.08);
}

.btn.ghost.dark {
  color: var(--brand-dark);
  border-color: #fdba74;
  background: #fff7ed;
}

.btn.text {
  color: #fed7aa;
  padding-inline: 4px;
}

.hero-poster {
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 32px;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 5;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  color: #fff;
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

.hero-dot.active {
  width: 28px;
  background: #fff;
}

.section-block {
  padding: 56px 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3.5vw, 40px);
  line-height: 1.16;
}

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

.section-more {
  color: var(--brand-dark);
  font-weight: 850;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #111827;
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  opacity: 0.7;
  transition: transform 0.35s ease;
}

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

.category-tile-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.04));
}

.category-tile strong,
.category-tile small {
  position: absolute;
  left: 18px;
  right: 18px;
  color: #fff;
}

.category-tile strong {
  bottom: 54px;
  font-size: 22px;
}

.category-tile small {
  bottom: 18px;
  color: #e5e7eb;
}

.search-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 24px;
  padding: 16px;
  border: 1px solid #fed7aa;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
}

.search-label {
  font-weight: 850;
  color: var(--brand-dark);
}

.search-input-wrap {
  flex: 1 1 320px;
  display: flex;
  gap: 10px;
}

.movie-search {
  width: 100%;
  height: 44px;
  border: 1px solid #fdba74;
  border-radius: 999px;
  padding: 0 16px;
  outline: none;
  background: #fff;
}

.movie-search:focus {
  box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.18);
}

.search-clear {
  border: 0;
  color: #fff;
  border-radius: 999px;
  padding: 0 16px;
  background: var(--brand);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(254, 215, 170, 0.82);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

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

.movie-card:hover .poster-link img {
  transform: scale(1.06);
}

.poster-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.66));
}

.poster-year,
.rank-chip {
  position: absolute;
  top: 12px;
  padding: 4px 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.92);
}

.poster-year {
  left: 12px;
}

.rank-chip {
  right: 12px;
  background: rgba(239, 68, 68, 0.92);
}

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

.movie-title {
  display: block;
  min-height: 48px;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.45;
}

.movie-title:hover {
  color: var(--brand-dark);
}

.movie-desc {
  min-height: 46px;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.movie-meta span {
  display: inline-flex;
  max-width: 100%;
  padding: 4px 8px;
  color: #9a3412;
  font-size: 12px;
  border-radius: 999px;
  background: #ffedd5;
}

.rank-section {
  padding-top: 28px;
}

.rank-list {
  overflow: hidden;
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.rank-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #ffedd5;
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row:hover {
  background: #fff7ed;
}

.rank-number {
  color: var(--accent);
  font-weight: 950;
  font-size: 22px;
}

.rank-title {
  font-weight: 850;
}

.rank-meta {
  color: var(--muted);
  font-size: 14px;
}

.page-main {
  min-height: 70vh;
}

.page-hero,
.detail-hero {
  margin-top: 34px;
  padding: 42px;
  border: 1px solid #fed7aa;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 237, 213, 0.84));
  box-shadow: var(--shadow);
}

.page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
}

.page-hero p {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
}

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

.category-card {
  overflow: hidden;
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 150px;
  background: #111827;
}

.category-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card-body {
  padding: 20px;
}

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

.category-card-body p {
  min-height: 52px;
  margin: 0 0 12px;
  color: var(--muted);
}

.category-card-body span {
  color: var(--brand-dark);
  font-weight: 900;
}

.detail-main {
  padding-bottom: 40px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 26px;
  box-shadow: var(--shadow);
  background: #111827;
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.breadcrumb a:hover {
  color: var(--brand-dark);
}

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.detail-one-line {
  max-width: 760px;
  margin: 0;
  color: #4b5563;
  font-size: 18px;
}

.detail-tags span {
  color: #9a3412;
  background: #ffedd5;
  border-color: #fdba74;
}

.player-panel {
  padding: 38px 0 18px;
}

.player-panel h2,
.detail-article h2,
.side-panel h2 {
  margin: 0 0 18px;
  font-size: 28px;
  line-height: 1.18;
}

.video-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.82));
  cursor: pointer;
}

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

.play-icon {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  border-radius: 50%;
  color: #fff;
  font-size: 30px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 12px 36px rgba(249, 115, 22, 0.4);
}

.play-text {
  font-size: 18px;
  font-weight: 900;
}

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

.detail-article,
.side-panel {
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.detail-article {
  padding: 28px;
}

.detail-article p {
  margin: 0 0 24px;
  color: #374151;
  font-size: 17px;
}

.info-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.info-table div {
  padding: 14px;
  border-radius: 16px;
  background: #fff7ed;
}

.info-table span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.info-table strong {
  display: block;
  margin-top: 4px;
}

.side-panel {
  padding: 20px;
  align-self: start;
}

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

.movie-card.compact {
  display: grid;
  grid-template-columns: 96px 1fr;
  border-radius: 18px;
}

.movie-card.compact .poster-link {
  aspect-ratio: 3 / 4;
}

.movie-card.compact .movie-title {
  min-height: auto;
}

.movie-card.compact .movie-desc {
  min-height: auto;
  -webkit-line-clamp: 2;
}

.site-footer {
  margin-top: 34px;
  padding: 34px 0;
  color: #e5e7eb;
  background: #111827;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  margin: 6px 0 0;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  gap: 16px;
  color: #fed7aa;
  font-weight: 800;
}

.is-filtered-out {
  display: none !important;
}

@media (max-width: 1100px) {
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid #fed7aa;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: flex;
  }

  .hero-content {
    grid-template-columns: 1fr;
    min-height: 680px;
    padding-top: 48px;
  }

  .hero-poster {
    display: none;
  }

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

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

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

  .page-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 30px;
  }

  .rank-row {
    grid-template-columns: 56px 1fr;
  }

  .rank-meta {
    grid-column: 2;
  }
}

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

  .hero-slider,
  .hero-content {
    min-height: 620px;
  }

  .hero-copy p,
  .detail-one-line {
    font-size: 16px;
  }

  .movie-grid,
  .category-grid,
  .category-list-grid {
    grid-template-columns: 1fr;
  }

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

  .search-input-wrap {
    flex-direction: column;
  }

  .detail-hero,
  .detail-article,
  .side-panel,
  .page-hero {
    padding: 20px;
  }

  .info-table {
    grid-template-columns: 1fr;
  }

  .movie-card.compact {
    grid-template-columns: 86px 1fr;
  }
}
