* {
  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(135deg, #f8fafc 0%, #ffffff 45%, #f9fafb 100%);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(248, 250, 252, 0.95), rgba(249, 250, 251, 0.95));
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #dc2626, #e11d48);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 18px;
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.28);
  transition: transform 0.3s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.08);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 20px;
  color: #1f2937;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.nav-link {
  color: #374151;
  font-weight: 600;
  font-size: 14px;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #b91c1c;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 190px;
  padding: 10px 14px;
}

.header-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.header-search button,
.primary-btn,
.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
}

.header-search button,
.primary-btn {
  color: #ffffff;
  border-radius: 12px;
  background: #dc2626;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.22);
  transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button {
  padding: 10px 14px;
}

.header-search button:hover,
.primary-btn:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  color: #374151;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 14px;
  gap: 10px;
  flex-wrap: wrap;
}

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

.mobile-link {
  padding: 9px 12px;
  border-radius: 999px;
  background: #ffffff;
  color: #4b5563;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.mobile-link.active {
  color: #ffffff;
  background: #dc2626;
}

.hero {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: #111827;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.48) 46%, rgba(0, 0, 0, 0.15));
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100% - 1180px) / 2));
  bottom: 64px;
  width: min(720px, calc(100% - 64px));
  color: #ffffff;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero .eyebrow,
.detail-hero .eyebrow {
  background: rgba(248, 113, 113, 0.18);
  color: #f87171;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 660px;
  margin: 0 0 20px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.7;
}

.hero-meta,
.detail-meta,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span,
.detail-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #f9fafb;
}

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

.primary-btn,
.ghost-btn {
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  font-weight: 700;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 34px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.38);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dot.active {
  width: 32px;
  background: #ffffff;
}

.section {
  padding: 54px 0;
}

.page-main {
  padding: 44px 0 72px;
}

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

.section-head h2,
.page-hero h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.03em;
}

.text-link {
  color: #dc2626;
  font-weight: 800;
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select {
  min-height: 44px;
  padding: 0 16px;
}

.filter-panel input {
  flex: 1 1 260px;
}

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

.rank-strip {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow-x: auto;
  padding-bottom: 8px;
}

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

.movie-card {
  border-radius: 22px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(229, 231, 235, 0.82);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.12);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #e5e7eb, #f9fafb);
}

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

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

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

.duration,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.duration {
  right: 10px;
  top: 10px;
  padding: 5px 8px;
  background: rgba(0, 0, 0, 0.68);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #dc2626, #fb7185);
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.3);
}

.card-body {
  padding: 16px;
}

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

.card-title:hover {
  color: #b91c1c;
}

.card-body p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  min-height: 66px;
  margin: 10px 0 14px;
  overflow: hidden;
  color: #6b7280;
  line-height: 1.55;
  font-size: 14px;
}

.meta-row {
  color: #6b7280;
  font-size: 13px;
  justify-content: space-between;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 12px;
  font-weight: 700;
}

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

.category-tile {
  min-height: 126px;
  padding: 22px;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(135deg, #ffffff, #fff1f2);
  border: 1px solid rgba(254, 202, 202, 0.6);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
  transition: transform 0.24s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
}

.category-tile strong {
  color: #111827;
  font-size: 20px;
}

.category-tile span {
  color: #dc2626;
  font-weight: 700;
}

.page-hero {
  position: relative;
  margin-bottom: 34px;
  padding: 52px;
  border-radius: 30px;
  overflow: hidden;
  background: radial-gradient(circle at 10% 20%, rgba(248, 113, 113, 0.18), transparent 28%), linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.08);
}

.page-hero p {
  max-width: 760px;
  color: #6b7280;
  font-size: 17px;
  line-height: 1.7;
}

.small-hero,
.rank-hero {
  min-height: 220px;
}

.category-section {
  margin-top: 48px;
}

.detail-hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #111827;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  filter: blur(2px);
  transform: scale(1.03);
}

.detail-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.98), rgba(17, 24, 39, 0.76) 48%, rgba(17, 24, 39, 0.35));
}

.detail-content {
  position: relative;
  padding: 56px 0 66px;
  color: #ffffff;
}

.breadcrumb,
.breadcrumb-sep {
  color: #d1d5db;
  font-weight: 700;
}

.breadcrumb:hover {
  color: #ffffff;
}

.detail-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 42px;
  align-items: end;
  margin-top: 38px;
}

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

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

.detail-info h1 {
  margin: 0 0 18px;
  max-width: 850px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.one-line {
  max-width: 780px;
  color: #e5e7eb;
  font-size: 20px;
  line-height: 1.7;
}

.detail-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.detail-info .primary-btn {
  margin-top: 24px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 26px 68px rgba(15, 23, 42, 0.18);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.22));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #dc2626;
  box-shadow: 0 18px 40px rgba(220, 38, 38, 0.35);
  font-size: 30px;
}

.play-overlay strong {
  font-size: 20px;
}

.player-card.playing .play-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.text-panel {
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.text-panel h2 {
  margin: 0 0 14px;
  color: #111827;
}

.text-panel p {
  margin: 0;
  color: #4b5563;
  line-height: 1.85;
}

.site-footer {
  margin-top: 34px;
  padding: 34px 0;
  background: #111827;
  color: #ffffff;
}

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

.footer-inner p {
  margin: 8px 0 0;
  color: #d1d5db;
}

.footer-links {
  display: flex;
  gap: 18px;
  color: #e5e7eb;
}

.is-hidden {
  display: none !important;
}

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

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

  .header-search {
    margin-left: auto;
  }

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

  .rank-strip {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }

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

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

  .brand-text small,
  .header-search {
    display: none;
  }

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

  .hero {
    height: 520px;
  }

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

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

  .hero-arrow {
    width: 40px;
    height: 40px;
    font-size: 28px;
  }

  .hero-prev {
    left: 12px;
  }

  .hero-next {
    right: 12px;
  }

  .section {
    padding: 36px 0;
  }

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

  .movie-grid,
  .compact-grid,
  .rank-strip,
  .category-grid,
  .detail-text {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 30px;
    border-radius: 24px;
  }

  .detail-hero {
    min-height: auto;
  }

  .detail-content {
    padding: 34px 0 44px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    gap: 26px;
    margin-top: 28px;
  }

  .detail-poster {
    max-width: 240px;
  }

  .detail-info h1 {
    font-size: 38px;
  }

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

  .footer-inner {
    align-items: start;
    flex-direction: column;
  }
}
