/* ======================================================== */
/* ⬇️ 内部软件4：装修 (7组件编辑器 - 磨砂玻璃优化版) ⬇️ */
/* ======================================================== */

.deco-app-overlay { background-color: #E8E8ED; }

.deco-main-container {
    flex: 1; display: flex; flex-direction: column; width: 100%; height: 100%;
    padding-top: calc(5px + var(--safe-top));
    overflow: hidden; box-sizing: border-box;
    opacity: 0; transition: opacity 0.3s ease-in 0.1s;
}
.deco-app-overlay.active .deco-main-container { opacity: 1; }

/* ==========================================
   🌟 顶部浏览器标签栏 (紧凑三标签)
========================================== */
.deco-tab-bar {
    width: 100%; background: #DDDDE1;
    padding: 6px 8px 0 8px; flex-shrink: 0;
    display: flex; align-items: flex-end; gap: 3px; z-index: 5;
}
.deco-tab {
    display: flex; align-items: center; justify-content: center;
    gap: 4px; padding: 7px 8px;
    border-radius: 8px 8px 0 0; cursor: pointer;
    transition: all 0.2s ease; -webkit-tap-highlight-color: transparent;
    min-width: 0; flex: 1;
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid transparent; border-bottom: none;
}
.deco-tab:active { transform: scale(0.97); }
.deco-tab-icon { width: 12px; height: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.deco-tab-icon svg { width: 11px; height: 11px; color: #888; }
.deco-tab-text {
    font-size: 11px; font-weight: 500; color: #666;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    flex: 1; min-width: 0; transition: color 0.2s;
}
.deco-tab-close {
    width: 14px; height: 14px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; cursor: pointer; opacity: 0; pointer-events: none;
}
.deco-tab-close svg { width: 8px; height: 8px; color: #888; }
.deco-tab.active {
    background: #ffffff; border-color: rgba(0, 0, 0, 0.08);
    z-index: 10; box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.04);
}
.deco-tab.active .deco-tab-text { color: #111; font-weight: 700; }
.deco-tab.active .deco-tab-icon svg { color: #333; }
.deco-tab.active .deco-tab-close { opacity: 1; pointer-events: auto; }
.deco-tab-add {
    width: 24px; height: 24px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; flex-shrink: 0; margin-bottom: 3px; margin-left: 1px;
}
.deco-tab-add svg { width: 12px; height: 12px; color: #777; }
.deco-tab-add:active { background: rgba(0, 0, 0, 0.08); transform: scale(0.9); }

/* ==========================================
   🌟 页面内容
========================================== */
.deco-page-content {
    flex: 1; background: #ffffff; overflow-y: auto;
    padding: 0 0 calc(20px + var(--safe-bottom)) 0;
}
.deco-page-content::-webkit-scrollbar { display: none; }
.deco-page-content { -ms-overflow-style: none; scrollbar-width: none; }
.deco-page { display: none; flex-direction: column; animation: deco-fade-in 0.2s ease-out; }
.deco-page.active { display: flex; }
@keyframes deco-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================
   🌟 旋转磨砂预览舞台 (阴影大幅收敛)
========================================== */
.deco-preview-stage {
    width: 100%; min-height: 265px;
    display: flex; align-items: center; justify-content: center;
    position: relative;
    background: linear-gradient(180deg, #F0F0F3 0%, #F7F7F9 50%, #ffffff 100%);
    overflow: hidden; flex-shrink: 0; padding: 25px 0 15px 0;
}
.deco-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 20; transition: transform 0.2s;
}
.deco-arrow svg { width: 16px; height: 16px; color: #555; }
.deco-arrow:active { transform: translateY(-50%) scale(0.85); }
.deco-arrow-left { left: 10px; }
.deco-arrow-right { right: 10px; }

/* 🌟 旋转磨砂白卡片 — 阴影极度收敛 */
.deco-glass-card {
    width: 210px; min-height: 210px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    /* 🌟 阴影极度收敛：只保留极轻的底部投影 */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    transform: rotate(-6deg);
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex; flex-direction: column; align-items: center;
    padding: 12px 12px 14px 12px; position: relative; z-index: 10;
    overflow: hidden;
}
.deco-glass-card.swing-left { transform: rotate(-14deg) translateX(-15px) scale(0.94); }
.deco-glass-card.swing-right { transform: rotate(4deg) translateX(15px) scale(0.94); }

.deco-card-badge {
    background: rgba(0, 0, 0, 0.04); color: #999;
    font-size: 8px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase;
    padding: 2px 10px; border-radius: 20px; white-space: nowrap;
    margin-bottom: 6px; align-self: center;
}

/* 🌟 预览内容盒 — 反旋转让组件正着显示 */
.deco-preview-box {
    width: 100%; flex: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; overflow: hidden;
    /* 🌟 核心：反向旋转6度，让内部组件保持正向水平 */
    transform: rotate(6deg);
}

/* 预览小元素 */
.dp-avatar { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; border: 2px solid rgba(255,255,255,0.8); box-shadow: 0 1px 4px rgba(0,0,0,0.05); background: #eee; }
.dp-circle { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,0.03); }
.dp-text { font-size: 10px; font-weight: 600; text-align: center; max-width: 95%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-text-s { font-size: 8px; font-weight: 500; text-align: center; max-width: 95%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-bubble { padding: 3px 7px; border-radius: 6px; font-size: 7px; font-weight: 600; max-width: 100px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-row { display: flex; align-items: center; gap: 5px; }
.dp-col { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.dp-icon-box { width: 30px; height: 22px; background: #fff; border-radius: 3px; box-shadow: 0 1px 2px rgba(0,0,0,0.03); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.dp-icon-box img { width: 100%; height: 100%; object-fit: cover; }
.dp-dock { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 5px 10px; border-radius: 14px; }
.dp-dock-icon { width: 24px; height: 24px; background: #fff; border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,0.03); overflow: hidden; }
.dp-dock-icon img { width: 100%; height: 100%; object-fit: cover; }
.dp-search { display: flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 20px; }

/* 页码指示器 */
.deco-dots { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 8px 0 5px 0; flex-shrink: 0; }
.deco-dot { width: 5px; height: 5px; border-radius: 50%; background: #ddd; transition: all 0.3s; cursor: pointer; }
.deco-dot.active { background: #111; width: 16px; border-radius: 3px; }

/* ==========================================
   🌟 编辑面板 — 磨砂玻璃卡片风格
========================================== */
.deco-editor-panel {
    padding: 5px 15px 0 15px;
    display: flex; flex-direction: column; gap: 8px;
}

/* 🌟 每一行编辑项：白色磨砂玻璃效果 */
.deco-edit-row {
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-radius: 14px;
    padding: 11px 14px;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.deco-edit-label {
    font-size: 12px; font-weight: 600; color: #555;
    flex-shrink: 0; min-width: 52px; letter-spacing: 0.2px;
}

.deco-edit-input {
    flex: 1; border: none;
    background: rgba(245, 245, 247, 0.8);
    border-radius: 10px;
    padding: 9px 12px; font-size: 12px; color: #111; font-weight: 500;
    outline: none; min-width: 0;
    transition: background 0.2s;
}
.deco-edit-input:focus { background: #fff; box-shadow: 0 0 0 1.5px rgba(0,0,0,0.06); }
.deco-edit-input::placeholder { color: #c0c0c0; }

.deco-edit-color-wrapper { display: flex; align-items: center; gap: 8px; flex: 1; }
.deco-edit-color-input {
    width: 34px; height: 34px; border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    cursor: pointer; padding: 0; background: none;
    -webkit-appearance: none; overflow: hidden;
    transition: transform 0.15s;
}
.deco-edit-color-input:active { transform: scale(0.92); }
.deco-edit-color-input::-webkit-color-swatch-wrapper { padding: 0; }
.deco-edit-color-input::-webkit-color-swatch { border: none; border-radius: 8px; }
.deco-edit-color-hex {
    font-size: 11px; font-family: -apple-system, monospace;
    font-weight: 600; color: #999; letter-spacing: 0.3px;
}

.deco-edit-avatar-row { display: flex; align-items: center; gap: 10px; flex: 1; }
.deco-edit-avatar-preview {
    width: 34px; height: 34px; border-radius: 10px;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    background: #f0f0f0; flex-shrink: 0;
}
.deco-edit-avatar-btns { display: flex; gap: 6px; }
.deco-avatar-btn {
    padding: 6px 12px;
    background: rgba(245, 245, 247, 0.9);
    border-radius: 8px; font-size: 11px; font-weight: 700;
    color: #444; cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.deco-avatar-btn:active { background: #eaeaea; transform: scale(0.95); }

.deco-edit-range-wrapper { display: flex; align-items: center; gap: 8px; flex: 1; }
.deco-edit-range {
    flex: 1; -webkit-appearance: none; height: 3px;
    background: rgba(0,0,0,0.08); border-radius: 2px; outline: none;
}
.deco-edit-range::-webkit-slider-thumb {
    -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 5px rgba(0,0,0,0.12); cursor: pointer;
}
.deco-edit-range-val { font-size: 11px; font-weight: 700; color: #555; min-width: 28px; text-align: center; }

/* ==========================================
   🌟 底部保存按钮
========================================== */
.deco-save-row { display: flex; gap: 10px; padding: 20px 15px 10px 15px; flex-shrink: 0; }
.deco-save-btn {
    flex: 1; padding: 14px 0; border-radius: 14px; font-size: 13px; font-weight: 700;
    text-align: center; cursor: pointer; transition: transform 0.15s;
}
.deco-save-btn:active { transform: scale(0.96); }
.deco-save-btn.outline { background: rgba(245,245,247,0.9); color: #666; }
.deco-save-btn.primary { background: #111; color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

.deco-empty-hint { text-align: center; padding: 80px 20px; color: #ccc; font-size: 13px; font-weight: 600; letter-spacing: 1px; }
#deco-avatar-file-input { display: none; }

/* ==========================================
   🌟 字体管理页面专属样式 (高级白色磨砂)
========================================== */
.font-preview-card {
    margin: 15px 15px 0 15px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(25px) saturate(150%);
    -webkit-backdrop-filter: blur(25px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    padding: 24px 20px 20px 20px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    display: flex; flex-direction: column; gap: 12px;
}
.font-preview-label {
    position: absolute; top: 12px; right: 16px;
    font-size: 9px; font-weight: 800; letter-spacing: 2px;
    color: #b0b0b0; text-transform: uppercase;
}
.font-preview-zh { font-size: 14px; font-weight: 500; color: #111; line-height: 1.6; text-align: justify; }
.font-preview-en { font-size: 12px; font-weight: 400; color: #888; line-height: 1.5; font-style: italic; }
.font-preview-size-tag {
    align-self: flex-end;
    background: #111; color: #fff;
    font-size: 10px; font-weight: 800;
    padding: 4px 10px; border-radius: 12px;
    letter-spacing: 0.5px;
}

.font-section-title { font-size: 14px; font-weight: 800; color: #222; padding: 18px 18px 0 18px; letter-spacing: 0.3px; }

.font-import-card, .font-size-card, .font-scope-card, .font-bind-card {
    margin: 8px 15px 0 15px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px; padding: 14px;
    display: flex; flex-direction: column; gap: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.font-import-row { display: flex; align-items: center; gap: 10px; }
.font-import-label { font-size: 12px; font-weight: 700; color: #555; min-width: 52px; flex-shrink: 0; }
.font-import-input {
    flex: 1; border: none; background: rgba(245, 245, 247, 0.8);
    border-radius: 10px; padding: 9px 12px; font-size: 12px; color: #111; font-weight: 500;
    outline: none; min-width: 0; transition: background 0.2s;
}
.font-import-input:focus { background: #fff; box-shadow: 0 0 0 1.5px rgba(0,0,0,0.06); }
.font-import-input::placeholder { color: #ccc; font-size: 11px; }
.font-import-actions { display: flex; gap: 8px; margin-top: 4px; }

.font-action-btn {
    flex: 1; padding: 12px 0; border-radius: 12px; font-size: 13px; font-weight: 700; text-align: center;
    cursor: pointer; transition: transform 0.15s; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.font-action-btn:active { transform: scale(0.96); }
.font-action-btn.outline { background: rgba(245,245,247,0.9); color: #555; }
.font-action-btn.primary { background: #111; color: #fff; box-shadow: 0 3px 10px rgba(0,0,0,0.1); }
.font-action-btn.dark { background: #333; color: #fff; }
.font-action-btn.danger { background: #ff3b30; color: #fff; }

.font-size-row { display: flex; align-items: center; justify-content: space-between; }
.font-size-label { font-size: 13px; font-weight: 700; color: #333; }
.font-size-control { display: flex; align-items: center; gap: 12px; }
.font-size-btn {
    width: 32px; height: 32px; border-radius: 10px; background: rgba(245, 245, 247, 0.9);
    display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: #333;
    cursor: pointer; transition: transform 0.1s; box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.font-size-btn:active { transform: scale(0.9); background: #e8e8ea; }
.font-size-value { font-size: 18px; font-weight: 800; color: #111; min-width: 28px; text-align: center; font-family: monospace; }

.font-scope-card { padding: 0; overflow: hidden; }
.font-scope-option {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer;
    transition: background 0.15s; border-bottom: 1px solid rgba(0,0,0,0.03);
}
.font-scope-option:last-child { border-bottom: none; }
.font-scope-option:active { background: rgba(0,0,0,0.02); }
.font-scope-radio {
    width: 18px; height: 18px; border-radius: 50%; border: 2px solid #ccc; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; transition: border-color 0.2s;
}
.font-scope-radio::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: transparent; transition: background 0.2s; }
.font-scope-option.active .font-scope-radio { border-color: #111; }
.font-scope-option.active .font-scope-radio::after { background: #111; }
.font-scope-info { display: flex; flex-direction: column; gap: 2px; }
.font-scope-name { font-size: 13px; font-weight: 700; color: #222; }
.font-scope-desc { font-size: 10px; color: #999; font-weight: 500; }

.font-bind-hint { font-size: 11px; color: #888; font-weight: 500; margin-bottom: 10px; line-height: 1.4; }
.font-bind-list { display: flex; flex-wrap: wrap; gap: 8px; }
.font-bind-chip {
    padding: 6px 14px; border-radius: 20px; font-size: 11px; font-weight: 700; cursor: pointer;
    transition: all 0.2s; user-select: none; background: rgba(245, 245, 247, 0.9); color: #555; border: 1px solid transparent;
}
.font-bind-chip.active { background: #111; color: #fff; border-color: #111; }
.font-bind-chip:active { transform: scale(0.95); }

.font-plans-list { margin: 8px 15px 0 15px; display: flex; flex-direction: column; gap: 8px; }
.font-empty-hint { text-align: center; padding: 25px; color: #ccc; font-size: 12px; font-weight: 600; background: rgba(255,255,255,0.5); border-radius: 14px; }
.font-plan-item {
    background: rgba(255, 255, 255, 0.65); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 14px; padding: 12px 14px;
    display: flex; align-items: center; justify-content: space-between; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
.font-plan-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.font-plan-name { font-size: 13px; font-weight: 700; color: #222; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.font-plan-meta { font-size: 10px; color: #999; font-weight: 500; }
.font-plan-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.font-plan-btn { padding: 5px 10px; border-radius: 8px; font-size: 11px; font-weight: 700; cursor: pointer; transition: transform 0.1s; }
.font-plan-btn:active { transform: scale(0.92); }
.font-plan-btn.delete { background: #ffe5e5; color: #ff3b30; }


.font-bottom-actions { display: flex; gap: 8px; padding: 20px 15px 15px 15px; }
