:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #fff7f7;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --red-900: #7f1d1d;
  --red-800: #991b1b;
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --red-500: #ef4444;
  --amber: #f59e0b;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--red-900), var(--red-700));
  box-shadow: 0 12px 30px rgba(127, 29, 29, 0.3);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--red-600);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}

.brand-text {
  font-size: 19px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #fee2e2;
  font-weight: 600;
}

.main-nav a {
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: #ffffff;
}

.nav-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  font-size: 26px;
  background: transparent;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  color: #ffffff;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  background-size: cover;
  background-position: center;
  transition: opacity 0.75s ease, transform 1.8s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 600px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 42px;
  align-items: center;
  padding: 64px 0 46px;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fecaca;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  font-weight: 700;
}

.hero h1 {
  margin: 24px 0 18px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-desc {
  max-width: 650px;
  color: #f3f4f6;
  font-size: 18px;
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-weight: 800;
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.28);
}

.btn-primary {
  border-color: var(--red-600);
  background: var(--red-600);
  box-shadow: 0 18px 35px rgba(220, 38, 38, 0.36);
}

.hero-side {
  position: relative;
  border-radius: 26px;
  padding: 18px;
  background: rgba(17, 24, 39, 0.58);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 16 / 10;
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(0,0,0,0.72));
}

.hero-mini-title {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
}

.hero-mini-title strong {
  display: block;
  margin-bottom: 6px;
  font-size: 22px;
}

.hero-mini-title span {
  color: #e5e7eb;
}

.hero-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.hero-thumb {
  overflow: hidden;
  border-radius: 14px;
  cursor: pointer;
  border: 2px solid transparent;
  background: rgba(255,255,255,0.12);
}

.hero-thumb.active {
  border-color: #ffffff;
}

.hero-thumb img {
  width: 100%;
  height: 86px;
  object-fit: cover;
}

main {
  padding-bottom: 56px;
}

.section {
  padding: 52px 0 0;
}

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

.section-title h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.1;
}

.section-more {
  color: var(--red-700);
  font-weight: 800;
}

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

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

.poster-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.poster-link:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.poster-frame {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #fee2e2, #f8fafc);
}

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

.poster-link:hover img {
  transform: scale(1.06);
}

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

.play-chip {
  right: 10px;
  bottom: 10px;
  padding: 5px 10px;
  background: rgba(220, 38, 38, 0.9);
  font-size: 12px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--amber);
}

.movie-info {
  padding: 14px;
}

.movie-info h3 {
  margin: 0 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}

.meta,
.one-line,
.page-intro,
.detail-desc,
.site-footer p {
  color: var(--muted);
}

.meta {
  margin: 0 0 8px;
  font-size: 13px;
}

.one-line {
  display: -webkit-box;
  min-height: 42px;
  margin: 0 0 12px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
  line-height: 1.5;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-list span {
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--red-700);
  background: #fee2e2;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  display: block;
  padding: 22px;
  border-radius: 20px;
  background: linear-gradient(135deg, #ffffff, #fff7ed);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-card h3 {
  margin: 0 0 10px;
  color: var(--red-800);
  font-size: 20px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.page-hero {
  padding: 54px 0 26px;
  background: linear-gradient(135deg, #fff7ed, #ffffff 48%, #fee2e2);
}

.page-title {
  max-width: 780px;
}

.page-title h1 {
  margin-bottom: 14px;
}

.page-intro {
  margin: 0;
  font-size: 17px;
  line-height: 1.8;
}

.filter-panel {
  margin: 26px 0;
  padding: 18px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.search-box input {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  font-size: 15px;
}

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

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-row button {
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: var(--red-800);
  background: #fee2e2;
  font-weight: 800;
  cursor: pointer;
}

.filter-row button.active,
.filter-row button:hover {
  color: #ffffff;
  background: var(--red-700);
}

.detail-hero {
  padding: 42px 0;
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #7f1d1d);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: #fecaca;
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
}

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

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
}

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

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

.detail-desc {
  max-width: 760px;
  color: #f3f4f6;
  font-size: 17px;
  line-height: 1.9;
}

.player-section {
  padding: 44px 0 0;
}

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

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(220,38,38,0.35), rgba(0,0,0,0.62));
  cursor: pointer;
}

.play-overlay.hide {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--red-600);
  box-shadow: 0 20px 46px rgba(220, 38, 38, 0.42);
  font-size: 30px;
}

.play-text {
  font-size: 18px;
  font-weight: 900;
}

.content-panel {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 24px;
}

.article-box,
.side-box {
  border-radius: 22px;
  padding: 24px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.article-box h2,
.side-box h2 {
  margin: 0 0 16px;
  color: var(--red-800);
}

.article-box p,
.side-box p {
  color: #374151;
  line-height: 1.9;
}

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

.related-list a {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f9fafb;
  color: var(--red-800);
  font-weight: 800;
}

.site-footer {
  margin-top: 64px;
  padding: 42px 0 20px;
  background: #111827;
  color: #9ca3af;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 32px;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer p {
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.footer-links a:hover {
  color: #ffffff;
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid #374151;
  text-align: center;
}

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

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

  .hero-content,
  .detail-layout,
  .content-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    max-width: 360px;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 64px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border-radius: 0 0 18px 18px;
    background: var(--red-800);
  }

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

  .main-nav a {
    padding: 12px;
  }

  .hero,
  .hero-content {
    min-height: auto;
  }

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

  .hero-thumbs {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

  .movie-info {
    padding: 12px;
  }
}
