:root {
  --red: #dc2626;
  --red-dark: #b91c1c;
  --orange: #f97316;
  --yellow: #f59e0b;
  --text: #111827;
  --muted: #6b7280;
  --light: #f9fafb;
  --line: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: #f3f4f6;
}

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

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

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.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 210px;
}

.brand-mark,
.footer-brand span {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  font-weight: 900;
  font-size: 22px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 14px 25px rgba(220, 38, 38, 0.28);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  margin-left: 12px;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 20px;
  letter-spacing: -0.02em;
}

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

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #374151;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--red);
  background: #fef2f2;
}

.top-search {
  width: 300px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.top-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 8px 10px;
  background: transparent;
}

.top-search button,
.primary-btn {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: #fff;
  font-weight: 700;
  padding: 10px 18px;
  cursor: pointer;
  box-shadow: 0 14px 25px rgba(220, 38, 38, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-search button:hover,
.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(220, 38, 38, 0.3);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  color: #111827;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px 16px 18px;
  background: #fff;
}

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

.mobile-panel a,
.mobile-panel button {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f9fafb;
}

.mobile-panel form {
  display: grid;
  gap: 10px;
}

.mobile-panel input {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.hero-wrap {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at 16% 20%, rgba(255, 255, 255, 0.23), transparent 26%), linear-gradient(135deg, #b91c1c 0%, #ef4444 36%, #f97316 68%, #f59e0b 100%);
}

.hero-wrap::after {
  content: "";
  position: absolute;
  inset: auto -10% -36% -10%;
  height: 55%;
  background: rgba(255, 255, 255, 0.18);
  filter: blur(70px);
}

.hero-frame {
  position: relative;
  z-index: 1;
  min-height: 560px;
  padding: 70px 0 44px;
}

.hero-slide {
  display: none;
  align-items: center;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.75fr);
  gap: 52px;
  animation: fadeIn 0.45s ease both;
}

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

.hero-copy h1 {
  max-width: 760px;
  margin: 18px 0 12px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(24px, 3vw, 38px);
}

.hero-copy p {
  max-width: 760px;
  margin: 0 0 22px;
  color: #fff7ed;
  font-size: 18px;
  line-height: 1.8;
}

.hero-tag,
.section-kicker,
.inner-hero span {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  padding: 8px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-tags,
.detail-tags,
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.detail-tags a {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

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

.ghost-btn {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  font-weight: 700;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  min-height: 410px;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
  transform: perspective(900px) rotateY(-6deg) rotateX(2deg);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 410px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hero-poster:hover img {
  transform: scale(1.06);
}

.poster-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.74));
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

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

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

.hero-quick-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

.hero-quick-links a {
  padding: 9px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.section {
  padding: 58px 0;
}

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

.section-kicker {
  color: var(--red);
  background: #fef2f2;
  border-color: #fee2e2;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.04em;
}

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

.section-more {
  white-space: nowrap;
  color: var(--red);
  font-weight: 700;
}

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

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

.movie-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--card);
  border-radius: 18px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.movie-card figure {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

.movie-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.type-badge,
.rank-num {
  position: absolute;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  background: var(--red);
  font-size: 12px;
  font-weight: 800;
}

.rank-num {
  left: auto;
  right: 12px;
  min-width: 34px;
  text-align: center;
  background: rgba(17, 24, 39, 0.82);
}

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

.movie-card h3,
.movie-card h4 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card h4 {
  font-size: 15px;
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  gap: 10px;
  color: #9ca3af;
  margin-top: 12px;
  font-size: 13px;
}

.movie-card.rank {
  flex-direction: row;
  min-height: 142px;
}

.movie-card.rank figure {
  width: 42%;
  min-width: 150px;
  aspect-ratio: auto;
}

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

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

.category-link {
  display: block;
  padding: 18px;
}

.category-thumbs {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 0.9fr;
  gap: 8px;
  height: 156px;
  margin-bottom: 16px;
}

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

.category-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-card p {
  color: var(--muted);
  margin: 0;
  line-height: 1.65;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 18px;
}

.category-samples a {
  color: var(--red);
  background: #fef2f2;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 13px;
}

.inner-hero {
  color: #fff;
  padding: 72px 0;
  background: linear-gradient(135deg, #111827 0%, #7f1d1d 50%, #f97316 100%);
}

.inner-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(36px, 6vw, 58px);
  letter-spacing: -0.05em;
}

.inner-hero p {
  max-width: 820px;
  margin: 0;
  color: #fee2e2;
  font-size: 18px;
  line-height: 1.75;
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.crumb a:hover {
  color: #fff;
}

.toolbar,
.search-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.search-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.page-search {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: 0;
  padding: 14px 16px;
  background: #f9fafb;
}

.page-search:focus {
  border-color: #fca5a5;
  box-shadow: 0 0 0 4px #fee2e2;
}

.filter-chip {
  border: 1px solid #fee2e2;
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--red);
  background: #fff7f7;
  cursor: pointer;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: #fff;
  background: var(--red);
}

.empty-state {
  display: none;
  margin: 36px 0 0;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border-radius: 18px;
}

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

.detail-hero {
  color: #fff;
  padding: 64px 0;
  background: radial-gradient(circle at 70% 20%, rgba(249, 115, 22, 0.44), transparent 26%), linear-gradient(135deg, #030712 0%, #7f1d1d 55%, #ea580c 100%);
}

.detail-grid {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

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

.detail-intro h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.lead {
  max-width: 820px;
  margin: 0 0 22px;
  color: #fee2e2;
  font-size: 19px;
  line-height: 1.8;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.detail-tags {
  margin-bottom: 24px;
}

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

.player-card h2 {
  margin: 0;
  padding: 18px 22px;
  color: #fff;
  font-size: 22px;
}

.player-wrap {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.78));
}

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

.play-ring {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.play-ring span {
  width: 0;
  height: 0;
  margin-left: 7px;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 25px solid var(--red);
}

.player-cover strong {
  max-width: 80%;
  font-size: clamp(22px, 4vw, 40px);
  text-align: center;
}

.player-cover em {
  font-style: normal;
  color: #fee2e2;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  padding-bottom: 64px;
}

.text-panel,
.side-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.text-panel h2,
.side-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.text-panel p {
  margin: 0 0 24px;
  color: #374151;
  line-height: 1.9;
  font-size: 17px;
}

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

.side-list .movie-card {
  flex-direction: row;
}

.side-list .movie-card figure {
  width: 42%;
  min-width: 128px;
  aspect-ratio: auto;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
  padding: 48px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 900;
  font-size: 22px;
}

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

.site-footer h2 {
  color: #fff;
  font-size: 18px;
  margin: 0 0 14px;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.site-footer a:hover {
  color: #fca5a5;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .top-search {
    display: none;
  }

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

  .hero-poster {
    transform: none;
  }

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

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

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

  .desktop-nav {
    display: none;
  }

  .brand {
    min-width: 0;
  }

  .brand-copy small {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .hero-frame {
    min-height: auto;
    padding: 44px 0 34px;
  }

  .hero-slide {
    gap: 28px;
  }

  .hero-copy p,
  .lead,
  .inner-hero p {
    font-size: 16px;
  }

  .hero-poster,
  .hero-poster img {
    min-height: 300px;
  }

  .section {
    padding: 40px 0;
  }

  .section-head,
  .search-panel {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .movie-card.rank,
  .side-list .movie-card {
    min-height: 128px;
  }

  .movie-card.rank figure,
  .side-list .movie-card figure {
    min-width: 126px;
  }

  .detail-hero,
  .inner-hero {
    padding: 44px 0;
  }

  .detail-content {
    padding-bottom: 44px;
  }
}
