/* ============================================================
   恒星页  专属样式
   轨道中心：设计稿 (985, 540)
   ============================================================ */

/* 左侧信息栏（自上而下）：恒星名称+介绍 → 矿物统计 → 分割线 → 行星 hover 信息 */
.star-panel  { left: 40px; top: 200px;  width: 300px; min-height: 120px; animation: ui-rise 0.7s 0.15s ease both; }
.planet-panel{ left: 40px; top: 700px;  width: 300px; min-height: 180px; }
.star-resource-panel { animation: ui-rise 0.7s 0.3s ease both; }
.orbit-system { animation: ui-fade 0.9s 0.1s ease both; }

/* 分割线（分隔「恒星信息（含矿物统计）」与「行星 hover 信息」） */
.divider {
  position: absolute;
  left: 40px;
  top: 676px;
  width: 300px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  box-shadow: var(--glow);
}

.planet-hint {
  position: absolute;
  left: 40px;
  top: 700px;
  width: 300px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-dim);
}

/* ---- 恒星系矿物统计面板（左侧，紧贴恒星介绍下方，汇总系内全部行星资源） ---- */
.star-resource-panel { left: 40px; top: 452px; width: 300px; }
.tier-star .resource-title {
  font-size: 15px;
  color: var(--accent-2);
  letter-spacing: 2px;
}
.resource-summary {
  margin-top: 6px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

/* 矿物统计列表：双列网格，每项 图标 + 名称 + 累加总量 */
.tier-star .resource-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}
.mineral-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
/* 矿物图标（素材来自「矿物/」目录） */
.mineral-stat .r-icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: var(--r-sm);
  background: rgba(120, 200, 255, 0.08);
  border: 1px solid var(--line);
  padding: 3px;
  box-sizing: border-box;
}
.mineral-stat .r-icon-empty { background: rgba(120, 200, 255, 0.04); }
.mineral-stat .ms-body { flex: 1 1 auto; min-width: 0; line-height: 1.25; }
.mineral-stat .ms-name {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mineral-stat .ms-amount {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- 轨道系统 ---- */
.orbit-system {
  position: absolute;
  left: 985px;
  top: 540px;
  width: 0;
  height: 0;
}

/* 单条轨道环 */
.orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(120, 200, 255, 0.22);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
/* 悬停对应行星时高亮其轨道 */
.orbit.active {
  border-color: rgba(120, 210, 255, 0.85);
  box-shadow: 0 0 16px rgba(56, 214, 255, 0.55), inset 0 0 16px rgba(56, 214, 255, 0.25);
}

/* 行星绕轨旋转的“臂” */
.orbit-arm {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  transform-origin: 0 0;
  animation: orbit-rotate linear infinite;
}
@keyframes orbit-rotate { to { transform: rotate(360deg); } }

/* 恒星本体（--star-glow 由 JS 按光谱型设置，缺省为恒星金） */
.star-core {
  position: absolute;
  left: 0;
  top: 0;
  --star-glow: #ffb648;
  transform: translate(-50%, -50%);
  animation: star-pulse 5s ease-in-out infinite;
}
.star-core img {
  display: block; width: 100%; height: 100%; object-fit: contain;
  /* 恒星自转：绕自身轴缓慢旋转，周期由 JS 随机设定（与外层光晕脉动相互独立） */
  animation: planet-self-spin linear infinite;
}
@keyframes star-pulse {
  0%, 100% { filter: drop-shadow(0 0 32px var(--star-glow)); }
  50%      { filter: drop-shadow(0 0 60px var(--star-glow)); }
}
/* 日冕：恒星周身缓慢旋转的光芒，叠在本体之后 */
.star-core::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 210%;
  height: 210%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg,
    transparent 0deg 5deg,
    var(--star-glow) 5deg 6deg,
    transparent 6deg 11deg);
  opacity: 0.10;
  filter: blur(3px);
  z-index: -1;
  pointer-events: none;
  animation: corona-spin 26s linear infinite;
}
@keyframes corona-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* 行星节点（挂在轨道臂末端） */
.planet-node {
  position: absolute;
  left: 0;
  top: 0;
  cursor: pointer;
  /* 居中靠 JS 设置的负 margin（尺寸不定）；transform 留给反向自转动画 */
  transition: filter 0.25s ease;
  filter: drop-shadow(0 0 6px rgba(56, 214, 255, 0.4));
  /* 反向自转，使行星贴图始终保持正向 */
  animation: orbit-rotate linear infinite reverse;
}
.planet-node img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  /* 自转：绕自身轴旋转（公转由轨道臂负责，二者互不影响） */
  animation: planet-self-spin linear infinite;
}
@keyframes planet-self-spin { to { transform: rotate(360deg); } }
.planet-node:hover { filter: drop-shadow(0 0 20px rgba(56, 214, 255, 0.95)); }
.planet-node.active { filter: drop-shadow(0 0 24px rgba(255, 182, 72, 0.95)); }
