html,
body {
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
}
#app {
height: 100%;
margin: 0;
padding: 0;
}
/* 面板根:占满整个面板,沿用 default 的 preview-col 布局 */
.preview-panel-root {
position: relative;
height: 100%;
box-sizing: border-box;
display: flex;
flex-direction: column;
border: 1px solid var(--color-normal-border);
background: #171a1f;
overflow: hidden;
}
.preview-toolbar {
display: flex;
align-items: center;
gap: 6px;
padding: 6px 8px;
border-bottom: 1px solid var(--color-normal-border);
background: linear-gradient(180deg, #1c1f24, #171a1f);
flex: none;
}
.p-online {
display: inline-flex;
align-items: center;
gap: 5px;
font-size: 12px;
color: #8b94a3;
white-space: nowrap;
}
.p-online .dot {
width: 7px;
height: 7px;
border-radius: 50%;
background: #5a6270;
flex: none;
}
.p-online.ok {
color: #10b981;
}
.p-online.ok .dot {
background: #34d399;
box-shadow: 0 0 6px #34d399;
}
.p-online.warn {
color: #f59e0b;
}
.p-online.warn .dot {
background: #f59e0b;
box-shadow: 0 0 6px #f59e0b;
}
.p-sep {
width: 1px;
height: 18px;
background: var(--color-normal-border);
margin: 0 4px;
flex: none;
}
.p-group {
display: inline-flex;
align-items: center;
gap: 5px;
color: #8b94a3;
}
.p-group > ui-icon {
font-size: 14px;
}
.p-device {
min-width: 108px;
}
.p-fps-in {
width: 56px;
}
.pbtn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 26px;
height: 26px;
padding: 0;
border: 1px solid var(--color-normal-border);
border-radius: 5px;
background: #21252b;
color: #a3adbd;
cursor: pointer;
transition: all 0.12s ease;
flex: none;
}
.pbtn:hover {
background: #2a303a;
color: #e6ebf2;
border-color: #3a4250;
}
.pbtn.on {
background: linear-gradient(180deg, #3b82f6, #2563eb);
color: #fff;
border-color: #3b82f6;
box-shadow: 0 1px 6px rgba(59, 130, 246, 0.45);
}
.pbtn.major {
width: 30px;
background: linear-gradient(180deg, #3b82f6, #2563eb);
color: #fff;
border-color: #3b82f6;
box-shadow: 0 1px 6px rgba(59, 130, 246, 0.45);
}
.pbtn.major:hover {
filter: brightness(1.12);
}
.pbtn ui-icon {
font-size: 15px;
}
.spacer {
flex: 1;
}
.p-zoom {
position: absolute;
right: 8px;
bottom: 8px;
z-index: 5;
padding: 2px 8px;
border-radius: 10px;
background: rgba(20, 22, 26, 0.78);
color: #cfe0ff;
font-size: 11px;
font-variant-numeric: tabular-nums;
pointer-events: none;
backdrop-filter: blur(3px);
}
.preview-frame-wrap {
flex: 1;
display: flex;
position: relative;
min-height: 0;
}
/* 无 iframe 游戏渲染容器(引擎脚本直接跑在面板 DOM 里) */
.game-view {
flex: 1;
width: 100%;
min-width: 0;
background: #171a1f;
overflow: hidden;
position: relative;
}
/* 预览器 UI 控件条仅作为 Ui 构造依赖保留,不显示 */
#yyka-game-host .toolbar {
display: none !important;
}
#yyka-game-host .content,
#yyka-game-host .contentWrap,
#yyka-game-host #GameDiv,
#yyka-game-host #Cocos3dGameContainer {
width: 100% !important;
height: 100% !important;
margin: 0 !important;
padding: 0 !important;
}
#yyka-game-host #GameDiv {
display: flex;
align-items: center;
justify-content: center;
background: #171a1f;
}
#yyka-game-host #GameCanvas {
width: 100%;
height: 100%;
display: block;
}
/* 加载画面 */
#yyka-game-host #splash {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
background: #141519;
}
#yyka-game-host #splash .progress-bar {
width: 200px;
height: 6px;
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 8px;
background: rgba(255, 255, 255, 0.04);
overflow: hidden;
}
#yyka-game-host #splash .progress-bar > span {
display: block;
height: 100%;
width: 0;
background: linear-gradient(90deg, #3b82f6, #60a5fa);
border-radius: 8px;
}
#yyka-game-host #bulletin {
position: absolute;
inset: 0;
display: none;
align-items: center;
justify-content: center;
color: rgba(255, 255, 255, 0.45);
font-size: 13px;
}
#yyka-game-host #error {
position: absolute;
inset: 0;
display: none;
z-index: 10;
background: rgba(0, 0, 0, 0.85);
color: #f87171;
padding: 16px;
overflow: auto;
white-space: pre-wrap;
font-size: 12px;
}
/* 面板层渲染错误提示(点击重新加载) */
.preview-err {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
background: rgba(16, 16, 16, 0.88);
color: #f87171;
font-size: 12px;
line-height: 1.7;
padding: 16px;
text-align: center;
cursor: pointer;
z-index: 6;
word-break: break-all;
}
/* 预览服务未启动时的遮罩提示 */
.preview-cover {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
background: rgba(16, 16, 16, 0.82);
z-index: 5;
}
.cover-box {
text-align: center;
color: var(--color-normal-contrast-weak);
font-size: 13px;
line-height: 1.9;
padding: 16px;
}
.cover-box b {
display: block;
font-size: 15px;
color: var(--color-warn);
margin-bottom: 10px;
}
.cover-box button {
margin-top: 12px;
}
.ok {
color: var(--color-success);
}
.warn {
color: var(--color-warn);
}