.iwb-container {
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.iwb-header {
    background: #2271b1;
    color: white;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
}

.iwb-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.iwb-toolbar {
    background: #f0f0f1;
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
}

.iwb-tool-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.iwb-tool-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.iwb-tool-btn:hover {
    border-color: #2271b1;
    background: #f6f7f7;
}

.iwb-tool-btn.active {
    background: #2271b1;
    border-color: #2271b1;
    color: white;
}

.iwb-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
}

.iwb-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.iwb-color-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

#iwb-color {
    width: 50px;
    height: 35px;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
}

.iwb-slider-label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 14px;
    min-width: 150px;
}

.iwb-slider-label input[type="range"] {
    width: 100%;
}

.iwb-actions {
    margin-left: auto;
}

.iwb-btn {
    padding: 8px 16px;
    border: 1px solid #2271b1;
    background: white;
    color: #2271b1;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.iwb-btn:hover {
    background: #2271b1;
    color: white;
}

.iwb-btn-primary {
    background: #2271b1;
    color: white;
}

.iwb-btn-primary:hover {
    background: #135e96;
}

.iwb-btn-success {
    border-color: #00a32a;
    color: #00a32a;
}

.iwb-btn-success:hover {
    background: #00a32a;
    color: white;
}

.iwb-canvas-wrapper {
    position: relative;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

#iwb-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

#iwb-canvas.text-mode {
    cursor: text;
}

.iwb-text-input {
    position: absolute;
    border: 2px dashed #2271b1;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px;
    outline: none;
    font-family: Arial, sans-serif;
    resize: none;
    overflow: hidden;
}

.iwb-message {
    margin-top: 10px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
}

.iwb-message.success {
    background: #d5f5e3;
    color: #00a32a;
    border: 1px solid #00a32a;
    display: block;
}

.iwb-message.error {
    background: #f8d7da;
    color: #d63638;
    border: 1px solid #d63638;
    display: block;
}

@media (max-width: 768px) {
    .iwb-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .iwb-tool-group {
        width: 100%;
        justify-content: center;
    }
    
    .iwb-actions {
        margin-left: 0;
        justify-content: center;
    }
}