/* ============================================================
   Angus Inst. — Products 页 · Angus Star 星球交互
   总览 3:2 → 预渲染转场 → 区域近景（右侧 30% 产品面板）
   ============================================================ */

.as-star { margin-top: 4px; }

.as-stage {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: 18px;
  overflow: hidden;
  background: #10203a;
  box-shadow: 0 18px 44px rgba(16, 32, 58, .18);
  isolation: isolate;
}

/* ---------- 底图 ---------- */
.as-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* display:block 类会盖过 UA 的 [hidden]{display:none}，这里显式补回 */
.as-img[hidden], .as-video[hidden], .as-panel[hidden], .as-intro[hidden] { display: none; }
.as-closeup.as-fade-in { animation: as-fade .32s ease both; }
@keyframes as-fade { from { opacity: 0; } to { opacity: 1; } }

.as-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}

.as-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 22, 40, .18) 0%, rgba(10, 22, 40, 0) 26%);
}
.as-stage[data-mode="night"] .as-shade {
  background: linear-gradient(180deg, rgba(6, 12, 28, .3) 0%, rgba(6, 12, 28, 0) 26%);
}

/* ---------- 区域入口（总览上） ---------- */
.as-spot {
  position: absolute;
  left: var(--sx);
  top: var(--sy);
  transform: translate(-50%, -50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px 7px 9px;
  border: 2px solid rgba(43, 87, 154, .28);
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: #1d3353;
  font: 600 13.5px/1 "Nunito", "PingFang SC", sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 32, 58, .22);
  transition: transform .16s ease, box-shadow .16s ease;
}
.as-spot:hover, .as-spot:focus-visible {
  transform: translate(-50%, -50%) scale(1.06);
  box-shadow: 0 8px 22px rgba(16, 32, 58, .3);
  outline: none;
}
.as-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3b82d6;
  box-shadow: 0 0 0 4px rgba(59, 130, 214, .22);
  flex: none;
}
.as-stage[data-mode="night"] .as-dot { background: #7fb2f5; }
.as-spot[hidden] { display: none; }
/* 悬停/聚焦显示简介 */
.as-spot::after {
  content: attr(data-blurb);
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: 240px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(24, 36, 58, .93);
  color: #eef3fa;
  font: 500 12.5px/1.55 "Nunito", "PingFang SC", sans-serif;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transition: opacity .16s ease, transform .16s ease;
  pointer-events: none;
  white-space: normal;
}
.as-spot:hover::after, .as-spot:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ---------- 昼夜切换 ---------- */
.as-mode {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(20, 32, 54, .55);
  backdrop-filter: blur(6px);
}
.as-mode-btn {
  border: 0;
  border-radius: 999px;
  padding: 5px 12px;
  background: transparent;
  color: #dfe9f7;
  font: 600 12.5px/1.2 "Nunito", "PingFang SC", sans-serif;
  cursor: pointer;
}
.as-mode-btn[aria-pressed="true"] { background: rgba(255, 255, 255, .92); color: #1d3353; }

/* ---------- 手机端区域介绍卡 ---------- */
.as-intro {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 5;
  width: min(86%, 340px);
  padding: 13px 15px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 10px 30px rgba(16, 32, 58, .3);
}
.as-intro-text { margin: 0 0 10px; font: 500 13px/1.6 "Nunito", "PingFang SC", sans-serif; color: #24365a; }
.as-intro-actions { display: flex; gap: 8px; }

/* ---------- 按钮 ---------- */
.as-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1.5px solid rgba(43, 87, 154, .3);
  border-radius: 999px;
  padding: 6px 13px;
  background: #fff;
  color: #1d3353;
  font: 600 12.5px/1.2 "Nunito", "PingFang SC", sans-serif;
  cursor: pointer;
  text-decoration: none;
}
.as-btn:hover { background: #f2f6fc; }
.as-btn-solid { background: #3b82d6; border-color: #3b82d6; color: #fff; }
.as-btn-solid:hover { background: #2f6fbd; }

/* ---------- 加载失败重试 ---------- */
.as-retry {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(14, 24, 42, .82);
  color: #eef3fa;
  font: 600 14px/1.4 "Nunito", "PingFang SC", sans-serif;
}
.as-retry[hidden] { display: none; }

/* ---------- 产品面板（右侧约 30%） ---------- */
.as-panel {
  position: absolute;
  top: 5.5%;
  right: 2.5%;
  bottom: 5.5%;
  width: 31%;
  min-width: 300px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: #eff0f0;
  box-shadow: 0 14px 40px rgba(12, 24, 46, .32);
  overflow: hidden;
  animation: as-panel-in .3s ease both;
}
@keyframes as-panel-in {
  from { opacity: 0; transform: translateX(26px); }
  to   { opacity: 1; transform: translateX(0); }
}
.as-stage[data-mode="night"] .as-panel {
  background: rgba(23, 32, 50, .94);
  color: #e8eef8;
}

.as-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 13px;
  border-bottom: 1px solid rgba(29, 51, 83, .1);
}
.as-stage[data-mode="night"] .as-panel-head { border-bottom-color: rgba(232, 238, 248, .14); }
.as-region-title {
  flex: 1;
  margin: 0;
  font: 800 15px/1.3 "Nunito", "PingFang SC", sans-serif;
  color: #1d3353;
  text-align: center;
}
.as-stage[data-mode="night"] .as-region-title { color: #e8eef8; }
.as-back-list, .as-back-star { flex: none; }
.as-stage[data-mode="night"] .as-btn { background: rgba(255, 255, 255, .1); border-color: rgba(232, 238, 248, .3); color: #e8eef8; }
.as-stage[data-mode="night"] .as-btn:hover { background: rgba(255, 255, 255, .18); }
.as-stage[data-mode="night"] .as-btn-solid { background: #3b82d6; border-color: #3b82d6; color: #fff; }

.as-panel-body { flex: 1; overflow-y: auto; padding: 12px 13px; overscroll-behavior: contain; }
.as-panel-body:focus { outline: none; }

/* 列表 */
.as-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.as-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid rgba(29, 51, 83, .12);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}
.as-item:hover, .as-item:focus-visible {
  border-color: rgba(59, 130, 214, .55);
  box-shadow: 0 4px 14px rgba(59, 130, 214, .16);
  transform: translateY(-1px);
  outline: none;
}
.as-stage[data-mode="night"] .as-item { background: rgba(255, 255, 255, .07); border-color: rgba(232, 238, 248, .16); }
.as-item img {
  width: 74px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  flex: none;
  background: var(--blue-soft, #e8f0fb);
}
.as-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.as-item-title { font: 700 13.5px/1.35 "Nunito", "PingFang SC", sans-serif; color: #1d3353; }
.as-stage[data-mode="night"] .as-item-title { color: #eef3fa; }
.as-item-desc {
  font: 500 12px/1.5 "Nunito", "PingFang SC", sans-serif;
  color: #5a6c88;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.as-stage[data-mode="night"] .as-item-desc { color: #b9c7dd; }
.as-item-arrow { flex: none; color: #7d92b3; font-weight: 700; }

.as-empty {
  margin: 8px 2px;
  padding: 18px 14px;
  border: 1.5px dashed rgba(29, 51, 83, .2);
  border-radius: 12px;
  text-align: center;
  font: 600 13px/1.6 "Nunito", "PingFang SC", sans-serif;
  color: #5a6c88;
}
.as-stage[data-mode="night"] .as-empty { color: #b9c7dd; border-color: rgba(232, 238, 248, .25); }

/* 详情（同一面板内展开） */
.as-article-title { margin: 4px 0 10px; font: 800 16.5px/1.4 "Nunito", "PingFang SC", sans-serif; color: #1d3353; }
.as-stage[data-mode="night"] .as-article-title { color: #eef3fa; }
.as-article-title:focus { outline: none; }
.as-article-content { font: 500 13px/1.75 "Nunito", "PingFang SC", sans-serif; color: #33465f; }
.as-stage[data-mode="night"] .as-article-content { color: #ccd8ea; }
.as-article-content p { margin: 0 0 10px; }
.as-article-content img { max-width: 100%; height: auto; border-radius: 10px; }
.as-article-content h2, .as-article-content h3, .as-article-content h4 { font-size: 14px; margin: 14px 0 6px; color: #1d3353; }
.as-article-content ul, .as-article-content ol { padding-left: 20px; margin: 0 0 10px; }
.as-article-more { margin-top: 14px; }

/* ---------- 移动端：列表放到图片下方 ---------- */
@media (max-width: 860px) {
  .as-stage { aspect-ratio: auto; background: transparent; box-shadow: none; overflow: visible; }
  .as-img, .as-video { position: relative; inset: auto; width: 100%; height: auto; aspect-ratio: 3 / 2; border-radius: 14px; }
  .as-video { position: absolute; }
  .as-stage { overflow: hidden; }
  /* 入口改为图片内小标签 */
  .as-spot { padding: 5px 10px 5px 7px; font-size: 12px; }
  .as-spot::after { display: none; }
  .as-panel {
    position: static;
    width: auto;
    min-width: 0;
    margin-top: 12px;
    animation: none;
  }
  .as-intro { bottom: 12px; }
  .as-mode { top: 10px; right: 10px; }
}

/* ---------- 减少动态 ---------- */
@media (prefers-reduced-motion: reduce) {
  .as-closeup.as-fade-in, .as-panel { animation: none; }
  .as-spot, .as-item { transition: none; }
}
