body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 20px;
    margin-bottom: 20px;
}

.grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fafafa;
}

.image-container {
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #eee;
    border: 1px solid #ccc;
}

canvas {
    max-width: 100%;
    max-height: 100%;
}

p {
    margin: 10px 0;
    font-size: 16px;
    text-align: center;
}

.slider-container {
    display: flex;
    align-items: center;
    width: 100%;
    margin-top: 10px;
}

.slider {
    flex: 1;
    margin-right: 10px;
}

#thresholdValue {
    min-width: 30px;
    text-align: right;
}

.upload-container {
    text-align: center;
    margin-top: 20px;
}

#imageUpload {
    display: none;
}

.upload-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.upload-btn:hover {
    background-color: #45a049;
}