:root {
  color-scheme: light;
  --bg: #f8fafc;
  --paper: #ffffff;
  --paper-soft: #fff7ed;
  --ink: #111827;
  --muted: #6b7280;
  --line: #fee2e2;
  --red: #dc2626;
  --red-dark: #991b1b;
  --orange: #f97316;
  --gold: #f59e0b;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at top left, rgba(254, 226, 226, 0.95), transparent 36rem), var(--bg);
  color: var(--ink);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(127, 29, 29, 0.08);
}

.header-inner {
  max-width: 1320px;
  height: 68px;
  margin: 0 auto;
  padding: 0 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.04em;
  color: var(--red-dark);
}

.brand {
  font-size: 1.24rem;
  white-space: nowrap;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.28);
}

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

.desktop-nav a,
.mobile-nav a {
  color: #374151;
  font-weight: 700;
  transition: color 0.2s ease;
}

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

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.filter-box input {
  width: 230px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 11px 16px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.top-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.section-link,
.play-button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

.top-search button,
.mobile-search button,
.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border-radius: 999px;
  padding: 11px 18px;
  box-shadow: 0 12px 25px rgba(220, 38, 38, 0.22);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  color: var(--red-dark);
}

.mobile-nav {
  display: none;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 22px 18px;
  grid-template-columns: 1fr;
  gap: 14px;
}

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

.mobile-search {
  display: flex;
  gap: 10px;
}

.mobile-search input {
  flex: 1;
  width: auto;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 650px;
  color: white;
  background: radial-gradient(circle at 18% 20%, rgba(248, 113, 113, 0.55), transparent 26rem), linear-gradient(135deg, #111827 0%, #7f1d1d 52%, #1f2937 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(127, 29, 29, 0.72), rgba(15, 23, 42, 0.84));
  z-index: 1;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.34;
  filter: blur(1px) saturate(1.12);
}

.hero-layout {
  position: relative;
  z-index: 3;
  max-width: 1320px;
  min-height: 650px;
  margin: 0 auto;
  padding: 88px 22px 110px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 380px;
  gap: 60px;
  align-items: center;
}

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

.hero-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 900;
  color: #fffbeb;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(2.5rem, 6vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.08em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 1.12rem;
  line-height: 1.85;
}

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

.hero-tags span,
.tag-row span,
.detail-tags span {
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 0.83rem;
  font-weight: 800;
}

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

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

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 999px;
  padding: 14px 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.secondary-button {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.hero-poster {
  display: block;
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
  border: 5px solid rgba(255, 255, 255, 0.2);
  aspect-ratio: 2 / 3;
}

.hero-poster img,
.movie-card img,
.detail-cover img,
.ranking-poster img {
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #fee2e2, #fef3c7);
}

.hero-tabs {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 6;
  width: min(1280px, calc(100% - 44px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.hero-tab {
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  padding: 13px;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-tab:hover,
.hero-tab.is-active {
  background: rgba(220, 38, 38, 0.72);
  transform: translateY(-2px);
}

.hero-tab strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.95rem;
}

.hero-tab span {
  color: #fde68a;
  font-size: 0.78rem;
  font-weight: 800;
}

.main-wrap,
.page-wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 54px 22px;
}

.section-block {
  margin-bottom: 62px;
}

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

.section-heading > div {
  display: flex;
  gap: 12px;
  align-items: center;
}

.section-line {
  width: 5px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--red), var(--orange));
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.section-link {
  color: var(--red);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(127, 29, 29, 0.08);
  border-radius: 999px;
  padding: 10px 16px;
}

.intro-panel,
.page-hero,
.detail-info,
.content-panel {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.intro-panel {
  margin-bottom: 54px;
  padding: 34px;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 28px;
  align-items: center;
}

.intro-panel h1,
.page-hero h1,
.detail-title {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.07em;
  color: var(--ink);
}

.intro-panel p,
.page-hero p,
.content-panel p,
.detail-info p {
  color: var(--muted);
  line-height: 1.86;
}

.intro-stats {
  display: grid;
  gap: 12px;
}

.intro-stats a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 18px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #fff7ed, #fff1f2);
  color: var(--red-dark);
  font-weight: 900;
}

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

.category-card {
  min-height: 210px;
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 24px;
  color: white;
  background: linear-gradient(135deg, #991b1b, #dc2626 56%, #f97316);
  box-shadow: 0 20px 38px rgba(220, 38, 38, 0.22);
}

.category-card::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -55px;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
}

.category-card h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: 1.45rem;
}

.category-card p {
  position: relative;
  z-index: 1;
  color: #fffbeb;
  line-height: 1.65;
}

.category-card span {
  position: absolute;
  left: 24px;
  bottom: 22px;
  z-index: 1;
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(254, 226, 226, 0.9);
  border-radius: 20px;
  background: white;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 48px rgba(127, 29, 29, 0.15);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #fee2e2;
}

.poster-link img {
  transition: transform 0.35s ease;
}

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

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  font-weight: 900;
  font-size: 0.8rem;
}

.play-mark {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: rgba(220, 38, 38, 0.9);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

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

.movie-card h2 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  line-height: 1.34;
}

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

.movie-meta {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 0.84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-line {
  min-height: 48px;
  margin: 0 0 12px;
  color: #4b5563;
  font-size: 0.9rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row span,
.detail-tags span {
  color: var(--red-dark);
  background: #fff1f2;
}

.page-hero {
  padding: 38px;
  margin-bottom: 34px;
  background: linear-gradient(135deg, #fff 0%, #fff7ed 60%, #fff1f2 100%);
}

.page-kicker {
  color: var(--red-dark);
  background: white;
  border-color: var(--line);
}

.filter-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
}

.filter-box input {
  width: min(100%, 420px);
}

.breadcrumb {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 28px;
  align-items: start;
}

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

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #030712;
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #030712;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, rgba(3, 7, 18, 0.35), rgba(127, 29, 29, 0.45));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.detail-info {
  padding: 26px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 2 / 3;
  margin-bottom: 22px;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.14);
}

.detail-title {
  font-size: clamp(2rem, 3vw, 3rem);
}

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

.detail-meta span {
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--red-dark);
  background: #fff7ed;
  font-weight: 900;
}

.content-panel {
  margin-top: 28px;
  padding: 30px;
}

.content-panel h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 1.5rem;
}

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

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

.ranking-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.ranking-poster {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 2 / 3;
}

.ranking-item h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

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

.search-empty,
.no-results {
  padding: 42px;
  border-radius: 24px;
  text-align: center;
  color: var(--muted);
  background: white;
  border: 1px solid var(--line);
}

.site-footer {
  margin-top: 50px;
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #7f1d1d 60%, #111827);
}

.footer-grid {
  max-width: 1320px;
  margin: 0 auto;
  padding: 46px 22px;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
}

.footer-grid h2 {
  margin: 0 0 12px;
  color: white;
  font-size: 1.08rem;
}

.footer-grid a {
  display: block;
  margin: 9px 0;
  color: #fee2e2;
}

.footer-grid p {
  line-height: 1.75;
}

.footer-brand {
  color: white;
  font-size: 1.35rem;
}

.footer-bottom {
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px 22px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #fecaca;
}

@media (max-width: 1180px) {
  .desktop-nav,
  .top-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

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

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

@media (max-width: 860px) {
  .hero-layout,
  .intro-panel,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-layout {
    padding-top: 62px;
    gap: 30px;
  }

  .hero-poster {
    max-width: 280px;
  }

  .hero-tabs {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    width: auto;
    margin: -86px 22px 24px;
    grid-template-columns: 1fr;
  }

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

  .filter-box {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 540px) {
  .header-inner {
    padding: 0 16px;
  }

  .brand {
    font-size: 1.05rem;
  }

  .hero {
    min-height: 620px;
  }

  .hero-layout {
    min-height: 620px;
    padding: 46px 16px 110px;
  }

  .hero h1,
  .hero h2 {
    font-size: 2.5rem;
  }

  .main-wrap,
  .page-wrap {
    padding: 36px 16px;
  }

  .intro-panel,
  .page-hero,
  .content-panel,
  .detail-info {
    padding: 22px;
  }

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

  .ranking-item {
    grid-template-columns: 84px minmax(0, 1fr);
  }
}
