:root {
  --bg: #f9fafb;
  --surface: #ffffff;
  --surface-soft: #fff7f7;
  --text: #111827;
  --muted: #6b7280;
  --muted-strong: #374151;
  --line: #f3f4f6;
  --primary: #dc2626;
  --primary-dark: #991b1b;
  --accent: #f97316;
  --shadow: 0 24px 70px rgba(17, 24, 39, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(220, 38, 38, 0.12), transparent 26rem),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.10), transparent 26rem),
    var(--bg);
  min-height: 100vh;
}

body.menu-open {
  overflow: hidden;
}

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

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, #fee2e2, #fff7ed);
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(243, 244, 246, 0.88);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.25);
}

.brand-name {
  font-size: 20px;
}

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

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  color: var(--muted-strong);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--primary);
  background: #fee2e2;
}

.nav-link:hover {
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid #fee2e2;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(220, 38, 38, 0.08);
}

.header-search input,
.hero-search input,
.page-filter input {
  border: 0;
  outline: 0;
  min-width: 180px;
  color: var(--text);
  background: transparent;
  padding: 10px 12px;
}

.header-search button,
.hero-search button,
.primary-button,
.secondary-button,
.ghost-button,
.category-button,
.load-button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.header-search button,
.hero-search button,
.primary-button,
.load-button {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 14px 32px rgba(220, 38, 38, 0.22);
}

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

.primary-button,
.secondary-button,
.ghost-button,
.category-button,
.load-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
}

.secondary-button,
.ghost-button,
.category-button {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(254, 226, 226, 0.95);
}

.ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.category-button:hover,
.load-button:hover,
.header-search button:hover,
.hero-search button:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #fee2e2;
  padding: 10px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--primary-dark);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 8px 22px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}

main {
  min-height: 70vh;
}

.page-section,
.hero-wrap,
.page-hero,
.detail-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px 22px;
}

.hero-wrap {
  padding-top: 34px;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-radius: 36px;
  background: #111827;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  align-items: center;
  gap: 40px;
  padding: 56px;
  color: #fff;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.8s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.64), rgba(17, 24, 39, 0.14)),
    var(--hero-bg) center / cover no-repeat;
  transform: scale(1.04);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.9), transparent);
}

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

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fed7aa;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
  max-width: 780px;
  margin: 18px 0 18px;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

.hero-content p {
  max-width: 700px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.85;
}

.hero-tags,
.tag-row,
.info-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.info-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.hero-search {
  display: flex;
  max-width: 580px;
  margin-top: 30px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.25);
}

.hero-search input {
  flex: 1;
  min-width: 0;
}

.hero-search button {
  padding: 0 24px;
}

.hero-poster {
  justify-self: end;
  width: min(360px, 100%);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

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

.hero-poster strong {
  display: block;
  margin-top: 16px;
  font-size: 22px;
}

.hero-poster em {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-style: normal;
}

.hero-controls {
  position: absolute;
  left: 56px;
  right: 56px;
  bottom: 32px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

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

.hero-dot.is-active {
  background: #fff;
}

.hero-arrows {
  display: flex;
  gap: 10px;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.section-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}

.section-heading span,
.page-kicker {
  color: var(--primary);
  font-weight: 900;
  letter-spacing: 0.12em;
}

.section-heading h2,
.page-hero h1,
.detail-title h1,
.search-title h1 {
  margin: 0;
  font-size: clamp(30px, 4.2vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.section-heading p,
.page-hero p,
.detail-title p,
.search-title p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  padding: 22px;
  min-height: 166px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #fff, #fff7f7);
  border: 1px solid #fee2e2;
  box-shadow: 0 18px 52px rgba(220, 38, 38, 0.08);
}

.category-tile::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -35px;
  bottom: -35px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.12);
}

.category-tile strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 12px;
  font-size: 22px;
}

.category-tile p {
  position: relative;
  z-index: 1;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 16px;
}

.category-tile span {
  position: relative;
  z-index: 1;
  color: var(--primary);
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid rgba(243, 244, 246, 0.95);
  box-shadow: 0 18px 50px rgba(17, 24, 39, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: #fecaca;
  box-shadow: 0 25px 70px rgba(220, 38, 38, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 36%, rgba(17, 24, 39, 0.72));
}

.poster-glow {
  position: absolute;
  inset: auto 14px 14px 14px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  filter: blur(18px);
}

.play-badge {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.movie-card-body {
  padding: 18px;
}

.movie-meta-line,
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb {
  margin-bottom: 18px;
}

.breadcrumb a {
  color: var(--primary);
  font-weight: 800;
}

.movie-card h3 {
  margin: 8px 0 8px;
  font-size: 20px;
  line-height: 1.28;
}

.movie-card h3 a:hover,
.compact-card:hover strong,
.footer-links a:hover {
  color: var(--primary);
}

.movie-card p {
  min-height: 4.6em;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 14px;
}

.tag-row span,
.info-tags span {
  color: var(--primary-dark);
  background: #fee2e2;
}

.feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 28px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 82px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 34px rgba(17, 24, 39, 0.06);
}

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

.rank-item img,
.compact-card img {
  width: 82px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
}

.rank-item h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.compact-panel,
.info-panel,
.player-panel,
.detail-text,
.search-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(243, 244, 246, 0.95);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.compact-panel {
  padding: 22px;
}

.compact-panel h2,
.info-panel h2,
.detail-text h2,
.player-panel h2 {
  margin: 0 0 18px;
  font-size: 24px;
}

.compact-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: #fff7f7;
}

.compact-card img {
  width: 72px;
}

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card strong {
  line-height: 1.35;
}

.compact-card em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.page-hero {
  padding-bottom: 36px;
}

.page-hero-card {
  overflow: hidden;
  margin-top: 26px;
  padding: 34px;
  border-radius: 32px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(153, 27, 27, 0.94), rgba(249, 115, 22, 0.8)),
    radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.22), transparent 20rem);
  box-shadow: var(--shadow);
}

.page-hero-card p {
  color: rgba(255, 255, 255, 0.86);
}

.page-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 12px;
  border: 1px solid #fee2e2;
  border-radius: 22px;
  background: #fff;
}

.page-filter input {
  flex: 1;
}

.no-results {
  display: none;
  padding: 28px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed #fecaca;
  border-radius: 22px;
  background: #fff7f7;
}

.detail-hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 22px 20px;
}

.detail-title {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 24px;
  align-items: end;
  padding: 28px;
  color: #fff;
  border-radius: 32px;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.58)),
    var(--detail-bg) center / cover no-repeat;
  box-shadow: var(--shadow);
}

.detail-title img {
  width: 170px;
  aspect-ratio: 2 / 3;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.34);
}

.detail-title p {
  color: rgba(255, 255, 255, 0.82);
}

.detail-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
  gap: 28px;
  padding-top: 20px;
}

.player-panel {
  overflow: hidden;
}

.player-box {
  position: relative;
  overflow: hidden;
  background: #000;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.68));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-circle {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 22px 60px rgba(220, 38, 38, 0.4);
}

.play-circle::before {
  content: "";
  margin-left: 6px;
  border-style: solid;
  border-width: 18px 0 18px 28px;
  border-color: transparent transparent transparent #fff;
}

.player-caption,
.detail-text {
  padding: 24px;
}

.player-caption h2 {
  margin-bottom: 8px;
}

.player-caption p,
.detail-text p,
.info-panel p {
  color: var(--muted);
  line-height: 1.85;
}

.detail-text {
  margin-top: 24px;
}

.info-panel {
  padding: 22px;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0 0 22px;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.info-list dt {
  color: var(--muted);
}

.info-list dd {
  margin: 0;
  color: var(--muted-strong);
  font-weight: 800;
  text-align: right;
}

.search-panel {
  padding: 24px;
}

.search-form-large {
  display: flex;
  gap: 12px;
}

.search-form-large input {
  flex: 1;
  border: 1px solid #fee2e2;
  border-radius: 999px;
  padding: 14px 18px;
  outline: none;
  background: #fff;
}

.search-form-large input:focus {
  border-color: #fca5a5;
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.16);
}

.search-results {
  margin-top: 28px;
}

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

.sitemap-list a {
  display: block;
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
}

.site-footer {
  margin-top: 60px;
  background: #111827;
  color: #fff;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 42px 22px;
  display: grid;
  gap: 18px;
}

.footer-inner p {
  margin: 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: rgba(255, 255, 255, 0.88);
}

.copyright {
  font-size: 13px;
}

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

  .hero-slide,
  .feature-layout,
  .detail-wrap {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    justify-self: start;
    max-width: 260px;
  }

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

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

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

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

  .header-inner {
    padding-inline: 16px;
  }

  .brand-name {
    font-size: 18px;
  }

  .hero-wrap,
  .page-section,
  .page-hero,
  .detail-wrap,
  .detail-hero {
    padding-inline: 16px;
  }

  .hero-carousel {
    min-height: 720px;
    border-radius: 26px;
  }

  .hero-slide {
    padding: 30px 22px 90px;
  }

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

  .hero-search,
  .search-form-large,
  .page-filter {
    flex-direction: column;
    align-items: stretch;
    border-radius: 22px;
  }

  .hero-search button,
  .search-form-large button {
    min-height: 46px;
  }

  .hero-controls {
    left: 22px;
    right: 22px;
    bottom: 22px;
  }

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

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

  .detail-title img {
    width: 132px;
  }
}

@media (max-width: 520px) {
  .category-strip,
  .movie-grid,
  .sitemap-list {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 38px 70px 1fr;
  }

  .rank-item img {
    width: 70px;
  }

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