* {
  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: #1f2937;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 45%, #f8fafc 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #7c3aed 0%, #2563eb 100%);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.22);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #7c2d12;
  background: linear-gradient(135deg, #facc15, #fb923c);
  box-shadow: 0 10px 24px rgba(251, 146, 60, 0.35);
}

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

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  transition: background 0.25s ease, color 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.header-search {
  position: relative;
  width: 236px;
}

.header-search input {
  width: 100%;
  height: 40px;
  border: 0;
  outline: 0;
  padding: 0 42px 0 18px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  transition: background 0.25s ease, width 0.25s ease;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.header-search input:focus {
  background: rgba(255, 255, 255, 0.25);
}

.header-search button {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 30px;
  height: 30px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: transparent;
  cursor: pointer;
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
}

.hero-slider {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.55) 46%, rgba(0, 0, 0, 0.08) 100%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  top: 50%;
  width: min(620px, calc(100% - 64px));
  transform: translateY(-50%);
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(90deg, #f97316, #ef4444);
  box-shadow: 0 10px 26px rgba(239, 68, 68, 0.36);
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p {
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
  line-height: 1.75;
}

.hero-actions,
.discover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-button,
.ghost-button,
.discover-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(90deg, #f97316, #ef4444);
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.35);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.primary-button:hover,
.ghost-button:hover,
.discover-actions a:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 20px 36px rgba(17, 24, 39, 0.22);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 30px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

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

.hero-dot.active {
  width: 34px;
  background: #f97316;
}

.section {
  padding: 72px 0;
}

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

.section-title.centered {
  display: block;
  text-align: center;
}

.section-title span,
.page-hero span,
.detail-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: #f97316;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-title h2,
.page-hero h1,
.rank-panel h2,
.side-card h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 3.8vw, 38px);
  line-height: 1.15;
}

.section-title p,
.page-hero p {
  max-width: 720px;
  margin: 10px auto 0;
  color: #6b7280;
  font-size: 17px;
  line-height: 1.7;
}

.section-title a {
  color: #f97316;
  font-weight: 800;
}

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

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

.category-card {
  position: relative;
  min-height: 186px;
  overflow: hidden;
  padding: 24px;
  border-radius: 24px;
  color: #ffffff;
  isolation: isolate;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.22);
}

.category-cover,
.category-mask {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
}

.category-mask {
  z-index: -1;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.8), rgba(37, 99, 235, 0.78));
}

.accent-pink .category-mask,
.accent-rose .category-mask {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.84), rgba(244, 63, 94, 0.76));
}

.accent-orange .category-mask,
.accent-amber .category-mask {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.86), rgba(245, 158, 11, 0.78));
}

.accent-blue .category-mask,
.accent-indigo .category-mask {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.86), rgba(79, 70, 229, 0.78));
}

.accent-red .category-mask {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.86), rgba(249, 115, 22, 0.76));
}

.accent-green .category-mask,
.accent-teal .category-mask {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.86), rgba(13, 148, 136, 0.76));
}

.accent-slate .category-mask,
.accent-stone .category-mask,
.accent-purple .category-mask {
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.88), rgba(124, 58, 237, 0.74));
}

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

.category-card em {
  display: block;
  color: rgba(255, 255, 255, 0.86);
  font-style: normal;
  line-height: 1.65;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.09);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.16);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #374151);
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.score-badge,
.rank-number {
  position: absolute;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  font-weight: 900;
}

.score-badge {
  right: 12px;
  top: 12px;
  min-width: 46px;
  height: 30px;
  color: #7c2d12;
  background: #fbbf24;
}

.rank-number {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.movie-info {
  padding: 18px;
}

.movie-meta-line,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 13px;
}

.movie-meta-line span,
.detail-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3f4f6;
}

.movie-card h3 {
  margin: 12px 0 8px;
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 14px;
  overflow: hidden;
  color: #6b7280;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span,
.detail-tags span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #374151;
  background: #f3f4f6;
  font-size: 12px;
}

.movie-card.wide {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
}

.movie-card.wide .movie-poster {
  aspect-ratio: auto;
  min-height: 214px;
}

.movie-card.compact {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  border-radius: 18px;
}

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

.movie-card.compact .movie-info {
  padding: 14px;
}

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

.movie-card.compact p,
.movie-card.compact .tag-row {
  display: none;
}

.movie-card.feature .movie-poster {
  aspect-ratio: 16 / 10;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  align-items: start;
}

.rank-panel,
.side-card {
  position: sticky;
  top: 96px;
  padding: 24px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
}

.rank-panel.double {
  position: static;
}

.rank-panel h2,
.side-card h2 {
  margin-bottom: 18px;
  font-size: 24px;
}

.mini-list {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}

.mini-item {
  display: grid;
  grid-template-columns: 28px 60px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  transition: background 0.25s ease;
}

.mini-item:hover {
  background: #f9fafb;
}

.mini-rank {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 900;
}

.mini-item img {
  width: 60px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.mini-item strong,
.mini-item em {
  display: block;
}

.mini-item strong {
  color: #111827;
  line-height: 1.4;
}

.mini-item em {
  margin-top: 4px;
  color: #6b7280;
  font-size: 12px;
  font-style: normal;
}

.editorial-block {
  width: min(1180px, calc(100% - 32px));
  padding: 40px;
  border-radius: 34px;
  background: linear-gradient(135deg, #fff7ed, #fee2e2);
}

.editor-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
}

.discover-band {
  margin-bottom: 72px;
  padding: 56px 32px;
  border-radius: 34px;
  text-align: center;
  color: #ffffff;
  background: linear-gradient(90deg, #f97316, #ef4444, #ec4899);
  box-shadow: 0 22px 60px rgba(239, 68, 68, 0.24);
}

.discover-band h2 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 46px);
}

.discover-band p {
  margin: 0 auto 26px;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.7;
}

.discover-actions {
  justify-content: center;
}

.discover-actions a {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.page-hero {
  color: #ffffff;
  padding: 86px 0;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
}

.page-hero.accent-orange {
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.page-hero.accent-blue,
.page-hero.accent-indigo {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
}

.page-hero.accent-purple {
  background: linear-gradient(135deg, #7c3aed, #ec4899);
}

.page-hero.accent-pink,
.page-hero.accent-rose {
  background: linear-gradient(135deg, #ec4899, #f43f5e);
}

.page-hero.accent-red {
  background: linear-gradient(135deg, #dc2626, #f97316);
}

.page-hero.accent-amber {
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

.page-hero.accent-green,
.page-hero.accent-teal {
  background: linear-gradient(135deg, #16a34a, #0d9488);
}

.page-hero.accent-slate,
.page-hero.accent-stone {
  background: linear-gradient(135deg, #334155, #78716c);
}

.page-hero h1,
.page-hero p,
.page-hero span {
  color: #ffffff;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 160px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.filter-bar.strong {
  margin-top: -36px;
}

.filter-bar input,
.filter-bar select {
  height: 46px;
  border: 1px solid #e5e7eb;
  outline: 0;
  border-radius: 999px;
  padding: 0 16px;
  color: #374151;
  background: #f9fafb;
}

.detail-page {
  padding: 32px 0 72px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 20px;
  color: #6b7280;
  font-size: 14px;
}

.breadcrumbs a {
  color: #f97316;
  font-weight: 700;
}

.breadcrumbs em {
  color: #374151;
  font-style: normal;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  padding: 0;
  color: #ffffff;
  background: #000000;
  cursor: pointer;
}

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

.player-dark {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
}

.play-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 20px 45px rgba(239, 68, 68, 0.35);
  font-size: 30px;
}

.player-shell.playing .player-cover {
  display: none;
}

.detail-card,
.side-card {
  margin-top: 24px;
  padding: 28px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.09);
}

.detail-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.detail-heading h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
}

.category-pill {
  flex: 0 0 auto;
  padding: 9px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, #f97316, #ef4444);
  font-weight: 800;
}

.detail-card section {
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid #e5e7eb;
}

.detail-card h2 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 22px;
}

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

.detail-side {
  min-width: 0;
}

.side-related {
  grid-template-columns: 1fr;
}

.site-footer {
  margin-top: 48px;
  color: #d1d5db;
  background: #111827;
}

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

.footer-brand {
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.footer-inner p {
  max-width: 480px;
  margin: 10px 0 0;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: start;
  justify-content: flex-end;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
}

@media (max-width: 1080px) {
  .category-grid,
  .movie-grid,
  .category-grid.large {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .split-section,
  .detail-layout,
  .editor-layout {
    grid-template-columns: 1fr;
  }

  .rank-panel,
  .side-card {
    position: static;
  }
}

@media (max-width: 820px) {
  .site-header-inner {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .mobile-menu-button {
    display: inline-flex;
  }

  .main-nav {
    order: 3;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
  }

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

  .header-search {
    order: 4;
    width: 100%;
  }

  .hero-slider {
    height: 560px;
  }

  .hero-content {
    left: 20px;
    width: calc(100% - 40px);
  }

  .hero-content p {
    font-size: 17px;
  }

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

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

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

  .section {
    padding: 48px 0;
  }

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

  .movie-card.wide,
  .movie-card.compact {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .hero-slider {
    height: 520px;
  }

  .hero-content h1 {
    font-size: 36px;
  }

  .page-hero {
    padding: 58px 0;
  }

  .detail-card,
  .side-card,
  .editorial-block {
    padding: 20px;
    border-radius: 22px;
  }

  .play-circle {
    width: 64px;
    height: 64px;
    font-size: 24px;
  }
}
