/* ========================================
   图片叠加工具 - image_overlay.css
   ======================================== */

/* ========== 隐藏工具类 ========== */
.io-hidden {
    display: none !important;
}

/* ========== 主容器 ========== */
.io-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 620px;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

/* 全屏模式 */
.io-container.io-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
}

/* ========== 顶部工具栏 ========== */
.io-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.35);
    flex-shrink: 0;
    min-height: 46px;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* 工具栏分组间半透明竖线分隔 */
.toolbar-group + .toolbar-group {
    border-left: 1px solid rgba(255, 255, 255, 0.22);
    padding-left: 8px;
    margin-left: 2px;
}

.toolbar-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
}

.toolbar-btn {
    padding: 5px 11px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #667eea;
    transition: all 0.2s;
    white-space: nowrap;
    user-select: none;
}

.toolbar-btn:hover {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.toolbar-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* 禁用态 */
.toolbar-btn:disabled {
    opacity: 0.38;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    pointer-events: none;
}

/* 清空二次确认态 - 变润色提示危险操作 */
#clearBtn.io-btn-confirm {
    background: #fff3cd;
    color: #d97706;
    animation: io-confirm-pulse 0.4s ease;
}

/* 布局按钮选中态 */
.layout-btn.io-layout-active {
    background: #fff;
    color: #764ba2;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6);
    font-weight: 700;
    position: relative;
}

.layout-btn.io-layout-active::after {
    content: '✓';
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 9px;
    background: #764ba2;
    color: #fff;
    border-radius: 50%;
    width: 13px;
    height: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ========== 主内容三列布局 ========== */
.io-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #f0f2f5;
    gap: 0;
}

/* ========== 左侧图层面板 ========== */
.io-layers-panel {
    width: 190px;
    min-width: 160px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.io-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: linear-gradient(to bottom, #fafafa, #f5f5f5);
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.io-panel-header h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

.io-panel-add-btn {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: 1px solid #c7d2fe;
    background: #eef2ff;
    color: #667eea;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.io-panel-add-btn:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.io-layers-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

/* 空态 */
.io-layers-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 120px;
    color: #94a3b8;
    text-align: center;
}

.io-empty-icon {
    font-size: 28px;
    margin-bottom: 6px;
    opacity: 0.5;
}

.io-layers-empty p,
.io-props-empty p {
    font-size: 12px;
    line-height: 1.6;
    margin: 0;
    color: #94a3b8;
}

/* 图层项 */
.io-layer-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 8px;
    margin-bottom: 4px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.18s;
    user-select: none;
    position: relative;
    animation: io-layer-fadein 0.18s ease;
}

.io-layer-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.io-layer-item.io-layer-selected {
    background: #eef2ff;
    border-color: #667eea;
    box-shadow: 0 1px 4px rgba(102, 126, 234, 0.18);
    border-left: 3px solid #667eea;
}

.io-layer-thumb {
    width: 36px;
    height: 36px;
    border-radius: 3px;
    overflow: hidden;
    background: repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%) 0 0 / 8px 8px;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
}

.io-layer-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.io-layer-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.io-layer-name {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.io-layer-meta {
    display: block;
    font-size: 10px;
    color: #94a3b8;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 图层操作按鈕组 */
.io-layer-actions {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}

/* ========== 自定义滚动条 ========== */
.io-layers-list::-webkit-scrollbar,
.io-props-content::-webkit-scrollbar,
.io-canvas-wrapper::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.io-layers-list::-webkit-scrollbar-track,
.io-props-content::-webkit-scrollbar-track,
.io-canvas-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.io-layers-list::-webkit-scrollbar-thumb,
.io-props-content::-webkit-scrollbar-thumb,
.io-canvas-wrapper::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.28);
    border-radius: 3px;
}

.io-layers-list::-webkit-scrollbar-thumb:hover,
.io-props-content::-webkit-scrollbar-thumb:hover,
.io-canvas-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.55);
}

/* 图层项淡入动画 */
@keyframes io-layer-fadein {
    from { opacity: 0; transform: translateX(-6px); }
    to   { opacity: 1; transform: translateX(0); }
}

.io-layer-action-btn {
    width: 20px;
    height: 18px;
    border: none;
    border-radius: 3px;
    background: transparent;
    color: #94a3b8;
    font-size: 11px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    line-height: 1;
}

.io-layer-action-btn:hover {
    background: #e2e8f0;
    color: #475569;
}

.io-layer-action-btn.io-vis-active {
    color: #667eea;
}

.io-layer-hidden .io-layer-thumb,
.io-layer-hidden .io-layer-info {
    opacity: 0.45;
}

/* ========== 中间画布区域 ========== */
.io-canvas-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    background: #e8edf2;
    position: relative;
}

/* 画布顶部控制栏 */
.io-canvas-top-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.io-bar-label {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
}

.io-canvas-size-group,
.io-canvas-bg-group,
.io-zoom-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.io-canvas-bg-group {
    border-left: 1px solid #e2e8f0;
    padding-left: 12px;
}

.io-zoom-group {
    border-left: 1px solid #e2e8f0;
    padding-left: 12px;
    margin-left: auto;
}

.io-bar-select {
    padding: 3px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 11px;
    color: #475569;
    background: #f8fafc;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.io-bar-select:focus {
    border-color: #667eea;
}

/* 背景切换按钮 */
.io-bg-btn {
    padding: 3px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #f8fafc;
    color: #64748b;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
}

.io-bg-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.io-bg-btn.io-bg-active {
    background: #eef2ff;
    border-color: #667eea;
    color: #667eea;
    font-weight: 600;
    position: relative;
}

.io-bg-btn.io-bg-active::after {
    content: '✓';
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 9px;
    background: #667eea;
    color: #fff;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* 缩放控制 */
.io-small-btn {
    width: 26px;
    height: 26px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #f8fafc;
    color: #475569;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
    line-height: 1;
}

.io-small-btn:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.io-zoom-label {
    font-size: 11px;
    color: #475569;
    min-width: 38px;
    text-align: center;
    font-weight: 600;
}

/* 画布滚动容器 */
.io-canvas-wrapper {
    flex: 1;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 126, 234, 0.35) transparent;
}

.io-canvas-wrapper.io-drag-over {
    outline: 2px dashed #667eea;
    outline-offset: -6px;
    background: rgba(102, 126, 234, 0.04);
}

/* 画布元素 */
#mainCanvas {
    display: block;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border-radius: 2px;
    cursor: default;
    max-width: none;
    transition: box-shadow 0.2s;
}

#mainCanvas:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

/* 画布游标状态类 */
#mainCanvas.ic-cursor-grab {
    cursor: grab;
}

#mainCanvas.ic-cursor-grabbing {
    cursor: grabbing;
}

#mainCanvas.ic-cursor-crosshair {
    cursor: crosshair;
}

/* 初始上传区域 */
.io-upload-zone {
    position: absolute;
    top: 46px;
    left: 0;
    right: 0;
    bottom: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f2f5;
    z-index: 10;
    transition: background 0.2s;
    cursor: pointer;
}

.io-upload-zone.io-drag-over {
    background: #eef2ff;
    border: 2px dashed #667eea;
}

.io-upload-inner {
    text-align: center;
    padding: 40px;
    background: #fff;
    border-radius: 12px;
    border: 2px dashed #d1d5db;
    max-width: 380px;
    width: 90%;
    transition: all 0.2s;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.io-upload-zone.io-drag-over .io-upload-inner {
    border-color: #667eea;
    background: #fafbff;
}

.io-upload-icon {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

.io-upload-title {
    font-size: 16px;
    font-weight: 600;
    color: #334155;
    margin: 0 0 6px;
}

.io-upload-desc {
    font-size: 13px;
    color: #94a3b8;
    margin: 0 0 16px;
}

.io-upload-btn {
    padding: 9px 22px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.io-upload-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.io-upload-tip {
    font-size: 11px;
    color: #cbd5e1;
    margin: 10px 0 0;
}

/* 快捷键提示 */
.ael-shortcut-tip {
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
    padding: 5px 12px;
    background: #fff;
    border-top: 1px solid #f0f2f5;
    flex-shrink: 0;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== 右侧属性面板 ========== */
.io-props-panel {
    width: 220px;
    min-width: 200px;
    background: #fff;
    border-left: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.io-props-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 140px;
    color: #94a3b8;
    text-align: center;
    padding: 20px;
}

.io-props-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

/* 属性分组 */
.io-prop-group {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f4f8;
}

.io-prop-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.io-prop-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.io-prop-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.io-prop-label-row .io-prop-label {
    margin-bottom: 0;
}

.io-prop-value {
    font-size: 11px;
    font-weight: 700;
    color: #667eea;
    min-width: 36px;
    text-align: right;
}

/* 输入框 */
.io-prop-input {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 12px;
    color: #334155;
    background: #f8fafc;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.io-prop-input:focus {
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

/* 滑块 */
.io-prop-slider {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: #e2e8f0;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    accent-color: #667eea;
}

.io-prop-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(102, 126, 234, 0.4);
}

.io-prop-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(102, 126, 234, 0.4);
}

/* 下拉框 */
.io-prop-select {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 12px;
    color: #334155;
    background: #f8fafc;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.io-prop-select:focus {
    border-color: #667eea;
}

/* 坐标输入行 */
.io-pos-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

.io-pos-label {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
    width: 12px;
    flex-shrink: 0;
}

.io-prop-number {
    flex: 1;
    padding: 5px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 12px;
    color: #334155;
    background: #f8fafc;
    outline: none;
    transition: border-color 0.2s;
    min-width: 0;
}

.io-prop-number:focus {
    border-color: #667eea;
    background: #fff;
}

/* 属性按钮组 */
.io-prop-btn-row {
    display: flex;
    gap: 6px;
}

.io-prop-btn {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    font-weight: 500;
}

.io-prop-btn:hover {
    background: #eef2ff;
    border-color: #667eea;
    color: #667eea;
}

.io-prop-btn-danger {
    border-color: #fde8e8;
    color: #ef4444;
    background: #fff8f8;
}

.io-prop-btn-danger:hover {
    background: #fde8e8;
    border-color: #ef4444;
    color: #ef4444;
}

/* 图层计数徽标 */
.io-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #667eea;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 10px;
    min-width: 18px;
    height: 16px;
    padding: 0 5px;
    margin-left: 4px;
    vertical-align: middle;
    line-height: 1;
}

/* 居中按鈕独立占一行 */
.io-center-btn {
    width: 100%;
    margin-top: 6px;
    justify-content: center;
    background: #f0f4ff;
    border-color: #c7d2fe;
    color: #667eea;
}

.io-center-btn:hover {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
}

/* 撤销/重做按鈕为小图标风格 */
#undoBtn, #redoBtn {
    font-size: 13px;
    padding: 5px 9px;
}

/* 图层图像尺寸显示 */
.io-img-info-group {
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.io-img-dims {
    display: block;
    font-size: 10px;
    color: #94a3b8;
    font-family: 'SFMono-Regular', Consolas, monospace;
    letter-spacing: 0.03em;
    text-align: center;
    padding: 3px 8px;
    background: #f0f4f8;
    border-radius: 4px;
    border: 1px solid #e8eef4;
}

/* 确认态闪烁动画 */
@keyframes io-confirm-pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.06); }
    100% { transform: scale(1); }
}

/* ========== Toast 通知 ========== */
.io-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    z-index: 99999;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    white-space: nowrap;
}

.io-toast.io-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.io-toast-success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.io-toast-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.io-toast-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* ========== 暗黑模式 ========== */
@media (prefers-color-scheme: dark) {
    .io-container {
        background: #1e293b;
    }

    .io-layers-panel,
    .io-props-panel {
        background: #1e293b;
        border-color: #334155;
    }

    .io-panel-header {
        background: linear-gradient(to bottom, #1e293b, #172033);
        border-color: #334155;
    }

    .io-panel-header h3 {
        color: #94a3b8;
    }

    .io-layers-list,
    .io-props-content {
        background: #1e293b;
    }

    .io-layer-item {
        background: #263147;
        border-color: #334155;
    }

    .io-layer-item:hover {
        background: #2d3d55;
        border-color: #475569;
    }

    .io-layer-item.io-layer-selected {
        background: #2a3558;
        border-color: #667eea;
    }

    .io-layer-name {
        color: #cbd5e1;
    }

    .io-canvas-area {
        background: #0f172a;
    }

    .io-canvas-top-bar {
        background: #1e293b;
        border-color: #334155;
    }

    .io-bar-label {
        color: #94a3b8;
    }

    .io-bar-select,
    .io-bg-btn {
        background: #263147;
        border-color: #334155;
        color: #94a3b8;
    }

    .io-bg-btn.io-bg-active {
        background: #2a3558;
        color: #a5b4fc;
        border-color: #667eea;
    }

    .io-small-btn {
        background: #263147;
        border-color: #334155;
        color: #94a3b8;
    }

    .io-zoom-label {
        color: #94a3b8;
    }

    .io-canvas-wrapper {
        background: #0f172a;
    }

    .io-upload-zone {
        background: #0f172a;
    }

    .io-upload-inner {
        background: #1e293b;
        border-color: #334155;
    }

    .io-upload-title {
        color: #cbd5e1;
    }

    .io-upload-desc {
        color: #64748b;
    }

    .io-prop-group {
        border-color: #263147;
    }

    .io-prop-label {
        color: #64748b;
    }

    .io-prop-input,
    .io-prop-select,
    .io-prop-number {
        background: #263147;
        border-color: #334155;
        color: #cbd5e1;
    }

    .io-prop-input:focus,
    .io-prop-select:focus,
    .io-prop-number:focus {
        border-color: #667eea;
        background: #2d3d55;
    }

    .io-prop-slider {
        background: #334155;
    }

    .io-prop-btn {
        background: #263147;
        border-color: #334155;
        color: #94a3b8;
    }

    .io-prop-btn:hover {
        background: #2a3558;
        border-color: #667eea;
        color: #a5b4fc;
    }

    .io-prop-btn-danger {
        background: #2d1c1c;
        border-color: #4d2020;
        color: #f87171;
    }

    .ael-shortcut-tip {
        background: #1e293b;
        border-color: #263147;
        color: #64748b;
    }

    .io-panel-add-btn {
        background: #2a3558;
        border-color: #4c5f8a;
        color: #a5b4fc;
    }

    .io-layer-item.io-layer-selected {
        border-left-color: #667eea;
    }

    .io-img-dims {
        background: #1a2640;
        border-color: #334155;
        color: #64748b;
    }

    .io-canvas-wrapper.io-drag-over {
        outline-color: #667eea;
        background: rgba(102, 126, 234, 0.06);
    }

    .io-layers-list::-webkit-scrollbar-thumb,
    .io-props-content::-webkit-scrollbar-thumb,
    .io-canvas-wrapper::-webkit-scrollbar-thumb {
        background: rgba(102, 126, 234, 0.25);
    }
}

/* ========== 响应式 ========== */
@media (max-width: 900px) {
    .io-layers-panel {
        width: 160px;
        min-width: 140px;
    }

    .io-props-panel {
        width: 190px;
        min-width: 170px;
    }

    .toolbar-label {
        display: none;
    }
}

@media (max-width: 640px) {
    .io-container {
        height: auto;
        min-height: 100vh;
    }

    .io-main-content {
        flex-direction: column;
    }

    .io-layers-panel {
        width: 100%;
        max-height: 140px;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .io-layers-list {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 6px;
        gap: 6px;
    }

    .io-layer-item {
        min-width: 110px;
        flex-shrink: 0;
        margin-bottom: 0;
    }

    .io-props-panel {
        width: 100%;
        min-width: 0;
        border-left: none;
        border-top: 1px solid #e2e8f0;
    }

    .io-props-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 16px;
        padding: 8px 12px;
    }

    .io-canvas-area {
        min-height: 300px;
    }

    .io-canvas-top-bar {
        flex-wrap: wrap;
    }

    .io-zoom-group {
        border-left: none;
        padding-left: 0;
    }

    .ael-shortcut-tip {
        font-size: 10px;
    }
}
