:root {
  --bg: #fffaf0;
  --paper: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #fed7aa;
  --accent: #f97316;
  --accent-dark: #c2410c;
  --soft: #ffedd5;
  --dark: #111827;
  --shadow: 0 20px 45px rgba(124, 45, 18, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at top left, #fff7ed 0, #fffaf0 34%, #ffffff 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 237, 213, 0.96), rgba(255, 251, 235, 0.96));
  border-bottom: 1px solid rgba(251, 146, 60, 0.22);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 28px rgba(154, 52, 18, 0.08);
}

.nav-shell {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #ffffff;
  background: linear-gradient(135deg, #fb923c, #ea580c);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(234, 88, 12, 0.28);
}

.brand-text {
  font-size: 22px;
}

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

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

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--accent-dark);
  background: rgba(255, 237, 213, 0.9);
}

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

.top-search input,
.mobile-search input,
.filter-search input,
.filter-search select {
  min-width: 230px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  outline: none;
}

.filter-search select {
  min-width: 150px;
}

.top-search input:focus,
.mobile-search input:focus,
.filter-search input:focus,
.filter-search select:focus {
  border-color: #fb923c;
  box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.18);
}

.top-search button,
.mobile-search button,
.filter-search button,
.primary-button,
.secondary-button,
.play-cover {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button,
.mobile-search button,
.filter-search button,
.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, #fb923c, #ea580c);
  box-shadow: 0 12px 22px rgba(234, 88, 12, 0.22);
}

.top-search button,
.mobile-search button,
.filter-search button {
  height: 40px;
  padding: 0 16px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
}

.secondary-button {
  color: #7c2d12;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(251, 146, 60, 0.36);
}

.top-search button:hover,
.mobile-search button:hover,
.filter-search button:hover,
.primary-button:hover,
.secondary-button:hover,
.play-cover:hover {
  transform: translateY(-2px);
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font-size: 28px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
}

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

.hero-slider {
  position: relative;
  min-height: 640px;
}

.hero-slide {
  display: none;
  min-height: 640px;
  position: relative;
}

.hero-slide.is-active {
  display: block;
}

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 38%, rgba(251, 146, 60, 0.28), transparent 32%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.62) 48%, rgba(17, 24, 39, 0.20));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  min-height: 640px;
  max-width: 850px;
  padding: 86px 0 80px;
}

.hero-kicker,
.section-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 12px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-kicker {
  color: #fed7aa;
  background: rgba(154, 52, 18, 0.42);
  border: 1px solid rgba(253, 186, 116, 0.34);
}

.hero h1,
.hero h2 {
  margin: 16px 0 10px;
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(38px, 7vw, 72px);
}

.hero h2 {
  font-size: clamp(34px, 6vw, 60px);
}

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

.hero-meta,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 24px;
}

.hero-meta span,
.detail-meta span,
.rank-meta span {
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 13px;
  font-weight: 700;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-controls button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.46);
  cursor: pointer;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 26px;
  border-radius: 999px;
  background: #fb923c;
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: linear-gradient(180deg, rgba(255, 237, 213, 0.44), rgba(255, 255, 255, 0));
}

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

.section-head h1,
.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 10px 0 0;
  color: var(--dark);
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.section-head h2,
.page-title h1 {
  font-size: clamp(30px, 4vw, 44px);
}

.section-head p,
.page-title p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

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

.movie-card {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(251, 146, 60, 0.22);
  border-radius: 24px;
  box-shadow: 0 14px 30px rgba(124, 45, 18, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(249, 115, 22, 0.48);
  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.05);
}

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  color: #ffffff;
  background: rgba(234, 88, 12, 0.92);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

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

.movie-card h2,
.movie-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h2 a,
.movie-card h3 a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta,
.card-desc {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 13px;
}

.card-tags span,
.tag-list span {
  padding: 4px 8px;
  color: #9a3412;
  background: #ffedd5;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  min-height: 160px;
  padding: 22px;
  border-radius: 24px;
  color: #7c2d12;
  background: linear-gradient(135deg, #fff7ed, #fed7aa);
  border: 1px solid rgba(251, 146, 60, 0.28);
  box-shadow: 0 14px 30px rgba(124, 45, 18, 0.08);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  color: #7c2d12;
}

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

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.category-chip {
  padding: 8px 13px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-weight: 800;
}

.filter-bar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px;
  margin: 24px 0 28px;
  border: 1px solid rgba(251, 146, 60, 0.22);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
}

.page-title {
  padding: 58px 0 20px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 70px 110px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(251, 146, 60, 0.22);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: #ffffff;
  background: linear-gradient(135deg, #fb923c, #ea580c);
  border-radius: 18px;
  font-weight: 900;
  font-size: 20px;
}

.rank-cover {
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  object-fit: cover;
}

.rank-info h2 {
  margin: 0 0 6px;
  font-size: 21px;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
}

.detail-hero {
  padding: 54px 0 34px;
  background:
    radial-gradient(circle at top right, rgba(251, 146, 60, 0.24), transparent 36%),
    linear-gradient(180deg, #fff7ed, #ffffff);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: #9a3412;
  font-weight: 700;
  font-size: 14px;
}

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

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(251, 146, 60, 0.3);
}

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

.detail-title h1 {
  margin-top: 12px;
  font-size: clamp(34px, 5vw, 58px);
}

.detail-title p {
  max-width: 850px;
  color: #4b5563;
  font-size: 18px;
}

.detail-meta span {
  color: #7c2d12;
  background: rgba(255, 237, 213, 0.96);
  border-color: rgba(251, 146, 60, 0.26);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.content-panel {
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(251, 146, 60, 0.22);
  box-shadow: 0 14px 30px rgba(124, 45, 18, 0.08);
}

.content-panel h2 {
  margin: 0 0 12px;
  color: var(--dark);
}

.content-panel p {
  margin: 0 0 16px;
  color: #374151;
}

.player-section {
  padding: 44px 0 20px;
  background: #111827;
  color: #ffffff;
}

.player-section h2 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4vw, 42px);
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #030712;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

.player-box video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #030712;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.24), rgba(17, 24, 39, 0.78));
  font-size: 20px;
}

.play-cover.is-hidden {
  display: none;
}

.play-cover span {
  display: inline-grid;
  place-items: center;
  width: 86px;
  height: 86px;
  margin-right: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fb923c, #ea580c);
  box-shadow: 0 18px 34px rgba(234, 88, 12, 0.38);
}

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

.compact-card {
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(251, 146, 60, 0.18);
}

.compact-card img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.compact-card span {
  display: block;
  padding: 10px;
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.no-result {
  display: none;
  padding: 32px;
  text-align: center;
  color: var(--muted);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px dashed rgba(251, 146, 60, 0.38);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
  padding: 46px 0;
}

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

.footer-grid p {
  max-width: 480px;
  margin: 12px 0 0;
  color: #9ca3af;
}

.footer-grid a:not(.footer-brand) {
  display: block;
  margin: 7px 0;
  color: #d1d5db;
}

.footer-brand {
  color: #ffffff;
  font-size: 24px;
}

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

@media (max-width: 980px) {
  .main-nav,
  .top-search {
    display: none;
  }

  .menu-button {
    display: block;
  }

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

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

  .mobile-search input {
    flex: 1;
    min-width: 0;
  }

  .mobile-link {
    display: block;
    margin: 6px 0;
  }

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

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

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

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

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

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

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

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

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

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

  .rank-item {
    grid-template-columns: 52px 82px 1fr;
  }

  .rank-item .primary-button {
    grid-column: 1 / -1;
  }

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

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

@media (max-width: 460px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .filter-search {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-search input,
  .filter-search select {
    width: 100%;
    min-width: 0;
  }
}
