/* ================================================================
   菜刀客在线工具页 · image-blur.html 私有样式
   需在 /css/common.css 之后加载。
   ================================================================ */

/* ---- 隐私提示条 ---- */
.privacy-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    color: #166534;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 15px;
    text-align: center;
    justify-content: center;
}

.privacy-notice .icon {
    font-size: 18px;
    flex-shrink: 0;
}

/* ---- 上传区 ---- */
.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.upload-area.dragover {
    border-color: #667eea;
    background: #eef2ff;
}

.upload-area .icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.upload-area .upload-text {
    color: #6b7280;
    font-size: 14px;
}

.upload-area .upload-text strong {
    color: #667eea;
}

.upload-area .upload-tip {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 8px;
}

/* ---- 文件信息卡片 ---- */
.info-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.info-card .thumb {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
    background: #fff;
}

.info-card .meta {
    flex: 1;
    min-width: 0;
}

.info-card .name {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info-card .dims,
.info-card .size {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}

.btn-remove {
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
}

.btn-remove:hover {
    color: #dc2626;
}

/* ---- 模糊类型 ---- */
.effect-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.effect-bar .btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 6px 4px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.effect-bar .btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.effect-bar .btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
}

/* ---- 参数滑杆 ---- */
.param-row {
    width: 100%;
}

.param-row input[type="range"] {
    width: 100%;
    accent-color: #667eea;
    cursor: pointer;
}

.val {
    font-weight: 600;
    color: #667eea;
    font-variant-numeric: tabular-nums;
}

.tip {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 400;
}

/* ---- 操作按钮（左面板） ---- */
.region-actions {
    display: flex;
    gap: 6px;
}

.region-actions .btn {
    flex: 1;
    font-size: 12px;
    padding: 6px 8px;
}

.region-actions .btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.region-actions .btn:not(:disabled) {
    color: #fff;
}

#btnUndo:not(:disabled) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
}

#btnUndo:not(:disabled):hover {
    filter: brightness(1.1);
}

#btnClear:not(:disabled) {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    border-color: transparent;
}

#btnClear:not(:disabled):hover {
    filter: brightness(1.1);
}

/* ---- 区域记录（outputStatus 下方） ---- */
.region-records {
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 10px 12px;
}

.region-records-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.region-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 84px;
    overflow-y: auto;
}

.region-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 12px;
    color: #374151;
    white-space: nowrap;
}

.region-name {
    font-weight: 600;
}

.region-type {
    font-size: 11px;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    background: #eef2ff;
    color: #667eea;
    white-space: nowrap;
}

.region-type.mosaic {
    background: #fef2f2;
    color: #ef4444;
}

.region-dims {
    color: #9ca3af;
    font-variant-numeric: tabular-nums;
}

.region-del {
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 14px;
    cursor: pointer;
    padding: 2px 4px;
}

.region-del:hover {
    color: #dc2626;
}

/* ---- 画布区域 ---- */
.canvas-stage {
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f2f3f5;
    background-image: radial-gradient(circle, #e2e3e7 1px, transparent 1px);
    background-size: 16px 16px;
    padding: 12px;
    overflow: auto;
}

.canvas-stage canvas {
    max-width: 100%;
    max-height: 72vh;
    width: auto;
    height: auto;
    cursor: crosshair;
    touch-action: none;
    background: #fff;
    box-shadow: 0 0 0 1px #d1d5db, 0 2px 8px rgba(0, 0, 0, 0.08);
}

.canvas-stage .empty-state {
    margin: 20px;
}

@media (max-width: 600px) {
    .effect-bar {
        justify-content: center;
    }
}