:root {
  --bg: #fff7ed;
  --bg-strong: #ffedd5;
  --panel: rgba(255, 255, 255, 0.88);
  --text: #1f2937;
  --muted: #6b7280;
  --line: rgba(251, 146, 60, 0.22);
  --orange: #f97316;
  --amber: #f59e0b;
  --red: #ef4444;
  --shadow: 0 22px 60px rgba(154, 52, 18, 0.13);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(251, 146, 60, 0.18), transparent 30rem),
    linear-gradient(180deg, #fff7ed 0%, #ffffff 38%, #fff7ed 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.28);
}

.brand-copy {
  display: grid;
  line-height: 1.1;
}

.brand-copy strong {
  font-size: 20px;
  background: linear-gradient(135deg, #ea580c, #d97706);
  -webkit-background-clip: text;
  color: transparent;
}

.brand-copy em {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  font-style: normal;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 15px;
  font-weight: 650;
  color: #4b5563;
}

.main-nav a,
.mobile-panel a,
.footer-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
  color: var(--orange);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #fff3e6;
  color: #c2410c;
  font-size: 24px;
}

.mobile-panel {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

.mobile-panel.open {
  display: grid;
  gap: 12px;
}

main {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 620px;
  margin: 34px auto 48px;
  border-radius: 34px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(124, 45, 18, 0.92), rgba(251, 146, 60, 0.86)),
    radial-gradient(circle at 80% 12%, rgba(255, 255, 255, 0.32), transparent 18rem);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  padding: 64px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.08));
  z-index: 1;
}

.hero-copy,
.hero-art {
  position: relative;
  z-index: 2;
}

.hero-kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  max-width: 720px;
  margin: 22px 0 18px;
  color: #fff;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.9;
}

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

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

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

.btn-primary {
  color: #9a3412;
  background: #fff;
  box-shadow: 0 18px 36px rgba(255, 255, 255, 0.22);
}

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

.hero-art {
  justify-self: end;
  width: min(420px, 100%);
}

.hero-art .cover {
  aspect-ratio: 3 / 4;
  border-radius: 30px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
  transform: rotate(2deg);
}

.hero-tabs {
  position: absolute;
  left: 64px;
  right: 64px;
  bottom: 34px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
}

.hero-tab {
  min-height: 72px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(12px);
  cursor: pointer;
  text-align: left;
}

.hero-tab.active {
  background: rgba(255, 255, 255, 0.28);
}

.hero-tab strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hero-tab span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.15;
}

.section-desc {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.search-panel {
  margin: 28px 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 16px 45px rgba(154, 52, 18, 0.08);
  backdrop-filter: blur(14px);
}

.search-label {
  display: block;
  margin-bottom: 10px;
  color: #9a3412;
  font-weight: 800;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 12px;
}

.search-row input,
.search-row select {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: #fff;
  outline: none;
}

.search-row input:focus,
.search-row select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.search-count {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.category-card {
  min-height: 160px;
  padding: 22px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 70px rgba(154, 52, 18, 0.19);
}

.category-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.7;
}

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

.movie-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 16px 45px rgba(154, 52, 18, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 28px 65px rgba(154, 52, 18, 0.16);
}

.movie-poster {
  position: relative;
  display: block;
  overflow: hidden;
}

.cover {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fed7aa, #fb923c, #7c2d12);
}

.card-cover {
  aspect-ratio: 3 / 4;
}

.cover img,
.cover-fallback {
  width: 100%;
  height: 100%;
}

.cover img {
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.cover-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 52px;
  font-weight: 900;
}

.score-badge,
.play-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.score-badge {
  top: 12px;
  left: 12px;
  min-width: 42px;
  height: 28px;
  padding: 0 10px;
  color: #fff;
  background: rgba(234, 88, 12, 0.92);
  font-size: 13px;
  font-weight: 900;
}

.play-badge {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  color: #fff;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(10px);
}

.movie-body {
  padding: 16px;
}

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

.movie-body p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.meta-line,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.meta-line span,
.tag-row span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
  font-weight: 700;
}

.tag-row {
  margin-top: 10px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px minmax(160px, 1fr) minmax(120px, 0.8fr) 80px;
  gap: 14px;
  align-items: center;
  min-height: 58px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(154, 52, 18, 0.06);
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  font-weight: 900;
}

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

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

.rank-item strong {
  color: #c2410c;
  text-align: right;
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 34px;
  align-items: stretch;
  margin: 34px 0;
  padding: 28px;
  border-radius: 32px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(124, 45, 18, 0.94), rgba(251, 146, 60, 0.84)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.28), transparent 20rem);
  box-shadow: var(--shadow);
}

.detail-hero .cover {
  border-radius: 28px;
  aspect-ratio: 3 / 4;
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.26);
}

.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.06;
}

.detail-copy p {
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.9;
  font-size: 17px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.detail-tags span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.player-panel,
.content-panel {
  margin: 28px 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(154, 52, 18, 0.09);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.52));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.player-play {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border: 0;
  border-radius: 999px;
  color: #9a3412;
  background: #fff;
  font-weight: 900;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.26);
}

.content-panel h2,
.player-panel h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.content-panel p {
  color: #4b5563;
  line-height: 1.95;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 36px 0 10px;
}

.pagination a,
.pagination span {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: #9a3412;
  font-weight: 800;
}

.pagination .current {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
}

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

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand {
  margin-bottom: 10px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.footer-inner p {
  max-width: 560px;
  margin: 0;
  color: #9ca3af;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-content: flex-start;
  color: #d1d5db;
}

.empty-result {
  display: none;
  margin: 28px 0;
  padding: 28px;
  border-radius: 22px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 42px;
  }

  .hero-art {
    display: none;
  }

  .hero-tabs {
    grid-template-columns: repeat(4, 1fr);
    left: 32px;
    right: 32px;
  }

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

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

@media (max-width: 760px) {
  .header-inner {
    height: 66px;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .hero {
    min-height: 720px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 28px;
  }

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

  .hero-tabs {
    grid-template-columns: 1fr 1fr;
    left: 18px;
    right: 18px;
    bottom: 18px;
  }

  .section-head {
    display: block;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .category-grid,
  .movie-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .movie-body {
    padding: 12px;
  }

  .movie-body p {
    min-height: auto;
  }

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

  .rank-meta,
  .rank-item strong {
    grid-column: 2;
    text-align: left;
  }

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

  .detail-hero .cover {
    max-width: 260px;
    margin: 0 auto;
  }

  .footer-inner {
    display: block;
  }

  .footer-links {
    margin-top: 24px;
  }
}

@media (max-width: 460px) {
  main,
  .header-inner,
  .mobile-panel,
  .footer-inner {
    width: min(100% - 20px, 1240px);
  }

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

  .hero {
    min-height: 760px;
  }

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