/* GIAO DIỆN SOFT BRUTALISM - IMAGE COLOR PICKER */
.tool-container {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    max-width: 1100px; margin: 20px auto;
    border: 3px solid #111111; border-radius: 12px;
    box-shadow: 6px 6px 0px #111111; padding: 30px;
    background: #ffffff; color: #111111; box-sizing: border-box;
}

h2.tool-title {
    font-family: 'Montserrat', sans-serif; font-size: 2rem; text-align: center;
    text-transform: uppercase; margin-top: 0; margin-bottom: 25px; font-weight: 900;
}

/* Upload Zone */
.upload-zone {
    border: 4px dashed #111111; border-radius: 12px; background-color: #f4f4f4;
    padding: 60px 20px; text-align: center; cursor: pointer; transition: background-color 0.2s, transform 0.2s;
}
.upload-zone:hover, .upload-zone.dragover { background-color: #e2f0cb; transform: scale(1.02); }
.upload-icon { font-size: 3rem; display: block; margin-bottom: 15px; }
.upload-zone h3 { margin: 0 0 10px 0; font-family: 'Montserrat', sans-serif; font-size: 1.3rem; }
.upload-zone p { margin: 5px 0; color: #555; font-weight: 600; }
.privacy-note { color: #5FB376 !important; font-size: 0.9rem; margin-top: 15px !important; }

/* Workspace */
.main-layout { display: grid; grid-template-columns: 2fr 1.2fr; gap: 30px; }

/* Cột Trái: Canvas */
.image-panel { display: flex; flex-direction: column; gap: 15px; }

.canvas-wrapper {
    width: 100%; position: relative; border: 3px solid #111111; border-radius: 8px;
    background-color: #eee; overflow: hidden; box-shadow: 4px 4px 0px #111111;
    display: flex; justify-content: center; align-items: center; cursor: crosshair;
}

canvas { max-width: 100%; max-height: 600px; display: block; }

/* Kính lúp màu */
.magnifier {
    position: absolute; width: 60px; height: 60px; border: 3px solid #111111;
    border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%);
    box-shadow: 0 0 0 3px #fff, 4px 4px 0px rgba(17,17,17,0.5); display: none; z-index: 10;
}

.action-buttons-bottom button {
    cursor: pointer; font-family: 'Montserrat', sans-serif; font-size: 1rem;
    font-weight: 900; padding: 12px 15px; border: 3px solid #111111; border-radius: 8px;
    box-shadow: 4px 4px 0px #111111; transition: transform 0.1s, box-shadow 0.1s;
    text-transform: uppercase; color: #111111; outline: none; width: 100%;
    background-color: #eceae4;
}
.action-buttons-bottom button:active { transform: translate(4px, 4px); box-shadow: 0px 0px 0px #111111; }

/* Cột Phải: Thông tin & Lịch sử */
.info-panel { display: flex; flex-direction: column; gap: 20px; }

.current-color-card {
    background-color: #fdfd96; border: 3px solid #111111; border-radius: 8px;
    padding: 20px; box-shadow: 4px 4px 0px #111111; text-align: center;
}
.current-color-card h4 { margin: 0 0 15px 0; font-family: 'Montserrat', sans-serif; font-size: 1.1rem; }

.color-preview-box {
    width: 100%; height: 80px; border: 3px solid #111111; border-radius: 8px;
    background-color: #ffffff; margin-bottom: 15px;
}

.color-codes { background-color: #fff; border: 2px solid #111; padding: 10px; border-radius: 6px; text-align: left; margin-bottom: 15px;}
.code-line { margin-bottom: 5px; font-size: 1rem; display: flex; justify-content: space-between;}
.code-line:last-child { margin-bottom: 0; }
.code-label { font-weight: 700; color: #555; }
.code-line strong { font-family: 'Montserrat', monospace; font-size: 1.1rem; }

.current-color-card small { font-weight: 700; color: #e05a47; }

/* Danh sách màu đã pick */
.picked-colors-card {
    background-color: #f9f9f9; border: 3px solid #111111; border-radius: 8px;
    padding: 20px; box-shadow: 4px 4px 0px #111111; flex: 1; display: flex; flex-direction: column;
}

.picked-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; border-bottom: 2px dashed #ccc; padding-bottom: 10px;}
.picked-header h4 { margin: 0; font-family: 'Montserrat', sans-serif; font-size: 1.1rem; }
.btn-small {
    background-color: #ffb7b2; border: 2px solid #111; border-radius: 4px;
    padding: 5px 10px; font-size: 0.8rem; font-weight: 800; cursor: pointer; box-shadow: 2px 2px 0px #111;
}
.btn-small:active { transform: translate(2px,2px); box-shadow: 0px 0px 0px #111; }

.picked-list { flex: 1; max-height: 350px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.empty-state { color: #888; font-style: italic; font-weight: 600; text-align: center; margin-top: 20px; }

/* Dòng màu trong lịch sử */
.picked-item {
    display: flex; align-items: center; gap: 10px; background-color: #fff;
    border: 2px solid #111; border-radius: 6px; padding: 8px; box-shadow: 2px 2px 0px #111;
}
.picked-swatch { width: 40px; height: 40px; border: 2px solid #111; border-radius: 4px; }
.picked-info { flex: 1; display: flex; flex-direction: column; }
.picked-hex { font-weight: 900; font-family: 'Montserrat', monospace; font-size: 1rem; cursor: pointer; transition: color 0.1s;}
.picked-hex:hover { color: #2d7bb5; }
.picked-rgb { font-size: 0.75rem; color: #666; font-weight: 600; }

/* Toast */
#toastColorPicker {
    visibility: hidden; min-width: 200px; background-color: #111111; color: #ffffff;
    text-align: center; border-radius: 8px; padding: 12px; position: fixed;
    z-index: 9999; bottom: 30px; left: 50%; transform: translateX(-50%);
    font-weight: bold; opacity: 0; transition: opacity 0.3s, bottom 0.3s;
}
#toastColorPicker.show { visibility: visible; opacity: 1; bottom: 50px; }

@media (max-width: 850px) {
    .main-layout { grid-template-columns: 1fr; }
}