/* 3D 动态彩色标签云 · 前端样式
   设计约束：零硬编码主题私有色，仅用 currentColor + color-mix；
   旧浏览器用 @supports 兜底 rgba；主题自适应由 data/配置与 JS 协作。 */

.t3d-cloud {
    position: relative;
    width: 100%;
    color: inherit;               /* 跟随主题文字色 */
    box-sizing: border-box;
}

/* ===== 球体模式 ===== */
.t3d-sphere {
    height: 300px;
    overflow: hidden;
}
/* 无 JS 时的退化布局：普通换行标签流，避免叠在一起 */
.t3d-sphere .t3d-tag {
    position: relative;
    display: inline-block;
    margin: 3px 4px;
    color: inherit;
}
/* JS 接管后：绝对定位到球面 */
.t3d-sphere.t3d-ready {
    cursor: grab;
}
.t3d-sphere.t3d-ready.t3d-grab {
    cursor: grabbing;
}
.t3d-sphere.t3d-ready .t3d-tag {
    position: absolute;
    left: 0;
    top: 0;
    margin: 0;
    transform-origin: center;
    will-change: transform, opacity;
    color: inherit;
}

/* ===== 气泡模式 ===== */
.t3d-badge {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    padding: 4px;
    align-items: center;
}
.t3d-badge .t3d-tag {
    display: inline-flex;
    align-items: center;
    padding: 7px 13px;
    border-radius: 999px;
    color: inherit;
    will-change: transform;
    transition: transform .18s ease, box-shadow .18s ease;
}
.t3d-badge .t3d-tag:hover {
    transform: translateY(-3px);
}

/* ===== 标签通用 ===== */
.t3d-tag {
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.t3d-tag:hover {
    text-decoration: underline;
}

/* 旧浏览器兜底：不支持 color-mix 时由 JS 改用 rgba，此处保留透明背景 */
@supports not (color: color-mix(in srgb, red, transparent)) {
    .t3d-badge .t3d-tag {
        background: rgba(120, 140, 200, .15);
        border: 1px solid rgba(120, 140, 200, .3);
    }
}
