/* 拼豆 - 组件 */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Comic+Neue:wght@400;700&display=swap');
        
        body {
            font-family: 'Comic Neue', cursive;
            max-width: 1000px;
            margin: 0 auto;
            padding: 20px;
            background-color: #FFF5E6;
            background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23FFD9B3' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
        }

.density-option {
            margin: 0 10px;
            display: inline-block;
            padding: 8px 12px;
            background-color: #FFF9F9;
            border-radius: 6px;
            border: 1px solid #FFD9B3;
            cursor: pointer;
            transition: all 0.3s ease;
        }

.density-option:hover {
            background-color: #FFE6CC;
            transform: translateY(-2px);
        }

.density-option input[type="radio"] {
            margin-right: 5px;
            accent-color: #FF6B6B;
        }

.palette-option {
            margin: 0 5px;
            display: inline-block;
            padding: 8px 10px;
            background-color: #F9FFF9;
            border-radius: 6px;
            border: 1px solid #83d183;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 18px;
        }

.palette-option:hover {
            background-color: #0f7d0f;
            transform: translateY(-2px);
        }

.palette-option input[type="radio"] {
            margin-right: 5px;
            accent-color: lab(42.34% -44.07 33.03 / 0.765);
        }

.brand-option {
            margin: 0 5px;
            display: inline-block;
            padding: 8px 12px;
            background-color: #F9F9FF;
            border-radius: 6px;
            border: 1px solid #A0A0E0;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 18px;
        }

.brand-option:hover {
            background-color: #7070C8;
            color: white;
            transform: translateY(-2px);
        }

.brand-option input[type="radio"] {
            margin-right: 5px;
            accent-color: #5050C8;
        }

.brand-option.disabled-brand,
        .palette-option.disabled-palette {
            opacity: 0.4;
            cursor: not-allowed;
            pointer-events: none;
            filter: grayscale(0.5);
        }

.preview {
            text-align: center;
            margin: 10px;
            background-color: white;
            padding: 15px;
            border-radius: 10px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            border: 2px solid #FFE6CC;
            transition: all 0.3s ease;
        }

.preview:hover {
            transform: translateY(-4px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }

.preview h3 {
            color: #FF8C8C;
            font-family: 'Press Start 2P', cursive;
            font-size: 18px;
            margin-bottom: 18px;
        }

img {
            max-width: 300px;
            max-height: 300px;
            border: 3px solid #FFD9B3;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

canvas {
            max-width: 300px;
            max-height: 300px;
            border: 3px solid #FFD9B3;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

/* === Fused preview & editor modal (Task 4.4) === */

/* zoom modal 内的模式切换按钮:激活态(fused)视觉态 */
#zoomModeToggleButton.active-mode-fused {
    background-color: #FF6B6B !important;
    color: #FFFAF0;
    border-color: #FF6B6B;
}

/* zoom modal 内的烫法效果选项按钮 */
.fuse-effect-option:not(.active-effect):hover {
    background-color: #FFE6CC;
}
.fuse-effect-option.active-effect {
    background-color: #FF6B6B !important;
    color: #FFFAF0 !important;
    border-color: #FF6B6B !important;
}

/* editor modal:相似色色块 + 候选色号按钮 */
#editorSimilarGrid > div,
#editorRecentGrid > div {
    padding: 6px 4px;
    background-color: #FFF9F9;
    border: 1px solid #FFD9B3;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    font-size: 12px;
    transition: all 0.15s ease;
}
#editorSimilarGrid > div:hover,
#editorRecentGrid > div:hover {
    background-color: #FFE6CC;
    transform: translateY(-1px);
}
#editorSimilarGrid > div .swatch {
    display: inline-block;
    width: 100%;
    height: 18px;
    border-radius: 2px;
    margin-bottom: 2px;
    border: 1px solid #ccc;
}
#editorRecentGrid > div.selected-recent {
    outline: 2px solid #FF6B6B;
    outline-offset: 1px;
}

/* editor modal:输入框 + 确认按钮 */
#editorCodeInput:focus {
    outline: none;
    border-color: #FF6B6B;
}
#editorCodeSubmit {
    background-color: #83d183;
    border: 1px solid #0f7d0f;
    border-radius: 4px;
    cursor: pointer;
}
#editorCodeSubmit:hover {
    background-color: #0f7d0f;
    color: white;
}
#editorCancel {
    background-color: #FFF9F9;
    border: 1px solid #FFD9B3;
    border-radius: 4px;
    cursor: pointer;
}
#editorCancel:hover {
    background-color: #FFE6CC;
}

/* === 放大查看 modal (Task 6.x) === */

/* 米底按钮覆盖全局 button 的白字(全局 button 默认红底白字;米底配白字看不清) */
#fusedPreviewZoomButton,
#closeZoom,
#editorCancel,
#zoomModeToggleButton {
    color: #333;
}

/* 放大按钮 hover */
#fusedPreviewZoomButton:not(:disabled):hover {
    background-color: #FFE6CC;
}
#fusedPreviewZoomButton:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: #999;
}

/* 放大 modal 内的 canvas 解除 300px 上限,跟随包裹容器滚动 */
#zoomCanvas {
    max-width: none !important;
    max-height: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    display: block;
}

/* 关闭按钮风格 */
#closeZoom {
    background-color: #FFF9F9;
    border: 1px solid #FFD9B3;
    border-radius: 4px;
    cursor: pointer;
}
#closeZoom:hover {
    background-color: #FFE6CC;
}
