:root {
  --red: #dc2626;
  --red-dark: #b91c1c;
  --red-soft: #fee2e2;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --card: #ffffff;
  --soft: #f8fafc;
  --dark: #111827;
  --shadow: 0 18px 40px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fff 0%, #f9fafb 42%, #fff 100%);
}

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

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

.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.96);
  box-shadow: 0 1px 18px rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(14px);
}

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--red);
  white-space: nowrap;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), #fb7185);
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.28);
  font-size: 14px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 15px;
  color: #374151;
}

.main-nav a {
  padding: 8px 0;
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--red);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  width: 280px;
  border-radius: 999px;
  background: #f3f4f6;
  overflow: hidden;
  border: 1px solid transparent;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search:focus-within {
  border-color: rgba(220, 38, 38, 0.35);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
}

.header-search input,
.mobile-panel input,
.search-box input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  padding: 10px 14px;
  font-size: 14px;
}

.header-search button,
.mobile-panel button,
.search-box button {
  border: 0;
  color: #fff;
  background: var(--red);
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  font-size: 25px;
  color: #374151;
  cursor: pointer;
}

.channelbar {
  border-top: 1px solid #f3f4f6;
}

.channel-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 9px 0;
  color: #4b5563;
  font-size: 14px;
}

.channel-scroll a {
  white-space: nowrap;
}

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

.mobile-panel {
  display: none;
  padding: 14px 16px 18px;
  border-top: 1px solid #f3f4f6;
  background: #fff;
}

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

.mobile-panel form {
  display: flex;
  border-radius: 999px;
  overflow: hidden;
  background: #f3f4f6;
}

.mobile-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
  color: #374151;
}

.hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background: #0f172a;
  color: #fff;
}

.hero-slide {
  display: none;
  min-height: 520px;
  position: relative;
}

.hero-slide.active {
  display: block;
}

.hero-image {
  position: absolute;
  inset: 0;
}

.hero-image img {
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 30%, rgba(220, 38, 38, 0.36), transparent 34%), linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.72) 44%, rgba(15, 23, 42, 0.34));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.55fr);
  gap: 46px;
  align-items: center;
  min-height: 520px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.24);
  border: 1px solid rgba(248, 113, 113, 0.42);
  color: #fecaca;
  font-size: 14px;
  margin-bottom: 20px;
}

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

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

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  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: linear-gradient(135deg, var(--red), #fb7185);
  box-shadow: 0 16px 26px rgba(220, 38, 38, 0.28);
}

.btn-light {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-side-card {
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
}

.hero-side-card img {
  height: 390px;
  object-fit: cover;
}

.hero-side-meta {
  padding: 18px;
  background: rgba(15, 23, 42, 0.84);
}

.hero-side-meta strong {
  display: block;
  font-size: 20px;
  margin-bottom: 8px;
}

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

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

.hero-dots button.active {
  width: 30px;
  background: #fff;
}

.section {
  padding: 54px 0 0;
}

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

.section-head h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.04em;
}

.section-head p,
.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 16px;
  background: #e5e7eb;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.12);
}

.poster-link img {
  height: 275px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.68));
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

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

.rating-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 9px;
  color: #fff;
  background: var(--red);
  font-size: 12px;
  font-weight: 800;
}

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.84);
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(220, 38, 38, 0.92);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-card-body {
  padding: 12px 2px 0;
}

.movie-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.42;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-card h3 a:hover {
  color: var(--red);
}

.movie-card p {
  display: -webkit-box;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 9px;
  color: #9ca3af;
  font-size: 12px;
}

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

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

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 24px;
}

.feature-large {
  min-height: 440px;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  color: #fff;
  box-shadow: var(--shadow);
}

.feature-large img {
  height: 100%;
  object-fit: cover;
}

.feature-large::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.08));
}

.feature-large div {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 26px;
  z-index: 2;
}

.feature-large h3 {
  font-size: 34px;
  line-height: 1.2;
  margin: 0 0 10px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 46px 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.06);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--red), #fb7185);
}

.rank-item img {
  height: 92px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

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

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

.category-card {
  min-height: 156px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 20px;
  border-radius: 20px;
  color: #fff;
  background: radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.22), transparent 30%), linear-gradient(135deg, #111827, #dc2626);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s ease;
}

.category-card:hover {
  transform: translateY(-3px);
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
  font-size: 14px;
}

.page-title {
  padding: 54px 0 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.detail-bg {
  position: absolute;
  inset: 0;
}

.detail-bg img {
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
  filter: blur(3px);
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.76));
}

.detail-wrap {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  padding: 54px 0;
  align-items: center;
}

.detail-poster {
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.detail-poster img {
  height: 410px;
  object-fit: cover;
}

.detail-info h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.detail-info p {
  color: #d1d5db;
  font-size: 17px;
  line-height: 1.8;
  max-width: 860px;
}

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

.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #f3f4f6;
  font-size: 14px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.player-section {
  padding-top: 42px;
}

.player-shell {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 23, 0.38);
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.player-cover.hidden {
  opacity: 0;
}

.player-cover button {
  pointer-events: auto;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  border: 0;
  color: #fff;
  background: var(--red);
  font-size: 30px;
  cursor: pointer;
  box-shadow: 0 18px 36px rgba(220, 38, 38, 0.34);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding-top: 36px;
}

.article-panel,
.side-panel {
  padding: 26px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
}

.article-panel h2,
.side-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

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

.search-panel {
  border-radius: 24px;
  padding: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-box {
  display: flex;
  border-radius: 999px;
  overflow: hidden;
  background: #f3f4f6;
  margin-bottom: 24px;
}

.empty-state {
  padding: 42px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border-radius: 22px;
}

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

  .feature-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .main-nav,
  .header-search,
  .channelbar {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero-content,
  .detail-wrap {
    grid-template-columns: 1fr;
  }

  .hero-side-card {
    display: none;
  }

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

  .rank-item {
    grid-template-columns: 38px 58px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }

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

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

  .brand {
    font-size: 18px;
  }

  .hero,
  .hero-slide,
  .hero-content {
    min-height: 500px;
  }

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

  .poster-link img {
    height: 320px;
  }

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