/* ==========================================================================
   画笔星球 · 星币体系公共样式 star.css
   --------------------------------------------------------------------------
   为什么单独一个文件：
     原来的 upgrade.css 是「人民币时代」写的，价格样式只有 .hbx-price。
     现在改成星币，价格要用小圆徽标 + 数字，出现在列表页/详情页/我的页面，
     与其在三处各写一遍，不如抽出来共用。

   依赖：upgrade.css 里的 CSS 变量（--brand / --ink / --line ...）
   所以引入顺序必须是：先 upgrade.css，再 star.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   一、星币价格（列表卡片 / 详情页共用）
   -------------------------------------------------------------------------- */

.hbx-price {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-size: 17px;
  font-weight: 700;
  color: var(--brand, #E8453C);
  letter-spacing: -0.3px;
}

/* 星币符号：用一个小圆点造型，比 ¥ 更「游戏化」一点 */
.hbx-price .star-ic {
  font-size: 12px;
  color: var(--brand, #E8453C);
  opacity: 0.85;
  transform: translateY(-1px);
}

.hbx-price .unit {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-3, #98A0A8);
  margin-left: 1px;
  letter-spacing: 0;
}

/* 详情页大号价格 */
.hbx-dprice {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.hbx-dprice .star-ic {
  font-size: 15px;
  color: var(--brand, #E8453C);
}
.hbx-dprice .unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3, #98A0A8);
}

/* 划线价（原件 / 原价对比） */
.hbx-price-old {
  font-size: 12px;
  color: var(--ink-3, #98A0A8);
  text-decoration: line-through;
  margin-left: 6px;
  font-weight: 400;
}

/* --------------------------------------------------------------------------
   二、顶栏账号区（星币 + 头像）
   -------------------------------------------------------------------------- */

.hbx-medock {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin-left: 10px;
}

.hbx-medock .hbx-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--brand, #E8453C);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
}

.hbx-medock .hbx-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hbx-medock .star-bal {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand, #E8453C);
  text-decoration: none;
  white-space: nowrap;
  margin-right: 12px;
}

/* --------------------------------------------------------------------------
   三、价格角标：0.1 星币这种「超低价」给个视觉提示
   -------------------------------------------------------------------------- */

.hbx-cheap {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: var(--r-full, 999px);
  background: var(--brand-soft, #FFF1EF);
  color: var(--brand, #E8453C);
  font-size: 10.5px;
  font-weight: 600;
  vertical-align: middle;
}

/* --------------------------------------------------------------------------
   四、星币不足浮层（upgrade.js 里创建，这里给样式兜底）
   -------------------------------------------------------------------------- */

#hbx-shortage a:hover {
  opacity: 0.88;
}

/* --------------------------------------------------------------------------
   五、小屏适配
   -------------------------------------------------------------------------- */

@media (max-width: 420px) {
  .hbx-medock .star-bal {
    margin-right: 8px;
    font-size: 12.5px;
  }
  .hbx-price { font-size: 16px; }
}
