* {
  box-sizing: border-box;
}

:root {
  --red: #dc2626;
  --red-dark: #b91c1c;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --shadow: 0 16px 45px rgba(41, 37, 36, 0.12);
  --soft-shadow: 0 8px 28px rgba(41, 37, 36, 0.08);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--stone-50);
  color: var(--stone-800);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

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: 80;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--stone-200);
  box-shadow: 0 4px 18px rgba(41, 37, 36, 0.06);
  backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--red);
}

.brand-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-icon.small {
  width: 30px;
  height: 30px;
}

.brand-text {
  display: grid;
}

.brand-text strong,
.footer-brand strong {
  font-size: 20px;
  font-weight: 800;
  color: var(--stone-800);
  line-height: 1.1;
}

.brand-text small {
  margin-top: 2px;
  color: var(--stone-500);
  font-size: 12px;
}

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

.nav-link,
.mobile-nav-link {
  color: var(--stone-600);
  font-size: 15px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

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

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

.site-search input,
.mobile-search input,
.hero-search input {
  width: 210px;
  border: 1px solid var(--stone-200);
  border-radius: 12px;
  background: var(--stone-100);
  padding: 10px 12px;
  color: var(--stone-800);
  outline: 0;
}

.site-search input:focus,
.mobile-search input:focus,
.hero-search input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.site-search button,
.mobile-search button,
.hero-search button,
.primary-button,
.ghost-button,
.more-link,
.rank-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.site-search button,
.mobile-search button,
.hero-search button,
.primary-button,
.rank-action {
  background: var(--red);
  color: #fff;
  padding: 10px 16px;
}

.site-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.primary-button:hover,
.rank-action:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

.ghost-button,
.more-link {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.more-link {
  color: var(--red);
  background: #fff;
  border-color: var(--stone-200);
}

.more-link:hover {
  border-color: var(--red);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--stone-100);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--stone-700);
}

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

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

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mobile-nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
}

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

.hero {
  background: var(--stone-900);
}

.hero-viewport {
  position: relative;
  min-height: 630px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  background-position: center;
  background-size: cover;
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.38) 48%, rgba(0, 0, 0, 0.14)), linear-gradient(0deg, rgba(0, 0, 0, 0.92), transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 86px;
  color: #fff;
}

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

.section-kicker {
  margin-bottom: 12px;
}

.hero h1 {
  max-width: 820px;
  margin: 18px 0 14px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 760px;
  margin: 0 0 22px;
  color: #e7e5e4;
  font-size: clamp(17px, 2vw, 23px);
}

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

.hero-tags span,
.detail-tags a,
.tag-row span {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.tag-row span {
  background: #fef2f2;
  color: var(--red);
}

.detail-tags a {
  background: #fff;
  color: var(--red);
  border: 1px solid var(--stone-200);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
  font-size: 36px;
  line-height: 1;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  right: 50%;
  bottom: 32px;
  z-index: 5;
  display: flex;
  gap: 8px;
  transform: translateX(50%);
}

.hero-dots button {
  width: 32px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: #fff;
}

.quick-cats {
  background: #fff;
  border-bottom: 1px solid var(--stone-200);
}

.quick-cats-inner {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 18px 0;
}

.quick-cats a {
  flex: 0 0 auto;
  border: 1px solid var(--stone-200);
  border-radius: 999px;
  background: var(--stone-50);
  padding: 8px 14px;
  color: var(--stone-700);
  font-weight: 800;
}

.quick-cats a:hover {
  border-color: var(--red);
  color: var(--red);
}

.main-layout,
.content-section,
.category-overview,
.detail-layout {
  padding-top: 42px;
  padding-bottom: 42px;
}

.content-section + .content-section {
  padding-top: 22px;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading h2,
.page-hero h1,
.detail-hero h1 {
  margin: 0;
  color: var(--stone-800);
  line-height: 1.14;
}

.section-heading h2 {
  font-size: clamp(26px, 3.8vw, 38px);
}

.section-heading.split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card,
.search-card,
.rank-item,
.article-panel,
.side-panel {
  background: #fff;
  border: 1px solid var(--stone-200);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(220, 38, 38, 0.28);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  background: var(--stone-200);
  overflow: hidden;
}

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

.poster-link img,
.rank-poster img,
.search-thumb img,
.detail-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link img {
  transition: transform 0.35s ease;
}

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

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 22px rgba(220, 38, 38, 0.35);
}

.card-body {
  padding: 15px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--stone-500);
  font-size: 12px;
  font-weight: 700;
}

.movie-card h2,
.search-card h2,
.rank-item h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

.movie-card-medium h2,
.movie-card-small h2 {
  font-size: 16px;
}

.movie-card h2 a:hover,
.search-card h2 a:hover,
.rank-item h2 a:hover {
  color: var(--red);
}

.movie-card p,
.search-card p,
.rank-item p,
.article-panel p,
.side-panel p {
  margin: 0 0 12px;
  color: var(--stone-600);
}

.card-category {
  display: inline-flex;
  margin-top: 14px;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

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

.search-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  padding: 12px;
}

.search-thumb {
  display: block;
  height: 132px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--stone-200);
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 82px 58px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
}

.rank-poster {
  display: block;
  height: 112px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--stone-200);
}

.rank-index {
  color: var(--red);
  font-size: 28px;
  font-weight: 900;
}

.rank-action {
  align-self: center;
}

.page-hero {
  padding: 64px 0;
  background: linear-gradient(135deg, #fff, #fff7f7 48%, #f5f5f4);
  border-bottom: 1px solid var(--stone-200);
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--stone-600);
  font-size: 18px;
}

.breadcrumb {
  margin-bottom: 18px;
  color: var(--stone-600);
  font-size: 14px;
}

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

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

.category-bg,
.category-mask {
  position: absolute;
  inset: 0;
}

.category-bg {
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
  transition: transform 0.3s ease;
}

.category-mask {
  background: linear-gradient(90deg, rgba(28, 25, 23, 0.86), rgba(28, 25, 23, 0.34));
}

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

.category-text {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: end;
  min-height: 220px;
  padding: 28px;
  color: #fff;
}

.category-text strong {
  font-size: 30px;
  line-height: 1.2;
}

.category-text em {
  max-width: 560px;
  margin-top: 8px;
  color: #e7e5e4;
  font-style: normal;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-chip {
  border: 1px solid var(--stone-200);
  border-radius: 999px;
  background: #fff;
  color: var(--stone-700);
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 800;
}

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

[data-card].is-hidden {
  display: none !important;
}

.search-hero .hero-search {
  margin-top: 24px;
}

.search-hero .hero-search input {
  width: min(520px, 68vw);
  background: #fff;
}

.detail-hero {
  position: relative;
  min-height: 570px;
  background-position: center;
  background-size: cover;
  color: #fff;
}

.detail-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.42)), linear-gradient(0deg, rgba(0, 0, 0, 0.88), transparent 70%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 54px 0 64px;
}

.detail-hero .breadcrumb,
.detail-hero .breadcrumb a {
  color: #e7e5e4;
}

.detail-intro {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 34px;
  align-items: end;
  margin-top: 34px;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  border-radius: 24px;
  background: var(--stone-300);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
}

.detail-hero h1 {
  color: #fff;
  font-size: clamp(36px, 6vw, 64px);
}

.detail-line {
  max-width: 830px;
  margin: 16px 0 18px;
  color: #e7e5e4;
  font-size: 20px;
}

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

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

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

.detail-main,
.detail-side {
  display: grid;
  gap: 22px;
  align-content: start;
}

.player-section,
.article-panel,
.side-panel {
  padding: 22px;
}

.player-section {
  background: #fff;
  border: 1px solid var(--stone-200);
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
}

.player-section h2,
.article-panel h2,
.side-panel h2 {
  margin: 0 0 16px;
  color: var(--stone-800);
}

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

.player-box video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.48));
  cursor: pointer;
}

.player-cover span {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 34px;
  box-shadow: 0 18px 45px rgba(220, 38, 38, 0.35);
}

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

.side-panel dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 14px;
  margin: 0;
}

.side-panel dt {
  color: var(--stone-500);
  font-weight: 800;
}

.side-panel dd {
  margin: 0;
  color: var(--stone-800);
}

.site-footer {
  margin-top: 56px;
  background: var(--stone-900);
  color: var(--stone-300);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 48px 0 32px;
}

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

.site-footer p {
  margin: 10px 0 0;
  color: var(--stone-300);
}

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

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

.site-footer .footer-brand strong {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 0 24px;
  color: var(--stone-500);
}

.footer-bottom p {
  margin: 0;
}

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

  .menu-toggle {
    display: block;
  }

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

  .rank-list.compact {
    grid-template-columns: 1fr;
  }

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

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

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

  .brand-icon {
    width: 34px;
    height: 34px;
  }

  .brand-text strong {
    font-size: 17px;
  }

  .brand-text small {
    display: none;
  }

  .hero-viewport {
    min-height: 560px;
  }

  .hero-content {
    padding-bottom: 78px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-actions,
  .section-heading.split {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .movie-card-large .poster-link {
    aspect-ratio: 2 / 3;
  }

  .card-body {
    padding: 12px;
  }

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

  .search-card,
  .rank-item {
    grid-template-columns: 76px 1fr;
  }

  .search-thumb,
  .rank-poster {
    height: 106px;
  }

  .rank-index,
  .rank-action {
    display: none;
  }

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

  .detail-poster {
    width: min(240px, 70vw);
  }

  .detail-line {
    font-size: 17px;
  }

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

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

  .featured-grid,
  .medium-grid,
  .small-grid,
  .category-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .card-meta {
    font-size: 11px;
  }

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

  .player-section,
  .article-panel,
  .side-panel {
    padding: 16px;
  }
}