/* 窗口系统 */
.window {
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
}

.window.minimized {
    flex: none;
    height: 28px;
}

.window.minimized .window-content {
    display: none;
}

/* 窗口调整大小手柄 */
.resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 18px;
    height: 18px;
    background: transparent;
    cursor: nw-resize;
    z-index: 10;
    border-bottom-right-radius: 6px;
}

.resize-handle::after {
    content: '';
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 8px;
    height: 8px;
    background: transparent;
    opacity: 0;
    transition: opacity 0.2s ease;
    border: 2px solid transparent;
    border-bottom: 2px solid rgba(160, 160, 160, 0.7);
    border-right: 2px solid rgba(160, 160, 160, 0.7);
    border-bottom-right-radius: 8px;
    pointer-events: none;
}

.resize-handle:hover::after {
    opacity: 1;
}

/* 窗口标题栏 */
.window-header {
    height: 28px;
    background: #404040;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    cursor: move;
}

.window-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #e0e0e0;
    flex: 0 0 auto;
}

.window-title i {
    font-size: 12px;
    color: #ccc;
}

.window-context-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.window-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.window-context-badge,
.window-state-badge {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 9px;
    border-radius: 4px;
    font-size: 10px;
    line-height: 1;
    white-space: nowrap;
    letter-spacing: 0;
}

.window-context-badge {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.window-state-badge {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 600;
}

.window-state-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 6px;
    background: rgba(255, 255, 255, 0.45);
}

.window-state-badge.is-built {
    background: rgba(42, 114, 197, 0.22);
    color: #9fc8ff;
}

.window-state-badge.is-compiling {
    background: rgba(212, 146, 40, 0.22);
    color: #ffd391;
    border-color: rgba(255, 211, 145, 0.24);
}

.window-state-badge.is-compiling::before {
    background: #f2b84b;
    box-shadow: 0 0 0 3px rgba(242, 184, 75, 0.14);
}

.window-state-badge.is-downloading {
    background: rgba(42, 114, 197, 0.22);
    color: #9fc8ff;
    border-color: rgba(159, 200, 255, 0.24);
}

.window-state-badge.is-downloading::before {
    background: #6caeff;
    box-shadow: 0 0 0 3px rgba(108, 174, 255, 0.14);
}

.window-state-badge.is-running {
    background: rgba(29, 156, 98, 0.22);
    color: #8cf2bd;
    border-color: rgba(140, 242, 189, 0.24);
}

.window-state-badge.is-running::before {
    background: #42d987;
    box-shadow: 0 0 0 3px rgba(66, 217, 135, 0.16);
}

.window-state-badge.is-error {
    background: rgba(189, 28, 34, 0.22);
    color: #ffb5b7;
    border-color: rgba(255, 181, 183, 0.24);
}

.window-state-badge.is-error::before {
    background: #ff7478;
}

.window-state-badge.is-idle::before {
    background: rgba(255, 255, 255, 0.5);
}

.window-state-badge.is-paused {
    background: rgba(212, 146, 40, 0.22);
    color: #ffd391;
    border-color: rgba(255, 211, 145, 0.24);
}

.window-state-badge.is-paused::before {
    background: #f2b84b;
}

.window-controls {
    display: flex;
    gap: 4px;
    flex: 0 0 auto;
    margin-left: auto;
}

body.layout-fs_act .action-window .window-controls {
    display: none;
}

.window-control-btn {
    width: 18px;
    height: 18px;
    background: transparent;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #ccc;
    transition: all 0.2s;
}

.window-control-btn:hover {
    background-color: #555;
    color: #fff;
}

.window-control-btn.close-btn:hover {
    background-color: #BD1C22;
    color: white;
}

/* 窗口内容区 */
.window-content {
    flex: 1;
    background: #2b2b2b;
    overflow: hidden;
}

/* 仿真布局 */
.simulation-layout {
    height: 100%;
    display: flex;
    gap: 2px;
    padding: 2px;
}

/* 中心内容区域 */
.center-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
}

/* 主视口 */
.main-viewport {
    flex: 1;
    background: #393939;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
}

/* 3D视口 */
.viewport-3d {
    flex: 1;
    background: #2b2b2b;
    position: relative;
    overflow: hidden;
}

/* 底部时间轴 */
.timeline-panel {
    height: 32px;
    background: #353535;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.timeline-panel.dock-empty {
    display: none;
}

.timeline-header {
    height: 32px;
    background: #333;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    padding: 0 8px 0 12px;
    flex-shrink: 0;
}

.timeline-title {
    color: #ccc;
    font-size: 11px;
    flex-shrink: 0;
}

.arm-taskbar {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.arm-taskbar:empty {
    display: none;
}

.arm-taskbar-item {
    height: 24px;
    min-width: 72px;
    max-width: 108px;
    padding: 0 10px;
    color: #c8c8c8;
    background: #404040;
    border: 0;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    line-height: 24px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.arm-taskbar-item[hidden] {
    display: none;
}

.arm-taskbar-item:hover {
    color: #fff;
    background: #4b4b4b;
}

.timeline-toggle {
    background: transparent;
    color: #ccc;
    border: none;
    cursor: pointer;
    font-size: 8px;
    width: 16px;
    height: 16px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s;
}

.timeline-toggle:hover {
    color: #fff;
}

/* 收起状态显示向上箭头 */
/* 展开状态显示向下箭头 */

.timeline-toggle i {
    display: inline-block;
    transition: transform 0.3s ease;
}

.playback-controls {
    display: flex;
    gap: 8px;
}

.play-btn, .stop-btn, .record-btn {
    background: #4a4a4a;
    color: #ccc;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.play-btn:hover, .stop-btn:hover, .record-btn:hover {
    background: #555;
}

.timeline-ruler {
    height: 20px;
    background: #333;
    border-bottom: 1px solid #555;
}

.timeline-track {
    flex: 1;
    background: #2b2b2b;
}

/* 右侧属性面板基础样式（详细样式已移至panel-tabs.css） */

/* 面板样式已移至panel-tabs.css */

/* 所有面板相关样式已移至panel-tabs.css */ 
