* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #111827;
  background: linear-gradient(135deg, #f9fafb 0%, #eef2f7 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-shell {
  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);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #dc2626, #db2777);
  box-shadow: 0 12px 22px rgba(220, 38, 38, 0.26);
}

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

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

.brand-text small {
  margin-top: 4px;
  color: #6b7280;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #374151;
  font-weight: 600;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
  color: #dc2626;
}

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

.mobile-nav {
  display: none;
  padding: 10px 16px 18px;
  border-top: 1px solid #e5e7eb;
}

.mobile-nav.is-open {
  display: grid;
  gap: 6px;
}

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 10px;
  color: #374151;
  font-weight: 600;
}

.mobile-nav a:hover,
.mobile-nav a.is-active {
  color: #dc2626;
  background: #f9fafb;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.55) 42%, rgba(0, 0, 0, 0.15) 100%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 72px;
}

.hero-copy {
  max-width: 720px;
  color: #ffffff;
}

.hero-tags,
.detail-meta,
.badge-row,
.card-meta,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-tags span {
  padding: 6px 12px;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 700;
}

.hero-tags span:first-child {
  background: #dc2626;
}

.hero h1,
.hero h2 {
  margin: 18px 0 14px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
  text-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
}

.hero p {
  max-width: 640px;
  margin: 0 0 26px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions,
.section-head,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-actions {
  justify-content: flex-start;
}

.primary-btn,
.ghost-btn,
.search-bar button,
.back-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.search-bar button,
.back-top {
  color: #ffffff;
  background: linear-gradient(90deg, #dc2626, #db2777);
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.24);
}

.primary-btn,
.ghost-btn {
  min-height: 46px;
  padding: 0 28px;
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.primary-btn:hover,
.ghost-btn:hover,
.search-bar button:hover,
.back-top:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 36px;
  line-height: 1;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: #ffffff;
}

.quick-search {
  padding: 34px 0 8px;
}

.search-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.search-bar input,
.filter-panel input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0 16px;
  outline: none;
  color: #111827;
  background: #f9fafb;
}

.search-bar input:focus,
.filter-panel input:focus {
  border-color: #f43f5e;
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.search-bar button {
  min-width: 110px;
  padding: 0 24px;
}

.category-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.category-pills a,
.category-card,
.content-section.raised,
.detail-panel,
.side-card,
.player-card,
.poster-box,
.ranking-panel {
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.category-pills a {
  display: grid;
  gap: 8px;
  padding: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-pills a:hover,
.category-card:hover,
.movie-card:hover {
  transform: translateY(-4px);
}

.category-pills strong {
  color: #111827;
  font-size: 18px;
}

.category-pills span {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.6;
}

.section-stack {
  padding: 36px 0 64px;
  display: grid;
  gap: 48px;
}

.content-section {
  padding: 0;
}

.content-section.raised,
.content-section.soft,
.ranking-panel {
  padding: 28px;
}

.content-section.soft {
  border-radius: 22px;
  background: linear-gradient(90deg, #eff6ff, #faf5ff);
}

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

.section-head h2,
.page-hero h1,
.detail-panel h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.2;
}

.section-more {
  color: #dc2626;
  font-weight: 800;
}

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

.large-grid {
  padding-bottom: 54px;
}

.movie-card {
  min-width: 0;
  cursor: pointer;
  transition: transform 0.22s ease;
}

.movie-card a {
  display: grid;
  gap: 10px;
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #111827, #374151);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.1));
  transition: opacity 0.25s ease;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.75);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.badge-row {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
}

.badge-row span {
  padding: 4px 8px;
  border-radius: 7px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 700;
}

.badge-row span:first-child {
  background: #dc2626;
}

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

.movie-card:hover .poster-shade,
.movie-card:hover .play-mark {
  opacity: 1;
}

.movie-card:hover .play-mark {
  transform: translate(-50%, -50%) scale(1);
}

.card-title {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  color: #111827;
  font-weight: 700;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover .card-title {
  color: #dc2626;
}

.card-meta {
  color: #6b7280;
  font-size: 12px;
}

.card-meta span:first-child {
  padding: 3px 8px;
  border-radius: 999px;
  color: #374151;
  background: #f3f4f6;
}

.ranking-panel ol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-panel li a {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  row-gap: 4px;
  padding: 14px;
  border-radius: 14px;
  background: #f9fafb;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-panel li a:hover {
  background: #fff1f2;
  transform: translateY(-2px);
}

.ranking-panel span {
  grid-row: span 2;
  color: #dc2626;
  font-size: 20px;
  font-weight: 900;
}

.ranking-panel strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-panel em {
  color: #6b7280;
  font-size: 13px;
  font-style: normal;
}

.page-main {
  min-height: 70vh;
  padding: 42px 0 70px;
}

.page-hero {
  margin-bottom: 28px;
  padding: 34px;
  border-radius: 24px;
  color: #111827;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.small-hero {
  background: linear-gradient(135deg, #fee2e2, #fdf2f8);
}

.page-hero p {
  max-width: 780px;
  color: #4b5563;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  color: #6b7280;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #dc2626;
}

.filter-panel {
  margin-top: 20px;
}

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

.category-card {
  padding: 22px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card h2 {
  margin: 0 0 10px;
}

.category-card p {
  min-height: 76px;
  color: #4b5563;
  line-height: 1.7;
}

.category-sample {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.category-sample a {
  overflow: hidden;
  color: #dc2626;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.empty-state {
  display: none;
  margin: 30px 0 0;
  padding: 22px;
  border-radius: 18px;
  color: #6b7280;
  text-align: center;
  background: #ffffff;
}

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

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

.detail-primary {
  display: grid;
  gap: 22px;
}

.player-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
  object-fit: contain;
  cursor: pointer;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #111827;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.18));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 999px;
  color: #111827;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.32);
  font-size: 32px;
}

.player-start.is-hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.detail-panel {
  padding: 30px;
}

.detail-panel h1 {
  margin-bottom: 16px;
}

.detail-panel h2 {
  margin: 28px 0 10px;
  font-size: 20px;
}

.detail-panel p {
  margin: 0;
  color: #374151;
  line-height: 1.9;
}

.detail-meta span {
  padding: 6px 11px;
  border-radius: 999px;
  color: #7f1d1d;
  background: #fee2e2;
  font-size: 13px;
  font-weight: 700;
}

.review-text {
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(90deg, #eff6ff, #faf5ff);
  font-style: italic;
}

.tag-list {
  margin-top: 24px;
}

.tag-list span {
  padding: 6px 12px;
  border-radius: 999px;
  color: #374151;
  background: #f3f4f6;
  font-size: 13px;
  font-weight: 700;
}

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

.poster-box {
  overflow: hidden;
}

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

.side-card {
  position: sticky;
  top: 90px;
  padding: 22px;
}

.side-card h2 {
  margin: 0 0 16px;
}

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

.side-recommend .card-title {
  font-size: 13px;
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-inner {
  min-height: 96px;
  padding: 24px 0;
}

.footer-inner p {
  margin: 0;
  color: #9ca3af;
}

.back-top {
  min-height: 40px;
  padding: 0 18px;
}

@media (max-width: 1080px) {
  .desktop-nav {
    gap: 12px;
    font-size: 14px;
  }

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

  .category-pills,
  .category-layout {
    grid-template-columns: repeat(2, 1fr);
  }

  .ranking-panel ol {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .detail-side {
    grid-template-columns: 220px 1fr;
    align-items: start;
  }
}

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

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

  .hero {
    height: 78vh;
    min-height: 560px;
  }

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

  .hero-arrow {
    display: none;
  }

  .category-pills,
  .category-layout,
  .ranking-panel ol,
  .detail-side {
    grid-template-columns: 1fr;
  }

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

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

  .brand-text small {
    display: none;
  }

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

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

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

  .hero-actions,
  .section-head,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .quick-search {
    padding-top: 22px;
  }

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

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

  .content-section.raised,
  .content-section.soft,
  .ranking-panel,
  .page-hero,
  .detail-panel {
    padding: 20px;
    border-radius: 18px;
  }

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

  .player-start span {
    width: 66px;
    height: 66px;
    font-size: 26px;
  }
}
