/* ============================================================
   彩虹堂服装设计画板  tuya_draw.css
   ============================================================ */

/* ── 全局重置 ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    background: #1e1e2e;
    color: #e0e0e0;
    font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
    font-size: 13px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── 顶部标题栏 ───────────────────────────────────── */
.dd-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: #12121e;
    border-bottom: 1px solid #333;
    flex-shrink: 0;
}

.dd-topbar h1 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #e8a5c8;
    white-space: nowrap;
}

.dd-back-link {
    color: #aaa;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
    padding: 3px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}
.dd-back-link:hover { color: #fff; background: rgba(255,255,255,0.08); }

.dd-designs-link {
    color: #e8a5c8;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    padding: 5px 16px;
    border: 1px solid rgba(232,165,200,0.3);
    border-radius: 16px;
    transition: all 0.2s;
}
.dd-designs-link:hover {
    color: #fff;
    background: rgba(232,165,200,0.12);
    border-color: rgba(232,165,200,0.6);
}

.dd-topbar .dd-user {
    margin-left: auto;
    color: #999;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.dd-topbar .dd-auth-btn {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    background: #4a90e2;
    color: #fff;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
}
.dd-topbar .dd-auth-btn:hover {
    background: #357abd;
}

.dd-autosave-status {
    font-size: 11px;
    color: #666;
    white-space: nowrap;
    transition: color 0.3s;
}
.dd-autosave-status.dirty { color: #e0a040; }
.dd-autosave-status.saved { color: #4aee8a; }

.dd-save-now-btn {
    flex-shrink: 0;
    padding: 3px 10px;
    font-size: 11px;
    background: #1a2a3a;
    border: 1px solid #3a5a7a;
    border-radius: 4px;
    color: #88bbff;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.dd-save-now-btn:hover { background: #243060; }

/* ── 主体三栏布局 ─────────────────────────────────── */
.dd-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ── 左侧工具栏 ───────────────────────────────────── */
.dd-toolbar {
    width: 175px;
    flex-shrink: 0;
    background: #16162a;
    border-right: 1px solid #2e2e4a;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
}

.dd-toolbar section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dd-toolbar label {
    color: #aaa;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

/* 画笔 / 橡皮擦 切换 */
.dd-tool-btns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.dd-tool-btn {
    padding: 6px 4px;
    border: 1.5px solid #444;
    border-radius: 6px;
    background: #252540;
    color: #ccc;
    cursor: pointer;
    font-size: 18px;
    text-align: center;
    transition: background 0.15s, border-color 0.15s;
}

.dd-tool-btn:hover  { background: #32325a; }
.dd-tool-btn.active {
    background: #4a3a8a;
    border-color: #9a7aee;
    color: #fff;
}

/* 颜色预览块 + 选择器 */
.dd-color-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

#dd-color-preview {
    flex: 1;
    height: 28px;
    border-radius: 6px;
    border: 2px solid #555;
    cursor: pointer;
    /* background 由 JS 动态设置 */
}

#dd-color-picker {
    width: 0;
    height: 0;
    opacity: 0;
    position: absolute;
    pointer-events: none;
}

/* 笔触大小预览块（粗细滑块左侧） */
#dd-brush-preview {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 6px;
    border: 2px solid #555;
    display: block;
}

/* 色环弹层 */
.dd-wheel-popup {
    position: fixed;
    z-index: 9999;
    background: #1a1a2e;
    border: 1px solid #3a3a5a;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    min-width: 160px;
}
.dd-wheel-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
.dd-wheel-title {
    color: #aaa;
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.dd-wheel-close {
    background: none;
    border: none;
    color: #888;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}
.dd-wheel-close:hover { color: #fff; background: #3a3a5a; }
#dd-wheel-canvas {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    cursor: crosshair;
    display: block;
}
.dd-wheel-hex-row {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
}
.dd-wheel-hex-label {
    color: #aaa;
    font-size: 13px;
    font-family: monospace;
}
#dd-wheel-hex {
    flex: 1;
    background: #252540;
    border: 1px solid #444;
    border-radius: 5px;
    color: #eee;
    font-size: 13px;
    font-family: monospace;
    padding: 3px 6px;
    text-transform: uppercase;
    outline: none;
}
#dd-wheel-hex:focus { border-color: #9a7aee; }

/* 最近颜色行 */
.dd-recent-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 5px;
}
.dd-recent-colors {
    display: flex;
    gap: 6px;
    flex: 1;
    flex-wrap: wrap;
    overflow: hidden;
}
.dd-recent-swatch {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1.5px solid #555;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.1s;
}
.dd-recent-swatch:hover { border-color: #9a7aee; transform: scale(1.1); }

/* 吸管按鈕 */
.dd-eyedropper-btn {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: #252540;
    border: 1.5px solid #444;
    border-radius: 6px;
    color: #ccc;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.dd-eyedropper-btn:hover   { background: #32325a; border-color: #7a7acc; }
.dd-eyedropper-btn.active  { background: #3a2a6a; border-color: #9a7aee; color: #cca0ff; }

/* 滑块通用 */
.dd-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.dd-val-badge {
    color: #9a7aee;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.dd-slider-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dd-slider-row input[type=range] {
    flex: 1;
    width: 100%;
    height: 4px;
    accent-color: #9a7aee;
    cursor: pointer;
}

.dd-slider-row span {
    display: none;
}

/* 缩放 */
.dd-zoom-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

#dd-zoom-label {
    flex: 1;
    color: #ccc;
    font-size: 12px;
    text-align: center;
    min-width: 38px;
}

.dd-zoom-btn,
#dd-btn-reset-zoom {
    padding: 3px 7px;
    background: #252540;
    border: 1px solid #444;
    border-radius: 4px;
    color: #ccc;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    transition: background 0.15s;
}
.dd-zoom-btn:hover,
#dd-btn-reset-zoom:hover { background: #32325a; }

/* 撤销/重做 */
.dd-undo-row {
    display: flex;
    gap: 6px;
}
.dd-undo-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 4px;
    border: 1px solid #444;
    border-radius: 6px;
    background: #252540;
    color: #ddd;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.15s;
}
.dd-undo-btn:hover:not(:disabled)  { background: #32325a; }
.dd-undo-btn:active:not(:disabled) { background: #3a3a6a; }
.dd-undo-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    border-color: #333;
    color: #777;
}

/* 操作按钮组 */
.dd-action-btns {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dd-btn {
    width: 100%;
    padding: 7px 4px;
    border: 1px solid #444;
    border-radius: 6px;
    background: #252540;
    color: #ddd;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.15s;
    text-align: center;
}

.dd-btn:hover        { background: #32325a; }
.dd-btn.dd-btn-save  { border-color: #6a9aee; color: #8ab4ff; }
.dd-btn.dd-btn-export{ border-color: #6aee9a; color: #8affc0; }
.dd-btn.dd-btn-new   { border-color: #ee9a6a; color: #ffbb88; }

.dd-divider {
    height: 1px;
    background: #2e2e4a;
    margin: 2px 0;
}

/* ── 中间画布区 ───────────────────────────────── */
.dd-canvas-area {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: #1a1a2e;
    overflow: hidden;
    position: relative;
}

#dd-canvas-wrap {
    /* 尺寸由 JS 设置，960×960 */
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
    position: relative;
}

/* ── 右侧面板 ─────────────────────────────────────── */
.dd-panel {
    width: 240px;
    flex-shrink: 0;
    background: #16162a;
    border-left: 1px solid #2e2e4a;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dd-panel-section {
    padding: 10px 10px 8px;
    border-bottom: 1px solid #2e2e4a;
}

.dd-panel-section h3 {
    margin: 0;
    font-size: 12px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dd-panel-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.dd-toggle-model-btn {
    padding: 2px 8px;
    font-size: 11px;
    background: #1e1e3a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #bbb;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.dd-toggle-model-btn:hover { background: #2a2a50; color: #fff; }
.dd-toggle-model-btn--hidden { border-color: #7a3a3a; color: #e08080; }

/* 模特选择按钮组 */
.dd-model-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dd-model-btn {
    flex: 1 1 0;
    min-width: 0;
    aspect-ratio: 1 / 1;
    padding: 3px;
    background: #1a1a30;
    border: 2px solid #3a3a5a;
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s, background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dd-model-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 7px;
    display: block;
}
.dd-model-btn:hover  { border-color: #7a7acc; background: #22224a; }
.dd-model-btn.active {
    border-color: #9a7aee;
    background: #2a1a5a;
    box-shadow: 0 0 0 1px #9a7aee;
}

/* 模特选择下拉（保留但隐藏，供 loadChd 兼容） */
#dd-model-select {
    width: 100%;
    padding: 5px 6px;
    background: #1e1e3a;
    border: 1px solid #444;
    border-radius: 5px;
    color: #ddd;
    font-size: 12px;
}

/* 图层列表区 */
.dd-layer-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dd-layer-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px 6px;
    border-bottom: 1px solid #2e2e4a;
}

.dd-layer-panel-header h3 {
    margin: 0;
    font-size: 12px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#dd-btn-add-layer {
    padding: 3px 10px;
    background: #2a2a50;
    border: 1px solid #5a5a9a;
    border-radius: 4px;
    color: #aaa;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.15s;
}
#dd-btn-add-layer:hover { background: #3a3a6a; color: #fff; }

#dd-layer-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* 图层卡片 */
.dd-layer-card {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 6px;
    background: #1e1e3a;
    border: 1.5px solid #2e2e4a;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
}

.dd-layer-card:hover  { background: #26264a; }
.dd-layer-card.active {
    border-color: #7a5aee;
    background: #22204a;
}

.dd-layer-card[draggable=true] { cursor: grab; }
.dd-layer-card[draggable=true]:active { cursor: grabbing; }

.dd-layer-vis {
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
    user-select: none;
}

.dd-layer-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: #ddd;
}

.dd-rename-btn {
    opacity: 0.5;
    transition: opacity 0.15s;
    font-size: 11px;
    padding: 1px 4px;
}
.dd-layer-card:hover .dd-rename-btn,
.dd-rename-btn:hover {
    opacity: 1;
}

.dd-layer-type {
    width: 52px;
    font-size: 10px;
    padding: 1px 2px;
    background: #12122a;
    border: 1px solid #333;
    border-radius: 3px;
    color: #bbb;
    flex-shrink: 0;
}

.dd-icon-btn {
    padding: 2px 5px;
    background: transparent;
    border: 1px solid #333;
    border-radius: 4px;
    color: #aaa;
    cursor: pointer;
    font-size: 12px;
    flex-shrink: 0;
    transition: background 0.1s;
}

/* Layer overflow menu */
.dd-layer-menu-wrap { display: inline-block; }
.dd-layer-menu-button { font-size: 18px; padding: 4px 8px; border-radius: 6px; }
.dd-layer-menu { min-width: 120px; box-shadow: 0 6px 18px rgba(0,0,0,0.6); }
.dd-layer-menu-item { user-select: none; }
.dd-layer-menu-wrap .dd-layer-menu { display: none; }
.dd-layer-menu-wrap.open .dd-layer-menu { display: block; }

/* 模态重命名对话框 */
.dd-modal-overlay { display: none; align-items: center; justify-content: center; }
.dd-modal-box { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial; }
.dd-modal-input { box-sizing: border-box; }
.dd-modal-btn { background: #2a2a3a; border: 1px solid #3b3b4b; color: #fff; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.dd-modal-btn:hover { background: #333; }
.dd-modal-btn:focus { outline: 3px solid rgba(110,166,255,0.9); outline-offset: 2px; }
.dd-modal-input:focus { outline: 2px solid rgba(110,166,255,0.9); outline-offset: 1px; }

/* 移动端样式：更大按钮和更自适应的对话框 */
@media (max-width: 480px) {
    .dd-modal-box { width: calc(100% - 32px); margin: 6vh auto 0; min-width: 0; padding: 16px; }
    .dd-modal-btn { padding: 12px 16px; font-size: 16px; }
    .dd-modal-input { padding: 12px; font-size: 16px; }
}

/* Ensure visible modal overlay uses flex centering */
.dd-modal-overlay[style*="display: flex"] { display: flex !important; }

/* 图层面板：类型标签颜色 */
.dd-layer-name { font-weight: 600; color: #e6e6e6; }
.dd-layer-name-text { color: inherit; }
.dd-layer-type-label { color: #6fb3ff; margin-right: 6px; font-weight: 500; font-size: 0.95em; }

/* 类型按钮网格 */
.dd-modal-type-grid { width: 100%; }
.dd-type-btn { background: #111; border: 1px solid #444; color: #fff; border-radius: 6px; padding: 8px; display:flex; align-items:center; justify-content:center; min-height:44px; }
.dd-type-btn.selected {
    background: rgba(111,179,255,0.06);
    color: #6fb3ff;
    border: 1.5px solid #6fb3ff;
    box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}
.dd-type-btn:focus { outline: 3px solid rgba(110,166,255,0.18); outline-offset: 2px; }
.dd-modal-type-grid button { min-height: 44px; }
.dd-icon-btn:hover  { background: #32325a; color: #fff; }
.dd-del-btn:hover   { background: #5a2030; color: #ff8888; border-color: #aa3344; }

/* ── 模态弹窗 ─────────────────────────────────────── */
.dd-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.dd-modal {
    background: #1e1e36;
    border: 1px solid #5a5a8a;
    border-radius: 10px;
    padding: 24px 28px;
    min-width: 300px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.7);
}

.dd-modal h2 {
    margin: 0 0 16px;
    font-size: 15px;
    color: #e0e0ff;
}

.dd-modal p {
    color: #bbb;
    font-size: 13px;
    margin: 0 0 16px;
    line-height: 1.6;
}

.dd-modal input[type=text] {
    width: 100%;
    padding: 7px 10px;
    background: #12122a;
    border: 1px solid #555;
    border-radius: 5px;
    color: #eee;
    font-size: 13px;
    margin-bottom: 14px;
    outline: none;
}
.dd-modal input[type=text]:focus { border-color: #7a5aee; }

.dd-modal-btns {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.dd-modal-btns button {
    padding: 7px 18px;
    border-radius: 6px;
    border: 1px solid #555;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.15s;
}

.dd-modal-btns .dd-confirm {
    background: #4a3a8a;
    border-color: #7a5aee;
    color: #fff;
}
.dd-modal-btns .dd-confirm:hover { background: #5a4aaa; }

.dd-modal-btns .dd-export-m {
    background: #1a3a5a;
    border-color: #4a8aee;
    color: #aaddff;
}
.dd-modal-btns .dd-export-m:hover { background: #22447a; }

.dd-modal-btns .dd-export-t {
    background: #1a4a2a;
    border-color: #4aee8a;
    color: #aaffcc;
}
.dd-modal-btns .dd-export-t:hover { background: #225a34; }

.dd-modal-btns .dd-cancel {
    background: #2a2a3a;
    border-color: #444;
    color: #aaa;
}
.dd-modal-btns .dd-cancel:hover { background: #38384a; }

/* 存档弹窗底部两个按钮统一尺寸，颜色略有区别 */
.dd-slots-foot-btn {
    width: auto;
    padding: 7px 18px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid #555;
    cursor: pointer;
    transition: background 0.15s;
}
#dd-btn-load.dd-slots-foot-btn {
    background: #1a2a3a;
    border-color: #4a7aaa;
    color: #88bbee;
}
#dd-btn-load.dd-slots-foot-btn:hover { background: #22364a; }

/* ── 发布弹窗 ──────────────────────────────────────── */
.dd-modal.dd-modal-export { min-width: 300px; max-width: 400px; width: 80vw; }
.dd-export-note {
    color: #aaffcc;
    font-size: 12px;
    margin: 0 0 10px;
    padding: 6px 10px;
    background: rgba(74,238,138,0.08);
    border-left: 3px solid #4aee8a;
    border-radius: 4px;
}
.dd-export-preview-wrap {
    background: #111;
    border: 1px solid #333;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}
.dd-export-preview {
    display: block;
    max-width: 100%;
    max-height: 320px;
    object-fit: contain;
}
.dd-export-actions { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 8px; }
.dd-export-actions .dd-cancel { flex: 1; }

/* 作品介绍输入 */
.dd-export-desc-row {
    margin: 10px 0 12px;
}
.dd-export-desc-row label {
    display: block;
    color: #ccc;
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: 500;
}
.dd-export-desc {
    width: 100%;
    box-sizing: border-box;
    background: #1a1a2e;
    border: 1px solid #3a3a5a;
    border-radius: 6px;
    color: #ddd;
    font-size: 13px;
    padding: 8px 10px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
    transition: border-color 0.2s;
}
.dd-export-desc:focus {
    outline: none;
    border-color: #4aee8a;
    background: #1e1e36;
}
.dd-export-desc::placeholder {
    color: #666;
}

/* 发布按钮 */
.dd-export-pub {
    background: #4a2a8a;
    border-color: #7a4aee;
    color: #ccbbff;
}
.dd-export-pub:hover {
    background: #5a3aaa;
    border-color: #9a6aff;
}

/* 发布状态提示 */
.dd-publish-status {
    font-size: 12px;
    margin-top: 8px;
    text-align: center;
    min-height: 18px;
    line-height: 1.5;
}
.dd-publish-status--loading { color: #ffcc00; }
.dd-publish-status--success { color: #4aee8a; }
.dd-publish-status--error   { color: #ff6666; }

/* 发布提示 */
.dd-export-hint {
    font-size: 11px;
    color: #aaa;
    margin: 0 0 10px;
    padding: 5px 8px;
    background: rgba(255,255,255,0.04);
    border-left: 3px solid #7a7aaa;
    border-radius: 4px;
    line-height: 1.5;
}

/* 元件发布弹窗 */
.dd-modal.dd-modal-comp-export { min-width: 280px; max-width: 380px; width: 80vw; }
.dd-comp-export-info {
    color: #ccc;
    font-size: 13px;
    margin: 0 0 10px;
    padding: 6px 10px;
    background: rgba(122,74,238,0.08);
    border-left: 3px solid #7a4aee;
    border-radius: 4px;
}

/* 图层菜单禁用项 */
.dd-layer-menu-item.disabled { color: #555 !important; cursor: not-allowed !important; pointer-events: none; }

/* ── 滚动条美化 ───────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #666; }

/* ── 本地存档弹窗 ─────────────────────────────────── */
.dd-btn.dd-btn-slots { border-color: #aa7aee; color: #cc99ff; }

.dd-modal.dd-modal-slots { min-width: 360px; max-width: 480px; width: 90vw; }
.dd-modal.dd-modal-del   { min-width: 280px; max-width: 360px; width: 80vw; }
.dd-modal.dd-modal-del p { color: #ddd; font-size: 14px; margin: 8px 0 16px; }
.dd-del-confirm-ok { background: #6a1a1a; border-color: #cc4444; color: #ffaaaa; }
.dd-del-confirm-ok:hover { background: #882222; }
.dd-slot-notice {
    font-size: 11px;
    color: #aaa;
    background: #1a1a2e;
    border: 1px solid #3a3a5a;
    border-radius: 4px;
    padding: 6px 10px;
    margin-bottom: 8px;
    line-height: 1.6;
}

.dd-slot-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 4px;
}

.dd-slot-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: #1e1e3a;
    border-radius: 6px;
    border: 1px solid #2e2e4a;
}
.dd-slot-row--active {
    background: #1a2e1a;
    border-color: #4caf50;
}

.dd-slot-thumb {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 4px;
    background: #111122;
    border: 1px solid #333;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dd-slot-thumb img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    display: block;
}

.dd-slot-info {
    flex: 1;
    font-size: 12px;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dd-slot-btn {
    flex-shrink: 0;
    padding: 3px 10px;
    font-size: 11px;
    border-radius: 4px;
    border: 1px solid #444;
    cursor: pointer;
    transition: background 0.15s;
}
.dd-slot-btn:disabled { opacity: 0.35; cursor: default; }
.dd-slot-load { background: #1a2a4a; color: #88aaff; border-color: #3a5aaa; }
.dd-slot-load:not(:disabled):hover { background: #243060; }
.dd-slot-save { background: #1a3a2a; color: #88ffcc; border-color: #3a7a5a; }
.dd-slot-save:hover { background: #204a30; }
.dd-slot-dl   { background: #2a2a1a; color: #ffdd88; border-color: #7a6a2a; }
.dd-slot-dl:not(:disabled):hover { background: #3a3a20; }
.dd-slot-del  { background: #3a1a1a; color: #ff8888; border-color: #7a3a3a; }
.dd-slot-del:not(:disabled):hover { background: #4a2020; }

/* ── 响应式：小屏折叠 ─────────────────────────────── */
@media (max-width: 1100px) {
    .dd-panel { width: 200px; }
}
@media (max-width: 960px) {
    .dd-main { flex-direction: column; }
    .dd-toolbar { width: 100%; flex-direction: row; flex-wrap: wrap; height: auto; border-right: none; border-bottom: 1px solid #2e2e4a; }
    .dd-panel   { width: 100%; flex-direction: row; height: auto; max-height: 200px; border-left: none; border-top: 1px solid #2e2e4a; }
}
