:root {
  --bg: #f8fafc;
  --paper: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #e2e8f0;
  --line: #dbe3ef;
  --red: #dc2626;
  --red-dark: #b91c1c;
  --orange: #f97316;
  --blue: #2563eb;
  --slate: #111827;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: #ffffff;
  font-size: 14px;
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.32);
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(135deg, #ffffff, #fca5a5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-link,
.mobile-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #dbeafe;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #ffffff;
  background: rgba(239, 68, 68, 0.22);
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  width: 300px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.header-search input,
.mobile-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  padding: 11px 14px;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: #cbd5e1;
}

.header-search button,
.mobile-search button {
  border: 0;
  background: var(--red);
  color: #ffffff;
  padding: 11px 16px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #ffffff;
  border-radius: 99px;
}

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

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

.mobile-search {
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.015);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 1.2s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
}

.hero-mask {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 35%, rgba(248, 113, 113, 0.28), transparent 30%), linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(127, 29, 29, 0.72) 52%, rgba(249, 115, 22, 0.48) 100%), linear-gradient(0deg, #020617 0%, transparent 42%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: 72vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  gap: 48px;
  padding: 54px 0 72px;
}

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

.hero-pill,
.detail-pill,
.page-hero span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 14px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.28);
}

.hero h1,
.hero h2 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 28px;
  color: #e2e8f0;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.8;
}

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

.hero-meta span,
.detail-meta span {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  backdrop-filter: blur(12px);
}

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

.primary-btn,
.ghost-btn,
.section-link,
.panel-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  min-height: 50px;
  padding: 0 28px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: #ffffff;
  box-shadow: 0 16px 30px rgba(220, 38, 38, 0.34);
}

.ghost-btn {
  min-height: 50px;
  padding: 0 26px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover,
.panel-link:hover {
  transform: translateY(-2px);
}

.hero-poster {
  display: block;
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(14px);
  font-weight: 800;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

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

.quick-panel {
  position: relative;
  z-index: 10;
  margin-top: -36px;
  padding: 0 16px;
}

.quick-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-weight: 800;
}

.quick-search div,
.search-inline {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.quick-search input,
.search-inline input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 14px 18px;
}

.quick-search button {
  border: 0;
  padding: 0 24px;
  color: #ffffff;
  background: var(--red);
  cursor: pointer;
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.quick-tags a,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--red-dark);
  background: #fff1f2;
  font-weight: 700;
}

.content-section {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.white-section {
  width: 100%;
  max-width: none;
  padding: 56px max(16px, calc((100% - 1240px) / 2));
  background: #ffffff;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-link,
.panel-link {
  min-height: 42px;
  padding: 0 18px;
  color: var(--red-dark);
  background: #fff1f2;
}

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

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

.movie-card,
.wide-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.wide-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #111827;
}

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

.movie-card:hover .poster-wrap img,
.wide-card:hover .wide-thumb img {
  transform: scale(1.08);
}

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

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

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

.duration {
  right: 10px;
  top: 10px;
  padding: 6px 9px;
  background: rgba(2, 6, 23, 0.74);
}

.rank-badge {
  left: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.play-chip {
  left: 50%;
  bottom: 18px;
  transform: translate(-50%, 18px);
  padding: 9px 14px;
  background: var(--red);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  display: grid;
  gap: 8px;
  padding: 15px;
}

.card-body strong,
.wide-body strong {
  color: var(--ink);
  line-height: 1.38;
}

.card-body em,
.wide-body em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.card-body span,
.wide-body span {
  color: #475569;
  font-size: 14px;
  line-height: 1.55;
}

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

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

.category-card {
  position: relative;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: 24px;
  padding: 24px;
  color: #ffffff;
  box-shadow: var(--shadow);
}

.category-card img,
.category-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.category-card img {
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.category-layer {
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88) 0%, rgba(15, 23, 42, 0.2) 100%);
}

.category-card strong,
.category-card em {
  position: relative;
  z-index: 2;
}

.category-card strong {
  font-size: 24px;
  margin-bottom: 8px;
}

.category-card em {
  color: #e2e8f0;
  font-style: normal;
  line-height: 1.6;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 32px;
  align-items: start;
}

.wide-list,
.rank-list {
  display: grid;
  gap: 14px;
}

.wide-card {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  min-height: 104px;
}

.wide-thumb {
  position: relative;
  overflow: hidden;
  background: #111827;
}

.wide-body {
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 14px;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 24px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.ranking-panel h2 {
  margin: 0 0 18px;
  font-size: 26px;
}

.panel-link {
  width: 100%;
  margin-top: 18px;
}

.tool-row {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
}

.filter-input,
.sort-select {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  outline: 0;
}

.filter-input {
  flex: 1;
  min-width: 180px;
  padding: 0 18px;
}

.sort-select {
  padding: 0 18px;
  color: var(--ink);
}

.result-label {
  margin-left: auto;
  color: var(--muted);
  white-space: nowrap;
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.red-hero {
  background: radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.44), transparent 30%), linear-gradient(135deg, #111827, #7f1d1d 60%, #ea580c);
}

.search-hero {
  background: radial-gradient(circle at 70% 20%, rgba(220, 38, 38, 0.35), transparent 34%), linear-gradient(135deg, #0f172a, #1e293b);
}

.page-hero > div {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.page-hero h1 {
  margin: 18px 0;
  font-size: clamp(38px, 5vw, 64px);
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  color: #dbeafe;
  font-size: 19px;
  line-height: 1.8;
}

.search-inline {
  max-width: 680px;
  margin-top: 26px;
  border: 0;
}

.primary-filter {
  min-height: 56px;
  border-radius: 999px;
}

.detail-shell {
  padding: 30px 16px 0;
  background: radial-gradient(circle at 75% 8%, rgba(220, 38, 38, 0.22), transparent 28%), linear-gradient(180deg, #020617 0%, #111827 100%);
  color: #ffffff;
}

.breadcrumb {
  width: min(1240px, 100%);
  margin: 0 auto 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #cbd5e1;
  font-size: 14px;
}

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

.player-card {
  width: min(1240px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
  gap: 28px;
  align-items: stretch;
  padding-bottom: 42px;
}

.video-box {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.video-box video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  cursor: pointer;
}

.play-trigger {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.08));
  cursor: pointer;
}

.play-trigger span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: #ffffff;
  font-size: 34px;
  box-shadow: 0 18px 40px rgba(220, 38, 38, 0.42);
  transform: translateX(3px);
}

.play-trigger.hidden {
  display: none;
}

.player-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.player-info h1 {
  margin: 18px 0 14px;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.16;
  letter-spacing: -0.05em;
}

.player-info p {
  margin: 0 0 24px;
  color: #dbeafe;
  line-height: 1.8;
}

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

.detail-content {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 32px;
  padding: 42px 0 64px;
}

.story-card,
.related-card {
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.story-card {
  padding: 32px;
}

.story-card h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.story-card h2:not(:first-child) {
  margin-top: 34px;
}

.story-card p {
  color: #475569;
  line-height: 1.9;
  font-size: 17px;
}

.lead-text {
  color: var(--ink) !important;
  font-weight: 800;
}

.related-card {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 22px;
}

.compact-head {
  align-items: center;
  margin-bottom: 18px;
}

.related-list .wide-card {
  grid-template-columns: 120px minmax(0, 1fr);
}

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

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 38px 0;
}

.footer-brand {
  color: #ffffff;
  font-size: 22px;
}

.footer-inner p {
  max-width: 640px;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: flex-start;
}

.footer-links a {
  border-radius: 999px;
  padding: 9px 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

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

@media (max-width: 1120px) {
  .header-search {
    display: none;
  }

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

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

  .split-section,
  .detail-content,
  .player-card {
    grid-template-columns: 1fr;
  }

  .ranking-panel,
  .related-card {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

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

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-poster {
    display: none;
  }

  .quick-inner {
    grid-template-columns: 1fr;
  }

  .quick-tags {
    justify-content: flex-start;
  }

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

  .wide-card {
    grid-template-columns: 116px minmax(0, 1fr);
  }

  .footer-inner,
  .section-head,
  .tool-row {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 560px) {
  .header-inner {
    height: 62px;
  }

  .brand-text {
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero,
  .hero-inner {
    min-height: 68vh;
  }

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

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

  .hero-meta span,
  .detail-meta span {
    font-size: 13px;
  }

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

  .content-section,
  .detail-content {
    width: min(100% - 24px, 1240px);
    padding: 38px 0;
  }

  .white-section {
    padding-left: 12px;
    padding-right: 12px;
  }

  .player-info,
  .story-card,
  .related-card {
    padding: 20px;
  }

  .play-trigger span {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }
}
