:root {
  --page-bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #fff7ed;
  --ink: #0f172a;
  --muted: #64748b;
  --muted-soft: #e2e8f0;
  --brand: #dc2626;
  --brand-dark: #b91c1c;
  --accent: #f97316;
  --accent-soft: #ffedd5;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  z-index: 80;
  top: 0;
  right: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.header-inner,
.footer-inner,
.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border-radius: 14px;
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.28);
}

.brand-name {
  font-size: 1.22rem;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link,
.mobile-link {
  color: #334155;
  font-size: 0.95rem;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--brand);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 13px;
  background: #f1f5f9;
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  padding: 8px 16px 16px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}

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

.mobile-link {
  padding: 10px 14px;
  border-radius: 12px;
}

.mobile-link:hover,
.mobile-link.active {
  background: #fff1f2;
}

.page-shell {
  padding-top: 92px;
}

.home-shell {
  padding-top: 88px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

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

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 7, 18, 0.86), rgba(15, 23, 42, 0.62) 42%, rgba(15, 23, 42, 0.12));
}

.hero-content {
  position: absolute;
  top: 50%;
  left: clamp(24px, 6vw, 72px);
  max-width: 650px;
  transform: translateY(-50%);
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 14px;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.95), rgba(249, 115, 22, 0.92));
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.hero h1,
.inner-hero h1,
.detail-info h1 {
  margin: 18px 0 16px;
  font-size: clamp(2.1rem, 5vw, 4.3rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 620px;
  margin: 0 0 24px;
  color: #e2e8f0;
  font-size: 1.12rem;
}

.hero-tags,
.detail-meta-grid,
.card-meta,
.rank-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags span {
  padding: 6px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(14px);
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.3);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-tile:hover,
.category-card:hover,
.rank-item:hover {
  transform: translateY(-3px);
}

.hero-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.35);
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  z-index: 6;
  right: 32px;
  bottom: 28px;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.content-section,
.split-section,
.quick-search-panel,
.filter-panel,
.inner-hero,
.detail-hero,
.player-section,
.article-section {
  margin-top: 56px;
}

.quick-search-panel,
.filter-panel,
.inner-hero,
.article-section,
.special-panel {
  padding: clamp(22px, 4vw, 38px);
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.quick-search-panel,
.filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.quick-search-panel h2,
.section-heading h2,
.article-section h2,
.player-section h2,
.site-footer h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  line-height: 1.2;
}

.quick-search-panel p,
.section-heading p,
.inner-hero p,
.article-section p,
.category-card-body p,
.site-footer p {
  margin: 8px 0 0;
  color: var(--muted);
}

.search-box {
  display: grid;
  min-width: min(420px, 100%);
  gap: 8px;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 800;
}

.wide-search {
  width: 100%;
}

.search-box input {
  width: 100%;
  height: 48px;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  outline: none;
  padding: 0 16px;
  background: #ffffff;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

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

.movie-grid,
.category-grid,
.category-card-grid {
  display: grid;
  gap: 22px;
}

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

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

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

.horizontal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 280px);
  gap: 22px;
  overflow-x: auto;
  padding: 4px 4px 16px;
  scroll-snap-type: x mandatory;
}

.horizontal-row .movie-card {
  scroll-snap-align: start;
}

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  box-shadow: var(--shadow);
}

.card-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.movie-card-large .card-poster {
  aspect-ratio: 16 / 10;
}

.movie-card-small .card-poster {
  aspect-ratio: 3 / 4;
}

.card-poster img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.card-poster::after {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.72));
}

.card-play {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.24);
}

.card-body {
  padding: 16px;
}

.card-meta,
.rank-top {
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 800;
}

.movie-card h3,
.rank-copy h3,
.category-card h2 {
  margin: 8px 0;
  color: #0f172a;
  font-size: 1.04rem;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-copy h3 a:hover,
.category-card h2 a:hover,
.text-link:hover {
  color: var(--brand);
}

.movie-card p,
.rank-copy p {
  display: -webkit-box;
  min-height: 3.1em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row,
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 5px 9px;
  color: #7c2d12;
  background: #ffedd5;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
}

.hero-tag-row .tag {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

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

.category-tile,
.category-card {
  display: block;
  padding: 22px;
  background: linear-gradient(135deg, #ffffff, #fff7ed);
  border: 1px solid rgba(254, 215, 170, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile span {
  display: block;
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 1.16rem;
  font-weight: 900;
}

.category-tile small {
  color: var(--muted);
  font-size: 0.9rem;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 16px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-cover {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
  background: #111827;
}

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

.rank-num,
.rank-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border-radius: 10px;
}

.rank-dot {
  width: 10px;
  min-width: 10px;
  height: 10px;
}

.rank-copy h3 {
  font-size: 1.05rem;
}

.text-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--brand);
  font-weight: 900;
}

.inner-shell {
  padding-top: 112px;
}

.inner-hero {
  margin-top: 0;
  background: radial-gradient(circle at top right, #fed7aa, transparent 38%), #ffffff;
}

.inner-hero p {
  max-width: 760px;
  font-size: 1.05rem;
}

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

.filter-chip {
  min-height: 38px;
  padding: 0 14px;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #ffffff;
  cursor: pointer;
  font-weight: 800;
  transition: color 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--accent));
}

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

.category-card {
  padding: 0;
  overflow: hidden;
}

.category-card-media {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  min-height: 130px;
  background: #111827;
}

.category-card-media img {
  height: 100%;
  min-height: 130px;
  object-fit: cover;
}

.category-card-body {
  padding: 22px;
}

.ranking-page-list {
  margin-top: 34px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-shell {
  padding-top: 112px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 0.92rem;
  font-weight: 700;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(230px, 330px) 1fr;
  gap: clamp(24px, 5vw, 52px);
  align-items: center;
  padding: clamp(24px, 5vw, 46px);
  background: radial-gradient(circle at top right, #fed7aa, transparent 38%), #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
  background: #111827;
}

.detail-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-info h1 {
  color: #0f172a;
}

.detail-one-line {
  max-width: 780px;
  color: #475569;
  font-size: 1.08rem;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 24px 0;
}

.detail-meta-grid span {
  padding: 12px 14px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  font-weight: 700;
}

.detail-tag-row {
  margin-bottom: 26px;
}

.player-section {
  padding: clamp(22px, 4vw, 34px);
  background: #111827;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.player-section h2 {
  margin-bottom: 18px;
  color: #ffffff;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.64));
}

.player-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.big-play {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.32);
  cursor: pointer;
  font-size: 1.75rem;
}

.article-section p {
  color: #334155;
  font-size: 1.04rem;
}

.empty-state {
  display: none;
  padding: 24px;
  color: #64748b;
  text-align: center;
  background: #ffffff;
  border-radius: var(--radius-lg);
}

.empty-state.is-visible {
  display: block;
}

.site-footer {
  margin-top: 72px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 42px;
  padding: 48px 0;
}

.footer-brand {
  color: #ffffff;
  font-size: 1.2rem;
}

.site-footer h2 {
  margin-bottom: 14px;
  color: #ffffff;
  font-size: 1rem;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a:hover {
  color: #fb923c;
}

.footer-bottom {
  padding: 20px 16px;
  color: #94a3b8;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

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

  .split-section {
    grid-template-columns: 1fr;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .page-shell,
  .home-shell,
  .inner-shell,
  .detail-shell {
    width: min(100% - 24px, 1180px);
    padding-top: 88px;
  }

  .hero {
    min-height: 620px;
    border-radius: 22px;
  }

  .hero-content {
    right: 20px;
    left: 20px;
  }

  .hero-mask {
    background: linear-gradient(180deg, rgba(3, 7, 18, 0.28), rgba(3, 7, 18, 0.88));
  }

  .hero-arrow {
    top: auto;
    bottom: 22px;
    transform: none;
  }

  .hero-dots {
    right: 50%;
    bottom: 34px;
    transform: translateX(50%);
  }

  .quick-search-panel,
  .filter-panel,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .movie-grid,
  .category-grid,
  .category-card-grid,
  .ranking-page-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

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

  .rank-item,
  .detail-hero,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 520px) {
  .brand-name {
    font-size: 1rem;
  }

  .hero h1,
  .inner-hero h1,
  .detail-info h1 {
    font-size: 2rem;
  }

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

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

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

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }
}
