* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #0f172a;
  background: #f8fafc;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(16px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #991b1b);
  box-shadow: 0 14px 30px rgba(239, 68, 68, 0.3);
}

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

.main-nav a {
  padding: 9px 14px;
  border-radius: 999px;
  color: #e2e8f0;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(226, 232, 240, 0.2);
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 999px;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #0f172a;
}

.hero-slider {
  position: relative;
  min-height: 560px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  filter: saturate(1.05);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(127, 29, 29, 0.78) 48%, rgba(15, 23, 42, 0.72) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.06));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.55fr);
  align-items: center;
  gap: 42px;
  padding: 76px 0 94px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px 12px;
  border: 1px solid rgba(254, 202, 202, 0.35);
  border-radius: 999px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.35);
  font-size: 14px;
  font-weight: 700;
}

.hero-title {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  font-weight: 900;
}

.hero-movie-title {
  margin: 18px 0 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.12;
  font-weight: 850;
}

.hero-text {
  margin: 18px 0 0;
  max-width: 680px;
  color: #e2e8f0;
  font-size: 19px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fecaca;
  background: rgba(185, 28, 28, 0.28);
  border: 1px solid rgba(248, 113, 113, 0.22);
  font-size: 13px;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border: 0;
  border-radius: 12px;
  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: #fff;
  background: #dc2626;
  box-shadow: 0 18px 35px rgba(220, 38, 38, 0.32);
}

.btn-primary:hover {
  background: #b91c1c;
}

.btn-light {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.btn-ghost {
  color: #dc2626;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.hero-poster-card {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

.hero-poster-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-poster-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0));
}

.hero-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.hero-arrow {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 22px;
}

.hero-dot {
  width: 28px;
  height: 8px;
  border-radius: 999px;
  opacity: 0.55;
  transition: width 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 44px;
  opacity: 1;
  background: #ef4444;
}

.quick-strip {
  position: relative;
  z-index: 3;
  padding: 18px 0 26px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), #0f172a 35%);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.quick-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  color: #fff;
  background: rgba(30, 41, 59, 0.78);
  transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.quick-card:hover {
  transform: translateY(-3px);
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.58);
}

.page-hero {
  color: #fff;
  background: linear-gradient(135deg, #1e293b, #7f1d1d 58%, #0f172a);
  padding: 58px 0;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  color: #e2e8f0;
  font-size: 18px;
}

.section {
  padding: 64px 0;
}

.section-light {
  background: #fff;
}

.section-muted {
  background: #f1f5f9;
}

.section-dark {
  color: #fff;
  background: #0f172a;
}

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

.section-title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-dark .section-title {
  color: #fff;
}

.section-subtitle {
  margin: 8px 0 0;
  max-width: 700px;
  color: #64748b;
}

.section-dark .section-subtitle {
  color: #cbd5e1;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card.is-hidden {
  display: none;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.32s ease;
}

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

.poster-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: end;
  padding: 12px;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.08) 60%, transparent);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.movie-card:hover .poster-mask {
  opacity: 1;
}

.poster-year {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 8px;
  color: #fff;
  background: #dc2626;
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 10px 0 0;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 800;
}

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

.movie-meta {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

.movie-line {
  margin: 7px 0 0;
  color: #475569;
  font-size: 13px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-card {
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.14);
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  padding: 8px;
  background: #0f172a;
}

.category-preview img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
}

.category-body {
  padding: 22px;
}

.category-body h2,
.category-body h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 900;
}

.category-body p {
  margin: 10px 0 0;
  color: #64748b;
}

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

.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px 0 44px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  color: #0f172a;
  background: #fff;
  outline: none;
}

.search-box input:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.16);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  color: #94a3b8;
  transform: translateY(-50%);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button {
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #475569;
  background: #f8fafc;
  font-weight: 700;
}

.filter-button.is-active,
.filter-button:hover {
  color: #fff;
  border-color: #dc2626;
  background: #dc2626;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 58px 78px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #7f1d1d);
  font-weight: 900;
}

.ranking-item img {
  width: 78px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.ranking-item h2,
.ranking-item h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.score {
  color: #dc2626;
  font-size: 20px;
  font-weight: 900;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #64748b;
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.7fr);
  gap: 28px;
  align-items: start;
}

.player-card {
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
}

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

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 100%;
  height: 100%;
  border: 0;
  color: #fff;
  background: #020617;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.56) saturate(1.1);
}

.play-mark {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  color: #fff;
  background: #dc2626;
  font-size: 34px;
  box-shadow: 0 20px 42px rgba(220, 38, 38, 0.42);
}

.player-title {
  position: absolute;
  z-index: 2;
  left: 24px;
  right: 24px;
  bottom: 24px;
  text-align: left;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 900;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.65);
}

.detail-side,
.content-card {
  border-radius: 24px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.detail-side {
  overflow: hidden;
}

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

.detail-info {
  padding: 22px;
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.12;
  font-weight: 900;
}

.detail-meta {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  color: #475569;
  font-size: 15px;
}

.content-card {
  padding: 28px;
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 900;
}

.content-card p + h2 {
  margin-top: 30px;
}

.content-card p {
  margin: 0;
  color: #334155;
  font-size: 17px;
  line-height: 1.85;
}

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

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
}

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

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

.footer-grid p,
.footer-grid a {
  color: #94a3b8;
  font-size: 14px;
}

.footer-grid a:hover {
  color: #f87171;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  font-size: 14px;
}

.empty-state {
  display: none;
  padding: 28px;
  border-radius: 18px;
  color: #64748b;
  background: #fff;
  border: 1px solid #e2e8f0;
  text-align: center;
}

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

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

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

  .detail-side {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .header-inner {
    min-height: 64px;
  }

  .mobile-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  }

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

  .main-nav a {
    border-radius: 12px;
  }

  .hero-slider {
    min-height: 680px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 48px 0 104px;
  }

  .hero-poster-card {
    max-width: 260px;
    transform: rotate(0deg);
  }

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

  .ranking-item {
    grid-template-columns: 42px 64px minmax(0, 1fr);
  }

  .ranking-item .score {
    grid-column: 3;
  }
}

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

  .section {
    padding: 44px 0;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

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

  .detail-side {
    display: block;
  }

  .content-card {
    padding: 20px;
  }

  .hero-actions,
  .section-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .play-mark {
    width: 66px;
    height: 66px;
    font-size: 28px;
  }

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