/* ── 主题色：影院酒红 + 琥珀金 ── */
:root {
  --red: #b91c3c;
  --red2: #e11d48;
  --red3: #7f1239;
  --ink: #1c1917;
  --muted: #64748b;
  --line: #f5e6ea;
  --bg: #faf7f8;
  --soft: #f8f2f4;
  --card: #ffffff;
  --accent: #d97706;
  --accent-soft: #fff7ed;
  --shadow: 0 18px 48px rgba(127, 18, 57, 0.1);
  --shadow-lg: 0 28px 64px rgba(127, 18, 57, 0.14);
  --radius: 20px;
  --radius-lg: 28px;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(225, 29, 72, 0.06), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, #fff 42%, #fff 100%);
  color: var(--ink);
  line-height: 1.6;
}

a {
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

/* ── 顶栏 ── */
.topbar {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid rgba(185, 28, 60, 0.08);
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
}

.brand-mark {
  background: linear-gradient(135deg, var(--red), var(--red2));
  box-shadow: 0 8px 22px rgba(185, 28, 60, 0.32);
  font-size: 14px;
}

.brand strong {
  background: linear-gradient(92deg, var(--red3) 0%, var(--red) 48%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.brand em {
  color: #94a3b8;
  letter-spacing: 0.04em;
}

.nav-wrap {
  gap: 12px;
  min-height: 68px;
}

.nav-links {
  gap: 6px 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  position: relative;
  padding: 8px 4px;
  font-size: 14px;
  font-weight: 700;
  color: #475569;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--red), var(--accent));
  transform: scaleX(0);
  transition: transform 0.22s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

.mobile-panel.open {
  display: block;
}

.mobile-panel a {
  display: block;
  border-radius: 12px;
  margin: 4px 0;
  padding: 12px 10px;
  font-weight: 600;
  color: #475569;
}

.mobile-panel a.active,
.mobile-panel a:hover {
  background: var(--soft);
  color: var(--red);
}

body.nav-open {
  overflow: hidden;
}

/* ── 首页轮播 ── */
.hero-carousel {
  min-height: min(78vh, 720px);
  background: linear-gradient(135deg, #3f0d1f 0%, #7f1239 50%, #1e1b4b 100%);
}

.hero-slide img {
  transform: scale(1.04);
  transition: transform 8s ease-out, opacity 0.8s ease;
  filter: saturate(1.05) brightness(0.92);
}

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

.hero-bg {
  background:
    linear-gradient(105deg, rgba(63, 13, 31, 0.94) 0%, rgba(127, 18, 57, 0.72) 38%, rgba(30, 27, 75, 0.55) 68%, rgba(15, 23, 42, 0.25) 100%);
}

.hero-content {
  min-height: min(78vh, 720px);
  padding: 48px 0 72px;
  gap: 40px;
}

.hero-title {
  text-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}

.eyebrow {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}

.hero-panel {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-lg);
}

.hero-panel img {
  height: min(360px, 42vh);
}

.hero-dots {
  bottom: 32px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
}

/* ── 按钮 ── */
.btn {
  border-radius: 14px;
  padding: 13px 22px;
  letter-spacing: 0.02em;
}

.btn-primary {
  background: #fff;
  color: var(--red);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--red3), var(--red));
  box-shadow: 0 10px 28px rgba(185, 28, 60, 0.28);
}

.btn-ghost {
  backdrop-filter: blur(6px);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

/* ── 区块节奏 ── */
.section {
  padding: 64px 0;
}

.section-white {
  background: #fff;
}

.section-soft {
  background:
    linear-gradient(180deg, #fff 0%, var(--soft) 55%, var(--bg) 100%);
}

.section-head {
  align-items: flex-end;
  margin-bottom: 32px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.section-kicker {
  color: var(--red);
  font-size: 12px;
  letter-spacing: 0.14em;
}

.section-title {
  color: var(--ink);
}

.section-desc {
  max-width: 640px;
}

/* ── 统计卡 ── */
.stat-grid {
  gap: 16px;
}

.stat-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(145deg, #fff, var(--soft));
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.stat-card strong {
  background: linear-gradient(135deg, var(--red), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── 分类卡 ── */
.category-grid {
  gap: 16px;
}

.category-card {
  min-height: 156px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #9f1239 0%, var(--red) 55%, #ea580c 100%);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-card:nth-child(2n) {
  background: linear-gradient(145deg, #7f1239 0%, #be123c 55%, #f43f5e 100%);
}

.category-card:nth-child(3n) {
  background: linear-gradient(145deg, #831843 0%, #db2777 50%, #f97316 100%);
}

.category-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-lg);
}

/* ── 影片卡 ── */
.movie-grid {
  gap: 20px;
}

.movie-card {
  border-radius: var(--radius-lg);
  border-color: var(--line);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(185, 28, 60, 0.18);
  box-shadow: var(--shadow-lg);
}

.poster {
  background: linear-gradient(145deg, #3f0d1f, var(--red2));
}

.poster-year {
  background: rgba(255, 255, 255, 0.95);
  color: var(--red3);
  backdrop-filter: blur(4px);
}

.movie-info {
  padding: 16px 16px 18px;
}

.movie-title {
  transition: color 0.2s ease;
}

.meta span,
.card-tags span,
.tag-cloud span {
  background: var(--soft);
  color: #9f1239;
  border: 1px solid var(--line);
}

/* ── 编辑推荐 ── */
.feature-card {
  min-height: 300px;
  border-radius: var(--radius-lg);
}

.feature-card::after {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.2) 55%, transparent 100%);
}

/* ── 榜单 ── */
.rank-list {
  gap: 10px;
}

.rank-copy {
  min-width: 0;
  overflow: hidden;
}

.rank-copy strong {
  line-height: 1.35;
  word-break: normal;
  overflow-wrap: anywhere;
}

.rank-item {
  border-radius: 16px;
  border-color: var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  border-color: rgba(185, 28, 60, 0.2);
}

.rank-item:nth-child(1) .rank-no {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.rank-item:nth-child(2) .rank-no {
  background: linear-gradient(135deg, #94a3b8, #cbd5e1);
}

.rank-item:nth-child(3) .rank-no {
  background: linear-gradient(135deg, #d97706, #f59e0b);
}

.rank-no {
  background: linear-gradient(135deg, var(--red3), var(--red));
}

/* 播放页侧边栏仅 320px，需压缩榜单列宽避免标题竖排 */
.side-card .rank-list .rank-item {
  grid-template-columns: 32px 48px minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
}

.side-card .rank-list .rank-no {
  width: 32px;
  height: 32px;
  font-size: 13px;
  border-radius: 10px;
}

.side-card .rank-list .rank-item img {
  width: 48px;
  height: 64px;
}

.side-card .rank-list .rank-heat {
  display: none;
}

.side-card .rank-list .rank-copy strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
}

.side-card .rank-list .rank-copy em {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 搜索与筛选 ── */
.toolbar {
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(127, 18, 57, 0.05);
}

.search-box {
  border-radius: 14px;
  border-color: var(--line);
  background: var(--bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box:focus {
  border-color: rgba(185, 28, 60, 0.45);
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.1);
  background: #fff;
}

.filter-row {
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--red3), var(--red));
  box-shadow: 0 6px 18px rgba(185, 28, 60, 0.22);
}

/* ── 播放页 ── */
.breadcrumb {
  padding-top: 20px;
  margin-bottom: 0;
  color: #94a3b8;
}

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

.detail-hero {
  padding: 36px 0 56px;
  background:
    radial-gradient(ellipse 80% 120% at 0% 0%, rgba(255, 255, 255, 0.08), transparent 50%),
    linear-gradient(135deg, #3f0d1f 0%, #9f1239 45%, #be123c 100%);
}

.detail-poster {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.detail-meta span {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
}

.player-wrap {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lg);
}

.player-wrap video {
  width: 100%;
  max-height: min(72vh, 720px);
  background: #000;
}

.content-card,
.side-card {
  border-radius: var(--radius-lg);
  border-color: var(--line);
}

.mini-card {
  border-radius: 16px;
  border-color: var(--line);
}

.mini-card:hover {
  border-color: rgba(185, 28, 60, 0.2);
}

/* ── 页脚 ── */
.footer {
  margin-top: 56px;
  background: linear-gradient(180deg, #1e1b2e 0%, #111827 100%);
}

.footer-brand {
  background: linear-gradient(90deg, #fff, #fecdd3);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footer a:hover {
  color: #fda4af;
}

.footer-bottom {
  background: rgba(0, 0, 0, 0.18);
}

/* ── 杂项 ── */
#root {
  min-height: 100dvh;
}

body {
  margin: 0;
  overflow-x: hidden;
}

.player-error {
  margin: 0;
  padding: 14px 18px;
  background: rgba(185, 28, 60, 0.1);
  color: #9f1239;
  font-size: 14px;
  font-weight: 700;
}

.ababseo-float {
  position: fixed;
  right: 22px;
  bottom: 88px;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 9px;
  pointer-events: none;
  user-select: none;
  animation: ababseoFly 3.6s ease-in-out infinite;
}

.ababseo-tg {
  width: 30px;
  height: 30px;
  fill: #2aabee;
  filter: drop-shadow(0 6px 14px rgba(42, 171, 238, 0.35));
}

.ababseo-text {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #2aabee;
  text-shadow: 0 2px 10px rgba(42, 171, 238, 0.28);
}

@keyframes ababseoFly {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

.app-bootstrap {
  display: grid;
  place-items: center;
  min-height: 70dvh;
  padding: 24px;
  text-align: center;
  background: linear-gradient(135deg, #7f1239, #be123c, #d97706);
  color: #fff;
}

.app-bootstrap__spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.24);
  border-top-color: #fff;
  animation: appBootstrapSpin 0.9s linear infinite;
  margin: 0 auto 14px;
}

.app-bootstrap__msg {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.82);
}

@keyframes appBootstrapSpin {
  to { transform: rotate(360deg); }
}

/* ── 响应式 ── */
@media (max-width: 1100px) {
  .nav-links {
    gap: 4px 10px;
  }

  .nav-link {
    font-size: 13px;
  }

  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    display: none;
  }

  .rank-layout,
  .article-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .topbar {
    padding-top: env(safe-area-inset-top, 0);
  }

  .nav-wrap {
    min-height: 60px;
  }

  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero-carousel,
  .hero-content {
    min-height: 520px;
  }

  .hero-content {
    padding: 36px 0 64px;
  }

  .hero-title {
    font-size: clamp(32px, 8vw, 44px);
  }

  .section {
    padding: 48px 0;
  }

  .toolbar {
    padding: 14px;
  }

  .filter-row {
    margin: 0 -4px;
    padding: 0 4px 6px;
  }

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

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

  .detail-poster {
    max-width: 320px;
    margin: 0 auto;
  }

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

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

  .rank-item {
    grid-template-columns: 40px 56px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .rank-item img {
    width: 56px;
    height: 74px;
  }

  .rank-no {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .rank-heat {
    display: none;
  }

  .player-wrap video {
    max-height: 56vh;
  }
}

@media (max-width: 560px) {
  .wrap {
    width: min(1180px, calc(100% - 24px));
  }

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

  .hero-title {
    font-size: 32px;
  }

  .hero-actions {
    display: grid;
    gap: 10px;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

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

  .movie-info {
    padding: 12px;
  }

  .movie-title {
    font-size: 16px;
  }

  .section-head {
    align-items: flex-start;
    display: block;
  }

  .stat-card strong {
    font-size: 28px;
  }

  .detail-title {
    font-size: 32px;
  }

  .content-card {
    padding: 22px;
  }

  .hero-desc {
    font-size: 16px;
  }

  .rank-copy em {
    display: none;
  }

  .ababseo-float {
    right: max(14px, env(safe-area-inset-right, 0));
    bottom: calc(72px + env(safe-area-inset-bottom, 0));
  }

  .ababseo-tg {
    width: 24px;
    height: 24px;
  }

  .ababseo-text {
    font-size: 13px;
  }
}
